<html><head></head><body><div class="yahoo-style-wrap" style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div dir="ltr" data-setdir="false">Hi,</div><div dir="ltr" data-setdir="false"><br></div> <div>After several years I am updating my scripts using MITgcmutils. Unfortunately, I receive the following errors. I am unsure if these errors are relevant to my grids files, my python3, or ...<br>I would be grateful if anybody could advise me.<br>Best, Mahdi</div><div dir="ltr" data-setdir="false"><br></div><div><br></div><div dir="ltr" data-setdir="false"><div>In [4]: XC= MT.rdmds('/media/mahdi/D/IR24/data/grids/XC')<br> ...: <br>---------------------------------------------------------------------------<br>ValueError Traceback (most recent call last)<br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:67, in parse1(s)<br> 66 try:<br>---> 67 return int(s)<br> 68 except ValueError:<br><br>ValueError: invalid literal for int() with base 10: ''<br><br>During handling of the above exception, another exception occurred:<br><br>ParseError Traceback (most recent call last)<br>Input In [4], in <cell line: 1>()<br>----> 1 XC= MT.rdmds('/media/mahdi/D/IR24/data/grids/XC')<br><br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:337, in rdmds(fnamearg, itrs, machineformat, rec, fill_value, returnmeta, astype, region, lev, usememmap, mm, squeeze, verbose)<br> 334 if debug: warning('Found',len(metafiles),'metafiles for iteration',it)<br> 336 for metafile in metafiles:<br>--> 337 gdims,i0s,ies,timestep,timeinterval,map2gl,meta = readmeta(metafile)<br> 338 if arr is None:<br> 339 # initialize, allocate<br> 340 try:<br><br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:175, in readmeta(f)<br> 173 def readmeta(f):<br> 174 """ read meta file and extract tile/timestep-specific parameters """<br>--> 175 meta = parsemeta(f)<br> 176 dimList = meta.pop('dimList')<br> 177 # pythonize<br><br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:126, in parsemeta(metafile)<br> 122 _currentline = line<br> 124 if opening == '[':<br> 125 # [] can contain any type of values, separated by commas<br>--> 126 val = [ parse1(s) for s in re.split(r',? *',line) ]<br> 127 else:<br> 128 # {} can only contain single quote-delimited strings separated by space<br> 129 val = [ s.rstrip() for s in re.split(r"' *'", line.strip("'")) ]<br><br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:126, in <listcomp>(.0)<br> 122 _currentline = line<br> 124 if opening == '[':<br> 125 # [] can contain any type of values, separated by commas<br>--> 126 val = [ parse1(s) for s in re.split(r',? *',line) ]<br> 127 else:<br> 128 # {} can only contain single quote-delimited strings separated by space<br> 129 val = [ s.rstrip() for s in re.split(r"' *'", line.strip("'")) ]<br><br>File ~/miniconda3/envs/mysos/lib/python3.10/site-packages/MITgcmutils-0.1.0-py3.10.egg/MITgcmutils/mds.py:69, in parse1(s)<br> 67 return int(s)<br> 68 except ValueError:<br>---> 69 raise ParseError("Cannot parse value: " + s)<br><br>ParseError: in metafile: Cannot parse value: <br>in: 2</div><div><br></div></div></div></body></html>