Skip to content

Commit 22e5e8c

Browse files
Merge pull request #137 from GEOS-ESM/feature/wjiang/fix_zoom
fix zoom value
2 parents ff4ab3b + a172439 commit 22e5e8c

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
### Fixed
2222

23+
- Fixed zoom value when there is landice. It will be determined by input tilefile
2324
- Fixed Restart = 1 when the domain is not global
2425

2526
### Removed

GEOSldas_App/ldas.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import sys
55
import glob
6-
import linecache
76
import shutil
87
import fileinput
98
import time
@@ -310,18 +309,7 @@ def __init__(self, cmdLineArgs):
310309
inpgeom_= None
311310
# assigning Gridname
312311
if 'GRIDNAME' not in self.ExeInputs :
313-
tmptile = os.path.realpath(self.ExeInputs['TILING_FILE'])
314-
extension = os.path.splitext(tmptile)[1]
315-
if extension == '.domain':
316-
extension = os.path.splitext(tmptile)[0]
317-
gridname_ =''
318-
if extension == '.til':
319-
gridname_ = linecache.getline(tmptile, 3).strip()
320-
else:
321-
nc_file = netCDF4.Dataset(tmptile,'r')
322-
gridname_ = nc_file.getncattr('Grid_Name')
323-
# in case it is an old name: SMAP-EASEvx-Mxx
324-
gridname_ = gridname_.replace('SMAP-','').replace('-M','_M')
312+
gridname_ = get_gridname(self.ExeInputs['TILING_FILE'])
325313
self.ExeInputs['GRIDNAME'] = gridname_
326314

327315
if 'POSTPROC_HIST' not in self.ExeInputs:
@@ -867,6 +855,7 @@ def createLnRstBc(self) :
867855
config['output']['surface']['wemin'] = wemin_out
868856

869857
if RESTART_str == "M" : # restart from merra2
858+
config['input']['surface']['zoom'] = '2'
870859
yyyymm = int(YYYYMMDDHH[0:6])
871860
merra2_expid = "d5124_m2_jan10"
872861
if yyyymm < 197901 :
@@ -898,7 +887,6 @@ def createLnRstBc(self) :
898887
catch_obj.remap()
899888
if self.with_landice:
900889
config['output']['surface']['remap_water'] = True
901-
config['input']['surface']['zoom'] = '2'
902890
landice_obj = lake_landice_saltwater(config_obj = config)
903891
landice_obj.remap()
904892

0 commit comments

Comments
 (0)