[Dart-dev] [6049] DART/branches/development/models/CESM/shell_scripts: The setup script advances default model states for 3 days.

nancy at ucar.edu nancy at ucar.edu
Thu Apr 11 10:00:46 MDT 2013


Revision: 6049
Author:   thoar
Date:     2013-04-11 10:00:44 -0600 (Thu, 11 Apr 2013)
Log Message:
-----------
The setup script advances default model states for 3 days.
Subsequent restarts have been tested for 24 hour advances.
There is a problem with CLM at the moment in that the namelist
settings are not creating .h0. files, which DART needs.

There is also an inconsistency in that the inflation files as
created have a prefix for each model component but are not
staged using these prefixes ... yet.

Modified Paths:
--------------
    DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh
    DART/branches/development/models/CESM/shell_scripts/assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh
    DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh

-------------- next part --------------
Modified: DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh	2013-04-10 17:07:31 UTC (rev 6048)
+++ DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh	2013-04-11 16:00:44 UTC (rev 6049)
@@ -63,9 +63,9 @@
 #    script names; so consider it's length and information content.
 # num_instances:  Number of ensemble members
 
-setenv case                 cesm_test3
+setenv case                 cesm_test
+setenv cesmtag              cesm1_1_1
 setenv compset              B_RCP4.5_CAM5_CN
-setenv cesmtag              cesm1_1_1
 setenv resolution           0.9x1.25_gx1v6
 setenv num_instances        2
 
@@ -113,11 +113,13 @@
 #
 # stop_option   Units for determining the forecast length between assimilations
 # stop_n        Number of time units in the forecast
+# assim_n       Number of time units between assimilations
 # ==============================================================================
 
 setenv resubmit      0
 setenv stop_option   nhours
 setenv stop_n        72
+setenv assim_n       24
 
 # ==============================================================================
 # job settings
@@ -129,7 +131,7 @@
 # ==============================================================================
 
 setenv ACCOUNT      P86850054
-setenv timewall     1:00
+setenv timewall     0:30
 setenv queue        small
 setenv ptile        15
 
@@ -215,14 +217,14 @@
 echo "OCN  gets $ocn_pes"
 echo ""
 
-#   total number of hw pes = 240 
-#   cpl hw pe range ~ from 0 to 59 
-#   cam hw pe range ~ from 0 to 119 
-#   pop2 hw pe range ~ from 120 to 239 
-#   clm hw pe range ~ from 0 to 59 
-#   cice hw pe range ~ from 60 to 89 
-#   sglc hw pe range ~ from 90 to 119 
-#   rtm hw pe range ~ from 120 to 149 
+#   total number of hw pes = 240
+#   cpl hw pe range ~ from 0 to 59
+#   cam hw pe range ~ from 0 to 119
+#   pop2 hw pe range ~ from 120 to 239
+#   clm hw pe range ~ from 0 to 59
+#   cice hw pe range ~ from 60 to 89
+#   sglc hw pe range ~ from 90 to 119
+#   rtm hw pe range ~ from 120 to 149
 #   TJH FIXME ... CLM could use a lot more processors.
 
 ./xmlchange NTHRDS_CPL=1,NTASKS_CPL=$cpl_pes
@@ -265,7 +267,7 @@
 ./xmlchange STOP_N=$stop_n
 ./xmlchange CONTINUE_RUN=FALSE
 ./xmlchange RESUBMIT=$resubmit
-./xmlchange PIO_TYPENAME=pnetcdf
+#./xmlchange PIO_TYPENAME=pnetcdf
 
 ./xmlchange DOUT_S=FALSE
 ./xmlchange DOUT_S_ROOT=${archdir}
@@ -292,6 +294,58 @@
 endif
 
 # ==============================================================================
+# Modify namelist templates for each instance.
+# ==============================================================================
+
+@ inst = 1
+while ($inst <= $num_instances)
+
+   set instance  = `printf %04d $inst`
+
+   # ===========================================================================
+   set fname = "user_nl_cam_$instance"
+   # ===========================================================================
+
+   echo " inithist      = 'DAILY'"                      >> ${fname}
+   echo " ncdata        = 'cam_initial_${instance}.nc'" >> ${fname}
+   echo " empty_htapes  = .true. "                      >> ${fname}
+   echo " fincl1        = 'PHIS:I' "                    >> ${fname}
+   echo " nhtfrq        = -$assim_n "                   >> ${fname}
+   echo " mfilt         = 1 "                           >> ${fname}
+
+   # ===========================================================================
+   set fname = "user_nl_pop2_$instance"
+   # ===========================================================================
+
+   # POP Namelists
+   # init_ts_suboption = 'data_assim'   for non bit-for-bit restarting (assimilation mode)
+   # init_ts_suboption = 'null'         for 'perfect' restarting/forecasting
+
+   echo "init_ts_suboption = 'null'" >> $fname
+
+   # ===========================================================================
+   set fname = "user_nl_clm_$instance"
+   # ===========================================================================
+   
+   # Customize the land namelists
+   # The history tapes are a work in progress. If you write out the instantaneous
+   # flux variables every 30 minutes to the .h1. file, the forward observation
+   # operators for these fluxes should just read them from the .h1. file rather
+   # than trying to create them from the (incomplete DART) CLM state.
+
+   echo "hist_empty_htapes = .false."                >> $fname
+   echo "hist_fincl1 = 'NEP'"                        >> $fname
+   echo "hist_fincl2 = 'NEP','FSH','EFLX_LH_TOT_R'"  >> $fname
+   echo "hist_nhtfrq = -$assim_n,1,"                 >> $fname
+   echo "hist_mfilt  = 1,48"                         >> $fname
+   echo "hist_avgflag_pertape = 'A','A'"             >> $fname
+
+   @ inst ++
+end
+
+./preview_namelists
+
+# ==============================================================================
 # Update source files if need be
 #    Ideally, using DART will not require any source mods.
 #    Until then, this script accesses source mods from a hard-wired location below.
@@ -330,8 +384,30 @@
 
 # ==============================================================================
 # Stage the restarts now that the run directory exists
+# I ran this compset once without setting user_nl_atm_00nn to see where the
+# initial files come from.
 # ==============================================================================
 
+set stagedir = /glade/p/cesm/cseg/inputdata/atm/cam/inic/fv
+
+echo ''
+echo "Copying the restart files from ${stagedir}"
+echo 'into the CESM run directory.'
+echo ''
+
+@ inst = 1
+while ($inst <= $num_instances)
+   set instance  = `printf %04d $inst`
+
+   echo ''
+   echo "Staging restarts for instance $inst of $num_instances"
+
+   ${COPY} ${stagedir}/cami-mam3_0000-01-01_0.9x1.25_L30_c100618.nc \
+             ${rundir}/cam_initial_${instance}.nc
+
+   @ inst ++
+end
+
 # ==============================================================================
 # Edit the run script to reflect project, queue, and wallclock
 # ==============================================================================
@@ -451,24 +527,36 @@
 endif
 
 # ${COPY} ${DARTroot}/models/CESM/shell_scripts/st_archive.sh   Tools/ TJH DEBUG
-${COPY} ${DARTroot}/models/CESM/shell_scripts/assimilate.csh  assimilate.csh
-${COPY} ${DARTroot}/models/CESM/work/input.nml                input.nml
+${COPY} ${DARTroot}/models/CESM/shell_scripts/assimilate.csh          assimilate.csh
+${COPY} ${DARTroot}/models/CESM/shell_scripts/cam_assimilate.csh  cam_assimilate.csh
+${COPY} ${DARTroot}/models/CESM/shell_scripts/pop_assimilate.csh  pop_assimilate.csh
+${COPY} ${DARTroot}/models/CESM/shell_scripts/clm_assimilate.csh  clm_assimilate.csh
 
 # ==============================================================================
 # Stage the DART executables in the CESM execution root directory: EXEROOT
 # ==============================================================================
 
-foreach FILE ( filter pop_to_dart dart_to_pop \
-                      clm_to_dart dart_to_clm \
-                      cam_to_dart dart_to_cam )
-   ${COPY} ${DARTroot}/models/CESM/work/${FILE} ${exeroot}/
-   if ( $status != 0 ) then
-      echo "WARNING: ${DARTroot}/models/CESM/work/${FILE} not copied to ${exeroot}"
-      echo "WARNING: ${DARTroot}/models/CESM/work/${FILE} not copied to ${exeroot}"
-   #  exit -3  TJH FIXME
-   endif
-end
+${COPY} ${DARTroot}/models/cam/work/cam_to_dart   ${exeroot}/.
+${COPY} ${DARTroot}/models/cam/work/dart_to_cam   ${exeroot}/.
+${COPY} ${DARTroot}/models/cam/work/filter        ${exeroot}/filter_cam
+${COPY} ${DARTroot}/models/cam/work/filter        ${exeroot}/filter
+${COPY} ${DARTroot}/models/cam/work/input.nml                cam_input.nml
 
+${COPY} ${DARTroot}/models/clm/work/clm_to_dart   ${exeroot}/.
+${COPY} ${DARTroot}/models/clm/work/dart_to_clm   ${exeroot}/.
+${COPY} ${DARTroot}/models/clm/work/filter        ${exeroot}/filter_clm
+${COPY} ${DARTroot}/models/clm/work/input.nml                clm_input.nml
+
+${COPY} ${DARTroot}/models/POP/work/pop_to_dart   ${exeroot}/.
+${COPY} ${DARTroot}/models/POP/work/dart_to_pop   ${exeroot}/.
+${COPY} ${DARTroot}/models/POP/work/filter        ${exeroot}/filter_pop
+${COPY} ${DARTroot}/models/POP/work/input.nml                pop_input.nml
+
+${COPY} ${DARTroot}/models/CESM/work/cesm_to_dart ${exeroot}/.
+${COPY} ${DARTroot}/models/CESM/work/dart_to_cesm ${exeroot}/.
+${COPY} ${DARTroot}/models/CESM/work/filter       ${exeroot}/filter_cesm
+${COPY} ${DARTroot}/models/CESM/work/input.nml               input.nml
+
 # ==============================================================================
 # What to do next
 # ==============================================================================
@@ -485,7 +573,7 @@
 echo "For continued submissions after the initial (hybrid) startup,"
 echo "make the following changes to the env_run variables:"
 echo ''
-echo "  ./xmlchange -file env_run.xml -id STOP_N        -val 1"
+echo "  ./xmlchange -file env_run.xml -id STOP_N        -val 24"
 echo "  ./xmlchange -file env_run.xml -id CONTINUE_RUN  -val TRUE"
 echo "  ./xmlchange -file env_run.xml -id RESUBMIT      -val <your_favorite_number>"
 echo ''

Modified: DART/branches/development/models/CESM/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/assimilate.csh	2013-04-10 17:07:31 UTC (rev 6048)
+++ DART/branches/development/models/CESM/shell_scripts/assimilate.csh	2013-04-11 16:00:44 UTC (rev 6049)
@@ -12,12 +12,10 @@
 
 echo "`date` -- BEGIN CESM ASSIMILATE"
 
-./cam_assimilate.csh
+${CASEROOT}/cam_assimilate.csh
+${CASEROOT}/pop_assimilate.csh
+# ${CASEROOT}/clm_assimilate.csh
 
-# for now, just call the cam script
-#./pop_assimilate.csh
-#./clm_assimilate.csh
-
 echo "`date` -- END CESM ASSIMILATE"
 
 exit 0

Modified: DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh	2013-04-10 17:07:31 UTC (rev 6048)
+++ DART/branches/development/models/CESM/shell_scripts/cam_assimilate.csh	2013-04-11 16:00:44 UTC (rev 6049)
@@ -57,7 +57,7 @@
 set ensemble_size = ${NINST_ATM}
 
 # Create temporary working directory for the assimilation
-set temp_dir = assimilate_dir
+set temp_dir = assimilate_cam
 echo "temp_dir is $temp_dir"
 
 # Create a clean temporary directory and go there
@@ -75,7 +75,7 @@
 # Piping stuff through 'bc' strips off any preceeding zeros.
 #-------------------------------------------------------------------------
 
-set FILE = `ls -1t ../*.cam_0001.i.* | head -n 1`
+set FILE = `head -1 ../rpointer.atm_0001`
 set FILE = $FILE:t
 set FILE = $FILE:r
 set MYCASE = `echo $FILE | sed -e "s#\..*##"`
@@ -113,11 +113,11 @@
 
 echo "`date` -- BEGIN COPY BLOCK"
 
-if (  -e   ${CASEROOT}/input.nml ) then
-   ${COPY} ${CASEROOT}/input.nml .
+if (  -e   ${CASEROOT}/cam_input.nml ) then
+   ${COPY} ${CASEROOT}/cam_input.nml input.nml
 else
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/cam_input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/cam_input.nml not found ... ERROR"
    exit -2
 endif
 
@@ -385,17 +385,17 @@
 endif
 
 echo "`date` -- BEGIN FILTER"
-${LAUNCHCMD} ${EXEROOT}/filter || exit -7
+${LAUNCHCMD} ${EXEROOT}/filter_cam || exit -7
 echo "`date` -- END FILTER"
 
 if ( $?LSB_PJL_TASK_GEOMETRY ) then
    setenv LSB_PJL_TASK_GEOMETRY "${ORIGINAL_LAYOUT}"
 endif
 
-${MOVE} Prior_Diag.nc      ../Prior_Diag.${ATM_DATE_EXT}.nc
-${MOVE} Posterior_Diag.nc  ../Posterior_Diag.${ATM_DATE_EXT}.nc
-${MOVE} obs_seq.final      ../obs_seq.${ATM_DATE_EXT}.final
-${MOVE} dart_log.out       ../dart_log.${ATM_DATE_EXT}.out
+${MOVE} Prior_Diag.nc      ../cam_Prior_Diag.${ATM_DATE_EXT}.nc
+${MOVE} Posterior_Diag.nc  ../cam_Posterior_Diag.${ATM_DATE_EXT}.nc
+${MOVE} obs_seq.final      ../cam_obs_seq.${ATM_DATE_EXT}.final
+${MOVE} dart_log.out       ../cam_dart_log.${ATM_DATE_EXT}.out
 
 # Accomodate any possible inflation files
 # 1) rename file to reflect current date
@@ -404,7 +404,7 @@
 
 foreach FILE ( ${PRIOR_INF_OFNAME} ${POSTE_INF_OFNAME} ${PRIOR_INF_DIAG} ${POSTE_INF_DIAG} )
    if ( -e ${FILE} ) then
-      ${MOVE} ${FILE} ../${FILE}.${ATM_DATE_EXT}
+      ${MOVE} ${FILE} ../cam_${FILE}.${ATM_DATE_EXT}
    else
       echo "No ${FILE} for ${ATM_DATE_EXT}"
    endif

Modified: DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh	2013-04-10 17:07:31 UTC (rev 6048)
+++ DART/branches/development/models/CESM/shell_scripts/clm_assimilate.csh	2013-04-11 16:00:44 UTC (rev 6049)
@@ -57,7 +57,7 @@
 set ensemble_size = ${NINST_LND}
 
 # Create temporary working directory for the assimilation
-set temp_dir = assimilate_dir
+set temp_dir = assimilate_clm
 echo "temp_dir is $temp_dir"
 
 # Create a clean temporary directory and go there
@@ -100,7 +100,7 @@
 
 set YYYYMMDD = `printf %04d%02d%02d ${LND_YEAR} ${LND_MONTH} ${LND_DAY}`
 set YYYYMM   = `printf %04d%02d     ${LND_YEAR} ${LND_MONTH}`
-set OBSFNAME = obs_seq.daybefore.${YYYYMMDD}
+set OBSFNAME = obs_seq.${LND_DATE_EXT}
 set OBS_FILE = ${BASEOBSDIR}/${YYYYMM}/${OBSFNAME}
 
 if (  -e   ${OBS_FILE} ) then
@@ -117,11 +117,11 @@
 
 echo "`date` -- BEGIN COPY BLOCK"
 
-if (  -e   ${CASEROOT}/input.nml ) then
-   ${COPY} ${CASEROOT}/input.nml .
+if (  -e   ${CASEROOT}/clm_input.nml ) then
+   ${COPY} ${CASEROOT}/clm_input.nml input.nml
 else
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/clm_input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/clm_input.nml not found ... ERROR"
    exit -2
 endif
 
@@ -399,17 +399,17 @@
 endif
 
 echo "`date` -- BEGIN FILTER"
-${LAUNCHCMD} ${EXEROOT}/filter || exit -7
+${LAUNCHCMD} ${EXEROOT}/filter_clm || exit -7
 echo "`date` -- END FILTER"
 
 if ( $?LSB_PJL_TASK_GEOMETRY ) then
    setenv LSB_PJL_TASK_GEOMETRY "${ORIGINAL_LAYOUT}"
 endif
 
-${MOVE} Prior_Diag.nc      ../Prior_Diag.${LND_DATE_EXT}.nc
-${MOVE} Posterior_Diag.nc  ../Posterior_Diag.${LND_DATE_EXT}.nc
-${MOVE} obs_seq.final      ../obs_seq.${LND_DATE_EXT}.final
-${MOVE} dart_log.out       ../dart_log.${LND_DATE_EXT}.out
+${MOVE} Prior_Diag.nc      ../clm_Prior_Diag.${LND_DATE_EXT}.nc
+${MOVE} Posterior_Diag.nc  ../clm_Posterior_Diag.${LND_DATE_EXT}.nc
+${MOVE} obs_seq.final      ../clm_obs_seq.${LND_DATE_EXT}.final
+${MOVE} dart_log.out       ../clm_dart_log.${LND_DATE_EXT}.out
 
 # Accomodate any possible inflation files
 # 1) rename file to reflect current date
@@ -418,7 +418,7 @@
 
 foreach FILE ( ${PRIOR_INF_OFNAME} ${POSTE_INF_OFNAME} ${PRIOR_INF_DIAG} ${POSTE_INF_DIAG} )
    if ( -e ${FILE} ) then
-      ${MOVE} ${FILE} ../${FILE}.${LND_DATE_EXT}
+      ${MOVE} ${FILE} ../clm_${FILE}.${LND_DATE_EXT}
    else
       echo "No ${FILE} for ${LND_DATE_EXT}"
    endif

Modified: DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh
===================================================================
--- DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh	2013-04-10 17:07:31 UTC (rev 6048)
+++ DART/branches/development/models/CESM/shell_scripts/pop_assimilate.csh	2013-04-11 16:00:44 UTC (rev 6049)
@@ -57,7 +57,7 @@
 set ensemble_size = ${NINST_OCN}
 
 # Create temporary working directory for the assimilation
-set temp_dir = assimilate_dir
+set temp_dir = assimilate_pop
 echo "temp_dir is $temp_dir"
 
 # Create a clean temporary directory and go there
@@ -114,11 +114,11 @@
 
 echo "`date` -- BEGIN COPY BLOCK"
 
-if (  -e   ${CASEROOT}/input.nml ) then
-   ${COPY} ${CASEROOT}/input.nml .
+if (  -e   ${CASEROOT}/pop_input.nml ) then
+   ${COPY} ${CASEROOT}/pop_input.nml input.nml
 else
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
-   echo "ERROR ... DART required file ${CASEROOT}/input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/pop_input.nml not found ... ERROR"
+   echo "ERROR ... DART required file ${CASEROOT}/pop_input.nml not found ... ERROR"
    exit -2
 endif
 
@@ -383,17 +383,17 @@
 endif
 
 echo "`date` -- BEGIN FILTER"
-${LAUNCHCMD} ${EXEROOT}/filter || exit -7
+${LAUNCHCMD} ${EXEROOT}/filter_pop || exit -7
 echo "`date` -- END FILTER"
 
 if ( $?LSB_PJL_TASK_GEOMETRY ) then
    setenv LSB_PJL_TASK_GEOMETRY "${ORIGINAL_LAYOUT}"
 endif
 
-${MOVE} Prior_Diag.nc      ../Prior_Diag.${OCN_DATE_EXT}.nc
-${MOVE} Posterior_Diag.nc  ../Posterior_Diag.${OCN_DATE_EXT}.nc
-${MOVE} obs_seq.final      ../obs_seq.${OCN_DATE_EXT}.final
-${MOVE} dart_log.out       ../dart_log.${OCN_DATE_EXT}.out
+${MOVE} Prior_Diag.nc      ../pop_Prior_Diag.${OCN_DATE_EXT}.nc
+${MOVE} Posterior_Diag.nc  ../pop_Posterior_Diag.${OCN_DATE_EXT}.nc
+${MOVE} obs_seq.final      ../pop_obs_seq.${OCN_DATE_EXT}.final
+${MOVE} dart_log.out       ../pop_dart_log.${OCN_DATE_EXT}.out
 
 # Accomodate any possible inflation files
 # 1) rename file to reflect current date
@@ -402,7 +402,7 @@
 
 foreach FILE ( ${PRIOR_INF_OFNAME} ${POSTE_INF_OFNAME} ${PRIOR_INF_DIAG} ${POSTE_INF_DIAG} )
    if ( -e ${FILE} ) then
-      ${MOVE} ${FILE} ../${FILE}.${OCN_DATE_EXT}
+      ${MOVE} ${FILE} ../pop_${FILE}.${OCN_DATE_EXT}
    else
       echo "No ${FILE} for ${OCN_DATE_EXT}"
    endif


More information about the Dart-dev mailing list