barronh / pseudonetcdf

PseudoNetCDF like NetCDF except for many scientific format backends
GNU Lesser General Public License v3.0
76 stars 35 forks source link

icartt read/write support #112

Open barronh opened 4 years ago

barronh commented 4 years ago

I’ve gotten the question “can PseudoNetCDF write ICARTT files?” a few times recently. I’m opening this question as a forum for exploring further.

PseudoNetCDF has a ICARTT reader and writer (Ames ffi 1001). The reader has been more heavy used and tested. The writer has had little use as far as I know. As a result, I’d expect some issues to arise in its use. For example, it doesn’t seem to work from the command line but it does work in python with the example file in the testcase.[1]

This in bash:

pncgen.py -f icartt test.ffi1001 test.nc
pncgen.py -f icartt --out-format=icartt test.ffi1001 test.txt

Is this in python or ipython:

import PseudoNetCDF as pnc
f = pnc.pncopen('test.ffi1001', format='ffi1001')
f.save('test.nc')
f.save('test.txt', format='ffi1001')

I would be super grateful if anyone wanted to test and recommend or make improvements.

barronh commented 4 years ago

As a side note, there are other packages that do this. Recently, Christoph Knote has an icartt package was brought to my attention. A cursory read suggests that package supports ffi 1001 and may also support ffi 2110.

The icartt package is Python v2 compatible. It might be easy to update that package for v3 support. Probably just Unicode wrappers.

FObersteiner commented 2 years ago

As a side note, there are other packages that do this. Recently, Christoph Knote has an icartt package

The icartt package on pypi recently got an update to v2 (to support v2 of the ICARTT format). At the moment, it supports ffi 1001 and 2110.