[Dart-dev] [4051] DART/trunk/models/cam: More updates from Kevin Raeder:
nancy at ucar.edu
nancy at ucar.edu
Tue Sep 15 14:59:18 MDT 2009
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/dart-dev/attachments/20090915/1f431108/attachment.html
-------------- next part --------------
Modified: DART/trunk/models/cam/full_experiment/auto_diag2ms_LSF.csh
===================================================================
--- DART/trunk/models/cam/full_experiment/auto_diag2ms_LSF.csh 2009-09-15 20:55:21 UTC (rev 4050)
+++ DART/trunk/models/cam/full_experiment/auto_diag2ms_LSF.csh 2009-09-15 20:59:18 UTC (rev 4051)
@@ -83,6 +83,7 @@
## Added to make mean easily accessible in the form of a CAM initial file
echo 'cam_analyses.tar' >> tar_excl_list
echo 'H[0-9]*' >> tar_excl_list
+echo 'H_all*' >> tar_excl_list
#-----------------------------
# Stuff the Posterior mean fields into CAM initial files.
@@ -97,6 +98,7 @@
# Save out history files from H* directories before calculating CAM/CLM analyses and deleting H*
# compressing saves a factor of 12.
+ set ar_status = 1
ls H[012]*/*.h0.* >& /dev/null
if ($status == 0) then
gzip H[012]*/*.h0.*
@@ -110,7 +112,7 @@
endif
if ($ar_status != 0) echo 'ARCHIVING of H[012]*.h0.gz.tar FAILED' >> & $saved
else
- echo 'ARCHIVING of H[012]*.h0.gz.tar FAILED; no files available' >> & $saved
+ echo 'ARCHIVING of H[012]*.h0.gz.tar NOT DONE; no files available' >> & $saved
endif
if (-e ../../analyses2initial.csh) then
@@ -135,23 +137,23 @@
# exit
# endif
- set num_anal = `ls H[0-2]*/cam_init_*`
-# ls H[0-2]*/c*_init_* > /dev/null
-# if ($status != 0) then
set tar_stat = 0
if (! -e cam_analyses.tar) then
- if ($#num_anal < 4) then
+ ls -1 -d H[0-2]* >! hdir_names
+ set num_anal = `wc -l hdir_names`
+ if ($num_anal[1] > 0) then
echo " " >>& $saved
../../analyses2initial.csh no_MS '.' Posterior copy 1 ${obs_seq} >>& $saved
- set num_anal = `ls H[0-2]*/cam_init_*`
+ tar -c -f cam_analyses.tar H[0-2]*/{c,ice}*_init_*
+ set tar_stat = $status
endif
-
- tar -c -f cam_analyses.tar H[0-2]*/{c,ice}*_init_*
- set tar_stat = $status
endif
- if ($tar_stat == 0 ) \
+ if ($tar_stat == 0 ) then
msrcp -pe 1000 -pr $proj_num -wpwd $write_pass -comment "write password $write_pass" \
cam_analyses.tar mss:${ms_dir}/cam_analyses.tar >>& $saved
+ else
+ echo 'cam_analyses.tar NOT archived because of tar problem' >>& $saved
+ endif
set list = `ls -l cam_analyses.tar`
set local_size = $list[5]
set list = `msls -l ${ms_dir}/cam_analyses.tar`
Modified: DART/trunk/models/cam/full_experiment/job_mpi.csh
===================================================================
--- DART/trunk/models/cam/full_experiment/job_mpi.csh 2009-09-15 20:55:21 UTC (rev 4050)
+++ DART/trunk/models/cam/full_experiment/job_mpi.csh 2009-09-15 20:59:18 UTC (rev 4051)
@@ -353,6 +353,8 @@
set CAM_phis = $CAM_src/cam_phis.nc
set num_lons = 64
set num_lats = 32
+ # < CAM 3.6.0:
+ set num_levs = 26
else if ($resol == T42) then
# T42
set DART_ics_1 = /ptmp/dart/CAM_init/T42/03-01-01/DART_MPI
@@ -365,6 +367,8 @@
set CAM_phis = $CAM_src/cam_phis.nc
set num_lons = 128
set num_lats = 64
+ # < CAM 3.6.0:
+ set num_levs = 26
else if ($resol == T85) then
# T85
set DART_ics_1 = /ptmp/dart/CAM_init/T85_cam3.5/Jul_1/DART
@@ -376,6 +380,8 @@
# set CAM_src = /ptmp/dart/CAM/CAM_src/Cam3/cam3.1/models/atm/cam/bld/T85_3.1-O3
set num_lons = 256
set num_lats = 128
+ # < CAM 3.6.0:
+ set num_levs = 26
else if ($resol == FV4x5) then
set DART_ics_1 = /ptmp/dart/CAM_init/FV4x5/03-01-01/DART_MPI
set CAM_ics_1 = /ptmp/dart/CAM_init/FV4x5/03-01-01/CAM/caminput_
@@ -386,6 +392,8 @@
set CAM_phis = $CAM_src/cam_phis.nc
set num_lons = 72
set num_lats = 46
+ # < CAM 3.6.0:
+ set num_levs = 26
else if ($resol == FV1.9x2.5) then
set DART_ics_1 = /ptmp/dart/CAM_init/FV1.9x2.5_cam3.6.26/Aug_1/DART
set CAM_ics_1 = /ptmp/dart/CAM_init/FV1.9x2.5_cam3.6.26/Aug_1/CAM/caminput_
@@ -395,17 +403,17 @@
# set CAM_src = /blhome/raeder/Cam4/cam3.6.32.24/models/atm/cam/bld/FV_2deg-noleap-O2
set CAM_src = /blhome/raeder/Cam4/cam3.6.32.24/models/atm/cam/bld/FV_2deg-del4-O2
set CAM_phis = $CAM_src/cam_phis.nc
+ # Running CAM parallel (async=4) may require grid info for domain decomposition.
set num_lons = 144
set num_lats = 96
+ # < CAM 3.6.0: set num_levs = 26
+ set num_levs = 30
# To use real SSTs it's necessary to pass matching stream info to the ice model by a special namelist
# which is done through casemodel.
# This must be done (now) even for CAM < 3.6; enter 'none' and 0s in that case.
set sst = '/ptmp/dart/CAM_init/FV1.9x2.5_cam3.5/Namelistin_files/sst_HadOIBl_bc_1.9x2.5_1949_2007.nc'
set str_yr_first = 1949
set str_yr_last = 2007
- # Newer CAMs need specific namelist choices.
- # Define a wordlist to test for appropriate namelist entries.
- set cam_version = ( 3 6 32 )
# If another FV resolution is added, then another qualifier is needed in the
# domain decomposition section below.
endif
@@ -415,9 +423,6 @@
# This is only used if obs_seq_1_depend = false
set namelist = 'cwd'
-set num_levs = 26
-if ($cam_version[1] > 3 || ($cam_version[1] == 3 && $cam_version[2] > 5)) set num_levs = 30
-
if (${parallel_cam} == true) then
set CAM_src = ${CAM_src}-mpi
endif
@@ -441,6 +446,11 @@
set save_freq = 4
set mod_save = 1
+# Set switch to archive the ensemble of h0 history files in a file on the Mass Store.
+# Be careful; the default h0 file is large, so you may want to edit its contents via
+# the CAM namelist
+set save_hist = 'false'
+
# END of run parameters to change
#==========================================================================================
@@ -457,7 +467,7 @@
#----------------------------------------------------------
# try to discover the ensemble size from the input.nml
# this is some gory shell programming ... all to do 'something simple'
-grep ens_size input_${obs_seq_first}.nml >! ensstring.$$
+grep ens_size ${input}${obs_seq_first}.nml >! ensstring.$$
set ensstring = `sed -e "s#,##g" ensstring.$$`
set num_ens = $ensstring[3]
${REMOVE} ensstring.$$
@@ -468,7 +478,7 @@
echo "There are ${num_ens} ensemble members." >> $MASTERLOG
# Try to discover the model version from input.nml
- grep model_version input_${obs_seq_first}.nml >! ensstring.$$
+ grep model_version ${input}${obs_seq_first}.nml >! ensstring.$$
# Replace the ,s with nothings and put the words into a list
set ensstring = `sed -e "s#,##g" ensstring.$$`
echo $ensstring[3] >! ensstring.$$
@@ -877,7 +887,8 @@
echo "$ice_init $str_yr_first $str_yr_last $sst" >> casemodel.$i
echo "$parallel_cam" >> casemodel.$i
echo "$run_command" >> casemodel.$i
- # Only write the 8th record if it's FV and run-cam.csh needs the decomposition info
+ echo "$save_hist" >> casemodel.$i
+ # Only write the 9th record if it's FV and run-cam.csh needs the decomposition info
if ($keep_lev_blocks > 0) then
echo "$num_procs $keep_lev_blocks $keep_lat_blocks " >> casemodel.$i
endif
Modified: DART/trunk/models/cam/shell_scripts/advance_model.csh
===================================================================
--- DART/trunk/models/cam/shell_scripts/advance_model.csh 2009-09-15 20:55:21 UTC (rev 4050)
+++ DART/trunk/models/cam/shell_scripts/advance_model.csh 2009-09-15 20:59:18 UTC (rev 4051)
@@ -217,18 +217,23 @@
${MOVE} namelist ${CENTRALDIR}
${MOVE} caminput.nc ${CENTRALDIR}/H${hour}/caminput_${element}.nc
${MOVE} clminput.nc ${CENTRALDIR}/H${hour}/clminput_${element}.nc
+ if (-e iceinput.tar) \
${MOVE} iceinput.tar ${CENTRALDIR}/H${hour}/iceinput_${element}.tar
- set hist = `ls *.h0.*`
- echo "advance_model: hist is "$hist >> cam_out_temp
- ${MOVE} $hist ${CENTRALDIR}/H${hour}
- # redundant element #; /$hist:r_${element}.nc
+ set save_hist = `head -8 ${CENTRALDIR}/casemodel | tail -1`
+ if ($save_hist == 'true') then
+ set hist = `ls *.h0.*`
+ echo "advance_model: hist is "$hist >> cam_out_temp
+ ${MOVE} $hist ${CENTRALDIR}/H${hour}
+ # redundant element #; /$hist:r_${element}.nc
+ endif
# link the new initial files into the CENTRAL directory where filter will find them.
${LINK} ${CENTRALDIR}/H${hour}/caminput_${element}.nc \
${CENTRALDIR}/caminput_${element}.nc
${LINK} ${CENTRALDIR}/H${hour}/clminput_${element}.nc \
${CENTRALDIR}/clminput_${element}.nc
+ if (-e iceinput.tar) \
${LINK} ${CENTRALDIR}/H${hour}/iceinput_${element}.tar \
${CENTRALDIR}/iceinput_${element}.tar
Modified: DART/trunk/models/cam/shell_scripts/run-cam.csh
===================================================================
--- DART/trunk/models/cam/shell_scripts/run-cam.csh 2009-09-15 20:55:21 UTC (rev 4050)
+++ DART/trunk/models/cam/shell_scripts/run-cam.csh 2009-09-15 20:59:18 UTC (rev 4051)
@@ -180,8 +180,8 @@
# job_mpi.csh has calculated num_procs to make nprocs be correct,
# and the helpful condition is satisfied in the namelist below.
set length_casemodel = `wc -l ${CENTRALDIR}/casemodel`
-if ($length_casemodel[1] == 8) then
- set list = `head -8 ${CENTRALDIR}/casemodel | tail -1`
+if ($length_casemodel[1] == 9) then
+ set list = `head -9 ${CENTRALDIR}/casemodel | tail -1`
set num_procs = $list[1]
set lev_blocks = $list[2]
set lat_blocks = $list[3]
@@ -204,16 +204,26 @@
else if ($cam_version == 'multi-namelist') then
# This builds all the *_in namelists CAM3.5 needs
- $cfgdir/build-namelist -v $verbosity \
- -case ${camroot:t}-$case \
- -runtype startup \
- $dir_arg $wrkdir \
- -infile $CENTRALDIR/namelistin \
- -cice_nl "$cice_nl" \
- -namelist "$namelist_string" \
- || echo "build-namelist failed" && exit 1
- # For advance_model to copy back to CENTRALDIR for archiving; won't be used here.
- cat *_in >! namelist
+ if ($cice_nl == '') then
+ $cfgdir/build-namelist -v $verbosity \
+ -case ${camroot:t}-$case \
+ -runtype startup \
+ $dir_arg $wrkdir \
+ -infile $CENTRALDIR/namelistin \
+ -namelist "$namelist_string" \
+ || echo "build-namelist failed" && exit 1
+ else
+ $cfgdir/build-namelist -v $verbosity \
+ -case ${camroot:t}-$case \
+ -runtype startup \
+ $dir_arg $wrkdir \
+ -infile $CENTRALDIR/namelistin \
+ -cice_nl "$cice_nl" \
+ -namelist "$namelist_string" \
+ || echo "build-namelist failed" && exit 1
+ # For advance_model to copy back to CENTRALDIR for archiving; won't be used here.
+ cat *_in >! namelist
+ endif
endif
echo "finished build-namelist ..."
@@ -258,16 +268,22 @@
# but volpn files have unique names which must be manually removed, except the last
# of each obs_seq. So remove this old one since we have the new one from the
# latest forecast.
- mv *\.cice\.r\.[0-9]* iceinput
- # preserve only the youngest meltpond(volpn) and aero restart files
- set ice_restarts = `ls -t *.cice.r.[a-z]*.*`
- tar -c -f iceinput.tar iceinput $ice_restarts[1-2]
+ ls *\.cice\.r\.[0-9]*
+ if ($status == 0) then
+ mv *\.cice\.r\.[0-9]* iceinput
+ # preserve only the youngest meltpond(volpn) and aero restart files
+ set ice_restarts = `ls -t *.cice.r.[a-z]*.*`
+ tar -c -f iceinput.tar iceinput $ice_restarts[1-2]
+ endif
# move only the youngest h0 file
- set hist = `ls -t *\.h0\.*`
- echo hist is $hist
- echo hist1 is $hist[1]
- mv $hist[1] hide_hist
+ set save_hist = `head -8 ${CENTRALDIR}/casemodel | tail -1`
+ if ($save_hist == 'true') then
+ set hist = `ls -t *\.h0\.*`
+ echo hist is $hist
+ echo hist1 is $hist[1]
+ mv $hist[1] hide_hist
+ endif
endif
# Remove 'leftovers' ONLY if CAM completed correctly (old ice initials need to
More information about the Dart-dev
mailing list