do_c-lamp_rewrite.bash
author Forrest Hoffman <forrest@climatemodeling.org>
Sun, 21 Sep 2008 21:59:01 -0400
changeset 0 c8ca04c3a9d6
permissions -rwxr-xr-x
Initial commit of code to rewrite C-LAMP output from CLM3 for the Earth System Grid (ESG)
     1 #!/bin/bash
     2 #
     3 # Rewrites C-LAMP Experiment 1 model output for distribution on the Earth
     4 # System Grid (ESG).
     5 #
     6 ESGROOT=/u3/forrest/ESG/c-lamp
     7 #
     8 echo "`date` -- Rewriting C-LAMP model output for distribution on ESG"
     9 for model in clm3_casa clm3_cn; do
    10    for exp in exp1_2 exp1_3 exp1_4 exp1_6 exp1_7; do
    11       for run in run1; do
    12          for stat in monthly_mean; do
    13             rm -rf ${ESGROOT}/${model}/${exp}/${run}/${stat}
    14             mkdir -p ${ESGROOT}/${model}/${exp}/${run}/${stat}
    15             chmod 755 ${ESGROOT}/${model}/${exp}/${run}/${stat}
    16             cp -p namelist.${model}.${exp}.${run}.${stat} namelist
    17             echo "`date` -- Rewriting output for ${model}.${exp}.${run}.${stat}"
    18             time ./c-lamp_rewrite >& c-lamp_rewrite.${model}.${exp}.${run}.${stat}.log
    19             echo "`date` -- Computing SHA1 checksums for ${model}.${exp}.${run}.${stat}"
    20             (cd ${ESGROOT}/${model}/${exp}/${run}/${stat} ; time sha1sum *.nc > SHA1SUM; chmod 644 *)
    21          done
    22       done
    23    done
    24 done
    25 echo "`date` -- Done"