Skip to content

Commit

Permalink
add_lake_20200810: Updates to the grid driver scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Aug 17, 2020
1 parent 7322428 commit 95deb2f
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 88 deletions.
32 changes: 12 additions & 20 deletions driver_scripts/driver_grid.cray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@
# "regional_gfdl" - stand-alone gfdl regional grid
# "regional_esg" - stand-alone extended Schmidt gnomonic
# (esg) regional grid
# 3) For "stretch" and "nest" grids, set the stretching factor -
# 3) For "uniform" grids - to include lake fraction and
# depth, set "add_lake" to true, and the "lake_cutoff" value.
# 4) For "stretch" and "nest" grids, set the stretching factor -
# "stretch_fac", and center lat/lon of highest resolution
# tile - "target_lat" and "target_lon".
# 4) For "nest" grids, set the refinement ratio - "refine_ratio",
# 5) For "nest" grids, set the refinement ratio - "refine_ratio",
# the starting/ending i/j index location within the parent
# tile - "istart_nest", "jstart_nest", "iend_nest", "jend_nest"
# 5) For "regional_gfdl" grids, set the "halo". Default is three
# 6) For "regional_gfdl" grids, set the "halo". Default is three
# rows/columns.
# 6) For "regional_esg" grids, set center lat/lon of grid,
# 7) For "regional_esg" grids, set center lat/lon of grid,
# - "target_lat/lon" - the i/j dimensions - "i/jdim", the
# x/y grid spacing - "delx/y", and halo.
# 7) Set working directory - TMPDIR - and path to the repository
# 8) Set working directory - TMPDIR - and path to the repository
# clone - home_dir.
# 8) Submit script: "cat $script | bsub".
# 9) All files will be placed in "out_dir".
# 9) Submit script: "cat $script | bsub".
# 10) All files will be placed in "out_dir".
#
#-----------------------------------------------------------------------

Expand All @@ -65,12 +67,11 @@ module list
export gtype=uniform # 'uniform', 'stretch', 'nest'
# 'regional_gfdl', 'regional_esg'

export add_lake=false # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored

if [ $gtype = uniform ]; then
export res=96
export add_lake=true # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -117,15 +118,6 @@ export out_dir=/gpfs/hps3/stmp/$LOGNAME/my_grids
# Should not need to change anything below here.
#-----------------------------------------------------------------------

if [ $add_lake = true ]; then
if [ $gtype != uniform ]; then
set +x
echo "Adding lake data to orography data is only available"
echo "for uniform grids."
exit 1
fi
fi

export NODES=1
export APRUN="aprun -n 1 -N 1 -j 1 -d 1 -cc depth"
export APRUN_SFC="aprun -j 1 -n 24 -N 24"
Expand Down
32 changes: 12 additions & 20 deletions driver_scripts/driver_grid.dell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,23 @@
# "regional_gfdl" - stand-alone gfdl regional grid
# "regional_esg" - stand-alone extended Schmidt gnomonic
# (esg) regional grid
# 3) For "stretch" and "nest" grids, set the stretching factor -
# 3) For "uniform" grids - to include lake fraction and
# depth, set "add_lake" to true, and the "lake_cutoff" value.
# 4) For "stretch" and "nest" grids, set the stretching factor -
# "stretch_fac", and center lat/lon of highest resolution
# tile - "target_lat" and "target_lon".
# 4) For "nest" grids, set the refinement ratio - "refine_ratio",
# 5) For "nest" grids, set the refinement ratio - "refine_ratio",
# the starting/ending i/j index location within the parent
# tile - "istart_nest", "jstart_nest", "iend_nest", "jend_nest"
# 5) For "regional_gfdl" grids, set the "halo". Default is three
# 6) For "regional_gfdl" grids, set the "halo". Default is three
# rows/columns.
# 6) For "regional_esg" grids, set center lat/lon of grid,
# 7) For "regional_esg" grids, set center lat/lon of grid,
# - "target_lat/lon" - the i/j dimensions - "i/jdim", the
# x/y grid spacing - "delx/y", and halo.
# 7) Set working directory - TMPDIR - and path to the repository
# 8) Set working directory - TMPDIR - and path to the repository
# clone - home_dir.
# 8) Submit script: "cat $script | bsub".
# 9) All files will be placed in "out_dir".
# 9) Submit script: "cat $script | bsub".
# 10) All files will be placed in "out_dir".
#
#-----------------------------------------------------------------------

Expand All @@ -67,12 +69,11 @@ module list
export gtype=uniform # 'uniform', 'stretch', 'nest',
# 'regional_gfdl', 'regional_esg'

export add_lake=false # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored

if [ $gtype = uniform ]; then
export res=96
export add_lake=true # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -119,15 +120,6 @@ export out_dir=/gpfs/dell1/stmp/$LOGNAME/my_grids
# Should not need to change anything below here.
#-----------------------------------------------------------------------

if [ $add_lake = true ]; then
if [ $gtype != uniform ]; then
set +x
echo "Adding lake data to orography data is only available"
echo "for uniform grids."
exit 1
fi
fi

export APRUN=time
export APRUN_SFC="mpirun -l"
export OMP_NUM_THREADS=24 # orog code worked best with 24 threads.
Expand Down
32 changes: 12 additions & 20 deletions driver_scripts/driver_grid.hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@
# "regional_gfdl" - stand-alone gfdl regional grid
# "regional_esg" - stand-alone extended Schmidt gnomonic
# (esg) regional grid
# 3) For "stretch" and "nest" grids, set the stretching factor -
# 3) For "uniform" grids - to include lake fraction and
# depth, set "add_lake" to true, and the "lake_cutoff" value.
# 4) For "stretch" and "nest" grids, set the stretching factor -
# "stretch_fac", and center lat/lon of highest resolution
# tile - "target_lat" and "target_lon".
# 4) For "nest" grids, set the refinement ratio - "refine_ratio",
# 5) For "nest" grids, set the refinement ratio - "refine_ratio",
# the starting/ending i/j index location within the parent
# tile - "istart_nest", "jstart_nest", "iend_nest", "jend_nest"
# 5) For "regional_gfdl" grids, set the "halo". Default is three
# 6) For "regional_gfdl" grids, set the "halo". Default is three
# rows/columns.
# 6) For "regional_esg" grids, set center lat/lon of grid,
# 7) For "regional_esg" grids, set center lat/lon of grid,
# - "target_lat/lon" - the i/j dimensions - "i/jdim", the
# x/y grid spacing - "delx/y", and halo.
# 7) Set working directory - TMPDIR - and path to the repository
# 8) Set working directory - TMPDIR - and path to the repository
# clone - home_dir.
# 8) Submit script: "sbatch $script".
# 9) All files will be placed in "out_dir".
# 9) Submit script: "sbatch $script".
# 10) All files will be placed in "out_dir".
#
#-----------------------------------------------------------------------

Expand All @@ -67,12 +69,11 @@ module list
export gtype=uniform # 'uniform', 'stretch', 'nest'
# 'regional_gfdl', 'regional_esg'

export add_lake=false # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored

if [ $gtype = uniform ]; then
export res=96
export add_lake=true # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -119,15 +120,6 @@ export out_dir=/scratch2/NCEPDEV/stmp1/$LOGNAME/my_grids
# Should not need to change anything below here.
#-----------------------------------------------------------------------

if [ $add_lake = true ]; then
if [ $gtype != uniform ]; then
set +x
echo "Adding lake data to orography data is only available"
echo "for uniform grids."
exit 1
fi
fi

export APRUN=time
export APRUN_SFC=srun
export OMP_NUM_THREADS=24
Expand Down
32 changes: 12 additions & 20 deletions driver_scripts/driver_grid.jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@
# "regional_gfdl" - stand-alone gfdl regional grid
# "regional_esg" - stand-alone extended Schmidt gnomonic
# (esg) regional grid
# 3) For "stretch" and "nest" grids, set the stretching factor -
# 3) For "uniform" grids - to include lake fraction and
# depth, set "add_lake" to true, and the "lake_cutoff" value.
# 4) For "stretch" and "nest" grids, set the stretching factor -
# "stretch_fac", and center lat/lon of highest resolution
# tile - "target_lat" and "target_lon".
# 4) For "nest" grids, set the refinement ratio - "refine_ratio",
# 5) For "nest" grids, set the refinement ratio - "refine_ratio",
# the starting/ending i/j index location within the parent
# tile - "istart_nest", "jstart_nest", "iend_nest", "jend_nest"
# 5) For "regional_gfdl" grids, set the "halo". Default is three
# 6) For "regional_gfdl" grids, set the "halo". Default is three
# rows/columns.
# 6) For "regional_esg" grids, set center lat/lon of grid,
# 7) For "regional_esg" grids, set center lat/lon of grid,
# - "target_lat/lon" - the i/j dimensions - "i/jdim", the
# x/y grid spacing - "delx/y", and halo.
# 7) Set working directory - TMPDIR - and path to the repository
# 8) Set working directory - TMPDIR - and path to the repository
# clone - home_dir.
# 8) Submit script: "sbatch $script".
# 9) All files will be placed in "out_dir".
# 9) Submit script: "sbatch $script".
# 10) All files will be placed in "out_dir".
#
#-----------------------------------------------------------------------

Expand All @@ -68,12 +70,11 @@ module list
export gtype=uniform # 'uniform', 'stretch', 'nest'
# 'regional_gfdl', 'regional_esg'

export add_lake=false # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored

if [ $gtype = uniform ]; then
export res=96
export add_lake=true # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -120,15 +121,6 @@ export out_dir=/lfs4/HFIP/emcda/$LOGNAME/stmp/my_grids
# Should not need to change anything below here.
#-----------------------------------------------------------------------

if [ $add_lake = true ]; then
if [ $gtype != uniform ]; then
set +x
echo "Adding lake data to orography data is only available"
echo "for uniform grids."
exit 1
fi
fi

export APRUN=time
export APRUN_SFC=srun
export OMP_NUM_THREADS=24
Expand Down
19 changes: 12 additions & 7 deletions driver_scripts/driver_grid.orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,23 @@
# "regional_gfdl" - stand-alone gfdl regional grid
# "regional_esg" - stand-alone extended Schmidt
# gnomonic (esg) regional grid
# 3) For "stretch" and "nest" grids, set the stretching factor -
# 3) For "uniform" grids - to include lake fraction and
# depth, set "add_lake" to true, and the "lake_cutoff" value.
# 4) For "stretch" and "nest" grids, set the stretching factor -
# "stretch_fac", and center lat/lon of highest resolution
# tile - "target_lat" and "target_lon".
# 4) For "nest" grids, set the refinement ratio - "refine_ratio",
# 5) For "nest" grids, set the refinement ratio - "refine_ratio",
# the starting/ending i/j index location within the parent
# tile - "istart_nest", "jstart_nest", "iend_nest", "jend_nest"
# 5) For "regional_gfdl" grids, set the "halo". Default is three
# 6) For "regional_gfdl" grids, set the "halo". Default is three
# rows/columns.
# 6) For "regional_esg" grids, set center lat/lon of grid,
# 7) For "regional_esg" grids, set center lat/lon of grid,
# - "target_lat/lon" - the i/j dimensions - "i/jdim", the
# x/y grid spacing - "delx/y", and halo.
# 7) Set working directory - TMPDIR - and path to the repository
# 8) Set working directory - TMPDIR - and path to the repository
# clone - home_dir.
# 8) Submit script: "sbatch $script".
# 9) All files will be placed in "out_dir".
# 9) Submit script: "sbatch $script".
# 10) All files will be placed in "out_dir".
#
#-----------------------------------------------------------------------

Expand All @@ -69,6 +71,9 @@ export gtype=uniform # 'uniform', 'stretch', 'nest',

if [ $gtype = uniform ]; then
export res=96
export add_lake=true # Add lake frac and depth to orography data.
# Uniform grids only.
export lake_cutoff=0.20 # lake frac less than lake_cutoff is ignored
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down
14 changes: 13 additions & 1 deletion ush/fv3gfs_driver_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ export machine=${machine:?}
export res=${res:-96} # resolution of tile: 48, 96, 128, 192, 384, 768, 1152, 3072
export gtype=${gtype:-uniform} # grid type: uniform, stretch, nest, regional_gfdl,
# or regional_esg
export add_lake=${add_lake:-false} # add lake fraction and depth. uniform only.

export add_lake=${add_lake:-false} # add lake fraction and depth. uniform only.
export lake_cutoff=${lake_cutoff:-0.20} # lake fractions less than lake_cutoff
# are ignored.

if [ $gtype = uniform ]; then
echo "Creating global uniform grid"
Expand Down Expand Up @@ -89,6 +92,15 @@ else
exit 9
fi

if [ $add_lake = true ]; then
if [ $gtype != uniform ]; then
set +x
echo "Adding lake data to orography data is only available"
echo "for uniform grids."
exit 1
fi
fi

export TMPDIR=${TMPDIR:?}
export out_dir=${out_dir:?}

Expand Down

0 comments on commit 95deb2f

Please sign in to comment.