Skip to content

Commit

Permalink
Draft of frepp files for CM2G63L
Browse files Browse the repository at this point in the history
- Took .frepp files from OM4_025 and replace paths to CM2G63L WOA05 data
  and mosaic directories.
- Hopefully helps address issue #1.
- Completely untested!
  • Loading branch information
adcroft committed Nov 10, 2014
1 parent c347f58 commit 4a9eb0e
Show file tree
Hide file tree
Showing 3 changed files with 339 additions and 0 deletions.
120 changes: 120 additions & 0 deletions coupled_AM2_LM2_SIS/CM2G63L/ocn_annual.frepp
Original file line number Diff line number Diff line change
@@ -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
116 changes: 116 additions & 0 deletions coupled_AM2_LM2_SIS/CM2G63L/ocn_annual_z.frepp
Original file line number Diff line number Diff line change
@@ -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
103 changes: 103 additions & 0 deletions coupled_AM2_LM2_SIS/CM2G63L/ocn_monthly.frepp
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4a9eb0e

Please sign in to comment.