[MITgcm-devel] f77 question
Jean-Michel Campin
jmc at ocean.mit.edu
Fri Oct 7 11:22:17 EDT 2005
Hi Martin,
> Is it legal (it seems to work for me) to pass only
> part of the field as in:
> call
> obcs_apply_ptracer(bi,bj,k,itracer,gPtr(1-Olx,1-
> Oly,k,bi,bj,iTracer),myThid)
> so that I pass the address of the beginning of the 2D-field? Or do I
> have to have two routines that do essentially the same (as in
> obcs_apply_ts and obcs_apply_tloc and obcs_apply_sloc)?
This should not cause problems, but you need to be carefull about
what you are passing.
And this is already done in few places, specially with ptracers:
for e.g., in PTRACERS_FIELDS_BLOCKING_EXCH :
_EXCH_XYZ_R8(pTracer(1-Olx,1-Oly,1,1,1,iTracer),myThid)
and inside EXCH_XYZ, the argument array is declared 5.D
or in shap_filt_uv_s2.F
CALL MOM_CALC_HDIV(bi,bj,k,2,
I tmpFldU(1-OLx,1-OLy,k,bi,bj),
I tmpFldV(1-OLx,1-OLy,k,bi,bj),
& hDiv,myThid)
with the 2 arguments arrays (corresponding to tmpFldU & tmpFldV) being
declared as 2.D arrays inside MOM_CALC_HDIV.
Cheers,
Jean-Michel
More information about the MITgcm-devel
mailing list