[Dart-dev] DART/branches Revision: 12482

dart at ucar.edu dart at ucar.edu
Tue Apr 3 05:20:15 MDT 2018


thoar at ucar.edu
2018-04-03 05:20:14 -0600 (Tue, 03 Apr 2018)
859
W Douglas Cramer 3:45 PM (21 hours ago)

I've completed the scripts that create and execute the ensemble openggcm runs, as well as a test script that simulates the interaction with filter. All of the scripts are in the rma_openggcm/models/openggcm/shell_scripts directory of the dart account.

create_base.csh : This creates the base openggcm run, which includes building the libraries and saving source files for the ensemble runs.

create_runs.csh : This creates the ensemble runs and the build_all and submit_all scripts. Solar wind input data and model parameters can be changed between the runs by editing the swdata and runme files, respectively.

dart_test.csh : This simulates the interaction with dart. It is executed with the ensemble runs by the submit_all script.

More work could be done on these, but they perform their function for now.

Doug




Added: DART/branches/openggcm/models/openggcm/shell_scripts/create_base.csh
===================================================================
--- DART/branches/openggcm/models/openggcm/shell_scripts/create_base.csh	                        (rev 0)
+++ DART/branches/openggcm/models/openggcm/shell_scripts/create_base.csh	2018-04-03 11:20:14 UTC (rev 12482)
@@ -0,0 +1,171 @@
+#!/bin/csh
+
+setenv OPENGGCMDIR $HOME/openggcm-2016-04-18
+set baserundir=$PWD/baserun
+
+# ----------------------------------------------------------------------
+# create_base.csh
+#
+# This script creates an openggcm run and copies necessary files to 
+#   create similar runs with identical source code.
+#
+# Inputs:
+#   baserundir :: location to create run
+#   runme :: normal runme file
+#   solar wind input files ::
+#     - SWFILE :: usual solar wind input file
+#     - (SWFILE=auto,minvar) SWMON.xxx files 
+#   TARGET :: edited target file (in conf/target) that 
+#               - prevents submission 
+#               - sets PPN
+#   ORBITFILE :: satellite orbit data file (optional)
+#
+# To do/problems:
+#   - what causes all the STOP messages?
+# ----------------------------------------------------------------------
+
+alias die 'echo FATAL: \!*; exit 1'
+
+if ( ! -r runme ) then
+  die "runme missing"
+endif
+
+if ( -d $baserundir ) then
+  rm -rf $baserundir
+  echo "previous base run removed"
+endif
+mkdir $baserundir
+
+#copy runme
+cp runme $baserundir
+
+#get solar wind, orbit data file info from runme
+$OPENGGCMDIR/bin/script.includes $OPENGGCMDIR runme $OPENGGCMDIR/include/input.defines 0
+if ( $status != 0 ) then
+  die "script.includes failed."
+endif
+if ( ! -r tmp.csh ) then
+  die "tmp.csh not found"
+endif
+source tmp.csh
+
+#copy solar wind, orbit data files
+if ( ( $SWFILE == "auto" ) || ( $SWFILE == "minvar" ) ) then
+  # if relative path, copy to base run dir
+  if ("$IDATA" !~ /*) then
+    if ( ! -d $baserundir/$IDATA ) then
+      mkdir $baserundir/$IDATA
+    endif
+    cp $IDATA/$SWMON.* $baserundir/$IDATA
+  endif
+else
+  cp $SWFILE $baserundir
+endif
+if ( $ORBITFILE != "none" ) then
+  cp $ORBITFILE $baserundir
+endif
+
+# build base run
+cd $baserundir
+./runme  #use special target file to prevent submission and set PPN
+
+#re-get runme params (necessary?)
+if ( ! -r $baserundir/tmp.csh ) then
+  die "tmp.csh not found"
+endif
+source $baserundir/tmp.csh
+
+#if not a swdata file run (auto or minvar), create generated swdata file
+if ( ! -r $baserundir/swdata ) then
+expand $baserundir/tmp.swdata1 |  awk '{ \
+    printf "%7.2f %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f %7.2f ", \
+    $1,$2,$3,$4,$5,$6,$7,$8,$9;  \
+    printf "%8.5f %8.5f %8.5f\n",$11,$12,$13; }'  >! $baserundir/swdata
+endif
+
+#save files needed for "copied" runs
+set GGCM_SOURCES = ( ggcm-cliches.for \
+    ggcm-util.for \
+    ggcm-vec.for \
+    mhd-cliches.for \
+    ggcm.for \
+    new_cotr.for \
+    mhd-modules.for \
+    mhd-scon.for \
+    mhd-corea.for \
+    mhd-coreb.for \


More information about the Dart-dev mailing list