Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0800e54
updates for integrated setup and coupled run of LADAS
saraqzhang Jan 28, 2025
57e74c6
Merge branch 'develop' into feature/saraqzhang/updatesetup4ladas
gmao-rreichle Jan 31, 2025
7fe7a89
fixed loss of some text from underlying develop version of ldas_setup
gmao-rreichle Feb 7, 2025
76795ca
minimal cleanup re. LADAS coupling (ldas_setup, exeinp.txt.Hy4dEnVar.*)
gmao-rreichle Feb 7, 2025
1d416fa
first iteration of changes for the option of using bkg lfo in…
saraqzhang Feb 13, 2025
3614242
for ladas lfo with bkg tag,and use HISTdet.rc, HISTens.rc
saraqzhang Feb 25, 2025
e622d0f
new file: GEOSldas_HISTdet.rc
saraqzhang Feb 25, 2025
14a6d64
new file: GEOSldas_HISTens.rc
saraqzhang Feb 25, 2025
54bed5d
cleanup and a fix in ldas_setup
saraqzhang Feb 25, 2025
2d6d069
update to bkg lfo in exeinp.txt.Hy4dEnVar.atmens & exeinp.txt.…
saraqzhang Feb 25, 2025
4ec59c6
Merge branch 'develop' into feature/saraqzhang/updatesetup4ladas
saraqzhang Feb 27, 2025
0a3cd3c
edits responding to comments at PR#81
saraqzhang Mar 27, 2025
c0c12f2
name fix in GEOSldas_HISTdet.rc
saraqzhang Mar 27, 2025
4170567
add comments on fvsetup-provided resource parameters
saraqzhang Mar 31, 2025
96af721
removed execute permissions from LDAS_Forcing.F90
gmao-rreichle Apr 8, 2025
fdef165
cleaned up "Nx+-" forcing option (replaced by "bkg.lfo_*") (LDAS_For…
gmao-rreichle Apr 8, 2025
a3a2463
Merge branch 'develop' into feature/saraqzhang/updatesetup4ladas
gmao-rreichle Apr 8, 2025
6a10dae
updated CHANGELOG.md
gmao-rreichle Apr 8, 2025
3bdc723
Merge branch 'develop' into feature/saraqzhang/updatesetup4ladas
gmao-rreichle Apr 10, 2025
f670c37
addtional collections to HISTens.rc and forcing filename bkg.…
saraqzhang Apr 10, 2025
88da354
commented out lndfcstana collection (so not written by default), move…
gmao-rreichle Apr 11, 2025
185f057
re-instated "Nx+-" functionality for optional segment in MET_TAG to e…
gmao-rreichle Apr 14, 2025
f239bc7
Update CHANGELOG.md
gmao-rreichle Apr 14, 2025
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
70 changes: 70 additions & 0 deletions GEOSldas_App/GEOSldas_HISTdet.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#
# Sample GEOSldas HISTORY.rc file for LADAS (central simulation)
#
# This sample is for the GEOSldas instance that is coupled with the central
# simulation component of the Hy4dEnVar ADAS:
#
# (1) The "catch_progn_incr" is output is the ensemble average.
# (2) The "catch_progn_incr" output is in tile space. Its definition is generic
#
##################################################################################

VERSION: 1
EXPID: GEOSldas_expid

COLLECTIONS:
'catch_progn_incr'
::

GRID_LABELS: PC720x361-DC
PC576x361-DC
::

PC720x361-DC.GRID_TYPE: LatLon
PC720x361-DC.IM_WORLD: 720
PC720x361-DC.JM_WORLD: 361
PC720x361-DC.POLE: PC
PC720x361-DC.DATELINE: DC
PC720x361-DC.LM: 1

PC576x361-DC.GRID_TYPE: LatLon
PC576x361-DC.IM_WORLD: 576
PC576x361-DC.JM_WORLD: 361
PC576x361-DC.POLE: PC
PC576x361-DC.DATELINE: DC
PC576x361-DC.LM: 1


catch_progn_incr.descr: 'Tile-space,3-Hourly,Instantaneous,Single-Level,Assimilation,Ensemble-Average Land Prognostics Increments',
catch_progn_incr.template: '%y4%m2%d2_%h2%n2z.bin',
catch_progn_incr.mode: 'instantaneous',
catch_progn_incr.frequency: 030000,
catch_progn_incr.ref_time: 013000,
catch_progn_incr.fields: 'TCFSAT_INCR' , 'LANDASSIM' ,
'TCFTRN_INCR' , 'LANDASSIM' ,
'TCFWLT_INCR' , 'LANDASSIM' ,
'QCFSAT_INCR' , 'LANDASSIM' ,
'QCFTRN_INCR' , 'LANDASSIM' ,
'QCFWLT_INCR' , 'LANDASSIM' ,
'CAPAC_INCR' , 'LANDASSIM' ,
'CATDEF_INCR' , 'LANDASSIM' ,
'RZEXC_INCR' , 'LANDASSIM' ,
'SRFEXC_INCR' , 'LANDASSIM' ,
'GHTCNT1_INCR' , 'LANDASSIM' ,
'GHTCNT2_INCR' , 'LANDASSIM' ,
'GHTCNT3_INCR' , 'LANDASSIM' ,
'GHTCNT4_INCR' , 'LANDASSIM' ,
'GHTCNT5_INCR' , 'LANDASSIM' ,
'GHTCNT6_INCR' , 'LANDASSIM' ,
'WESNN1_INCR' , 'LANDASSIM' ,
'WESNN2_INCR' , 'LANDASSIM' ,
'WESNN3_INCR' , 'LANDASSIM' ,
'HTSNNN1_INCR' , 'LANDASSIM' ,
'HTSNNN2_INCR' , 'LANDASSIM' ,
'HTSNNN3_INCR' , 'LANDASSIM' ,
'SNDZN1_INCR' , 'LANDASSIM' ,
'SNDZN2_INCR' , 'LANDASSIM' ,
'SNDZN3_INCR' , 'LANDASSIM' ,
::

# ========================== EOF ==============================================
1,083 changes: 1,083 additions & 0 deletions GEOSldas_App/GEOSldas_HISTens.rc

Large diffs are not rendered by default.

54 changes: 45 additions & 9 deletions GEOSldas_App/ldas_setup
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ class LDASsetup:
exphome_ = cmdLineArgs['exphome'].rstrip('/')
assert os.path.isdir(exphome_) # exphome should exist
self.exphome = os.path.abspath(exphome_)
self.nymdb = cmdLineArgs['nymdb']
self.nhmsb = cmdLineArgs['nhmsb']
self.verbose = cmdLineArgs['verbose']
self.runmodel = cmdLineArgs['runmodel']
if self.runmodel :
Expand Down Expand Up @@ -153,6 +155,9 @@ class LDASsetup:

for key in rqdExeInpKeys :
assert key in self.rqdExeInp,' "%s" is required in the input file %s' % (key,self.exeinpfile)
if cmdLineArgs['nymdb'] != 'None' and cmdLineArgs['nhmsb'] != 'None' :
self.date = f"{self.nymdb} {self.nhmsb}"
self.rqdExeInp[ 'BEG_DATE' ] = self.date

# print rqd exe inputs
if self.verbose:
Expand All @@ -167,9 +172,17 @@ class LDASsetup:
_mydir = None
self.ladas_coupling = int(self.rqdExeInp.get('LADAS_COUPLING',0))
self.adas_expdir =''
if self.ladas_coupling > 0:
assert 'ADAS_EXPDIR' in self.rqdExeInp, " need ADAS_EXPDIR in the input file %s" %(self.exeinpfile)
self.adas_expdir = self.rqdExeInp['ADAS_EXPDIR']
if self.ladas_coupling > 0 :
self.adas_expdir = os.path.dirname(self.exphome)
self.rqdExeInp[ 'ADAS_EXPDIR'] = self.adas_expdir
self.adas_expid = os.path.basename(self.adas_expdir)
self.rqdExeInp[ 'MET_TAG' ] = self.adas_expid + '__bkg'
if self.ladas_coupling == 1 :
self.rqdExeInp[ 'EXP_ID' ] = self.adas_expid + '_LDAS'
if self.ladas_coupling == 2 :
self.rqdExeInp[ 'EXP_ID' ] = self.adas_expid + '_LDAS4ens'
self.rqdExeInp[ 'MET_PATH' ] = self.adas_expdir +'/atmens/mem'

self.first_ens_id = int(self.rqdExeInp.get('FIRST_ENS_ID',0))
self.perturb = int(self.rqdExeInp.get('PERTURBATIONS',0))
if self.nens > 1:
Expand Down Expand Up @@ -1079,7 +1092,7 @@ class LDASsetup:

# DEFAULT rc files
default_rc = glob.glob(etcdir+'/GEOSldas_*.rc')
assert len(default_rc)==4
assert len(default_rc)==6
print (default_rc)
for rcfile in default_rc:
shortfile=rcfile.rsplit('GEOSldas_',1)[1]
Expand Down Expand Up @@ -1112,6 +1125,21 @@ class LDASsetup:
sp.call(shlex.split(cmd))
for line in fileinput.input(tmprcfile,inplace=True):
print (line.rstrip().replace('GEOSldas_expid',self.rqdExeInp['EXP_ID']))

# take HISTdet or HISTens if ladas
if shortfile =='HISTdet.rc' and self.ladas_coupling == 1 :
tmprcfile=self.rundir+'/HISTORY.rc'
histrc_file=rcfile
shutil.copy2(rcfile, tmprcfile)
for line in fileinput.input(tmprcfile,inplace=True):
print (line.rstrip().replace('GEOSldas_expid',self.rqdExeInp['EXP_ID']))
if shortfile =='HISTens.rc' and self.ladas_coupling == 2 :
tmprcfile=self.rundir+'/HISTORY.rc'
histrc_file=rcfile
shutil.copy2(rcfile, tmprcfile)
for line in fileinput.input(tmprcfile,inplace=True):
print (line.rstrip().replace('GEOSldas_expid',self.rqdExeInp['EXP_ID']))

# just copy an empty ExtData.rc
if shortfile=='ExtData.rc' :
shutil.copy2(rcfile, self.rundir+'/'+shortfile)
Expand Down Expand Up @@ -1553,14 +1581,12 @@ def _printExeInputKeys(rqdExeInpKeys):
print ('# #')
print ('# (2) EXP_DOMAIN must be global CS grid as in ADAS exp #')
print ('# #')
print ('# (3) MET_TAG must be set to [ADAS_EXPID]__Nx+- #')
print ('# (3) MET_TAG must be set to [ADAS_EXPID]__bkg #')
print ('# MET_PATH must be set as follows for #')
print ('# LADAS_COUPLING = 1: #')
print ('# [full_path]/[LDAS_EXPID]/scratch/ #')
print ('# ../../../../recycle/holdpredout/ #')
print ('# LADAS_COUPLING = 2: #')
print ('# [ADAS_EXPDIR]/atmens/ensdiag/forc #')
print ('# After ldas exp setup, verify the following link: #')
print ('# ../input/met_forcing/forc -> [MET_PATH] #')
print ('# [ADAS_EXPDIR]/atmens/mem #')
print ('# #')
print ('# (4) BCS_PATH must be consistent with that of #')
print ('# [ADAS_EXPDIR][/run/lnbcs #')
Expand Down Expand Up @@ -1710,6 +1736,16 @@ def parseCmdLine():
help='replace computing/sponsor account in batinp file',
type=str, default='None'
)
p_setup.add_argument(
'--nymdb',
help='replaces BEG_DATE date in exeinp file ',
type=str, default='None'
)
p_setup.add_argument(
'--nhmsb',
help='replaces BEG_DATE time in exeinp file ',
type=str, default='None'
)
p_setup.add_argument(
'--runmodel',
help='Obsolete.',
Expand Down
5 changes: 0 additions & 5 deletions GEOSldas_App/lenkf_j_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@
setenv GRID $forcgrid
$GEOSBIN/enpert_forc.csh
cd $SCRDIR
else

# move central-simulation forcing held in met_forcing to scratch dir
echo "move lfo_Nx+- met forcing from $EXPDIR/input/met_forcing to $SCRDIR"
/bin/mv $EXPDIR/input/met_forcing/*lfo_Nx+-*nc4 $SCRDIR/.

endif
endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
#
##############################################################################

NUM_LDAS_ENSEMBLE: [NUM_ATM_ENSEMBLE]
# e.g., ATMENS_AGCM_GRID = CF0090x6C
EXP_DOMAIN: [ATMENS_AGCM_GRID]_GLOBAL

NUM_LDAS_ENSEMBLE: [NUM_ATMENS_ENSEMBLE]

LADAS_COUPLING: 2

ADAS_EXPDIR: [full_path]/[ADAS_EXPDIR]

MET_TAG: [ADAS_EXPID]__Nx+-
MET_PATH: [ADAS_EXPDIR]/atmens/ensdiag/mem
MET_TAG: [ADAS_EXPID]__bkg
MET_PATH: [ADAS_EXPDIR]/atmens/mem

MET_HINTERP: 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
#
##############################################################################

# e.g., CENTRAL_AGCM_GRID = CF0360x6C
EXP_DOMAIN: [CENTRAL_AGCM_GRID]_GLOBAL

LADAS_COUPLING: 1

ADAS_EXPDIR: [full_path]/[ADAS_EXPDIR]

MET_TAG: [ADAS_EXPID]__Nx+-
MET_PATH: ../../scratch
MET_TAG: [ADAS_EXPID]__bkg
MET_PATH: ../../../../recycle/holdpredout
# option to use perturbed forcing created from central simulation and atm ensemble
# MET_PATH: [ADAS_EXPDIR]/atmens/rgdlfo

Expand Down
24 changes: 12 additions & 12 deletions GEOSldas_App/util/config/rewind_GEOSldas.csh
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ while ($inens <= $NENS)

if ($inens < 10) then
set ENSDIR = `echo ens000${inens}`
set catin = `echo catch000${inens}`
set pertin = `echo landpert000${inens}`
set seedin = `echo obspertrseed000${inens}`
set catin = `echo catch_e000${inens}`
set pertin = `echo landpert_e000${inens}`
set seedin = `echo obspertrseed_e000${inens}`
else if($inens < 100) then
set ENSDIR = `echo ens00${inens}`
set catin = `echo catch00${inens}`
set pertin = `echo landpert00${inens}`
set seedin = `echo obspertrseed00${inens}`
set catin = `echo catch_e00${inens}`
set pertin = `echo landpert_e00${inens}`
set seedin = `echo obspertrseed_e00${inens}`
else if($inens < 1000) then
set ENSDIR = `echo ens0${inens}`
set catin = `echo catch0${inens}`
set pertin = `echo landpert0${inens}`
set seedin = `echo obspertrseed0${inens}`
set catin = `echo catch_e0${inens}`
set pertin = `echo landpert_e0${inens}`
set seedin = `echo obspertrseed_e0${inens}`
else
set ENSDIR = `echo ens${inens}`
set catin = `echo catch${inens}`
set pertin = `echo landpert${inens}`
set seedin = `echo obspertrseed${inens}`
set catin = `echo catch_e${inens}`
set pertin = `echo landpert_e${inens}`
set seedin = `echo obspertrseed_e${inens}`
endif

/bin/ln -s ${rsout}/${ENSDIR}/Y${yin}/M${min}/${expid}.catch_internal_rst.${date} ${catin}_internal_rst
Expand Down
Loading
Loading