Skip to content

Commit

Permalink
Fix issues in file_regrid.py and regrid_restart_file.py
Browse files Browse the repository at this point in the history
gcpy/file_regrid.py
- Removed a double-flipping of vertical levels in LL -> CS/SG regridding

gcpy/regrid_restart_file.py
- Removed function check_lev_attribute, it is not defined

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
  • Loading branch information
yantosca committed Oct 19, 2023
1 parent e243d64 commit 21ca816
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions gcpy/file_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,6 @@ def regrid_ll_to_cssg(
towards_common=False
)

# Flip vertical levels (if necessary) and
# set the lev:positive attribute accordingly
dset = flip_lev_coord_if_necessary(
dset,
dim_format_in="classic",
dim_format_out=dim_format_out
)

# Fix names and attributes of of coordinate variables depending
# on the format of the ouptut grid (checkpoint or diagnostic).
# Also convert the "diagnostic" grid to the "checkpoint" grid
Expand Down
2 changes: 0 additions & 2 deletions gcpy/regrid_restart_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ def regrid_restart_file(
"Error when processing your stretched-grid parameters - are they correct?"
) from exception

dataset = check_lev_attribute(output_is_gchp)

dataset.to_netcdf("new_restart_file.nc")

info_message = "Wrote 'new_restart_file.nc' with %d variables"
Expand Down

0 comments on commit 21ca816

Please sign in to comment.