[MITgcm-support] Rebuilding pickup files from data files

eyulaeva at ucsd.edu eyulaeva at ucsd.edu
Thu Jan 25 02:30:16 EST 2007


Christopher, hi
This is the information I got a while ago from a post-doc at JPL
___________________________________________________________________
Here is what I can tell you about checkpoint files:

First these files are written in double precision as direct access files.
I used an output file from the model to generate new pickup file (with CD
scheme on). There are 2 different pickup files: a regular one with fields
and trends, and one for the CD scheme with fields on the D grid.

In the pickup file the different fields are:

uVel            :U velocity
gU              : trend for U, set to 0
gUnm1   : idem
vVel            : V velocity
gV              : trend for V , set to 0
gVnm1   : idem
theta           : T
gT              : T , equal gTdb
gTnm1   : trend for T, set to 0
salt            : S
gS              : S, equal salt
gSnm1   : trend for S, set to 0
etaN            : eta

I read the U,V,T,S,eta fields in output netcdf files in IDL, single
precision and copied them in db precision arrays:

IDL>
uVel=ncdf_lec('/home/DR049F/Uave/Uave_dr049f_1993_2003.cdf',ATT='global',/DIM,var='Uave')
IDL>
vVel=ncdf_lec('/home/DR049F/Vave/Vave_dr049f_1993_2003.cdf',ATT='global',/DIM,var='Vave')
IDL>
theta=ncdf_lec('/home/DR049F/Tave/Tave_dr049f_1993_2003.cdf',ATT='global',/DIM,var='Tave')
IDL>
salt=ncdf_lec('/home/DR049F/Save/Save_dr049f_1993_2003.cdf',ATT='global',/DIM,var='Save')
IDL>
etaN=ncdf_lec('/home/DR049F/Have/Have_dr049f_1993_2003.cdf',ATT='global',/DIM,var='Have')


IDL> uVeldb=dblarr(360,224,46)
IDL> vVeldb=dblarr(360,224,46)
IDL> thetadb=dblarr(360,224,46)
IDL> saltdb=dblarr(360,224,46)
IDL> etaNdb=dblarr(360,224)


IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
uVeldb(i,j,k)=uVel(i,j,k)
IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
vVeldb(i,j,k)=vVel(i,j,k)
IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
thetadb(i,j,k)=theta(i,j,k)
IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
saltdb(i,j,k)=salt(i,j,k)
IDL>  for i=0,359 do begin for j=0,223 do begin etaNdb(i,j)=etaN(i,j)


For the trends, there are set to 0, except for the 1 st one tor T and S
which are equal to the fileds:

IDL> gUdb=dblarr(360,224,46)
IDL> gUnm1db=dblarr(360,224,46)
IDL> gVdb=dblarr(360,224,46)
IDL> gVdbnm1=dblarr(360,224,46)
IDL> gTdb=dblarr(360,224,46)
IDL> gTnm1db=dblarr(360,224,46)
IDL> gSdb=dblarr(360,224,46)
IDL> gSnm1db=dblarr(360,224,46)

IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gUdb(i,j,k)=0.0
IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gUnm1db(i,j,k)=0.0
IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gVdb(i,j,k)=0.0
IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gVdbnm1(i,j,k)=0.0
IDL> for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gTdb(i,j,k)=thetadb(i,j,k)
IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gTnm1db(i,j,k)=0.0
IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gSdb(i,j,k)=saltdb(i,j,k)
IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin
gSnm1db(i,j,k)=0.0

You might want to make sure thje missing values are correct (not 0 but
-1.10+10 )

IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
uVelbd(i,j,k) lt -100.0 then uVeldb(i,j,k) =0.0

IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
vVeldb(i,j,k) lt -100.0 then vVeldb(i,j,k) =0.0


IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
thetabd(i,j,k) lt -100.0 then thetabd(i,j,k) =0.0

IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
gTbd(i,j,k) lt -100.0 then gTdb(i,j,k) =0.0


IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
saltdb(i,j,k) lt -100.0 then saltdb(i,j,k) =0.0

IDL>  for i=0,359 do begin for j=0,223 do begin for k=0,45 do begin if
gSdb(i,j,k) lt -100.0 then gSdb(i,j,k) =0.0


IDL>  for i=0,359 do begin for j=0,223 do begin if etaNdb(i,j) lt -100.0
then etaNdb(i,j)=0.0




Finally, to write the pick up file:

IDL> openw,2,'pickupfile',/swap_if_little_endian
IDL> writeu,2,uVeldb
IDL> writeu,2,gUdb
IDL>  writeu,2,gUnm1db
IDL>  writeu,2,vVeldb
IDL>  writeu,2,gVdb
IDL> writeu,2,gVdbnm1
IDL> writeu,2,thetadb
IDL> writeu,2,gTdb
IDL> writeu,2,gTnm1db
IDL> writeu,2,saltdb
IDL>  writeu,2,gSdb
IDL> writeu,2,gSnm1db
IDL>  writeu,2,etaNdb
IDL> close,2

______________________________________________________________
This is for an older version of MIT, so you should use the

usePickupBeforeC54 = .TRUE., (in PARM01 in data)
option to read this pickup file


Elena


> Thanks Andrea.
>
> I suspect the fact that I've lost the tendencies won't make a big
> difference in my case since I'm interested mainly in time-average
> behavior of fairly long runs. If the detailed time-dependence is
> different, it shouldn't matter much.
>
> I should be able to put together something that does the job (if no one
> else has).
>
> Thanks,
> Christopher
>
> Andrea Molod wrote:
>
>> hi christopher,
>>
>>> A recent computer crashed resulted in the loss of all the pickup
>>> files from several of my runs, but, as luck would have it, all of the
>>> separate data files (T, U, V, etc) were saved. Does anyone know if
>>> it's possible to rebuild the pickup files from the other data files
>>> so that the runs may be restarted? All the files are in the old mdsio
>>> format.
>>
>>
>> my take on the answer to your question is 'yes, sort of'. the number
>> of fields that need to be on a pickup partly depends on what kind of
>> run you
>> have, but the 'dump' files are indeed 'snap shots' of the model state
>> that
>> can be written into a pickup file. what is missing, however, are the
>> pickup fields that represent 'tendencies' of the state variables. like
>> gT and gTNm1 (time tendency of theta, same at one step back). which
>> you will have to put on the pickup file you write (zeros). the model
>> will
>> not give you the same result you would have gotten had you continued
>> your run from the pickups. if that's ok then i think your runs are ok.
>>
>> i don't have a routine offhand to make the pickups from the dump. maybe
>> someone else has one? to see the write sequence for the pickups see
>> routines write_pickup.F or read_pickup.F in the model/src directory.
>> there will be a separate call sequence for each field.
>>
>> hope this helps.
>>
>> andrea
>> _______________________________________________
>> 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