|
3 | 3 | import os
|
4 | 4 | import sys
|
5 | 5 | import glob
|
6 |
| -import linecache |
7 | 6 | import shutil
|
8 | 7 | import fileinput
|
9 | 8 | import time
|
@@ -310,18 +309,7 @@ def __init__(self, cmdLineArgs):
|
310 | 309 | inpgeom_= None
|
311 | 310 | # assigning Gridname
|
312 | 311 | 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']) |
325 | 313 | self.ExeInputs['GRIDNAME'] = gridname_
|
326 | 314 |
|
327 | 315 | if 'POSTPROC_HIST' not in self.ExeInputs:
|
@@ -867,6 +855,7 @@ def createLnRstBc(self) :
|
867 | 855 | config['output']['surface']['wemin'] = wemin_out
|
868 | 856 |
|
869 | 857 | if RESTART_str == "M" : # restart from merra2
|
| 858 | + config['input']['surface']['zoom'] = '2' |
870 | 859 | yyyymm = int(YYYYMMDDHH[0:6])
|
871 | 860 | merra2_expid = "d5124_m2_jan10"
|
872 | 861 | if yyyymm < 197901 :
|
@@ -898,7 +887,6 @@ def createLnRstBc(self) :
|
898 | 887 | catch_obj.remap()
|
899 | 888 | if self.with_landice:
|
900 | 889 | config['output']['surface']['remap_water'] = True
|
901 |
| - config['input']['surface']['zoom'] = '2' |
902 | 890 | landice_obj = lake_landice_saltwater(config_obj = config)
|
903 | 891 | landice_obj.remap()
|
904 | 892 |
|
|
0 commit comments