<p><b>dwj07@fsu.edu</b> 2012-03-12 15:34:47 -0600 (Mon, 12 Mar 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Updating makeMeshes.sh script to setup all of the current baroclinic_channel test runs.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2012-03-12 19:55:20 UTC (rev 1620)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2012-03-12 21:34:47 UTC (rev 1621)
@@ -4,7 +4,6 @@
 ## Change the horizontal spacings, vertical levels, and cells in the x direction here ##
 ## To start, grids are periodic in the x direction. This may change later                          ##
 ########################################################################################
-
 SPACINGS=&quot;1000 4000 10000&quot;
 VERTLEVS=&quot;20&quot;
 TCNAME=&quot;baroclinic_channel&quot;
@@ -23,7 +22,7 @@
 CUR_DIR=`pwd`
 
 if [ -z &quot;$3&quot; ]; then
-        PROCS=&quot;2 4 8 16 32 64 128 256 512 1024 2048 4096&quot;
+        PROCS=&quot;2 4 8 16 32&quot;
 else
         PROCS=&quot;$3&quot;
 fi
@@ -31,24 +30,33 @@
 X_EXTENT=&quot;160000&quot;
 Y_EXTENT=&quot;500000&quot;
 
+#######################################################
+## Setup Variables for different run initializations ##
+#######################################################
+TIME_STEPPERS[&quot;config_time_integration&quot;]=&quot;rk4 se1 se20 use&quot;
+TIME_STEPS[&quot;config_dt&quot;]=&quot;1 5 10 20 40 80 160&quot;
+
 ############################################################
 ## Setup Default namelist keys and values to update later ##
 ############################################################
+declare -A STATIC_NAMELIST_VARS
+STATIC_NAMELIST_VARS[&quot;config_run_duration&quot;]=&quot;'0000_00:02:40'&quot;
+STATIC_NAMELIST_VARS[&quot;config_input_name&quot;]=&quot;'grid.nc'&quot;
+STATIC_NAMELIST_VARS[&quot;config_output_name&quot;]=&quot;'output.nc'&quot;
+STATIC_NAMELIST_VARS[&quot;config_restart_name&quot;]=&quot;'restart.nc'&quot;
+STATIC_NAMELIST_VARS[&quot;config_output_interval&quot;]=&quot;'00_00:02:40'&quot;
+STATIC_NAMELIST_VARS[&quot;config_do_restart&quot;]=&quot;.false.&quot;
+STATIC_NAMELIST_VARS[&quot;config_vert_grid_type&quot;]=&quot;'zstar'&quot;
+STATIC_NAMELIST_VARS[&quot;config_rho0&quot;]=&quot;1000&quot;
+STATIC_NAMELIST_VARS[&quot;config_bottom_drag_coeff&quot;]=&quot;1.0e-2&quot;
+STATIC_NAMELIST_VARS[&quot;config_vert_visc_type&quot;]=&quot;'const'&quot;
+STATIC_NAMELIST_VARS[&quot;config_vert_diff_type&quot;]=&quot;'const'&quot;
+STATIC_NAMELIST_VARS[&quot;config_eos_type&quot;]=&quot;'linear'&quot;
+STATIC_NAMELIST_VARS[&quot;config_monotonic&quot;]=&quot;.true.&quot;
+STATIC_NAMELIST_VARS[&quot;config_vert_tracer_adv_order&quot;]=&quot;3&quot;
+STATIC_NAMELIST_VARS[&quot;config_horiz_tracer_adv_order&quot;]=&quot;3&quot;
+STATIC_NAMELIST_VARS[&quot;config_thickness_adv_order&quot;]=&quot;3&quot;
 
-KEYS[0]=&quot;config_time_integration&quot;;   VALUES[0]=&quot;'RK4'&quot;;
-KEYS[1]=&quot;config_run_duration&quot;;       VALUES[1]=&quot;'0200_00:00:00'&quot;;
-KEYS[2]=&quot;config_input_name&quot;;         VALUES[2]=&quot;'grid.nc'&quot;;
-KEYS[3]=&quot;config_output_name&quot;;        VALUES[3]=&quot;'output.nc'&quot;;
-KEYS[4]=&quot;config_restart_name&quot;;       VALUES[4]=&quot;'restart.nc'&quot;;
-KEYS[5]=&quot;config_output_interval&quot;;    VALUES[5]=&quot;'01_00:00:00'&quot;;
-KEYS[6]=&quot;config_do_restart&quot;;         VALUES[6]=&quot;.false.&quot;;
-KEYS[7]=&quot;config_vert_grid_type&quot;;     VALUES[7]=&quot;'zlevel'&quot;;
-KEYS[8]=&quot;config_rho0&quot;;               VALUES[8]=&quot;1000&quot;;
-KEYS[9]=&quot;config_bottom_drag_coeff&quot;;  VALUES[9]=&quot;1.0e-2&quot;;
-KEYS[10]=&quot;config_vert_visc_type&quot;;    VALUES[10]=&quot;'const'&quot;;
-KEYS[11]=&quot;config_vert_diff_type&quot;;    VALUES[11]=&quot;'const'&quot;;
-KEYS[12]=&quot;config_eos_type&quot;;          VALUES[12]=&quot;'linear'&quot;;
-
 #################################################
 ## Build perfect hex meshes using periodic_hex ##
 #################################################
@@ -104,10 +112,9 @@
         cp MPAS-namelist.input.default MPAS-namelist.input.temporary
 fi
 
-i=1
-for ((i=0; i&lt;${#KEYS[@]}; i++));
+for VAR_NAME in ${!STATIC_NAMELIST_VARS[@]}
 do
-        cat MPAS-namelist.input.temporary | sed &quot;s/${KEYS[$i]} .*/${KEYS[$i]} = ${VALUES[$i]}/g&quot; &gt; Temp
+        cat MPAS-namelist.input.temporary | sed &quot;s/${VAR_NAME} .*/${VAR_NAME} = ${STATIC_NAMELIST_VARS[$VAR_NAME]}/g&quot; &gt; Temp
         mv Temp MPAS-namelist.input.temporary
 done
 
@@ -176,46 +183,66 @@
                 mv ocean.nc ${TCNAME}_${NAME}_${VERTLEV}levs.grid.nc
                 mv graph.info ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info
 
-                for PROC in $PROCS
+                for TIME_STEPPER in ${TIME_STEPPERS}
                 do
-                        mkdir -p ${NAME}_${VERTLEV}levs/${PROC}procs
+                        if [ ${TIME_STEPPER} == 'rk4' ]; then
+                                TIME_INTEGRATOR=&quot;'RK4'&quot;
+                        elif [ ${TIME_STEPPER:0:2} == &quot;se&quot; ]; then
+                                TIME_INTEGRATOR=&quot;'split_explicit'&quot;
+                                SUB_CYCLES=${TIME_STEPPER:2}
+                        elif [ ${TIME_STEPPER} == 'use' ]; then
+                                TIME_INTEGRATOR=&quot;'unsplit_explicit'&quot;
+                        fi
 
-                        pmetis ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info $PROC &gt; /dev/null
+                        for TIME_STEP in ${TIME_STEPS}
+                        do
 
-                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.graph.info ${NAME}_${VERTLEV}levs/${PROC}procs/graph.info
-                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.graph.info.part.${PROC} ${NAME}_${VERTLEV}levs/${PROC}procs/graph.info.part.${PROC}
-                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.grid.nc ${NAME}_${VERTLEV}levs/${PROC}procs/grid.nc
-                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/namelist.input ${NAME}_${VERTLEV}levs/${PROC}procs/namelist.input
+                                for PROC in $PROCS
+                                do
 
-                        ## Copy executable to run directory
-                        if [ $# -ge 1  ]; then
-                                if [ -e ${NAME}_${VERTLEV}levs/${PROC}procs/ocean_model.exe ]; then
-                                        unlink ${NAME}_${VERTLEV}levs/${PROC}procs/ocean_model.exe
-                                fi
+                                        RUN_NAME=${NAME}_${VERTLEV}levs/${TIME_STEPPER}_${TIME_STEP}_${PROC}procs
 
-                                ln -s $1 ${NAME}_${VERTLEV}levs/${PROC}procs/ocean_model.exe
-                        fi
+                                        mkdir -p ${RUN_NAME}
 
-                        ## Copy run information to run directory
-                        if [ $# -ge 2 ]; then
-                                cp $2 ${NAME}_${VERTLEV}levs/${PROC}procs/.
-                        fi
+                                        pmetis ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info $PROC &gt; /dev/null
 
-                        echo &quot;${CUR_DIR}/${NAME}_${VERTLEV}levs/${PROC}procs&quot; &gt;&gt; run_paths
+                                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.graph.info ${RUN_NAME}/graph.info
+                                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.graph.info.part.${PROC} ${RUN_NAME}/graph.info.part.${PROC}
+                                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/${TCNAME}_${NAME}_${VERTLEV}levs.grid.nc ${RUN_NAME}/grid.nc
+
+                                        ## Copy executable to run directory
+                                        if [ $# -ge 1  ]; then
+                                                if [ -e ${RUN_NAME}/ocean_model.exe ]; then
+                                                        unlink ${RUN_NAME}/ocean_model.exe
+                                                fi
+
+                                                ln -s $1 ${RUN_NAME}/ocean_model.exe
+                                        fi
+
+                                        ## Copy run information to run directory
+                                        if [ $# -ge 2 ]; then
+                                                cp $2 ${RUN_NAME}/.
+                                        fi
+
+                                        echo &quot;${CUR_DIR}/${RUN_NAME}&quot; &gt;&gt; run_paths
+
+                                        ## Generate new namelist.input file for test case
+                                        cat MPAS-namelist.input.template  \
+                                                | sed &quot;s/config_time_integration .*/config_time_integration = ${TIME_INTEGRATOR}/g&quot; \
+                                                | sed &quot;s/config_n_btr_subcycles .*/config_n_btr_subcycles = ${SUB_CYCLES}/g&quot; \
+                                                | sed &quot;s/config_dt .*/config_dt = ${TIME_STEP}/g&quot; \
+                                                | sed &quot;s/config_h_mom_eddy_visc2 .*/config_h_mom_eddy_visc2 = ${VISC_H}/g&quot; \
+                                                | sed &quot;s/config_h_tracer_eddy_diff2 .*/config_h_tracer_eddy_diff2 = 0.0/g&quot; \
+                                                | sed &quot;s/config_vert_visc .*/config_vert_visc = ${VISC_V}/g&quot; \
+                                                | sed &quot;s/config_vert_diff .*/config_vert_diff = 0.0/g&quot; \
+                                                | sed &quot;s/config_dt .*/config_dt = ${TIME_STEP}/g&quot; \
+                                                | sed &quot;s/config_stats_interval .*/config_stats_interval = ${STATS}/g&quot; \
+                                                &gt; ${RUN_NAME}/namelist.input
+                                done
+                        done
                 done
 
                 mv ${TCNAME}_${NAME}_${VERTLEV}levs* ${NAME}_${VERTLEV}levs/.
-
-                ## Generate new namelist.input file for test case
-                cat MPAS-namelist.input.template  \
-                    | sed &quot;s/config_h_mom_eddy_visc2 .*/config_h_mom_eddy_visc2 = ${VISC_H}/g&quot; \
-                    | sed &quot;s/config_h_tracer_eddy_diff2 .*/config_h_tracer_eddy_diff2 = ${VISC_H}/g&quot; \
-                        | sed &quot;s/config_vert_visc .*/config_vert_visc = ${VISC_V}/g&quot; \
-                        | sed &quot;s/config_vert_diff .*/config_vert_diff = ${VISC_V}/g&quot; \
-                        | sed &quot;s/config_dt .*/config_dt = ${TIME_STEP}/g&quot; \
-                        | sed &quot;s/config_stats_interval .*/config_stats_interval = ${STATS}/g&quot; \
-                        &gt; ${NAME}_${VERTLEV}levs/namelist.input
-
         done
 
         rm map

</font>
</pre>