[Dart-dev] DART/branches Revision: 11520
dart at ucar.edu
dart at ucar.edu
Tue Apr 25 15:52:23 MDT 2017
nancy at ucar.edu
2017-04-25 15:52:23 -0600 (Tue, 25 Apr 2017)
47
update the quickbuilds to the latest version.
Modified: DART/branches/model_mod_changes/models/cm1/work/quickbuild.csh
===================================================================
--- DART/branches/model_mod_changes/models/cm1/work/quickbuild.csh 2017-04-25 21:48:54 UTC (rev 11519)
+++ DART/branches/model_mod_changes/models/cm1/work/quickbuild.csh 2017-04-25 21:52:23 UTC (rev 11520)
@@ -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
@@ -7,116 +7,162 @@
# DART $Id$
#----------------------------------------------------------------------
-# '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.
+# compile all programs in the current directory that have a mkmf_xxx file.
+#
+# usage: [ -mpi | -nompi ]
+#
+#
+# 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.
#----------------------------------------------------------------------
-\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 = "CM1"
-@ n = 1
+# programs which have the option of building with MPI:
+set MPI_TARGETS = "filter perfect_model_obs model_mod_check"
-echo
-echo
-echo "---------------------------------------------------------------"
-echo "${MODEL} build number ${n} is preprocess"
+# set default (override with -mpi or -nompi):
+# 0 = build without MPI, 1 = build with MPI
+set with_mpi = 1
-csh mkmf_preprocess
-make || exit $n
-./preprocess || exit 99
+# ---------------
+# shouldn't have to modify this script below here.
+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
+
+set preprocess_done = 0
+set cdebug = 0
+
+if ( $?CODE_DEBUG ) then
+ set cdebug = $CODE_DEBUG
+endif
+
+\rm -f *.o *.mod
+
#----------------------------------------------------------------------
+# Build any NetCDF files from .cdl files
+#----------------------------------------------------------------------
+
+@ n = 0
+
+@ has_cdl = `ls *.cdl | wc -l` >& /dev/null
+
+if ( $has_cdl > 0 ) then
+ foreach DATAFILE ( *.cdl )
+
+ set OUTNAME = `basename $DATAFILE .cdl`.nc
+
+ if ( ! -f $OUTNAME ) then
+ @ n = $n + 1
+ echo
+ echo "---------------------------------------------------"
+ echo "constructing $MODEL data file $n named $OUTNAME"
+
+ ncgen -o $OUTNAME $DATAFILE || exit $n
+ endif
+
+ end
+endif
More information about the Dart-dev
mailing list