-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the following for WCOSS2: Build modules. Consistency test driver scripts. Driver script for creating new grids. Driver script for the GDAS initialization utility. Fixes #559.
- Loading branch information
1 parent
c5cfcf4
commit 53f7d18
Showing
23 changed files
with
1,299 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
#!/bin/bash | ||
|
||
#PBS -o log | ||
#PBS -e log | ||
#PBS -q debug | ||
#PBS -A GFS-DEV | ||
#PBS -l walltime=00:05:00 | ||
#PBS -N make_grid | ||
#PBS -l select=1:ncpus=24:mem=100GB | ||
|
||
#----------------------------------------------------------------------- | ||
# Driver script to create a cubic-sphere based model grid on WCOSS2. | ||
# | ||
# Produces the following files (netcdf, each tile in separate file): | ||
# 1) 'mosaic' and 'grid' files containing lat/lon and other | ||
# records that describe the model grid. | ||
# 2) 'oro' files containing land mask, terrain and gravity | ||
# wave drag fields. | ||
# 3) Surface climo fields, such as soil type, vegetation | ||
# greenness and albedo. | ||
# | ||
# Note: The sfc_climo_gen program only runs with an | ||
# mpi task count that is a multiple of six. This is | ||
# an ESMF library requirement. Large grids may require | ||
# tasks spread across multiple nodes. The orography code | ||
# benefits from threads. | ||
# | ||
# To run, do the following: | ||
# | ||
# 1) Set "C" resolution, "res" - Example: res=96. | ||
# 2) Set grid type ("gtype"). Valid choices are | ||
# "uniform" - global uniform grid | ||
# "stretch" - global stretched grid | ||
# "nest" - global stretched grid with nest | ||
# "regional_gfdl" - stand-alone gfdl regional grid | ||
# "regional_esg" - stand-alone extended Schmidt gnomonic | ||
# (esg) regional grid | ||
# 3) For "uniform" and "regional_gfdl" 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". | ||
# 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" | ||
# 6) For "regional_gfdl" grids, set the "halo". Default is three | ||
# rows/columns. | ||
# 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. | ||
# 8) Set working directory - TEMP_DIR - and path to the repository | ||
# clone - home_dir. | ||
# 9) Check settings for 'make_gsl_orog' and 'veg_type_src' | ||
# below. | ||
# 10) Submit script: "cat $script | bsub". | ||
# 11) All files will be placed in "out_dir". | ||
# | ||
#----------------------------------------------------------------------- | ||
|
||
cd $PBS_O_WORKDIR | ||
|
||
source ../sorc/machine-setup.sh > /dev/null 2>&1 | ||
module use ../modulefiles | ||
module load build.$target.intel | ||
module list | ||
|
||
#----------------------------------------------------------------------- | ||
# Set grid specs here. | ||
#----------------------------------------------------------------------- | ||
|
||
export gtype=uniform # 'uniform', 'stretch', 'nest', | ||
# 'regional_gfdl', 'regional_esg' | ||
export make_gsl_orog=false # 'true' if user needs 'oro' files for GSL | ||
# orographic drag suite | ||
export veg_type_src="modis.igbp.0.05" # veg type data. | ||
# For viirs-based vegetation type data, set to: | ||
# 1) "viirs.igbp.0.05" for global 5km data | ||
# 2) "viirs.igbp.0.1" for global 10km data | ||
# 3) "viirs.igbp.0.03" for global 3km data | ||
# 4) "viirs.igbp.conus.0.01" for regional 1km data | ||
# For the modis-based data, set to: | ||
# 1) "modis.igbp.0.05" for global 5km data | ||
# 2) "modis.igbp.0.03" for global 3km data | ||
# 3) "modis.igbp.conus.0.01" for regional 1km data | ||
|
||
if [ $gtype = uniform ]; then | ||
export res=96 | ||
export add_lake=false # Add lake frac and depth to orography data. | ||
export lake_cutoff=0.20 # lake frac < lake_cutoff ignored when add_lake=T | ||
elif [ $gtype = stretch ]; then | ||
export res=96 | ||
export stretch_fac=1.5 # Stretching factor for the grid | ||
export target_lon=-97.5 # Center longitude of the highest resolution tile | ||
export target_lat=35.5 # Center latitude of the highest resolution tile | ||
elif [ $gtype = nest ] || [ $gtype = regional_gfdl ]; then | ||
export add_lake=false # Add lake frac and depth to orography data. | ||
export lake_cutoff=0.20 # lake frac < lake_cutoff ignored when add_lake=T | ||
export res=768 | ||
export stretch_fac=1.5 # Stretching factor for the grid | ||
export target_lon=-97.5 # Center longitude of the highest resolution tile | ||
export target_lat=38.5 # Center latitude of the highest resolution tile | ||
export refine_ratio=3 # The refinement ratio | ||
export istart_nest=123 # Starting i-direction index of nest grid in parent tile supergrid | ||
export jstart_nest=331 # Starting j-direction index of nest grid in parent tile supergrid | ||
export iend_nest=1402 # Ending i-direction index of nest grid in parent tile supergrid | ||
export jend_nest=1194 # Ending j-direction index of nest grid in parent tile supergrid | ||
export halo=3 # Lateral boundary halo | ||
elif [ $gtype = regional_esg ] ; then | ||
export res=-999 # equivalent resolution is computed | ||
export target_lon=-97.5 # Center longitude of grid | ||
export target_lat=35.5 # Center latitude of grid | ||
export idim=301 # Dimension of grid in 'i' direction | ||
export jdim=200 # Dimension of grid in 'j' direction | ||
export delx=0.0585 # Grid spacing (in degrees) in the 'i' direction | ||
# on the SUPERGRID (which has twice the resolution of | ||
# the model grid). The physical grid spacing in the 'i' | ||
# direction is related to delx as follows: | ||
# distance = 2*delx*(circumf_Earth/360 deg) | ||
export dely=0.0585 # Grid spacing (in degrees) in the 'j' direction. | ||
export halo=3 # number of row/cols for halo | ||
fi | ||
|
||
#----------------------------------------------------------------------- | ||
# Check paths. | ||
# home_dir - location of repository. | ||
# TEMP_DIR - working directory. | ||
# out_dir - where files will be placed upon completion. | ||
#----------------------------------------------------------------------- | ||
|
||
export home_dir=$PBS_O_WORKDIR/.. | ||
export TEMP_DIR=/lfs/h2/emc/stmp/$LOGNAME/fv3_grid.$gtype | ||
export out_dir=/lfs/h2/emc/stmp/$LOGNAME/my_grids | ||
|
||
#----------------------------------------------------------------------- | ||
# Should not need to change anything below here unless you want to | ||
# to change the job card for the number of tasks to use. Then, | ||
# you will need to check APRUN_SFC and OMP_NUM_THREADS. | ||
#----------------------------------------------------------------------- | ||
|
||
set -x | ||
|
||
export APRUN=time | ||
export APRUN_SFC="mpiexec -n 24 -ppn 24 -cpu-bind core" | ||
export OMP_NUM_THREADS=24 # orog code worked best with 24 threads. | ||
export OMP_PLACES=cores | ||
export OMP_STACKSIZE=2048m | ||
export machine=WCOSS2_CRAY | ||
|
||
ulimit -a | ||
ulimit -s unlimited | ||
|
||
#----------------------------------------------------------------------- | ||
# Start script. | ||
#----------------------------------------------------------------------- | ||
|
||
$home_dir/ush/fv3gfs_driver_grid.sh | ||
|
||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
help([[ | ||
Load environment to compile UFS_UTILS on WCOSS2 | ||
]]) | ||
|
||
cmake_ver=os.getenv("cmake_ver") or "3.20.2" | ||
load(pathJoin("cmake", cmake_ver)) | ||
|
||
PrgEnv_intel_ver=os.getenv("PrgEnv_intel_ver") or "8.1.0" | ||
load(pathJoin("PrgEnv-intel", PrgEnv_intel_ver)) | ||
|
||
craype_ver=os.getenv("craype_ver") or "2.7.13" | ||
load(pathJoin("craype", craype_ver)) | ||
|
||
intel_ver=os.getenv("intel_ver") or "19.1.3.304" | ||
load(pathJoin("intel", intel_ver)) | ||
|
||
cray_mpich_ver=os.getenv("cray_mpich_ver") or "8.1.7" | ||
load(pathJoin("cray-mpich", cray_mpich_ver)) | ||
|
||
|
||
libjpeg_ver=os.getenv("libjpeg_ver") or "9c" | ||
load(pathJoin("libjpeg", libjpeg_ver)) | ||
|
||
zlib_ver=os.getenv("zlib_ver") or "1.2.11" | ||
load(pathJoin("zlib", zlib_ver)) | ||
|
||
libpng_ver=os.getenv("libpng_ver") or "1.6.37" | ||
load(pathJoin("libpng", libpng_ver)) | ||
|
||
hdf5_ver=os.getenv("hdf5_ver") or "1.10.6" | ||
load(pathJoin("hdf5", hdf5_ver)) | ||
|
||
netcdf_ver=os.getenv("netcdf_ver") or "4.7.4" | ||
load(pathJoin("netcdf", netcdf_ver)) | ||
|
||
bacio_ver=os.getenv("bacio_ver") or "2.4.1" | ||
load(pathJoin("bacio", bacio_ver)) | ||
|
||
sfcio_ver=os.getenv("sfcio_ver") or "1.4.1" | ||
load(pathJoin("sfcio", sfcio_ver)) | ||
|
||
w3nco_ver=os.getenv("w3nco_ver") or "2.4.1" | ||
load(pathJoin("w3nco", w3nco_ver)) | ||
|
||
nemsio_ver=os.getenv("nemsio_ver") or "2.5.2" | ||
load(pathJoin("nemsio", nemsio_ver)) | ||
|
||
sigio_ver=os.getenv("sigio_ver") or "2.3.2" | ||
load(pathJoin("sigio", sigio_ver)) | ||
|
||
sp_ver=os.getenv("sp_ver") or "2.3.3" | ||
load(pathJoin("sp", sp_ver)) | ||
|
||
ip_ver=os.getenv("ip_ver") or "3.3.3" | ||
load(pathJoin("ip", ip_ver)) | ||
|
||
g2_ver=os.getenv("g2_ver") or "3.4.5" | ||
load(pathJoin("g2", g2_ver)) | ||
|
||
-- for mpiexec command | ||
cray_pals_ver=os.getenv("cray_pals_ver") or "1.0.12" | ||
load(pathJoin("cray-pals", cray_pals_ver)) | ||
|
||
udunits_ver=os.getenv("udunits_ver") or "2.2.28" | ||
load(pathJoin("udunits", udunits_ver)) | ||
|
||
gsl_ver=os.getenv("gsl_ver") or "2.7" | ||
load(pathJoin("gsl", gsl_ver)) | ||
|
||
nco_ver=os.getenv("nco_ver") or "4.9.7" | ||
load(pathJoin("nco", nco_ver)) | ||
|
||
setenv("HPC_OPT","/apps/ops/para/libs") | ||
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/compiler/intel/19.1.3.304") | ||
prepend_path("MODULEPATH", "/apps/ops/para/libs/modulefiles/mpi/intel/19.1.3.304/cray-mpich/8.1.7") | ||
esmf_ver=os.getenv("esmf_ver") or "8.2.1b04" | ||
load(pathJoin("esmf", esmf_ver)) | ||
|
||
whatis("Description: UFS_UTILS build environment") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.