From 4a9eb0e1afeffbc81f495a905e19cf6d37ce12f6 Mon Sep 17 00:00:00 2001 From: Alistair Adcroft Date: Mon, 10 Nov 2014 17:01:11 -0500 Subject: [PATCH] Draft of frepp files for CM2G63L - Took .frepp files from OM4_025 and replace paths to CM2G63L WOA05 data and mosaic directories. - Hopefully helps address issue #1. - Completely untested! --- coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp | 120 ++++++++++++++++++ .../CM2G63L/ocn_annual_z.frepp | 116 +++++++++++++++++ coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp | 103 +++++++++++++++ 3 files changed, 339 insertions(+) create mode 100644 coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp create mode 100644 coupled_AM2_LM2_SIS/CM2G63L/ocn_annual_z.frepp create mode 100644 coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp diff --git a/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp b/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp new file mode 100644 index 0000000000..72b481f70b --- /dev/null +++ b/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp @@ -0,0 +1,120 @@ +#!/bin/csh -fx +#------------------------------------ +#PBS -N ocean_ts_annual +#PBS -l size=1 +#PBS -l walltime=04:00:00 +#PBS -r y +#PBS -j oe +#PBS -o +#PBS -q batch +#---------------------------------- + +echo $0 $* + +# ============== VARIABLES SET BY FREPP ============= +# original arguments passed to this script when it was created by frepp +set argu +# experiment name (as appears in output directory names) +set descriptor +# path to NetCDF files postprocessed by frepp, as specified in XML +set in_data_dir +# input data file[s], without any path prefix; +# currently only used by timeAverage diagnostics +set in_data_file +# final output directory for diagnostics generated by this script +set out_dir +# working directory -- do whatever you want in here +# we may have to create this (use "mkdir -p" to be sure) +# and then clean up at end +set WORKDIR +# a string to indicate the mode: "batch" or "interactive" +set mode +# actual start/end years of diagnostics (start_year & end_year in XML) +set yr1 +set yr2 +# alternate way to specify a single year (instead of yr1==yr2) +set specify_year +# Data years, only used in scripts using time series as input, to +# generate a Ferret descriptor file from consecutive NetCDF chunks. +# start year of first chunk +set databegyr +# end year of last chunk +set dataendyr +# chunk length (an integer number), as specified in XML +set datachunk +# atmospheric land mask file +set staticfile +set script_path +set fremodule +# a string: "monthly" or "annual" for timeseries data +set freq +# first year of integration (4-digits, e.g. the year of initial condition) +set MODEL_start_yr +# Specify MOM version; "om2" or "om3" because some files depend on mom's grid +set mom_version +# full path to the grid specification file, which contains the land/sea mask +set gridspecfile +# history directory where the original "*.nc.cpio" files are found +set hist_dir +set nlon +set nlat +set frexml +set freanalysismodule +set stdoutdir +set analysis_options +set platform +set target +# ============== END OF VARIABLES SET BY FREPP ============= +# If any arguments were supplied on the command line, then those +# will replace the original frepp-supplied arguments. +if ($#argv) set argu = ($argv:q) + + +#set freanalysismodule = fre-analysis/test + +# make sure valid platform and required modules are loaded +if (`gfdl_platform` == "hpcs-csc") then + source $MODULESHOME/init/csh + module use -a /home/fms/local/modulefiles #/usr/local/paida/Modules + module purge +# module load $fremodule +# module load $freanalysismodule +# module load gcc + module load netcdf/4.2 + module load python/2.7.3 + module load intel_compilers +else + echo "ERROR: invalid platform" + exit 1 +endif + +# check again? +#if (! $?FRE_ANALYSIS_HOME) then +# echo "ERROR: environment variable FRE_ANALYSIS_HOME not set." +# exit 1 +#endif + +# Build MIDAS libs and set PYTHONPATH +(cd ${out_dir}/mom6/tools/python/025gridGeneration ; make frepp_local ) +setenv PYTHONPATH ${out_dir}/mom6/tools/python/025gridGeneration/local/lib/python + +# Run script +set src_dir = ${out_dir}/mom6/tools/analysis +set script_bash = ${src_dir}/MOM6_ts_annual.bash +set script_dir = ${out_dir}/mom6/tools/analysis +set woa05=/archive/gold/datasets/CM2G63L/obs/WOA05_ptemp_salt_annual.nc +set mosaicDir=/archive/gold/datasets/CM2G63L/siena/mosaic.unpacked + + +echo The following command is going to be invoked + +#mkdir -p $out_dir/ocean_${yr1}-${yr2}/ptemp +#$script_dir/SST_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual.$yr1-$yr2.ann.nc +#$script_dir/zonal_T_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual.$yr1-$yr2.ann.nc + +#mkdir -p $out_dir/ocean_${yr1}-${yr2}/salinity +#$script_dir/SSS_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/salinity -l ${yr1}-${yr2} $in_data_dir/ocean_annual.$yr1-$yr2.ann.nc +#$script_dir/zonal_S_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/salinity -l ${yr1}-${yr2} $in_data_dir/ocean_annual.$yr1-$yr2.ann.nc + +mkdir -p $out_dir/ocean_${yr1}-${yr2}/heat_salt_0_300m +$script_dir/TS_depth_integrals.py -r $woa05 -s 0 -e 300 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/heat_salt_0_300m -l ${yr1}-${yr2} $in_data_dir/ocean_annual.$yr1-$yr2.ann.nc diff --git a/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual_z.frepp b/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual_z.frepp new file mode 100644 index 0000000000..5ceac1a5e8 --- /dev/null +++ b/coupled_AM2_LM2_SIS/CM2G63L/ocn_annual_z.frepp @@ -0,0 +1,116 @@ +#!/bin/csh -fx +#------------------------------------ +#PBS -N ocean_ts_annual +#PBS -l size=1 +#PBS -l walltime=04:00:00 +#PBS -r y +#PBS -j oe +#PBS -o +#PBS -q batch +#---------------------------------- + +echo $0 $* + +# ============== VARIABLES SET BY FREPP ============= +# original arguments passed to this script when it was created by frepp +set argu +# experiment name (as appears in output directory names) +set descriptor +# path to NetCDF files postprocessed by frepp, as specified in XML +set in_data_dir +# input data file[s], without any path prefix; +# currently only used by timeAverage diagnostics +set in_data_file +# final output directory for diagnostics generated by this script +set out_dir +# working directory -- do whatever you want in here +# we may have to create this (use "mkdir -p" to be sure) +# and then clean up at end +set WORKDIR +# a string to indicate the mode: "batch" or "interactive" +set mode +# actual start/end years of diagnostics (start_year & end_year in XML) +set yr1 +set yr2 +# alternate way to specify a single year (instead of yr1==yr2) +set specify_year +# Data years, only used in scripts using time series as input, to +# generate a Ferret descriptor file from consecutive NetCDF chunks. +# start year of first chunk +set databegyr +# end year of last chunk +set dataendyr +# chunk length (an integer number), as specified in XML +set datachunk +# atmospheric land mask file +set staticfile +set script_path +set fremodule +# a string: "monthly" or "annual" for timeseries data +set freq +# first year of integration (4-digits, e.g. the year of initial condition) +set MODEL_start_yr +# Specify MOM version; "om2" or "om3" because some files depend on mom's grid +set mom_version +# full path to the grid specification file, which contains the land/sea mask +set gridspecfile +# history directory where the original "*.nc.cpio" files are found +set hist_dir +set nlon +set nlat +set frexml +set freanalysismodule +set stdoutdir +set analysis_options +set platform +set target +# ============== END OF VARIABLES SET BY FREPP ============= +# If any arguments were supplied on the command line, then those +# will replace the original frepp-supplied arguments. +if ($#argv) set argu = ($argv:q) + + +set freanalysismodule = fre-analysis/test + +# make sure valid platform and required modules are loaded +if (`gfdl_platform` == "hpcs-csc") then + source $MODULESHOME/init/csh + module use -a /home/fms/local/modulefiles #/usr/local/paida/Modules + module purge + module load $fremodule + module load $freanalysismodule + module load gcc + module load netcdf/4.2 + module load python/2.7.3 +else + echo "ERROR: invalid platform" + exit 1 +endif + +# check again? +if (! $?FRE_ANALYSIS_HOME) then + echo "ERROR: environment variable FRE_ANALYSIS_HOME not set." + exit 1 +endif + +# Run script +set src_dir = ${out_dir}/mom6/tools/analysis +set script_bash = ${src_dir}/MOM6_ts_annual.bash +set script_dir = ${out_dir}/mom6/tools/analysis +set woa05=/archive/gold/datasets/CM2G63L/obs/WOA05_ptemp_salt_annual.nc +set mosaicDir=/archive/gold/datasets/CM2G63L/siena/mosaic.unpacked + +echo The following command is going to be invoked + +mkdir -p $out_dir/ocean_${yr1}-${yr2}/ptemp +$script_dir/SST_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/zonal_T_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/depth_average_T_bias.py -w $woa05 -g $mosaicDir -zb 100 -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/depth_average_T_bias.py -w $woa05 -g $mosaicDir -zb 300 -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/depth_average_T_bias.py -w $woa05 -g $mosaicDir -zb 700 -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/depth_average_T_bias.py -w $woa05 -g $mosaicDir -zb 2000 -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/depth_average_T_bias.py -w $woa05 -g $mosaicDir -zt 2000 -zb 4000 -o $out_dir/ocean_${yr1}-${yr2}/ptemp -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc + +mkdir -p $out_dir/ocean_${yr1}-${yr2}/salinity +$script_dir/SSS_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/salinity -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc +$script_dir/zonal_S_bias_WOA05.py -w $woa05 -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/salinity -l ${yr1}-${yr2} $in_data_dir/ocean_annual_z.$yr1-$yr2.ann.nc diff --git a/coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp b/coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp new file mode 100644 index 0000000000..5c364fb50c --- /dev/null +++ b/coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp @@ -0,0 +1,103 @@ +#!/bin/csh -fx +#------------------------------------ +#PBS -N ocean_ts_annual +#PBS -l size=1 +#PBS -l walltime=04:00:00 +#PBS -r y +#PBS -j oe +#PBS -o +#PBS -q batch +#---------------------------------- + +echo $0 $* + +# ============== VARIABLES SET BY FREPP ============= +# original arguments passed to this script when it was created by frepp +set argu +# experiment name (as appears in output directory names) +set descriptor +# path to NetCDF files postprocessed by frepp, as specified in XML +set in_data_dir +# input data file[s], without any path prefix; +# currently only used by timeAverage diagnostics +set in_data_file +# final output directory for diagnostics generated by this script +set out_dir +# working directory -- do whatever you want in here +# we may have to create this (use "mkdir -p" to be sure) +# and then clean up at end +set WORKDIR +# a string to indicate the mode: "batch" or "interactive" +set mode +# actual start/end years of diagnostics (start_year & end_year in XML) +set yr1 +set yr2 +# alternate way to specify a single year (instead of yr1==yr2) +set specify_year +# Data years, only used in scripts using time series as input, to +# generate a Ferret descriptor file from consecutive NetCDF chunks. +# start year of first chunk +set databegyr +# end year of last chunk +set dataendyr +# chunk length (an integer number), as specified in XML +set datachunk +# atmospheric land mask file +set staticfile +set script_path +set fremodule +# a string: "monthly" or "annual" for timeseries data +set freq +# first year of integration (4-digits, e.g. the year of initial condition) +set MODEL_start_yr +# Specify MOM version; "om2" or "om3" because some files depend on mom's grid +set mom_version +# full path to the grid specification file, which contains the land/sea mask +set gridspecfile +# history directory where the original "*.nc.cpio" files are found +set hist_dir +set nlon +set nlat +set frexml +set freanalysismodule +set stdoutdir +set analysis_options +set platform +set target +# ============== END OF VARIABLES SET BY FREPP ============= +# If any arguments were supplied on the command line, then those +# will replace the original frepp-supplied arguments. +if ($#argv) set argu = ($argv:q) + + +set freanalysismodule = fre-analysis/test + +# make sure valid platform and required modules are loaded +if (`gfdl_platform` == "hpcs-csc") then + source $MODULESHOME/init/csh + module use -a /home/fms/local/modulefiles /usr/local/paida/Modules + module purge + module load $fremodule + module load $freanalysismodule + module load gcc + module load netcdf/4.2 + module load python/2.7.3 +else + echo "ERROR: invalid platform" + exit 1 +endif + +# check again? +if (! $?FRE_ANALYSIS_HOME) then + echo "ERROR: environment variable FRE_ANALYSIS_HOME not set." + exit 1 +endif + +# Run script +set script_dir = ${out_dir}/mom6/tools/analysis +set mosaicDir=/archive/gold/datasets/CM2G63L/siena/mosaic.unpacked + +echo The following command is going to be invoked + +mkdir -p $out_dir/ocean_${yr1}-${yr2}/Hosoda_MLD +$script_dir/MLD_003.py -g $mosaicDir -o $out_dir/ocean_${yr1}-${yr2}/Hosoda_MLD -l ${yr1}-${yr2} $in_data_dir/ocean_monthly.${yr1}01-${yr2}12.MLD_003.nc