Skip to content

Commit

Permalink
Merge pull request #4 from COSIMA/iss3
Browse files Browse the repository at this point in the history
fix corner array shape mismatch in write_scrip - closes #3 

fix seems to work: COSIMA/access-om2#206 (comment)
  • Loading branch information
aekiss authored Oct 15, 2020
2 parents 70d1dce + 1f2f1c9 commit 66c3ae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ def write_scrip(self, filename, mask=None, write_test_scrip=True, history=''):
corner_lat = f.createVariable('grid_corner_lat', 'f8',
('grid_size', 'grid_corners'))
corner_lat.units = 'degrees'
corner_lat[:] = clat[:].flatten()
corner_lat[:] = clat[:].reshape(-1,4)

corner_lon = f.createVariable('grid_corner_lon', 'f8',
('grid_size', 'grid_corners'))
corner_lon.units = 'degrees'
corner_lon[:] = clon[:].flatten()
corner_lon[:] = clon[:].reshape(-1,4)

f.title = self.description
f.history = history
Expand Down
2 changes: 1 addition & 1 deletion regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def is_var_temp_or_salt(src_var, dest_var):
for v in [src_var.lower(), dest_var.lower()]:
if v == 'salt' or v == 'vosaline' or v == 'practical_salinity':
return 'salt'
if v == 'temp' or v == 'votemper' or v == 'pottmp' or v == 'potential_temperature':
if v == 'temp' or v == 'votemper' or v == 'pottmp' or v == 'potential_temperature' or v == 'conservative_temperature':
return 'temp'

def check_src_data_ranges(src_data, temp_or_salt):
Expand Down

0 comments on commit 66c3ae9

Please sign in to comment.