[MITgcm-support] Question about bin files
Martin Losch
martin.losch at awi.de
Wed Mar 8 05:11:29 EST 2017
Hi Xing (and Jody),
Jody is right: there are actually 12 “monthly” mean 3D fields in lev_t.bin and lev_s.bin, however, only the first one is used for initialization and you really need the rbcs package for 3D restoring. The relaxation parameters in data only refer to the surface fields in lev_sst.bin and lev_sss.bin.
I also think that this is how the file size of 2952000 bytes comes about:
there are 12 records, each 90x40x15 in size = 648000 “words” or numbers. 2592000/648000 = 4 (not 8), so that each word or number has 4 bytes. This is single precision (real*4 in fortran) and in fact, readBinaryPrec=32, is set accordingly in the first namelist in data. For the surface relaxation fields lev_sst.bin and lev_sss.bin it’s totally analogous with filesize 172800/90/40/12 = 4 bytes for each number/word.
Martin
> On 8 Mar 2017, at 05:41, Jody Klymak <jklymak at uvic.ca> wrote:
>
> Hi Xing,
>
>> I’m having a question about bin files as initial conditions. I’m trying to write my own initial S and T files for tutorial_global_oce_latlon, so I read lev_s.bin first and tried to see how it looks. I think it should be having a size of 90x40x15=54000. However, its size is 2592000, which equals to 90x40x15x48.
>
> My version of that tutorial is 45x40x15 = 27000. The size of lev_s.bin is 2592000 *bytes*. At 8 bytes (64 bits) per value, thats 2592000/8 = 324000 elements, which is 12 times larger than your domain.
>
> You will note in `data` that
>
> # 2 months restoring timescale for temperature
> tauThetaClimRelax= 5184000.,
> # 6 months restoring timescale for salinity
> tauSaltClimRelax = 15552000.,
> periodicExternalForcing=.TRUE.,
> # 30 d
> externForcingPeriod=2592000.,
> # 360 d
> externForcingCycle=31104000.,
>
> So the factor of 12 is for the monthly (ahem 30-d) climatology of theta and salt. ie the files are nt*nz*ny*nx. The model will try and force itself back to these values with a time scale of 2 months for temperature, and 6 months for salt.
>
> Someone will correct me if I have this wrong, but I think its correct.
>
> I was going to simply suggest reading the manual, but this is not super-clearly documented that I could see either in the tutorial or in the main body of the docs. In fact, I wasn’t aware you could do relaxation to climatology this way, and would have used the `rbcs` package to do the same thing.
>
> Cheers, Jody
>
>
>> I’m not sure what does that 48 represent. I also tried to read lev_sss.bin and hoping its size is 90x40=3600 but instead it has a size of 172800=90x40x48. I think I must missed something. Does anyone know how to interpret the sizes of those bin files?
>>
>> Thanks!
>> Xing
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
More information about the MITgcm-support
mailing list