Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions pyroms/pyroms/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ def get_ROMS_hgrid(gridid):
x_psi=x_psi, y_psi=y_psi, dx=dx, dy=dy, \
dndx=dndx, dmde=dmde, angle_rho=angle)

#load the mask
try:
hgrd.mask_rho = np.array(nc.variables['mask_rho'][:])
except:
hgrd.mask_rho = np.ones(hgrd.x_rho.shape)

else:
#geographical grid
print('Load geographical grid from file')
Expand Down Expand Up @@ -366,11 +372,11 @@ def get_ROMS_hgrid(gridid):
lon_psi=lon_psi, lat_psi=lat_psi, dx=dx, dy=dy, \
dndx=dndx, dmde=dmde, angle_rho=angle)

#load the mask
try:
hgrd.mask_rho = np.array(nc.variables['mask_rho'][:])
except:
hgrd.mask_rho = np.ones(hgrd.lat_rho.shape)
#load the mask
try:
hgrd.mask_rho = np.array(nc.variables['mask_rho'][:])
except:
hgrd.mask_rho = np.ones(hgrd.lat_rho.shape)

return hgrd

Expand Down