pyroms -- a suite of tools for working with ROMS in Python

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
hetland
Posts: 81
Joined: Thu Jul 03, 2003 3:39 pm
Location: TAMU,USA

pyroms -- a suite of tools for working with ROMS in Python

#1 Unread post by hetland »

NOTE: THIS SECTION USED TO BE ABOUT PYROMS, WHICH HAS CEASED DEVELOPMENT. PLEASE USE OCTANT INSTEAD.

I have started to create a tool suite for working with ROMS in python, called octant. You can get the source and see other project resources at

http://octant.google.com/

This package is based on pyroms. The name has been changes, and the code base rearranged to make it possible for other C-Grid based models (notably GETM) to use the common code base.

Right now, I have some basic tools for reading roms netcdf files, working with s-coordinates, and grid generation. What is there is pretty solid, but not super well documented. I hope to develop more tools soon. Some of the things I would like to do are offline calculation of tracer advection (using pieces of step_t) and floats. I would like to add more support for simple visualization, and initial, boundary, and forcing file creation.

You are all invited to help. Let me know if you would like to be a member of the project. Sign up for a gmail account, if you don't already have one, and send me a note.
Last edited by hetland on Mon Jul 21, 2008 8:15 pm, edited 1 time in total.

RubenDiez-Lazaro

#2 Unread post by RubenDiez-Lazaro »

Great...
I think that portable, versatile, open and fast python scripts will replace in the future a lot of slow and ad-hoc matlab code...

turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

Re: pyroms -- a suite of tools for working with ROMS in Python

#3 Unread post by turuncu »

Hi,

I try to install pyroms but i get following error messages when importing pyroms,

/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyroms/Dataset.py:65: UserWarning: netCDF4 not found -- using pupynere.
warnings.warn('netCDF4 not found -- using pupynere.')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyroms/__init__.py", line 15, in <module>
from Dataset import Dataset, MFDataset
ImportError: cannot import name MFDataset

I am using Mac OS X Leopard and i install other required tools such as python netCDF4, HDF5, NETCDF4, scipy, numpy etc. and each of them working successfully under python.

Any suggestions will be helpful.

best,

--ufuk

linzhenhua
Posts: 64
Joined: Mon Oct 17, 2005 2:02 am
Location: Institute of Oceanology,Chinese Academy of Sciences

Re: pyroms -- a suite of tools for working with ROMS in Python

#4 Unread post by linzhenhua »

Hello,with limited python knowledge,I think there is something wrong with your netcdf4-python install.

Can you use the netcdf4-python packages? Try "import netCDF4" to see whether it works or not.

turuncu
Posts: 128
Joined: Tue Feb 01, 2005 8:21 pm
Location: Istanbul Technical University (ITU)
Contact:

Re: pyroms -- a suite of tools for working with ROMS in Python

#5 Unread post by turuncu »

yes, i could import netCDF4 module without error. The version of it is 0.7.4.

best,

--ufuk

User avatar
hetland
Posts: 81
Joined: Thu Jul 03, 2003 3:39 pm
Location: TAMU,USA

Re: pyroms -- a suite of tools for working with ROMS in Python

#6 Unread post by hetland »

This problem is due to the changes in the netCDF4 API. Basically, the multifile support has been folded into the regular netCDF4 object. In other words, there is no more MFNetCDF4.

I would recommend that you use the newer package (that has already fixed this bug) called octant. It is very similar to the old code, but it separates the model dependent code so that other models (in particular GETM) can also use the common code base. The name change was done to be more inclusive of other models..

Get it at

http://octant.googlecode.com
OCTANT (Ocean C-grid model seTup and Analysis Toolkit) is a suite of tools based on the python/numpy/matplotlib scientific python suite. NetCDF I/O is based on the NetCDF4-python package.

The toolkit contains general modeling tools for dealing with arrays, diagnosing standard properties, curvilinear grid generation, and interpolation. Specific tools are also included for ROMS and GETM.
Note, I have stopped work on pyroms, and all of the active work will be on octant.

Post Reply