[MITgcm-devel] f77 question
Martin Losch
mlosch at awi-bremerhaven.de
Fri Oct 7 10:29:39 EDT 2005
Hi,
I am fighting with f77 and open boundary conditions for passive tracers
(ptracers).
I would like to have a single routine that applies the OBCs to ptracer,
but this needs to be called from different places in the code, sometime
the full ptracers if available, sometimes it isn't, e.g., in
gad_advection only a 2D horizontal slab is available. For this case,
for T and S, there is a obcs_apply_tloc and obcs_apply_sloc, but I was
wondering whether it would be possible to do this with one routine in
which I declare a 2D field pFld, which is a formal parameter of my
subrountine obcs_apply_ptracer. In gad_advection, I don't have any
problems, because only a 2D field is passed, but in other places I have
the full 5D+1D field, e.g., in ptracers_implicit, or
ptracers_integrate. 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)?
(You'd better answer, eventually this will make it into the repository
(o: )
Martin
More information about the MITgcm-devel
mailing list