[MITgcm-support] How to specify location in parallel field?
Jean-Michel Campin
jmc at ocean.mit.edu
Fri Jul 18 09:53:18 EDT 2008
Hi David,
The usual way to identify 1 particular grid point is to
test the coordinate: xC,yC for grid-cell center, xG,yG
for grid-cell corner (longitude,latidude is usingSphericalPolarGrid
or usingCurvilinearGrid, or just distance in meter if usingCartesianGrid).
This way you don't have to worry about tile domain-decomposition
and processor/thread issues.
The other way (more tricky) is to use myXGlobalLo & myYGlobalLo
which refer to the starting indices in a "global index map" (with exch2
special case), see e.g., pkg/mdsio/mdsio_read_field.F, lines 423-425.
Jean-Michel
On Thu, Jul 17, 2008 at 02:28:32PM -0500, David Hebert wrote:
> Hello all,
>
> I would like to set the velocity field to a specific value at a specific
> location in the code (say, global gridpoint x,y,z). If I understand
> properly, in a parallel run each processor has its own range of elements
> with indices that are not necessarily the same as global indicies. Is
> there a function out there or a method I haven't found yet that will
> allow me to specify a global gridpoint and convert to local processor
> and local gridpoint?
>
> Thanks,
>
> David
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list