<p><b>dwj07@fsu.edu</b> 2012-03-19 14:38:14 -0600 (Mon, 19 Mar 2012)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Cleaning up the test case run directories.<br>
<br>
        Each mesh size within baroclinic_channel will be setup in a stand alone run directory<br>
        under which a .batch_runs directory contains all the run combinations for the batch<br>
        submission.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/README
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/README        2012-03-19 15:32:38 UTC (rev 1672)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/README        2012-03-19 20:38:14 UTC (rev 1673)
@@ -30,6 +30,12 @@
        to each of the run directories. It creates a directory for each combination of
        mesh and processor number.
+        Typical run directories are built in each test case directory, to be used in a
+        stand-alone fashion.
+
+        Batch runs are placed under this "typical use case" directory, within the .batch_runs
+        directory.
+
Template submit scripts:
        These files have the following naming scheme:
                machinename_submit_template.sh
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-19 15:32:38 UTC (rev 1672)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/makeMeshes.sh        2012-03-19 20:38:14 UTC (rev 1673)
@@ -11,7 +11,7 @@
###############################################################
## Change reference spacing, time_step, and viscosities here ##
###############################################################
-REF_TIME_STEP="60"
+REF_TIME_STEP="300"
REF_VISC_H="10.0"
REF_VISC_V="0.0001"
REF_SPACING="10000.0"
@@ -36,6 +36,10 @@
TIME_STEPPERS["config_time_integration"]="rk4 se1 se20 use"
TIME_STEPS["config_dt"]="1 5 10 20 40 80 160"
+DEFAULT_TIME_INTEGRATOR="'split_explicit'"
+DEFAULT_SUBCYCLES=20
+DEFAULT_RUN_DURATION="'0200_00:00:00'"
+
############################################################
## Setup Default namelist keys and values to update later ##
############################################################
@@ -165,11 +169,10 @@
                ## Compute scaled spacing, time_step, and viscosities
                D_SPACING=`echo "scale=4; ${SPACING}/${REF_SPACING}" | bc`
-                TIME_STEP=`echo "scale=4; $D_SPACING * $REF_TIME_STEP" | bc`
+                SCALED_TIME_STEP=`echo "scale=4; $D_SPACING * $REF_TIME_STEP" | bc`
                VISC_H=`echo "scale=4; ($D_SPACING^2)*${REF_VISC_H}" | bc`
                VISC_H=`echo ${REF_VISC_H}` # No Scaling in Horizontal
                VISC_V=`echo ${REF_VISC_V}` # No Scaling in Vertocal
-                STATS=`echo " $TOTAL_TIME / $TIME_STEP / 10 " | bc`
                echo " Converting ${NAME} mesh to have ${VERTLEV} levels"
@@ -184,16 +187,18 @@
                mv ocean.nc ${TCNAME}_${NAME}_${VERTLEV}levs.grid.nc
                mv graph.info ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info
-
+                
                for TIME_STEPPER in ${TIME_STEPPERS}
                do
                        if [ ${TIME_STEPPER} == 'rk4' ]; then
                                TIME_INTEGRATOR="'RK4'"
+                                SUB_CYCLES=0
                        elif [ ${TIME_STEPPER:0:2} == "se" ]; then
                                TIME_INTEGRATOR="'split_explicit'"
                                SUB_CYCLES=${TIME_STEPPER:2}
                        elif [ ${TIME_STEPPER} == 'use' ]; then
                                TIME_INTEGRATOR="'unsplit_explicit'"
+                                SUB_CYCLES=0
                        fi
                        for TIME_STEP in ${TIME_STEPS}
@@ -202,7 +207,7 @@
                                for PROC in $PROCS
                                do
-                                        RUN_NAME=${NAME}_${VERTLEV}levs/${TIME_STEPPER}_${TIME_STEP}/${PROC}procs
+                                        RUN_NAME=${NAME}_${VERTLEV}levs/.batch_runs/${TIME_STEPPER}_${TIME_STEP}/${PROC}procs
                                        mkdir -p ${RUN_NAME}
@@ -212,7 +217,6 @@
                                        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
                                        ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/dx ${RUN_NAME}/dx
-#                                        cp -R dx ${RUN_NAME}/dx
                                        ## Copy executable to run directory
                                        if [ $# -ge 1 ]; then
@@ -231,6 +235,7 @@
                                        echo "${CUR_DIR}/${RUN_NAME}" >> run_paths
                                        ## Generate new namelist.input file for test case
+                                        STATS=`echo " $TOTAL_TIME / $TIME_STEP / 10 " | bc`
                                        cat MPAS-namelist.input.template \
                                                | sed "s/config_time_integration .*/config_time_integration = ${TIME_INTEGRATOR}/g" \
                                                | sed "s/config_n_btr_subcycles .*/config_n_btr_subcycles = ${SUB_CYCLES}/g" \
@@ -239,7 +244,6 @@
                                                | sed "s/config_h_tracer_eddy_diff2 .*/config_h_tracer_eddy_diff2 = 0.0/g" \
                                                | sed "s/config_vert_visc .*/config_vert_visc = ${VISC_V}/g" \
                                                | sed "s/config_vert_diff .*/config_vert_diff = 0.0/g" \
-                                                | sed "s/config_dt .*/config_dt = ${TIME_STEP}/g" \
                                                | sed "s/config_stats_interval .*/config_stats_interval = ${STATS}/g" \
                                                > ${RUN_NAME}/namelist.input
                                done
@@ -248,6 +252,40 @@
                mv ${TCNAME}_${NAME}_${VERTLEV}levs* ${NAME}_${VERTLEV}levs/.
                mv dx ${NAME}_${VERTLEV}levs/.
+
+
+                cd ${NAME}_${VERTLEV}levs
+                ln -s ${TCNAME}_${NAME}_${VERTLEV}levs.grid.nc grid.nc
+                ln -s ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info graph.info
+
+                for PROC in $PROCS
+                do
+                        ln -s ${TCNAME}_${NAME}_${VERTLEV}levs.graph.info.part.${PROC} graph.info.part.${PROC}
+
+                done
+                cd ${CUR_DIR}
+
+                ## Generate new namelist.input file for typical test case
+                STATS=`echo " $TOTAL_TIME / $SCALED_TIME_STEP / 10 " | bc`
+                cat MPAS-namelist.input.template \
+                        | sed "s/config_run_duration .*/config_run_duration = ${DEFAULT_RUN_DURATION}/g" \
+                        | sed "s/config_time_integration .*/config_time_integration = ${DEFAULT_TIME_INTEGRATOR}/g" \
+                        | sed "s/config_n_btr_subcycles .*/config_n_btr_subcycles = ${DEFAULT_SUBCYCLES}/g" \
+                        | sed "s/config_dt .*/config_dt = ${SCALED_TIME_STEP}/g" \
+                        | sed "s/config_h_mom_eddy_visc2 .*/config_h_mom_eddy_visc2 = ${VISC_H}/g" \
+                        | sed "s/config_h_tracer_eddy_diff2 .*/config_h_tracer_eddy_diff2 = ${VISC_H}/g" \
+                        | sed "s/config_vert_visc .*/config_vert_visc = ${VISC_V}/g" \
+                        | sed "s/config_vert_diff .*/config_vert_diff = ${VISC_V}/g" \
+                        | sed "s/config_stats_interval .*/config_stats_interval = ${STATS}/g" \
+                        > ${NAME}_${VERTLEV}levs/namelist.input
+                ## Copy executable to run directory
+                if [ $# -ge 1 ]; then
+                        if [ -e ${NAME}_${VERTLEV}levs/ocean_model.exe ]; then
+                                unlink ${NAME}_${VERTLEV}levs/ocean_model.exe
+                        fi
+
+                        ln -s $1 ${NAME}_${VERTLEV}levs/ocean_model.exe
+                fi
        done
        rm map
Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2012-03-19 15:32:38 UTC (rev 1672)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2012-03-19 20:38:14 UTC (rev 1673)
@@ -228,6 +228,7 @@
                ./getErrors.sh > /dev/null
        fi
        cd ${CUR_DIR}
+        mv ${CASE}/*.errors .
} #}}}
## Clean up mpas directory
@@ -245,10 +246,10 @@
        rm -rf *m_*levs* submits
        rm -f run_paths
        rm -f MPAS-namelist.input.repo
-        rm -f *.errors
        cd ${CUR_DIR}
        rm -f *${CASE}.sh
+        rm -f ${CASE}*.errors
        rm -f timing_results*_${CASE}.txt
        rm -f job_ids_${CASE}
} #}}}
</font>
</pre>