<p><b>dwj07@fsu.edu</b> 2011-12-02 14:53:19 -0700 (Fri, 02 Dec 2011)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Adding some comments.<br>
<br>
        Improving compiler compatibility with basin (mainly for gfortran).<br>
</p><hr noshade><pre><font color="gray">Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/module_write_netcdf.F
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/module_write_netcdf.F        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/baroclinic_channel/basin_src/module_write_netcdf.F        2011-12-02 21:53:19 UTC (rev 1235)
@@ -95,7 +95,7 @@
       integer, intent(in) :: nVertLevels
       integer, intent(in) :: vertexDegree
       character (len=16) :: on_a_sphere
-      double precision :: sphere_radius
+      real*8 :: sphere_radius
 
  
       integer :: nferr

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/hopper_submit_template.sh        2011-12-02 21:53:19 UTC (rev 1235)
@@ -3,8 +3,8 @@
 #PBS -q regular 
 #PBS -l walltime=20:00
 #PBS -l mppwidth=num_procs 
-#PBD -o run_name.num_procs.out
-#PBD -e run_name.num_procs.err
+#PBD -o stdout.out
+#PBD -e stderr.err
 cd  working_dir
 
 aprun -n num_procs ocean_model_executable

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lobo_submit_template.sh        2011-12-02 21:53:19 UTC (rev 1235)
@@ -3,7 +3,7 @@
 #MSUB -l walltime=20:00
 #MSUB -l nodes=num_nodes:ppn=procs_per_node
 #MSUB -d working_dir
-#MSUB -o run_name.num_procs.out
-#MSUB -e run_name.num_procs.err
+#MSUB -o stdout.out
+#MSUB -e stderr.err
 
 mpirun -np num_procs ./ocean_model.exe

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/basin_src/module_write_netcdf.F
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/basin_src/module_write_netcdf.F        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/basin_src/module_write_netcdf.F        2011-12-02 21:53:19 UTC (rev 1235)
@@ -95,7 +95,7 @@
       integer, intent(in) :: nVertLevels
       integer, intent(in) :: vertexDegree
       character (len=16) :: on_a_sphere
-      double precision :: sphere_radius
+      real*8 :: sphere_radius
 
  
       integer :: nferr

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/lock_exchange/makeMeshes.sh        2011-12-02 21:53:19 UTC (rev 1235)
@@ -148,10 +148,12 @@
                         ln -f -s ${CUR_DIR}/${NAME}_${VERTLEV}levs/lock_exchange_${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
 
+                        ## Copy executable to run directory
                         if [ $# -ge 1 ]; then
                                 cp $1 ${NAME}_${VERTLEV}levs/${PROC}procs/ocean_model.exe
                         fi
 
+                        ## Copy run information to run directory
                         if [ $# -ge 2 ]; then
                                 cp $2 ${NAME}_${VERTLEV}levs/${PROC}procs/.
                         fi

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/oceanTestCases.sh        2011-12-02 21:53:19 UTC (rev 1235)
@@ -4,6 +4,12 @@
 ## Change these variables to customize the run ##
 #################################################
 
+## The repository address below shows how to change the revision number.
+## Be careful with the compile set for an older version, as not all the options
+## that exists now were present in older versions.
+
+# REPOSITORY_ADDRESS=&quot;https://svn-mpas-model.cgd.ucar.edu/trunk/mpas -r 995&quot;
+
 REPOSITORY_ADDRESS=&quot;https://svn-mpas-model.cgd.ucar.edu/trunk/mpas&quot;
 COMPILE_SET=&quot;ifort-serial&quot;
 MACHINE_NAME=&quot;lobo&quot;
@@ -25,25 +31,33 @@
 CASE_VALID=&quot;no&quot;
 
 
+## Remove forward slashes from case name, so the case can be tab-compeleted using the directory name
 CASE=`echo $CASE | sed &quot;s|/||g&quot;`
+
 ## Function Definitions ###{{{
 
+## Checkout and compile mpas.
 setup_mpas () { #{{{
         rm -f .run_info
         rm -f run_paths
         touch .run_info
 
+        ## Check out mpas from repository
         echo &quot;Checking out ${REPOSITORY_ADDRESS}&quot;
         svn co $REPOSITORY_ADDRESS mpas &gt; /dev/null
         cd mpas
 
+        ## Compile mpas using given compile set
         echo &quot;Compiling mpas&quot;
         make $COMPILE_SET CORE=ocean &gt; /dev/null &amp;&gt; /dev/null
         REV=`svn info | grep &quot;Revision&quot;`
         cd ..
 
+        ## Make a variable containing the make options used to build mpas
         MAKE_OPTS=`grep &quot;$COMPILE_SET:&quot; mpas/Makefile -A 11 | tail -n 11 | grep &quot;[a-Z]&quot;`
 
+        ## Create the run_info file, which will be used later to identify what
+        ## revision the run was performed from
         echo &quot;Compile flags:&quot; &gt;&gt; .run_info
         grep &quot;$COMPILE_SET:&quot; mpas/Makefile -A 11 | grep &quot;[a-Z]&quot; &gt;&gt; .run_info
         echo &quot;&quot; &gt;&gt; .run_info
@@ -52,12 +66,16 @@
         echo &quot;$REV&quot; &gt;&gt; .run_info
         echo &quot;$MACHINE_NAME&quot; &gt;&gt; .run_info
 
+        ## Create a header of a Makefile for use in compiling subcode with the same compiler.
         echo &quot;${COMPILE_SET}:&quot; &gt; .Makefile.front
         echo -e &quot;\t$MAKE_OPTS&quot; &gt;&gt; .Makefile.front
 } #}}}
 
+## Setup test case
 setup () { #{{{
         echo &quot;Setting up ${CASE} test case&quot;
+
+        ## Copy makefile header to sub directories if needed
         if [ -e ${CASE}/basin_src ]; then
                 cp .Makefile.front ${CASE}/basin_src/Makefile.front
         fi
@@ -68,12 +86,15 @@
 
         cp .run_info run_info
         cd ${CASE}
+
+        ## Call script to setup run directories, and meshes if needed
         ./makeMeshes.sh ${CUR_DIR}/mpas/src/ocean_model.exe ${CUR_DIR}/run_info &quot;$PROC_LIST&quot;
         cd ${CUR_DIR}
 
         rm run_info
 } #}}}
 
+## Submit test case runs to queue
 submit () { #{{{
         echo &quot;Submitting ${CASE} test case runs&quot;
         RUNS=`cat $CASE/run_paths`
@@ -81,13 +102,17 @@
         rm -f start_times_$CASE.sh
         mkdir -p $CASE/submits
 
+        ## Loop over run directories in ./${CASE}
         for RUN in $RUNS
         do
+                ## Get the name of the current run, and number of processors
+                ## from the run directory
                 NAME=`echo ${RUN%/*procs}`
                 NAME=`echo ${NAME##*/}`
                 PROCS=`echo ${RUN##*/}`
                 PROCS=`echo ${PROCS%%procs}`
 
+                ## Determine division of processors based on machine's PPN
                 if [ $PROCS -lt $MACHINE_PPN ]; then
                         NODES=1
                         PPN=${PROCS}
@@ -96,25 +121,33 @@
                         PPN=${MACHINE_PPN}
                 fi
 
+                ## Generate submission script
                 cat ${CUR_DIR}/${MACHINE_NAME}_submit_template.sh | sed &quot;s/run_name/${CASE}_${NAME}/g&quot; \
                         | sed &quot;s/num_nodes/${NODES}/g&quot; | sed &quot;s/procs_per_node/${PPN}/g&quot; | sed &quot;s|working_dir|$RUN|g&quot; \
                         | sed &quot;s/num_procs/$PROCS/g&quot; &gt; $CASE/submits/$NAME.sh
 
+                ## Submit job, and retain job id for later use
                 JOB_ID=`${SUBMISSION_CMD} ${CUR_DIR}/${CASE}/submits/$NAME.sh`
                 JOB_ID=`echo $JOB_ID | grep [0-9]`
+
+                ## Write job id to a file
                 echo $JOB_ID &gt;&gt; job_ids_${CASE}
 
+                ## Write start_times and cancel_jobs scripts
                 echo 'echo &quot;' &quot;$JOB_ID&quot; '&quot; `showstart ' &quot;$JOB_ID | head -n 3 | tail -n 1 | awk '{print&quot; '$6' &quot; }'&quot; '`'  &gt;&gt; start_times_${CASE}.sh
                 echo &quot;canceljob $JOB_ID &gt; /dev/null &amp;&gt; /dev/null&quot; &gt;&gt; cancel_jobs_${CASE}.sh
         done
 
+        ## Finish cancel_jobs script
         echo 'echo &quot;All jobs canceled&quot;' &gt;&gt; cancel_jobs_${CASE}.sh
         echo &quot;rm -f cancel_jobs_${CASE}.sh start_times_${CASE}.sh job_ids_${CASE}&quot; &gt;&gt; cancel_jobs_${CASE}.sh
 
+        ## Make scripts executable
         chmod +x cancel_jobs_${CASE}.sh
         chmod +x start_times_${CASE}.sh
 } #}}}
 
+## Postprocess test case
 postprocess () { #{{{
         echo &quot;Processing ${CASE} test case data&quot;
         rm -f timing_results_${CASE}.txt timing_results2_${CASE}.txt 
@@ -125,18 +158,24 @@
 
         RUNS=`cat ${CASE}/run_paths`
 
+        ## Loop over run directories in ./${CASE}
         for RUN in $RUNS
         do
+
+                ## Get name, processor counts, and grid spacing from directory name
                 NAME=`echo ${RUN%/*procs}`
                 NAME=`echo ${NAME##*/}`
                 SPACING=`echo ${NAME%m*}`
                 PROCS=`echo ${RUN##*/}`
                 PROCS=`echo ${PROCS%%procs}`
 
+                ## Get final kinetic energy, total run time, and run duration
+                ## from run directory
                 KE=`cat ${RUN}/stats_max.txt | tail -n 1 | awk '{print $7}'`
-                TIME=`grep &quot;total time&quot; ${RUN}/${CASE}_${NAME}.${PROCS}.out | awk '{print $4}' | head -n 1`
+                TIME=`grep &quot;total time&quot; ${RUN}/stdout.out | awk '{print $4}' | head -n 1`
                 DURATION=`grep &quot;config_run_duration&quot; ${RUN}/namelist.input`
 
+                ## Determine spacing in kilometers
                 KM=`expr match &quot;$SPACING&quot; 'k'`
 
                 if [ $KM == 0 ]; then
@@ -145,17 +184,22 @@
                         KM=`echo ${SPACING%k}`
                 fi
 
+                ## Build portions of timing_results file
+                ## Written separately so paste will format properly
                 echo &quot;${NAME}_${PROCS}procs&quot; &gt;&gt; first
                 echo &quot;${DURATION}&quot; &gt;&gt; second
                 echo &quot;Final KE: ${KE}&quot; &gt;&gt; third
                 echo &quot;Total time: ${TIME}&quot; &gt;&gt; fourth
 
+                ## Write timing_results2 file
                 echo &quot;${KM}&quot; ${PROCS} ${TIME} &gt;&gt; timing_results2_${CASE}.txt
 
+                ## Build portions of timing_results3 file
                 echo &quot;${PROCS}  &quot; &gt;&gt; timing_results3_front
                 echo &quot; ${TIME} ; ... % ${NAME}-${PROCS}procs&quot; &gt;&gt; timing_results3_back
         done
 
+        ## Finish timing_results files, and clean up
         echo &quot;]&quot; &gt;&gt; timing_results3_front
         echo &quot;     ]/86400.;&quot; &gt;&gt; timing_results3_back
 
@@ -167,12 +211,14 @@
         rm -f first second third fourth timing_results3_front timing_results3_back
 } #}}}
 
+## Clean up mpas directory
 clean_mpas () { #{{{
         echo &quot;Cleaning MPAS&quot;
         rm -rf mpas
         rm -f .run_info .Makefile.front
 } #}}}
 
+## Clean up test case directory
 clean () { #{{{
         echo &quot;Cleaning ${CASE} test case&quot;
         cd ${CASE}
@@ -187,11 +233,13 @@
 
 #}}}
 
+## Check to see if mpas has already been built, if not set it up
 if [ ! -e mpas/src/ocean_model.exe ]; then
         echo &quot;MPAS is not setup properly yet. Setting up MPAS first.&quot;
         setup_mpas
 fi
 
+## Check to see if pmetis is in path, as it is supposed to be. If not exit
 PMETIS_CHECK=`which pmetis | grep &quot;no pmetis in&quot;`
 
 if [ -n &quot;${PMETIS}&quot; ]; then
@@ -199,6 +247,7 @@
         exit
 fi
 
+## Verify a valid action and case are passed into script. If not print usage statement, and exit
 if [ $# -ge 2 ]; then
         if [ $1 == &quot;setup&quot; -o $1 == &quot;submit&quot; -o $1 == &quot;postprocess&quot; -o &quot;clean&quot; ]; then
                 ACTION_VALID=&quot;yes&quot;
@@ -214,6 +263,7 @@
                 fi
         fi
 
+        ## If case is mpas, action has to be clean
         if [ $CASE == &quot;mpas&quot; -a $ACTION != &quot;clean&quot; ]; then
                 echo &quot;A case of mpas can only have action of clean&quot;
                 echo &quot;&quot;
@@ -221,6 +271,7 @@
         fi
 fi
 
+## Print usage statement
 if [ $VALID == &quot;no&quot; ]; then
         echo &quot;Invalid usage.&quot;
         echo &quot;./oceanTestCases.sh [action] [case]&quot;
@@ -232,6 +283,7 @@
         exit
 fi
 
+## Handle different actions
 if [ $ACTION == &quot;setup&quot; ]; then
         setup
 elif [ $ACTION == &quot;submit&quot; ]; then

Modified: branches/ocean_projects/ocean_test_cases_staging/ocean/performance/makeMeshes.sh
===================================================================
--- branches/ocean_projects/ocean_test_cases_staging/ocean/performance/makeMeshes.sh        2011-12-02 20:57:32 UTC (rev 1234)
+++ branches/ocean_projects/ocean_test_cases_staging/ocean/performance/makeMeshes.sh        2011-12-02 21:53:19 UTC (rev 1235)
@@ -1,16 +1,23 @@
 #!/bin/bash
 
+#############################################################
+## Configure performance run using the following variables ##
+#############################################################
 MESH_LIST=&quot;015km_40levs 030km_40levs 060km_40levs 120km_40levs&quot;
-
-OCEAN_MODEL_EXECUTABLE=&quot;$1&quot;
 MESH_DIR=&quot;domains_lobo&quot;
 
+## If processor list is passed in, use it. Otherwise use the default.
 if [ -z &quot;$3&quot; ]; then
         PROC_LIST=&quot;24 48 96 192 384 768 1536 3072&quot;
 else
         PROC_LIST=&quot;$3&quot;
 fi
 
+##############################################
+## Don't edit below this unless you need to ##
+##############################################
+
+OCEAN_MODEL_EXECUTABLE=&quot;$1&quot;
 CUR_DIR=`pwd`
 rm -f run_paths
 
@@ -20,6 +27,7 @@
 
         for PROC in $PROC_LIST
         do
+                ## Setup run directory
                 RUN_DIR=${CUR_DIR}/${MESH}/${PROC}procs
                 mkdir -p $RUN_DIR
 

</font>
</pre>