[MITgcm-support] [EXTERNAL] changing one entry in pickup files

Dimitris Menemenlis dmenemenlis at gmail.com
Mon May 11 21:56:12 EDT 2020


oh, I am not familiar to pkg/flt, sorry
others please pitch in with a better answer

if I had to do this, I would use the routines:
https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/cs_grid/read_cs/readbin.m <https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/cs_grid/read_cs/readbin.m>
https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/cs_grid/read_cs/writebin.m <https://github.com/MITgcm/MITgcm/blob/master/utils/matlab/cs_grid/read_cs/writebin.m>
and try to read/write as follows:

field9=readbin('pickup_flt.ckptA.001.001.data’,[96 9],1,’real*8’,8);
% modify field9 as needed
writebin('pickup_flt.ckptA.001.001.data’,field9,1,’real*8’,8);

why are you using tiled pickup files?
are you working on an old cluster with separate disks?
or is this a pkg/flt requirement?
if you use globalfiles or singlecpuio options,
you would get a single pickup file per time easier to work with



> On May 11, 2020, at 5:18 PM, Paola Cessi <pcessi at ucsd.edu> wrote:
> 
> Hi Dimitri,
> 
> I am using matlab. These are pickups files from the flt package, so I am not sure they are the same as the regular MITgcm pickups. They are written and read with the mdsio package.
> 
> I _think_ that what I need to change is the 9th entry of the “arr" array, i.e. arr(9) written/read by the routines mdsio_wr_rec_rl.F/mdsio_rd_rec_rl.F. That said, I don’t understand how to locate this variable given the .meta file (attached).
> 
> Many thanks,
> 
> 
> 
> Paola
> 
> ----------------------------------------------
> Paola Cessi   
> Scripps Institution of Oceanography  
> 9500 Gilman Drive #0213               
> La Jolla, CA 92093-0213
> USA               
> Tel: +1 858 534 0622   Fax: +1 858 534 8045
> e-mail: pcessi at ucsd.edu <mailto:pcessi at ucsd.edu>     Web:  http://www-pord.ucsd.edu/~pcessi <http://www-pord.ucsd.edu/~pcessi>
> 
> Delivery address (Fed-Ex, DHL, UPS, etc.):
> Paola Cessi
> University of California San Diego
> Keck Center - Room 366
> 8851 Shellback Way
> La Jolla, CA 92093-0213
> USA
> 
> 
> 
> 
>> On May 11, 2020, at 4:41 PM, Dimitris Menemenlis <dmenemenlis at gmail.com <mailto:dmenemenlis at gmail.com>> wrote:
>> 
>> Hi Paola, do you use matlab or python?
>> 
>> If matlab and if noone answers with a generic answer, please send your pickup*.meta file and let me know which variable you want to replace and I will send you two lines of matlab code (and two small scripts) that will read and write the desired variable from and to the pickup file.
>> 
>> Cheers, Dimitris
>> 
>>> On May 11, 2020, at 3:39 PM, Paola Cessi <pcessi at ucsd.edu <mailto:pcessi at ucsd.edu>> wrote:
>>> 
>>> I need to change one entry in the pick-up files. Is there a simple sample program to read a pickup file change, one entry and write it again with the entry changed?
>>> 
>>> Thanks,
>>> 
>>> Paola
>>> 
>>> ----------------------------------------------
>>> Paola Cessi   
>>> Scripps Institution of Oceanography  
>>> 9500 Gilman Drive #0213               
>>> La Jolla, CA 92093-0213
>>> USA               
>>> Tel: +1 858 534 0622   Fax: +1 858 534 8045
>>> e-mail: pcessi at ucsd.edu <mailto:pcessi at ucsd.edu>     Web:  http://www-pord.ucsd.edu/~pcessi <http://www-pord.ucsd.edu/~pcessi>
>>> 
>>> Delivery address (Fed-Ex, DHL, UPS, etc.):
>>> Paola Cessi
>>> University of California San Diego
>>> Keck Center - Room 366
>>> 8851 Shellback Way
>>> La Jolla, CA 92093-0213
>>> USA
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> MITgcm-support mailing list
>>> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>>> http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support <https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!Mih3wA!QoirxRdRyr4vnrPbSnaKY7tFkekGeHWD65KRYp5_8wt09DuCmWRzUfDbDwwgxw$>
>> 
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org <mailto:MITgcm-support at mitgcm.org>
>> https://urldefense.com/v3/__http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support__;!!Mih3wA!QoirxRdRyr4vnrPbSnaKY7tFkekGeHWD65KRYp5_8wt09DuCmWRzUfDbDwwgxw$ 
> 
> <pickup_flt.ckptA.001.001.meta>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mitgcm.org/pipermail/mitgcm-support/attachments/20200511/728f0bf8/attachment.html>


More information about the MITgcm-support mailing list