MITgcm / xmitgcm

Read MITgcm mds binary files into xarray
http://xmitgcm.readthedocs.io
MIT License
56 stars 65 forks source link

open_mdsdataset without complete meta files #327

Closed jiand1219 closed 8 months ago

jiand1219 commented 1 year ago

Hi, I have a series of EXF.00000xxxxxx.data files but only have one and only EXF.meta file, in this case, I cannot read fldList, e.g. exfqnet

See the screenshot attached, somehow I can load EXF, but cannot get its sub-field: exfqnet, exftaux .... how can I solve it without each iterate's meta file

Screenshot 2023-08-31 at 13 26 20

cat EXF.meta nDims = [ 2 ]; dimList = [ 2000, 1, 2000, 2000, 1, 2000 ]; dataprec = [ 'float32' ]; nrecords = [ '17' ]; nFlds = [ '17' ]; fldList = { '; exfqnet; exfempmr; exfswnet; exflwnet; exfhl; exfhs; exfswdn; exflwdn; exfatemp; exfaqh; exfpreci; exfevap; exftaux; exftauy; exfuwind; exfvwind; exfwspee; ' };

Thanks in advance

timothyas commented 1 year ago

I don't think this is easily possible with xmitgcm functions, since it is designed with the assumption of having meta information. It seems like the two paths forward are to either copy meta information to be in a format that is expected by xmitgcm (see expected files for more info), or to use low level routines in the utils module.