[MITgcm-support] data precision

Martin Losch Martin.Losch at awi.de
Thu Jan 8 02:54:12 EST 2009

Hi 名 徐,

(I still cannot transcribe your name (o:)

the readBinaryPrec flag pertains only to input data (such as  
bathymetry, inital conditions, open boundary values, forcing fields,  
grid fields etc.) If you use the pkg/exf, then those fields can be  
handled separately. Likewise writeBinaryPrec controls the precision  
of the output fields that the model will produce for you.

Regardless of these flags, all floats are defined and handled as  
real*8 (there is a macro in the code "_RL" that expands to real*8 and  
one "_RS" that also expands to real*8, unless you redefine it, but  
that's not really recommended), and you cannot/must not/do not have  
any sensible reason to change that. All *_R8/RL routines handle _RL  
variables and all *_R4/RS handle _RS variables, but for most (nearly  
all) people _RL and _RS are really the same (that is, real*8). So  
nothing to worry about.


PS. Thinking about your obcs balance problem, balancing the inflow  
offline will be far more effective, if your input fields are real*8  
(readBinaryPrec=64), in fact I recommend doing it that way.

On 8 Jan 2009, at 05:40, 名 徐 wrote:

> Dear all
>      The default value of readBinaryPrec(writeBinaryPrec) is 32 in  
> data PARM01.Does it imply the input data  precision must be 32 
> (single precision,real*4).But many subroutines have been call on   
> the program read data on double precision(64,real*8) ,such as  
> global_sum_R8 in cg3d.F.Is it a bug?How can I conform it!
> Thanks
> 好玩贺卡等你发,邮箱贺卡全新上线!
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support

More information about the MITgcm-support mailing list