[MITgcm-devel] f77 question

Martin Losch mlosch at awi-bremerhaven.de
Fri Oct 7 11:56:33 EDT 2005


Thanks Jean-Michel and Baylor
I am still a little surprised that this works, but if that's the way it 
is I will do it this way.

Martin

On Oct 7, 2005, at 5:22 PM, Jean-Michel Campin wrote:

> 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
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel




More information about the MITgcm-devel mailing list