Skip to content

Commit

Permalink
Add valid range before doing remapycon when processing lpjg tp avoid …
Browse files Browse the repository at this point in the history
…problems with NaNs, Infs, etc (see subject of #823).
  • Loading branch information
treerink committed Apr 15, 2024
1 parent 9acc3c6 commit fdc8d79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ece2cmor3/lpjg2cmor.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,10 @@ def create_lpjg_netcdf(freq, inputfile, outname, outdims):
cdo = Cdo()

if target_grid_ == "T159":
cdo.remapycon('n80', input="-setgrid," + gridfile_ + " " + temp_ncfile,
cdo.remapycon('n80', input="-setvrange,-1e16,1e16 -setgrid," + gridfile_ + " " + temp_ncfile,
output=ncfile)
else:
cdo.remapycon('n128',input="-setgrid," + gridfile_ + " " + temp_ncfile,
cdo.remapycon('n128',input="-setvrange,-1e16,1e16 -setgrid," + gridfile_ + " " + temp_ncfile,
output=ncfile) # TODO: add remapping for possible other grids

os.remove(temp_ncfile)
Expand Down

0 comments on commit fdc8d79

Please sign in to comment.