[MITgcm-devel] gluemncbig and many tiles

Martin Losch Martin.Losch at awi.de
Mon Jan 14 04:29:28 EST 2013


Hi Oliver,

I am trying to use the great gluemncbig script to glue many (1120) 
netcdf files. After fixing this re.compile issue (although this may not 
be the best fix, and maybe {3,5} is even better):
     tilepatt = re.compile(r'(\.t[0-9]{3,4}\.nc)$')
I am getting different error messages on different computers:

1. On hicegate.hlrn.de (www.hlrn.de) with python 4.2

hicegate0:/gfs1/work/hbklosch/MITgcm/arctic_4km/run_jfnk_01120 $ 
gluemncbig -o diags2D.glob.nc diags2D.0*.t*.nc
Tiled dimensions: Yp1 Y X Xp1
Record dimension: T
Writing non-record variables
Traceback (most recent call last):
   File "/home/h/hbklosch/bin/gluemncbig", line 1336, in ?
     if progress and not verbose: sys.stderr.write('Writing {} records: 
'.format(nrec))
AttributeError: 'str' object has no attribute 'format'

2. On a local machine at AWI (uv100.awi.de) with python 2.6
uv100:run_jfnk_1120> gluemncbig -o diags2D.glob.nc diags2D.0001971000.t*
Tiled dimensions: Yp1 Y X Xp1
Record dimension: T
Traceback (most recent call last):
   File "/uv/home1/mlosch/bin/gluemncbig", line 1299, in <module>
     ncs[fname] = nc = netcdf_file(fname, 'r', **readopts)
   File "/uv/home1/mlosch/bin/gluemncbig", line 260, in __init__
     self.fp = open(self.filename, '%sb' % mode)
IOError: [Errno 24] Too many open files: 'diags2D.0001971000.t900.nc'

I am absolutely new to python (started looking at python last Thursday), 
so my opinion on this is probably very unqualified, but I assume that 
the first error has to do with the python version, but that the second 
error can be fixed somehow, right? I didn't find any solution yet, but 
while I keep looking you probably know the answer right away.

A more general question: I am so excited by the things python can do now 
(with matplotlib can plot finite elements very easily and beautifully), 
that I want to use it more. Do you already have a set of scripts that 
would replace our matlab functions (I saw mds, mnc, but, e.g. plotting 
the cube etc.) that you are willing to share?

Martin






--

Martin Losch
Alfred Wegener Institute for Polar and Marine Research
Postfach 120161, 27515 Bremerhaven, Germany;
Tel./Fax: ++49(0471)4831-1872/1797




More information about the MITgcm-devel mailing list