[Dart-dev] [6058] DART/branches/development/models: Removed the verbose option from the initialize_utilities call so that the
nancy at ucar.edu
nancy at ucar.edu
Tue Apr 16 15:20:35 MDT 2013
Revision: 6058
Author: thoar
Date: 2013-04-16 15:20:35 -0600 (Tue, 16 Apr 2013)
Log Message:
-----------
Removed the verbose option from the initialize_utilities call so that the
"Finished" string would appear in the logs. This allows us to implement a more
robust checking mechanism in the assimilate scripts.
Made the assimilate scripts look like their model/CESM/shell_scripts counterparts.
Modified Paths:
--------------
DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh
DART/branches/development/models/POP/dart_pop_mod.f90
DART/branches/development/models/POP/dart_to_pop.f90
DART/branches/development/models/POP/pop_to_dart.f90
DART/branches/development/models/POP/shell_scripts/CESM1_1_setup_hybrid.csh
DART/branches/development/models/POP/shell_scripts/assimilate.csh
DART/branches/development/models/cam/cam_to_dart.f90
DART/branches/development/models/cam/dart_to_cam.f90
DART/branches/development/models/cam/shell_scripts/CESM_setup_startup.csh
DART/branches/development/models/cam/shell_scripts/assimilate.csh
DART/branches/development/models/clm/clm_to_dart.f90
DART/branches/development/models/clm/dart_to_clm.f90
DART/branches/development/models/clm/shell_scripts/CESM1_1_setup.csh
DART/branches/development/models/clm/shell_scripts/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-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/CESM/shell_scripts/CESM1_1_1_setup.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -65,7 +65,7 @@
setenv case cesm_test
setenv cesmtag cesm1_1_1
-setenv compset B_RCP4.5_CAM5_CN
+setenv compset B_2000_CAM5
setenv resolution 0.9x1.25_gx1v6
setenv num_instances 2
@@ -130,7 +130,7 @@
# TJH: How many T62_gx1v6 CESM instances can fit on 1 node?
# ==============================================================================
-setenv ACCOUNT P8685xxxx
+setenv ACCOUNT P8685nnnn
setenv timewall 0:30
setenv queue small
setenv ptile 15
@@ -269,6 +269,8 @@
./xmlchange RESUBMIT=$resubmit
#./xmlchange PIO_TYPENAME=pnetcdf
+./xmlchange CLM_CONFIG_OPTS='-bgc cn'
+
./xmlchange DOUT_S=FALSE
./xmlchange DOUT_S_ROOT=${archdir}
./xmlchange DOUT_S_SAVE_INT_REST_FILES=FALSE
@@ -305,6 +307,8 @@
# ===========================================================================
set fname = "user_nl_cam_$instance"
# ===========================================================================
+ # For a HOP TEST ... empty_htapes = .false.
+ # For a HOP TEST ... use a default fincl1
echo " inithist = 'DAILY'" >> ${fname}
echo " ncdata = 'cam_initial_${instance}.nc'" >> ${fname}
@@ -320,6 +324,7 @@
# POP Namelists
# init_ts_suboption = 'data_assim' for non bit-for-bit restarting (assimilation mode)
# init_ts_suboption = 'null' for 'perfect' restarting/forecasting
+ # For a HOP TEST (untested)... tavg_file_freq_opt = 'nmonth' 'nday' 'once'"
echo "init_ts_suboption = 'null'" >> $fname
@@ -332,6 +337,8 @@
# 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.
+ # For a HOP TEST ... hist_empty_htapes = .false.
+ # For a HOP TEST ... use a default hist_fincl1
echo "hist_empty_htapes = .true." >> $fname
echo "hist_fincl1 = 'NEP'" >> $fname
@@ -577,6 +584,12 @@
echo " ./xmlchange -file env_run.xml -id CONTINUE_RUN -val TRUE"
echo " ./xmlchange -file env_run.xml -id RESUBMIT -val <your_favorite_number>"
echo ''
+echo "Once you get to 2004-01-04, there are more things to do ... "
+echo "in the CASEROOT directory, uncomment the ncdata in the user_nl_cam* files ..."
+echo "ncdata = 'cam_initial_${instance}.nc'" >> ${fname}
+echo "in the run directory, link the current cam initial files ..."
+echo "make sure the history tapes for cam,clm are being created at the right frequency"
+echo ''
echo "Check the streams listed in the streams text files. If more or different"
echo 'dates need to be added, then do this in the $CASEROOT/user_*files*'
echo "then invoke 'preview_namelists' so you can check the information in the"
Modified: DART/branches/development/models/POP/dart_pop_mod.f90
===================================================================
--- DART/branches/development/models/POP/dart_pop_mod.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/POP/dart_pop_mod.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
module dart_pop_mod
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
use types_mod, only : r8, rad2deg, PI, SECPERDAY
use time_manager_mod, only : time_type, get_date, set_date, get_time, set_time, &
set_calendar_type, get_calendar_string, &
@@ -17,7 +11,7 @@
use utilities_mod, only : get_unit, open_file, close_file, file_exist, &
register_module, error_handler, nc_check, &
find_namelist_in_file, check_namelist_read, &
- E_ERR, E_MSG, timestamp, find_textfile_dims, &
+ E_ERR, E_MSG, find_textfile_dims, &
logfileunit
use typesizes
@@ -707,3 +701,10 @@
end module dart_pop_mod
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/POP/dart_to_pop.f90
===================================================================
--- DART/branches/development/models/POP/dart_to_pop.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/POP/dart_to_pop.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
program dart_to_pop
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
!----------------------------------------------------------------------
! purpose: interface between DART and the POP model
!
@@ -27,7 +21,7 @@
!----------------------------------------------------------------------
use types_mod, only : r8
-use utilities_mod, only : initialize_utilities, timestamp, &
+use utilities_mod, only : initialize_utilities, finalize_utilities, &
find_namelist_in_file, check_namelist_read, &
logfileunit
use assim_model_mod, only : open_restart_read, aread_state_restart, close_restart
@@ -60,11 +54,10 @@
type(time_type) :: model_time, adv_to_time
real(r8), allocatable :: statevector(:)
character (len = 128) :: pop_restart_filename = 'no_pop_restart_file'
-logical :: verbose = .FALSE.
!----------------------------------------------------------------------
-call initialize_utilities(progname='dart_to_pop', output_flag=verbose)
+call initialize_utilities(progname='dart_to_pop')
!----------------------------------------------------------------------
! Call model_mod:static_init_model() which reads the POP namelists
@@ -130,7 +123,13 @@
call print_date(adv_to_time,'dart_to_pop:advance_to date',logfileunit)
endif
-! When called with 'end', timestamp will call finalize_utilities()
-call timestamp(string1=source, pos='end')
+call finalize_utilities('dart_to_pop')
end program dart_to_pop
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/POP/pop_to_dart.f90
===================================================================
--- DART/branches/development/models/POP/pop_to_dart.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/POP/pop_to_dart.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
program pop_to_dart
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
!----------------------------------------------------------------------
! purpose: interface between POP and DART
!
@@ -26,7 +20,7 @@
!----------------------------------------------------------------------
use types_mod, only : r8
-use utilities_mod, only : initialize_utilities, timestamp, &
+use utilities_mod, only : initialize_utilities, finalize_utilities, &
find_namelist_in_file, check_namelist_read
use model_mod, only : restart_file_to_sv, static_init_model, &
get_model_size, get_pop_restart_filename
@@ -58,11 +52,10 @@
type(time_type) :: model_time
real(r8), allocatable :: statevector(:)
character (len = 128) :: pop_restart_filename = 'no_pop_restart_filename'
-logical :: verbose = .FALSE.
!----------------------------------------------------------------------
-call initialize_utilities(progname='pop_to_dart', output_flag=verbose)
+call initialize_utilities(progname='pop_to_dart')
!----------------------------------------------------------------------
! Call model_mod:static_init_model(), which reads the namelists
@@ -99,13 +92,15 @@
call awrite_state_restart(model_time, statevector, iunit)
call close_restart(iunit)
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-!----------------------------------------------------------------------
-
call print_date(model_time, str='pop_to_dart:POP model date')
call print_time(model_time, str='pop_to_dart:DART model time')
-call timestamp(string1=source, pos='end')
+call finalize_utilities('pop_to_dart')
end program pop_to_dart
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/POP/shell_scripts/CESM1_1_setup_hybrid.csh
===================================================================
--- DART/branches/development/models/POP/shell_scripts/CESM1_1_setup_hybrid.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/POP/shell_scripts/CESM1_1_setup_hybrid.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -127,7 +127,7 @@
# ==============================================================================
setenv ACCOUNT P8685nnnn
-setenv timewall 0:30
+setenv timewall 0:20
setenv queue regular
setenv ptile 15
Modified: DART/branches/development/models/POP/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/POP/shell_scripts/assimilate.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -10,7 +10,7 @@
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
-echo "`date` -- BEGIN ASSIMILATE"
+echo "`date` -- BEGIN POP_ASSIMILATE"
switch ("`hostname`")
case be*:
@@ -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
@@ -238,7 +238,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -247,7 +247,7 @@
${LINK} $latest ${PRIOR_INF_IFNAME}
else
echo "ERROR: Requested PRIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../pop_${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -4
endif
@@ -265,7 +265,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../pop_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -274,7 +274,7 @@
${LINK} $latest ${POSTE_INF_IFNAME}
else
echo "ERROR: Requested POSTERIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../pop_${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -5
endif
endif
@@ -299,7 +299,7 @@
# advance_time_present = .false.
#=========================================================================
-echo "`date` -- BEGIN POP TO DART"
+echo "`date` -- BEGIN POP-TO-DART"
set member = 1
while ( ${member} <= ${ensemble_size} )
@@ -311,6 +311,9 @@
mkdir -p $MYTEMPDIR
cd $MYTEMPDIR
+ # make sure there are no old output logs hanging around
+ $REMOVE output.${member}.pop_to_dart
+
set OCN_RESTART_FILENAME = `printf ../../${MYCASE}.pop_%04d.r.${OCN_DATE_EXT}.nc ${member}`
set OCN_NML_FILENAME = `printf ../../pop2_in_%04d ${member}`
set DART_IC_FILENAME = `printf filter_ics.%04d ${member}`
@@ -332,7 +335,8 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.pop_to_dart | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'pop_to_dart' ... ERROR"
echo "ERROR ... DART died in 'pop_to_dart' ... ERROR"
exit -6
@@ -386,10 +390,10 @@
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
@@ -398,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
@@ -411,12 +415,14 @@
# and has the required input files remaining from 'Block 4'
#=========================================================================
-echo "`date` -- BEGIN DART TO POP"
+echo "`date` -- BEGIN DART-TO-POP"
set member = 1
while ( $member <= $ensemble_size )
cd member_${member}
+ ${REMOVE} output.${member}.dart_to_pop
+
echo "starting dart_to_pop for member ${member} at "`date`
${EXEROOT}/dart_to_pop >! output.${member}.dart_to_pop &
@@ -427,20 +433,20 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.dart_to_pop | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'dart_to_pop' ... ERROR"
echo "ERROR ... DART died in 'dart_to_pop' ... ERROR"
exit -8
endif
-echo "`date` -- END DART TO POP for all ${ensemble_size} members."
-echo "`date` -- END ASSIMILATE"
+echo "`date` -- END DART-TO-POP for all ${ensemble_size} members."
#-------------------------------------------------------------------------
# Cleanup
#-------------------------------------------------------------------------
-ls -lrt
+echo "`date` -- END POP_ASSIMILATE"
exit 0
Modified: DART/branches/development/models/cam/cam_to_dart.f90
===================================================================
--- DART/branches/development/models/cam/cam_to_dart.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/cam/cam_to_dart.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
program cam_to_dart
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
!----------------------------------------------------------------------
! purpose: interface between CAM and DART
!
@@ -91,6 +85,13 @@
call awrite_state_restart(model_time, statevector, iunit)
call close_restart(iunit)
-call finalize_utilities()
+call finalize_utilities('cam_to_dart')
end program cam_to_dart
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/cam/dart_to_cam.f90
===================================================================
--- DART/branches/development/models/cam/dart_to_cam.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/cam/dart_to_cam.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -115,7 +115,7 @@
endif
-call finalize_utilities()
+call finalize_utilities('dart_to_cam')
end program dart_to_cam
Modified: DART/branches/development/models/cam/shell_scripts/CESM_setup_startup.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/CESM_setup_startup.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/cam/shell_scripts/CESM_setup_startup.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -379,8 +379,10 @@
# ===========================================================================
set fname = "user_nl_clm_$instance"
# ===========================================================================
+ # hist_empty_htapes must be false at the moment. Otherwise the CLM restart file
+ # gets created with ntapes=0 which prevents CLM from restarting. Crazy.
- echo "hist_empty_htapes = .true. " >> ${fname}
+ echo "hist_empty_htapes = .false. " >> ${fname}
echo "finidat = 'clm_restart_${instance}.nc' " >> ${fname}
echo "fpftdyn = '${cesm_datadir}/lnd/clm2/surfdata/surfdata.pftdyn_0.9x1.25_rcp4.5_simyr1850-2100_c100406.nc' " >> ${fname}
@@ -686,3 +688,8 @@
echo "./${case}.submit"
echo ''
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Modified: DART/branches/development/models/cam/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/cam/shell_scripts/assimilate.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/cam/shell_scripts/assimilate.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -10,7 +10,7 @@
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
-echo "`date` -- BEGIN ASSIMILATE"
+echo "`date` -- BEGIN CAM_ASSIMILATE"
switch ("`hostname`")
case be*:
@@ -57,9 +57,15 @@
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"
-mkdir -p $temp_dir
+
+# Create a clean temporary directory and go there
+if ( -d $temp_dir ) then
+ ${REMOVE} $temp_dir/*
+else
+ mkdir -p $temp_dir
+endif
cd $temp_dir
#-------------------------------------------------------------------------
@@ -229,7 +235,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -238,7 +244,7 @@
${LINK} $latest ${PRIOR_INF_IFNAME}
else
echo "ERROR: Requested PRIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../cam_${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -4
endif
@@ -256,7 +262,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../cam_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -265,7 +271,7 @@
${LINK} $latest ${POSTE_INF_IFNAME}
else
echo "ERROR: Requested POSTERIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../cam_${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -5
endif
endif
@@ -290,7 +296,7 @@
# advance_time_present = .false.
#=========================================================================
-echo "`date` -- BEGIN CAM TO DART"
+echo "`date` -- BEGIN CAM-TO-DART"
set member = 1
while ( ${member} <= ${ensemble_size} )
@@ -306,6 +312,9 @@
mkdir -p $MYTEMPDIR
cd $MYTEMPDIR
+ # make sure there are no old output logs hanging around
+ $REMOVE output.${member}.cam_to_dart
+
set ATM_INITIAL_FILENAME = `printf ../../${MYCASE}.cam_%04d.i.${ATM_DATE_EXT}.nc ${member}`
set ATM_HISTORY_FILENAME = `ls -1t ../../${MYCASE}.cam*.h0.* | head -n 1`
set DART_IC_FILENAME = `printf filter_ics.%04d ${member}`
@@ -327,7 +336,8 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.cam_to_dart | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'cam_to_dart' ... ERROR"
echo "ERROR ... DART died in 'cam_to_dart' ... ERROR"
exit -6
@@ -382,10 +392,10 @@
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
@@ -394,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
@@ -407,12 +417,14 @@
# and has the required input files remaining from 'Block 4'
#=========================================================================
-echo "`date` -- BEGIN DART TO CAM"
+echo "`date` -- BEGIN DART-TO-CAM"
set member = 1
while ( $member <= $ensemble_size )
cd member_${member}
+ ${REMOVE} output.${member}.dart_to_cam
+
echo "starting dart_to_cam for member ${member} at "`date`
${EXEROOT}/dart_to_cam >! output.${member}.dart_to_cam &
@@ -423,13 +435,14 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.dart_to_cam | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'dart_to_cam' ... ERROR"
echo "ERROR ... DART died in 'dart_to_cam' ... ERROR"
exit -8
endif
-echo "`date` -- END DART TO CAM for all ${ensemble_size} members."
+echo "`date` -- END DART-TO-CAM for all ${ensemble_size} members."
#=========================================================================
# Block 7: The cam files have now been updated, move them into position.
@@ -492,8 +505,7 @@
# Cleanup
#-------------------------------------------------------------------------
-echo "finished assimilate script at "`date`
-echo "`date` -- END ASSIMILATE"
+echo "`date` -- END CAM_ASSIMILATE"
exit 0
Modified: DART/branches/development/models/clm/clm_to_dart.f90
===================================================================
--- DART/branches/development/models/clm/clm_to_dart.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/clm/clm_to_dart.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
program clm_to_dart
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
!----------------------------------------------------------------------
! purpose: interface between clm and DART
!
@@ -26,7 +20,7 @@
!----------------------------------------------------------------------
use types_mod, only : r8
-use utilities_mod, only : initialize_utilities, timestamp, &
+use utilities_mod, only : initialize_utilities, finalize_utilities, &
find_namelist_in_file, check_namelist_read
use model_mod, only : get_model_size, restart_file_to_sv, &
get_clm_restart_filename
@@ -53,7 +47,6 @@
! global storage
!----------------------------------------------------------------------
-logical :: verbose = .TRUE.
integer :: io, iunit, x_size
type(time_type) :: model_time
real(r8), allocatable :: statevector(:)
@@ -61,7 +54,7 @@
!======================================================================
-call initialize_utilities(progname='clm_to_dart', output_flag=verbose)
+call initialize_utilities(progname='clm_to_dart')
!----------------------------------------------------------------------
! Read the namelist to get the output filename.
@@ -92,13 +85,16 @@
call awrite_state_restart(model_time, statevector, iunit)
call close_restart(iunit)
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-!----------------------------------------------------------------------
-
call print_date(model_time, str='clm_to_dart:clm model date')
call print_time(model_time, str='clm_to_dart:DART model time')
-call timestamp(string1=source, pos='end')
+call finalize_utilities('clm_to_dart')
+
end program clm_to_dart
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/clm/dart_to_clm.f90
===================================================================
--- DART/branches/development/models/clm/dart_to_clm.f90 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/clm/dart_to_clm.f90 2013-04-16 21:20:35 UTC (rev 6058)
@@ -4,12 +4,6 @@
program dart_to_clm
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
!----------------------------------------------------------------------
! purpose: interface between DART and the CLM model
!
@@ -27,7 +21,7 @@
!----------------------------------------------------------------------
use types_mod, only : r8
-use utilities_mod, only : initialize_utilities, timestamp, &
+use utilities_mod, only : initialize_utilities, finalize_utilities, &
find_namelist_in_file, check_namelist_read, &
logfileunit, open_file, close_file, &
error_handler, E_MSG
@@ -60,11 +54,10 @@
integer :: iunit, io, x_size
type(time_type) :: model_time, adv_to_time
real(r8), allocatable :: statevector(:)
-logical :: verbose = .FALSE.
!----------------------------------------------------------------------
-call initialize_utilities(progname='dart_to_clm', output_flag=verbose)
+call initialize_utilities(progname='dart_to_clm')
!----------------------------------------------------------------------
! Call model_mod:static_init_model() which reads the clm namelists
@@ -126,7 +119,13 @@
call print_date(adv_to_time,'dart_to_clm:advance_to date',logfileunit)
endif
-! When called with 'end', timestamp will call finalize_utilities()
-call timestamp(string1=source, pos='end')
+call finalize_utilities('dart_to_clm')
end program dart_to_clm
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+
Modified: DART/branches/development/models/clm/shell_scripts/CESM1_1_setup.csh
===================================================================
--- DART/branches/development/models/clm/shell_scripts/CESM1_1_setup.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/clm/shell_scripts/CESM1_1_setup.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -303,6 +303,7 @@
# land surface diagnostics. Setting ROF_GRID to 'null' turns off the RTM.
./xmlchange ROF_GRID='null'
+./xmlchange CLM_CONFIG_OPTS='-bgc cn'
# level of debug output, 0=minimum, 1=normal, 2=more, 3=too much, valid values: 0,1,2,3 (integer)
Modified: DART/branches/development/models/clm/shell_scripts/assimilate.csh
===================================================================
--- DART/branches/development/models/clm/shell_scripts/assimilate.csh 2013-04-16 21:12:17 UTC (rev 6057)
+++ DART/branches/development/models/clm/shell_scripts/assimilate.csh 2013-04-16 21:20:35 UTC (rev 6058)
@@ -10,7 +10,7 @@
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
-echo "`date` -- BEGIN ASSIMILATE"
+echo "`date` -- BEGIN CLM_ASSIMILATE"
switch ("`hostname`")
case be*:
@@ -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
@@ -241,7 +241,7 @@
echo "inf_flavor(1) = $PRIOR_INF, using namelist values."
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../clm_${PRIOR_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -250,7 +250,7 @@
${LINK} $latest ${PRIOR_INF_IFNAME}
else
echo "ERROR: Requested PRIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../clm_${PRIOR_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -4
endif
@@ -268,7 +268,7 @@
else
# Look for the output from the previous assimilation
- (ls -rt1 ../${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
+ (ls -rt1 ../clm_${POSTE_INF_OFNAME}.* | tail -1 >! latestfile) > & /dev/null
set nfiles = `cat latestfile | wc -l`
# If one exists, use it as input for this assimilation
@@ -277,7 +277,7 @@
${LINK} $latest ${POSTE_INF_IFNAME}
else
echo "ERROR: Requested POSTERIOR inflation but specified no incoming inflation file."
- echo "ERROR: expected something like ../${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
+ echo "ERROR: expected something like ../clm_${POSTE_INF_OFNAME}.YYYY-MM-DD-SSSSS"
exit -5
endif
endif
@@ -302,7 +302,7 @@
# advance_time_present = .false.
#=========================================================================
-echo "`date` -- BEGIN CLM TO DART"
+echo "`date` -- BEGIN CLM-TO-DART"
set member = 1
while ( ${member} <= ${ensemble_size} )
@@ -314,6 +314,9 @@
mkdir -p $MYTEMPDIR
cd $MYTEMPDIR
+ # make sure there are no old output logs hanging around
+ $REMOVE output.${member}.clm_to_dart
+
set LND_RESTART_FILENAME = `printf ../../${MYCASE}.clm2_%04d.r.${LND_DATE_EXT}.nc ${member}`
set LND_HISTORY_FILENAME = `printf ../../${MYCASE}.clm2_%04d.h0.${LND_DATE_EXT}.nc ${member}`
set DART_IC_FILENAME = `printf filter_ics.%04d ${member}`
@@ -348,7 +351,8 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.clm_to_dart | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'clm_to_dart' ... ERROR"
echo "ERROR ... DART died in 'clm_to_dart' ... ERROR"
exit -6
@@ -402,10 +406,10 @@
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
@@ -414,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
@@ -427,12 +431,14 @@
# and has the required input files remaining from 'Block 4'
#=========================================================================
-echo "`date` -- BEGIN DART TO CLM"
+echo "`date` -- BEGIN DART-TO-CLM"
set member = 1
while ( $member <= $ensemble_size )
cd member_${member}
+ ${REMOVE} output.${member}.dart_to_clm
+
echo "starting dart_to_clm for member ${member} at "`date`
${EXEROOT}/dart_to_clm >! output.${member}.dart_to_clm &
@@ -443,24 +449,24 @@
wait
-if ($status != 0) then
+set nsuccess = `fgrep 'Finished ... at YYYY' member*/output.[0-9]*.dart_to_clm | wc -l`
+if (${nsuccess} != ${ensemble_size}) then
echo "ERROR ... DART died in 'dart_to_clm' ... ERROR"
echo "ERROR ... DART died in 'dart_to_clm' ... ERROR"
exit -8
endif
echo "`date` -- END DART-TO-CLM for all ${ensemble_size} members."
-echo "`date` -- END ASSIMILATE"
#-------------------------------------------------------------------------
# Cleanup
#-------------------------------------------------------------------------
-#\rm -f ../$CASE.*.rh0.*
-#\rm -f ../$CASE.*.rs1.*
-#\rm -f ../PET*.ESMF_LogFile
+# ${REMOVE} ../$CASE.*.rh0.*
+# ${REMOVE} ../$CASE.*.rs1.*
+# ${REMOVE} ../PET*.ESMF_LogFile
-ls -lrt
+echo "`date` -- END CLM_ASSIMILATE"
exit 0
More information about the Dart-dev
mailing list