[Dart-dev] DART/branches Revision: 11385

dart at ucar.edu dart at ucar.edu
Tue Mar 21 16:33:24 MDT 2017


nancy at ucar.edu
2017-03-21 16:33:23 -0600 (Tue, 21 Mar 2017)
173
add code to build netcdf files from any .cdl in the
current directory if the output file doesn't already exist.

this quickbuild should be the template for all other dirs.




Modified: DART/branches/rma_trunk/models/lorenz_63/work/quickbuild.csh
===================================================================
--- DART/branches/rma_trunk/models/lorenz_63/work/quickbuild.csh	2017-03-21 21:06:03 UTC (rev 11384)
+++ DART/branches/rma_trunk/models/lorenz_63/work/quickbuild.csh	2017-03-21 22:33:23 UTC (rev 11385)
@@ -1,4 +1,4 @@
-#!/bin/csh
+#!/bin/csh 
 #
 # DART software - Copyright UCAR. This open source software is provided
 # by UCAR, "as is", without charge, subject to all terms of use at
@@ -5,146 +5,158 @@
 # http://www.image.ucar.edu/DAReS/DART/DART_download
 #
 # DART $Id$
+
+#----------------------------------------------------------------------
+# compile all programs in the current directory that have a mkmf_xxx file.
 #
-# Script to manage the compilation of all components for this model;
-# executes a known "perfect model" experiment using an existing
-# observation sequence file (obs_seq.in) and initial conditions appropriate 
-# for both 'perfect_model_obs' (perfect_ics) and 'filter' (filter_ics).
-# There are enough initial conditions for 80 ensemble members in filter.
-# Use ens_size = 81 and it WILL bomb. Guaranteed.
-# The 'input.nml' file controls all facets of this execution.
+# usage: [ -mpi | -nompi ]
 #
-# 'create_obs_sequence' and 'create_fixed_network_sequence' were used to
-# create the observation sequence file 'obs_seq.in' - this defines 
-# what/where/when we want observations. This script does not run these 
-# programs - intentionally. 
 #
-# 'perfect_model_obs' results in a True_State.nc file that contains 
-# the true state, and obs_seq.out - a file that contains the "observations"
-# that will be assimilated by 'filter'.
-#
-# 'filter' results in three files (at least): Prior_Diag.nc - the state 
-# of all ensemble members prior to the assimilation (i.e. the forecast), 
-# Posterior_Diag.nc - the state of all ensemble members after the 
-# assimilation (i.e. the analysis), and obs_seq.final - the ensemble 
-# members' estimate of what the observations should have been.
-#
-# Once 'perfect_model_obs' has advanced the model and harvested the 
-# observations for the assimilation experiment, 'filter' may be run 
-# over and over by simply changing the namelist parameters in input.nml.
-#
-# The result of each assimilation can be explored in model-space with
-# matlab scripts that directly read the netCDF output, or in observation-space.
-# 'obs_diag' is a program that will create observation-space diagnostics
-# for any result of 'filter' and results in a couple data files that can
-# be explored with yet more matlab scripts.
-
+# environment variable options:
+#  before running this script, do:
+#   "setenv CODE_DEBUG 1" (csh) or "export CODE_DEBUG=1" (bash)
+#  to keep the .o and .mod files in the current directory instead of 
+#  removing them at the end.  this usually improves runtime error reports 
+#  and these files are required by most debuggers.
 #----------------------------------------------------------------------
-# 'preprocess' is a program that culls the appropriate sections of the
-# observation module for the observations types in 'input.nml'; the 
-# resulting source file is used by all the remaining programs, 
-# so this MUST be run first.
-#----------------------------------------------------------------------
 
-\rm -f preprocess *.o *.mod
-\rm -f ../../../obs_def/obs_def_mod.f90
-\rm -f ../../../obs_kind/obs_kind_mod.f90
+# this model name:
+set MODEL = "Lorenz_63"
 
-set MODEL = "lorenz_63"
+# programs which have the option of building with MPI:
+set MPI_TARGETS = "filter perfect_model_obs"
 
-@ n = 1
+# set default (override with -mpi or -nompi):
+#  0 = build without MPI, 1 = build with MPI
+set with_mpi = 0
 
-echo
-echo
-echo "---------------------------------------------------------------"
-echo "${MODEL} build number ${n} is preprocess"
 
-csh  mkmf_preprocess
-make || exit $n
+# ---------------
+# shouldn't have to modify this script below here.
 
-./preprocess || exit 99
+if ( $#argv >= 1 ) then
+   if ( "$1" == "-mpi" ) then
+      set with_mpi = 1 
+   else if ( "$1" == "-nompi" ) then
+      set with_mpi = 0
+   else
+      echo usage: $0 '[ -mpi | -nompi ]'
+      exit 0
+   endif
+endif


More information about the Dart-dev mailing list