[Dart-dev] [6303] DART/trunk/models/CESM/shell_scripts: Add code to copy the final_full.xx file into the cases dir

nancy at ucar.edu nancy at ucar.edu
Fri Jul 12 11:54:03 MDT 2013


Revision: 6303
Author:   nancy
Date:     2013-07-12 11:54:03 -0600 (Fri, 12 Jul 2013)
Log Message:
-----------
Add code to copy the final_full.xx file into the cases dir
even if none of the SEC settings are true.  if the user modifies
the input.nmls in the cases dir, we will need to have that file
available.  in the case that all the settings are false in the
default namelists, it isn't an error if the right size file isn't
found, but there's a warning printed out with help for making one
if you need it.  we are assuming that most reasonable ensemble
sizes will have a file already created for that size.

Modified Paths:
--------------
    DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh
    DART/trunk/models/CESM/shell_scripts/CESM1_1_1_initial.csh

-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh	2013-07-11 15:56:08 UTC (rev 6302)
+++ DART/trunk/models/CESM/shell_scripts/CESM1_1_1_continuation.csh	2013-07-12 17:54:03 UTC (rev 6303)
@@ -959,6 +959,13 @@
 # Each ensemble size has its own (static) file.
 # It is only needed if any
 # input.nml:&assim_tools_nml:sampling_error_correction = .true.,
+#
+# If any of the SECs in any namelist are true, force the final_full.nn
+# file to exist and be copied.  If they are all false, still try to copy
+# the file over to the cases dir so that if the user edits the namelist to
+# turn SEC on, the file will be there.  but in the latter case, don't fail
+# if the final_full doesn't exist for this ensemble size; just warn that
+# if it's turned on, they will have to generate one and copy it over.
 #=========================================================================
 
 set nmls = "cam_input.nml pop_input.nml clm_input.nml input.nml"
@@ -982,8 +989,31 @@
      endif
   endif
 end
-  
 
+# if the final_full file is not here, none of the namelists had SEC on.
+# but go ahead and copy one here; it's not fatal if one doesn't already
+# exist in the final_full_precomputed_tables dir for this ens size.
+# (i'm thinking that if they don't intend to use it, they shouldn't
+# have to generate one, but if they turn this option on, we should have
+# a copy of the file here where it's expected.)
+if ( !  -e   ./final_full.${ensemble_size} ) then
+  # SEC is false, but go ahead and try to copy one over
+  set SAMP_ERR_FILE = ${DARTroot}/system_simulation/final_full_precomputed_tables/final_full.${ensemble_size}
+  if (  -e   ${SAMP_ERR_FILE} ) then
+    ${COPY} ${SAMP_ERR_FILE} .
+  else
+    echo "WARNING: no final_full.xx file found for an ensemble size of ${ensemble_size}"
+    echo "WARNING: this file is NOT needed unless you want to turn on the"
+    echo "WARNING: sampling_error_correction feature in any of the models."
+    echo "WARNING: to use it, in addition to setting the namelist to .true., cd to:"
+    echo "WARNING:  ${DARTroot}/system_simulation"
+    echo "WARNING: and create a final_full.${ensemble_size} file"
+    echo "WARNING: one can be generated for any ensemble size; see docs"
+    echo "WARNING: Copy it into ${caseroot} before running."
+  endif
+endif
+
+
 # ==============================================================================
 # What to do next
 # ==============================================================================

Modified: DART/trunk/models/CESM/shell_scripts/CESM1_1_1_initial.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/CESM1_1_1_initial.csh	2013-07-11 15:56:08 UTC (rev 6302)
+++ DART/trunk/models/CESM/shell_scripts/CESM1_1_1_initial.csh	2013-07-12 17:54:03 UTC (rev 6303)
@@ -977,6 +977,13 @@
 # Each ensemble size has its own (static) file.
 # It is only needed if any
 # input.nml:&assim_tools_nml:sampling_error_correction = .true.,
+#
+# If any of the SECs in any namelist are true, force the final_full.nn
+# file to exist and be copied.  If they are all false, still try to copy
+# the file over to the cases dir so that if the user edits the namelist to
+# turn SEC on, the file will be there.  but in the latter case, don't fail
+# if the final_full doesn't exist for this ensemble size; just warn that
+# if it's turned on, they will have to generate one and copy it over.
 #=========================================================================
 
 set nmls = "cam_input.nml pop_input.nml clm_input.nml input.nml"
@@ -1000,8 +1007,30 @@
      endif
   endif
 end
-  
 
+# if the final_full file is not here, none of the namelists had SEC on.
+# but go ahead and copy one here; it's not fatal if one doesn't already
+# exist in the final_full_precomputed_tables dir for this ens size.
+# (i'm thinking that if they don't intend to use it, they shouldn't
+# have to generate one, but if they turn this option on, we should have
+# a copy of the file here where it's expected.)
+if ( !  -e   ./final_full.${ensemble_size} ) then
+  # SEC is false, but go ahead and try to copy one over
+  set SAMP_ERR_FILE = ${DARTroot}/system_simulation/final_full_precomputed_tables/final_full.${ensemble_size}
+  if (  -e   ${SAMP_ERR_FILE} ) then
+    ${COPY} ${SAMP_ERR_FILE} .
+  else
+    echo "WARNING: no final_full.xx file found for an ensemble size of ${ensemble_size}"
+    echo "WARNING: this file is NOT needed unless you want to turn on the"
+    echo "WARNING: sampling_error_correction feature in any of the models."
+    echo "WARNING: to use it, in addition to setting the namelist to .true., cd to:"
+    echo "WARNING:  ${DARTroot}/system_simulation"
+    echo "WARNING: and create a final_full.${ensemble_size} file"
+    echo "WARNING: one can be generated for any ensemble size; see docs"
+    echo "WARNING: Copy it into ${caseroot} before running."
+  endif
+endif
+
 # ==============================================================================
 # Initial setup for the default inflation scenario.
 # ==============================================================================


More information about the Dart-dev mailing list