[MITgcm-support] S/R exf_check_range error
Matthew Mazloff
mmazloff at MIT.EDU
Fri Sep 29 16:18:49 EDT 2006
Hi Dmitri,
exf_iprec is the read precision, not the internal model precision.
The model I/O is handled by the mdsio package (unless you use the mnc
package). You can see what the read parameters are in, for example,
mdsio_readfield.F:
SUBROUTINE MDSREADFIELD(
I fName,
I filePrec,
I arrType,
I nNz,
O arr,
I irecord,
I myThid )
C
C Arguments:
C
C fName string base name for file to read
C filePrec integer number of bits per word in file (32 or 64)
C arrType char(2) declaration of "arr": either "RS" or "RL"
C nNz integer size of third dimension: normally either 1 or Nr
C arr RS/RL array to read into, arr(:,:,nNz,:,:)
C irecord integer record number to read
C myThid integer thread identifier
C
C MDSREADFIELD first checks to see if the file "fName" exists, then
C if the file "fName.data" exists and finally the tiled files of the
C form "fName.xxx.yyy.data" exist. Currently, the meta-files are not
C read because it is difficult to parse files in fortran.
C The precision of the file is decsribed by filePrec, set either
C to floatPrec32 or floatPrec64. The precision or declaration of
C the array argument must be consistently described by the char*(2)
C string arrType, either "RS" or "RL". nNz allows for both 2-D and
C 3-D arrays to be handled. nNz=1 implies a 2-D model field and
C nNz=Nr implies a 3-D model field. irecord is the record number
C to be read and must be >= 1. The file data is stored in
C arr *but* the overlaps are *not* updated. ie. An exchange must
C be called. This is because the routine is sometimes called from
C within a MASTER_THID region.
C
For the exf package exf_iprec is passed to filePrec, and exf_yftype
is passed as arrType.
So, unless I'm mistaken, exf_iprec is the file precision, and
exf_yftype is the precision of the stored exf array.
One may want to read in a double precision file, but run in single
precision to reduce the memory footprint.
-Matt
On Sep 29, 2006, at 3:49 PM, Dmitri Leonov wrote:
> Maybe you also know what 'exf_yftype' stands for? There seems to be
> too many degrees of freedom here. If it's the model internal
> precision - why does it need to read it from the input file? (just
> curious)
>
> Matthew Mazloff wrote:
>> Hi Dmitri,
>>
>> not sure if you need a response (?)
>> here goes anyway: It is actually the read precision for the exf
>> package. I went to the exf package and saw exf_getffields.F
>> called exf_set_gen.F, which had the read call:
>>
>> call mdsreadfield( genfile0, exf_iprec, exf_yftype, 1
>> & , gen1, count0, mythid
>> & )
>>
>>
>> I assume the "i" was added to the name to represent input? not
>> sure...but I see why it is confusing.
>>
>> -Matt
>>
>>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list