pyroms question

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
lleoex

pyroms question

#1 Unread post by lleoex »

Hi everyone!

I want you to tell me some things about remapping. I have two grids: one of them a rectangular and another is curvilinear. I have one roms-history file in rectangular grid. And I want to get files with initial and boundary conditions for my curvilinear grid. Some months ago i tried to use pyroms`s examples from "Chukchi" directory for my task and everything was fine. But week ago i began to deploy same solution on another server and took fresh version of pyroms from github. And now one problem was detected. in two words it look like this:

Load geographical grid from file
Load geographical grid from file
ubar/vbar to be computed from u/v
Working with file ./roms_his_1.nc ...
Creating destination file ./roms_his_1_SAKHALIN.nc

remapping zeta from OKHOTSK to SAKHALIN
time = 80524800.0
Arakawa C-grid position is rho
Creating variable zeta
2011-11-21 12:26:58.246774
horizontal interpolation using scrip weights
2011-11-21 12:26:58.280144
write data in destination file

remapping and rotating u and v from OKHOTSK to SAKHALIN
Creating variable u
Creating variable v
vertical interpolation from sigma to standard z level
flood the u grid
flood the v grid
horizontal interpolation using scrip weights
vertical interpolation from standard z level to sigma
write data in destination file
Creating variable ubar
Creating variable vbar

Traceback (most recent call last):
File "./ini_sakh.py", line 26, in <module>
trange=(0,0),irange=irange,jrange=jrange)
File "/home/opt/models/roms/lib64/python2.6/site-packages/pyroms_toolbox/remapping.py", line 427, in remapping
np.diff(z_u[:,j,i])).sum() / -z_u[0,j,i]
File "/usr/lib64/python2.6/site-packages/numpy/ma/core.py", line 3642, in __mul__
return multiply(self, other)
File "/usr/lib64/python2.6/site-packages/numpy/ma/core.py", line 924, in __call__
m = umath.logical_or(ma, getmaskarray(b))
ValueError: operands could not be broadcast together with shapes (1,120) (32)



32 - is number of vertical layers in source file, but can you tell anything about (1, 120) ?
Is it a bug? or I doing it wrong?

frederic
Posts: 3
Joined: Thu Oct 09, 2008 5:18 pm
Location: NCAR

Re: pyroms question

#2 Unread post by frederic »

Hi lleoex,

What are the horizontal grid dimension?
Can you add print statment in script in order to return the shape of z_u?

Thanks,
Fred

Post Reply