Skip to content

Commit

Permalink
Fix for no tiles in process + few minor changes (#316)
Browse files Browse the repository at this point in the history
1) fix for no tiles in a process.
   - Branch is 0-diff vs develop in the current test suite. 
   - Branch is NOT yet 0-diff between the (old) 1d decomposition (w/ optimization) and the new 2d decomposition functionality.
2) change in absolute path to relative path link in lenkf.j.template
3) one place to set up determine NUM_LDAS_ENSEMBLE entry in lenkf.j from LDAS.rc, replacing the independent, ldas_setup-generated specification in lenkf.j
  • Loading branch information
weiyuan-jiang committed Sep 30, 2020
1 parent 16d36ae commit 455b31e
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 152 deletions.
2 changes: 0 additions & 2 deletions src/Applications/LDAS_App/ldas_setup
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,6 @@ class LDASsetup:
fout.write(line.replace('MY_EXPID',self.rqdExeInp['EXP_ID']))
elif 'MY_EXPDOMAIN' in line :
fout.write(line.replace('MY_EXPDOMAIN',self.rqdExeInp['EXP_DOMAIN']))
elif 'MY_ENSEMBLE' in line :
fout.write(line.replace('MY_ENSEMBLE',str(self.rqdExeInp['NUM_LDAS_ENSEMBLE'])))
elif 'MY_LOGFILE' in line :
fout.write(line.replace('MY_LOGFILE',my_logfile))
elif 'MY_ERRFILE' in line :
Expand Down
14 changes: 7 additions & 7 deletions src/Applications/LDAS_App/lenkf.j.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ setenv RUN_CMD "$GEOSBIN/esma_mpirun -np "
setenv HOMDIR $EXPDIR/run/
setenv SCRDIR $EXPDIR/scratch
setenv MODEL MY_MODEL
@ NENS = MY_ENSEMBLE
setenv MYNAME `finger $USER | cut -d: -f3 | head -1`
setenv POSTPROC_HIST MY_POSTPROC_HIST
setenv LADAS_COUPLING MY_LADAS_COUPLING # 1 --yes, 0 --no
Expand Down Expand Up @@ -75,6 +74,7 @@ endif

if (! -e $SCRDIR ) mkdir -p $SCRDIR

set NENS = `grep NUM_LDAS_ENSEMBLE: $HOMDIR/LDAS.rc | cut -d':' -f2`
set END_DATE = `grep END_DATE: $HOMDIR/CAP.rc | cut -d':' -f2`
set NUM_SGMT = `grep NUM_SGMT: $HOMDIR/CAP.rc | cut -d':' -f2`

Expand Down Expand Up @@ -577,16 +577,16 @@ EOF
if ( -l "$new_mwrtm_file" ) then
/bin/rm -f $new_mwrtm_file
endif
/bin/ln -s $old_mwrtm_file $new_mwrtm_file
/bin/ln -rs $old_mwrtm_file $new_mwrtm_file
/bin/rm ../input/restart/mwrtm_param_rst
/bin/ln -s $new_mwrtm_file ../input/restart/mwrtm_param_rst
/bin/ln -rs $new_mwrtm_file ../input/restart/mwrtm_param_rst
endif

if (-f $old_catch_param) then
if ( -l "$new_catch_param" ) then
/bin/rm -f $new_catch_param
endif
/bin/ln -s $old_catch_param $new_catch_param
/bin/ln -rs $old_catch_param $new_catch_param
endif

# Move Intermediate Checkpoints to RESTARTS directory
Expand Down Expand Up @@ -614,7 +614,7 @@ EOF
set tmp_file = $EXPDIR/output/$EXPDOMAIN/rs/$ENSDIR/Y${eYEAR}/M${eMON}/${EXPID}.${rstf}_internal_rst.${eYEAR}${eMON}${eDAY}_${eHour}${eMin}
/bin/mv ${rstf}${ENSID}_internal_checkpoint $tmp_file
/bin/rm -f $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
/bin/ln -s $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
/bin/ln -rs $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
endif

set rstf = 'landpert'
Expand All @@ -626,7 +626,7 @@ EOF
/bin/rm -f ${rstf}${ENSID}_internal_checkpoint
set old_rst = `/usr/bin/readlink -f $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst`
/bin/rm -f $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
/bin/ln -s $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
/bin/ln -rs $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_internal_rst
/usr/bin/gzip $old_rst &
endif

Expand All @@ -635,7 +635,7 @@ EOF
set tmp_file = $EXPDIR/output/$EXPDOMAIN/rs/$ENSDIR/Y${eYEAR}/M${eMON}/${EXPID}.${rstf}_rst.${eYEAR}${eMON}${eDAY}_${eHour}${eMin}
/bin/mv ${rstf}${ENSID}_checkpoint $tmp_file
/bin/rm -f $EXPDIR/input/restart/${rstf}${ENSID}_rst
/bin/ln -s $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_rst
/bin/ln -rs $tmp_file $EXPDIR/input/restart/${rstf}${ENSID}_rst
endif
# move intermediate check point files to output/$EXPDOMAIN/rs/$ENSDIR/Yyyyy/Mmm/ directories
# -------------------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 455b31e

Please sign in to comment.