Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions GEOSldas_App/GEOSldas_HIST.rc
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,9 @@ EASEv2_M36.LM: 1
tavg24_1d_issm_Nt.ref_time: 000000 ,
tavg24_1d_issm_Nt.fields: 'ICESURF' , 'ISSM' ,
'ICETHICK' , 'ISSM' ,
'ICEVEL' , 'ISSM' ,
'ICEEQSMB' , 'ISSM' ,
'ICEVX' , 'ISSM' ,
'ICEVY' , 'ISSM' ,
'ICESMB' , 'ISSM' ,
::

# ========================== EOF ==============================================================
6 changes: 0 additions & 6 deletions GEOSldas_App/GEOSldas_LDAS.rc
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ CATCHMENT_SPINUP: 0
#
LSM_CHOICE: 1

# ---- Ice-Sheet and Sea-Level System Model (ISSM) initialization (for LANDICE tiles)
#
# *ISSM_EXPDIR points to the directory containing the ISSM input file, which will be
# replaced by a restart directory in the future
#
ISSM_EXPDIR: /discover/nobackup/agstubbl/GEOS/Experiments/issm_expdir

# ---- Choice of tile type(s)
#
Expand Down
33 changes: 33 additions & 0 deletions GEOSldas_App/ldas.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def __init__(self, cmdLineArgs):
self.tile_types = ''
self.with_land = False
self.with_landice = False
self.with_issm = False
self.adas_expdir = ''

# assert necessary optional arguments in command line if exeinp file does not exsit
Expand Down Expand Up @@ -230,6 +231,10 @@ def __init__(self, cmdLineArgs):
assert int(self.ExeInputs['LSM_CHOICE']) <= 2, "\nLSM_CHOICE=3 (Catchment-CN4.5) is no longer supported. Please set LSM_CHOICE to 1 (Catchment) or 2 (Catchment-CN4.0)"
if "20" in self.tile_types :
self.with_landice = True

if self.with_landice == True:
if int(self.ExeInputs.get('DO_ISSM'))==1:
self.with_issm = True

self.nens = int(self.ExeInputs['NUM_LDAS_ENSEMBLE']) # fails if value of Nens is not an integer
self.first_ens_id = int(self.ExeInputs.get('FIRST_ENS_ID',0))
Expand Down Expand Up @@ -411,6 +416,11 @@ def __init__(self, cmdLineArgs):
landiceRstFile=self.in_rstdir+'/'+tmpFile
assert os.path.isfile(landiceRstFile), 'landice_internal_rst file [%s] does not exist!' %(landiceRstFile)

if self.with_issm:
tmpFile=self.ExeInputs['RESTART_ID']+'.issm_internal_rst.'+y4m2d2_h2m2
issmRstFile=self.in_rstdir+'/'+tmpFile
assert os.path.isfile(issmRstFile), 'issm_internal_rst file [%s] does not exist!' %(issmRstFile)

# DEAL WITH mwRTM input from exec
self.assim = True if self.ExeInputs.get('LAND_ASSIM', 'NO').upper() == 'YES' and self.with_land else False
# verify mwrtm file
Expand Down Expand Up @@ -867,6 +877,7 @@ def createLnRstBc(self) :
ensid = self.ensids[iens]
myCatchRst = myRstDir+'/'+self.catch +ensid +'_internal_rst'
myLandiceRst = myRstDir+'/'+ 'landice' +ensid +'_internal_rst'
myIssmRst = myRstDir+'/'+ 'issm' +ensid +'_internal_rst'
myVegRst = myRstDir+'/'+'vegdyn'+ensid +'_internal_rst'
myPertRst = myRstDir+'/'+ 'landpert' +ensid +'_internal_rst'

Expand Down Expand Up @@ -926,8 +937,17 @@ def createLnRstBc(self) :
if self.with_landice :
if RESTART_str in ['1', '3'] :
landiceRstFile = rstpath+ensdir +'/'+ y4m2+'/'+self.ExeInputs['RESTART_ID']+'.'+'landice_internal_rst.'+y4m2d2_h2m2
if self.with_issm:
issmRstFile = rstpath+ensdir +'/'+ y4m2+'/'+self.ExeInputs['RESTART_ID']+'.'+'issm_internal_rst.'+y4m2d2_h2m2



if RESTART_str in ['2', 'M']:
landiceRstFile = glob.glob(self.exphome+'/'+exp_id+'/mk_restarts/*'+'landice_internal_rst.'+YYYYMMDD+'*')[0]
if self.with_issm: # cheating here since we don't have mk_restarts for issm yet:
issmRstFile = rstpath+ensdir +'/'+ y4m2+'/'+self.ExeInputs['RESTART_ID']+'.'+'issm_internal_rst.'+y4m2d2_h2m2



if os.path.isfile(landiceRstFile) :
landiceLocal = self.rstdir+ensdir +'/'+ y4m2+'/'+self.ExeInputs['EXP_ID']+'.landice_internal_rst.'+y4m2d2_h2m2
Expand Down Expand Up @@ -960,6 +980,10 @@ def createLnRstBc(self) :
if self.with_landice :
print("link landice restart: " + myLandiceRst)
os.symlink(landiceRstFile, myLandiceRst)
if self.with_issm:
print("link issm restart: " + myIssmRst)
os.symlink(issmRstFile, myIssmRst)

if ( self.has_geos_pert and self.perturb == 1 ):
os.symlink(pertRstFile, myPertRst)

Expand Down Expand Up @@ -1215,6 +1239,9 @@ def createRCFiles(self):
if self.with_landice:
rstkey.append('LANDICE')
rstval.append('landice')
if self.with_issm:
rstkey.append('ISSM')
rstval.append('issm')

if self.has_mwrtm :
keyn='LANDASSIM_INTERNAL_RESTART_FILE'
Expand Down Expand Up @@ -1255,6 +1282,12 @@ def createRCFiles(self):
keyn = 'LANDICE_INTERNAL_CHECKPOINT_FILE'
valn = 'landice'+tmpl_+'_internal_checkpoint'
ldasrcInp[keyn]= valn
if self.with_issm:
keyn = 'ISSM_INTERNAL_CHECKPOINT_FILE'
valn = 'issm'+tmpl_+'_internal_checkpoint'
ldasrcInp[keyn]= valn


# specify LANDPERT restart file
if (self.perturb == 1):
keyn = 'LANDPERT_INTERNAL_RESTART_FILE'
Expand Down
2 changes: 1 addition & 1 deletion GEOSldas_App/lenkf_j_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@
set THISDIR = $EXPDIR/output/$EXPDOMAIN/rs/$ENSDIR/Y${{eYEAR}}/M${{eMON}}/
if (! -e $THISDIR ) mkdir -p $THISDIR

set rstfs = (${{LANDMODEL}} 'landice')
set rstfs = (${{LANDMODEL}} 'landice' 'issm')
foreach rstf ( $rstfs )
if (-f ${{rstf}}${{ENSID}}_internal_checkpoint ) then
set tmp_file = $EXPDIR/output/$EXPDOMAIN/rs/$ENSDIR/Y${{eYEAR}}/M${{eMON}}/${{EXPID}}.${{rstf}}_internal_rst.${{eYEAR}}${{eMON}}${{eDAY}}_${{eHour}}${{eMin}}
Expand Down
Loading