ESMG / pyroms

Python tools for the Regional Ocean Modeling System (ROMS)
Other
138 stars 88 forks source link

Arctic interpolations from SODA3 #4

Closed kshedstrom closed 6 years ago

kshedstrom commented 7 years ago

I'm working on stuff in /Volumes/R1/ROMS/ARCTIC4/remap_SODA3 on alnilam. Instead of hacking at the system pyroms_toolbox, I built a local BGrid_SODA3 for testing. It would be nice to get this example with the ystart option integrated into the main branch.

It could also use an initial file driver. I might get to it soon - or use a clm record as IC.

kshedstrom commented 6 years ago

Trying to get this going for someone, it is now failing in a new way:

python make_remap_weights_file.py /u1/uaf/kshedstrom/python/lib/python3.5/site-packages/pyroms_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py:87: MaskedArrayFutureWarning: setting an item on a masked array which has a shared mask will not copy the mask and also change the original mask array in the future. Check the NumPy 1.11 release notes for more information. h[:,0] = h[:,-2] TypeError: expected a writable bytes-like object

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "make_remap_weights_file.py", line 7, in name='SODA3.3.1', area='npolar', ystart=235) File "/u1/uaf/kshedstrom/python/lib/python3.5/site-packages/pyroms_toolbox/BGrid_GFDL/get_nc_BGrid_GFDL.py", line 100, in get_nc_BGrid_GFDL name, xrange=xrange, yrange=yrange) File "/u1/uaf/kshedstrom/python/lib/python3.5/site-packages/pyroms_toolbox/BGrid_GFDL/BGrid_GFDL.py", line 45, in init self._calculate_grid_angle() File "/u1/uaf/kshedstrom/python/lib/python3.5/site-packages/pyroms_toolbox/BGrid_GFDL/BGrid_GFDL.py", line 51, in _calculate_grid_angle self.lon_t_vert[:,1:], self.lat_t_vert[:,1:]) File "/import/u/u1/uaf/kshedstrom/.conda/envs/snowdrifts/lib/python3.5/site-packages/mpl_toolkits/basemap/pyproj.py", line 799, in inv _proj.Geod._inv(self,inx,iny,inz,ind,radians=radians) File "_proj.pyx", line 450, in _proj.Geod._inv (src/_proj.c:4541) SystemError: <class 'RuntimeError'> returned a result with an error set

I'll push my updates and the example files.

kshedstrom commented 6 years ago

Failing like this on a COBALT remapping as well.

kshedstrom commented 6 years ago

I think I sort of fixed it. For now.