<p><b>dwj07@fsu.edu</b> 2013-02-13 14:41:59 -0700 (Wed, 13 Feb 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Update advective transport to work with new ocean core namelist.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh        2013-02-13 21:29:30 UTC (rev 2473)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/advective_transport/makeMeshes.sh        2013-02-13 21:41:59 UTC (rev 2474)
@@ -33,8 +33,10 @@
#######################################################
## Setup Variables for different run initializations ##
#######################################################
+DEFAULT_TIME_INTEGRATOR="'RK4'"
+DEFAULT_SUBCYCLES="20"
ADVECTION_ROUTINES="std2 std3 std4 fct2 fct3 fct4"
-TIME_STEPPERS="rk4"
+TIME_STEPPERS="'rk4'"
TIME_STEPS="10"
############################################################
@@ -47,20 +49,24 @@
KEYS[$i]="config_restart_name"; VALUES[$i]="'restart.nc'"; i=$i+1;
KEYS[$i]="config_output_interval"; VALUES[$i]="'00_02:00:00'"; i=$i+1;
KEYS[$i]="config_do_restart"; VALUES[$i]=".false."; i=$i+1;
-KEYS[$i]="config_vert_grid_type"; VALUES[$i]="'zstar'"; i=$i+1;
+KEYS[$i]="config_vert_coord_movement"; VALUES[$i]="'uniform_stretching'"; i=$i+1;
KEYS[$i]="config_rho0"; VALUES[$i]="1000"; i=$i+1;
KEYS[$i]="config_bottom_drag_coeff"; VALUES[$i]="1.0e-3"; i=$i+1;
-KEYS[$i]="config_vert_visc_type"; VALUES[$i]="'const'"; i=$i+1;
-KEYS[$i]="config_vert_diff_type"; VALUES[$i]="'const'"; i=$i+1;
KEYS[$i]="config_eos_type"; VALUES[$i]="'linear'"; i=$i+1;
KEYS[$i]="config_vert_tracer_adv_order"; VALUES[$i]="3"; i=$i+1;
KEYS[$i]="config_thickness_adv_order"; VALUES[$i]="3"; i=$i+1;
-KEYS[$i]="config_h_mom_eddy_visc2";         VALUES[$i]="0.0"; i=$i+1;
-KEYS[$i]="config_h_tracer_eddy_diff2";         VALUES[$i]="0.0"; i=$i+1;
-KEYS[$i]="config_convective_visc"; VALUES[$i]="0.0"; i=$i+1;
-KEYS[$i]="config_convective_diff"; VALUES[$i]="0.0"; i=$i+1;
-KEYS[$i]="config_vert_visc"; VALUES[$i]="0.0"; i=$i+1;
-KEYS[$i]="config_vert_diff"; VALUES[$i]="0.0"; i=$i+1;
+KEYS[$i]="config_use_mom_del2";         VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_tracer_del2";         VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_mom_del4";         VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_tracer_del4";         VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_const_visc_diff"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_const_visc_visc"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_rich_visc_diff"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_rich_visc_visc"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_tanh_visc_diff"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_use_tanh_visc_visc"; VALUES[$i]=".false."; i=$i+1;
+KEYS[$i]="config_prescribe_velocity"; VALUES[$i]=".true."; i=$i+1;
+KEYS[$i]="config_prescribe_thickness"; VALUES[$i]=".true."; i=$i+1;
#################################################
## Build perfect hex meshes using periodic_hex ##
@@ -127,7 +133,6 @@
NUM_LINES=`echo ${NUM_LINES}-1 | bc`
sed -n "/_model/,/\//p" MPAS-namelist.input.temporary | head -n ${NUM_LINES} > namelist.top
-echo " config_prescribe_velocity = .true." >> namelist.top
echo '/' >> namelist.top
echo '' >> namelist.top
sed '/_model/,/\//d' MPAS-namelist.input.temporary > namelist.bottom
@@ -211,21 +216,23 @@
                unlink grid.nc
-                mkdir -p ${BASE_DIR}
+                mkdir -p ${CUR_DIR}/${BASE_DIR}
                for TIME_STEPPER in ${TIME_STEPPERS}
                do
-                        if [ ${TIME_STEPPER} == 'rk4' ]; then
+                        if [ ${TIME_STEPPER} == "'rk4'" ]; then
                                TIME_INTEGRATOR="'RK4'"
                                SUB_CYCLES=20
-                        elif [ ${TIME_STEPPER:0:2} == "se" ]; then
+                        elif [ ${TIME_STEPPER:0:2} == "'se'" ]; then
                                TIME_INTEGRATOR="'split_explicit'"
                                SUB_CYCLES=${TIME_STEPPER:2}
-                        elif [ ${TIME_STEPPER} == 'use' ]; then
+                        elif [ ${TIME_STEPPER} == "'use'" ]; then
                                TIME_INTEGRATOR="'unsplit_explicit'"
                                SUB_CYCLES=20
                        fi
+                        echo "Time integrator after test: ${TIME_STEPPER} -- ${TIME_INTEGRATOR}"
+
                        for TIME_STEP in ${TIME_STEPS}
                        do
@@ -245,14 +252,13 @@
                                                ## Compute scaled spacing, time_step, and viscosities
                                                D_SPACING=`echo "scale=4; ${SPACING}/${REF_SPACING}" | bc`
-                                                STATS=`echo " $TOTAL_TIME / $TIME_STEP / 10 " | bc`
-                                                RUN_DIR=${BASE_DIR}/.batch_runs/${TIME_STEPPER}_${TIME_STEP}_${ADVECTION_ROUTINE}/${PROC}procs
+                                                RUN_DIR=${CUR_DIR}/${BASE_DIR}/.batch_runs/${TIME_STEPPER}_${TIME_STEP}_${ADVECTION_ROUTINE}/${PROC}procs
                                                mkdir -p ${RUN_DIR}
                                                pmetis graph.info $PROC > /dev/null
-                                                mv graph.info.part.$PROC ${BASE_DIR}/.
+                                                mv graph.info.part.$PROC ${CUR_DIR}/${BASE_DIR}/.
                                                ln -f -s ${CUR_DIR}/${BASE_DIR}/graph.info ${RUN_DIR}/graph.info
                                                ln -f -s ${CUR_DIR}/${BASE_DIR}/graph.info.part.${PROC} ${RUN_DIR}/graph.info.part.${PROC}
@@ -275,12 +281,10 @@
                                                echo "${CUR_DIR}/${RUN_DIR}" >> 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_time_integrator .*/config_time_integrator = ${TIME_INTEGRATOR}/g" \
                                                        | sed "s/config_n_btr_subcycles .*/config_n_btr_subcycles = ${SUB_CYCLES}/g" \
                                                        | sed "s/config_dt .*/config_dt = ${TIME_STEP}/g" \
-                                                        | sed "s/config_stats_interval .*/config_stats_interval = ${STATS}/g" \
                                                        | sed "s/config_monotonic .*/config_monotonic = ${FCT_ON}/g" \
                                                        | sed "s/config_horiz_tracer_adv_order .*/config_horiz_tracer_adv_order = ${ADV_ORDER}/g" \
                                                        > ${RUN_DIR}/namelist.input
@@ -289,28 +293,26 @@
                        done
                done
-                mv ocean.nc ${BASE_DIR}/grid.nc
-                mv graph.info ${BASE_DIR}/graph.info
+                mv ocean.nc ${CUR_DIR}/${BASE_DIR}/grid.nc
+                mv graph.info ${CUR_DIR}/${BASE_DIR}/graph.info
                ## Copy executable to run directory
                if [ $# -ge 1 ]; then
-                        if [ -e ${BASE_DIR}/ocean_model.exe ]; then
-                                unlink ${BASE_DIR}/ocean_model.exe
+                        if [ -e ${CUR_DIR}/${BASE_DIR}/ocean_model.exe ]; then
+                                unlink ${CUR_DIR}/${BASE_DIR}/ocean_model.exe
                        fi
-                        ln -s $1 ${BASE_DIR}/ocean_model.exe
+                        ln -s $1 ${CUR_DIR}/${BASE_DIR}/ocean_model.exe
                fi
                ## Generate new namelist.input file for test case
-                STATS=`echo " $TOTAL_TIME / $SCALED_TIME_STEP / 10 " | bc`
                cat MPAS-namelist.input.template \
-                        | sed "s/config_time_integration .*/config_time_integration = ${DEFAULT_TIME_INTEGRATOR}/g" \
+                        | sed "s/config_time_integrator .*/config_time_integrator = ${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_stats_interval .*/config_stats_interval = ${STATS}/g" \
                        | sed "s/config_monotonic .*/config_monotonic = ${FCT_ON}/g" \
                        | sed "s/config_horiz_tracer_adv_order .*/config_horiz_tracer_adv_order = ${ADV_ORDER}/g" \
-                        > ${BASE_DIR}/namelist.input
+                        > ${CUR_DIR}/${BASE_DIR}/namelist.input
        done
done
</font>
</pre>