Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single step oro & fix files generation procedure for atm and ocn res combo #830

Merged
merged 92 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
f9e63a3
Add logic to ignore soil and clay percentage records.
GeorgeGayno-NOAA May 5, 2023
26eeef1
Merge branch 'develop' into bugfix/bnu_soil
GeorgeGayno-NOAA May 31, 2023
ecf2442
Update documentation and script logs for new files.
GeorgeGayno-NOAA Jun 1, 2023
478fbde
updates done by Sanatcumar
sanatcumar Jun 15, 2023
b91b5eb
updates done by Sanatcumar
sanatcumar Jun 15, 2023
6a004a7
updates done by Sanatcumar
sanatcumar Jun 15, 2023
9d1be51
updates done by Sanatcumar
sanatcumar Jun 15, 2023
d386999
updates done by Sanatcumar
sanatcumar Jun 15, 2023
e34c7d0
updates done by Sanatcumar
sanatcumar Jun 15, 2023
2653ab2
updates done by Sanatcumar
sanatcumar Jun 15, 2023
34a8676
Removed emails and links
sanatcumar Jun 16, 2023
cbb553f
Removed input files
sanatcumar Jun 30, 2023
6a7b778
Removed input files
sanatcumar Jun 30, 2023
0b9a03e
Removed log files
sanatcumar Jun 30, 2023
d6221b3
fixed the typo in ocean merge paths
sanatcumar Jun 30, 2023
4a208a1
added explanatory comments as recomended to the ocean_merge routines
sanatcumar Jun 30, 2023
069d1bf
removed unnecessary libraries (sp) when compiling
sanatcumar Jun 30, 2023
41f87d6
fixed a broken path in ocean_merge
sanatcumar Jun 30, 2023
ab1e628
fixed a broken path to mosaic
sanatcumar Jul 5, 2023
24c93fa
removed logs
sanatcumar Jul 10, 2023
eb0a511
relocated readme, reorganized output directories, removed logs and ot…
sanatcumar Jul 10, 2023
65d34fa
added more explanatory comments to code
sanatcumar Jul 10, 2023
b74ebc8
Major revision split orog
sanatcumar Aug 10, 2023
4455d90
Major revision split orog
sanatcumar Aug 10, 2023
e700e0a
Removed logs
sanatcumar Aug 10, 2023
f4769f8
removed some old namelist files
sanatcumar Aug 10, 2023
400cc13
Merge branch 'develop' into bugfix/bnu_soil
GeorgeGayno-NOAA Aug 11, 2023
084d51c
Some script updates.
GeorgeGayno-NOAA Aug 14, 2023
c246ffc
included doxygen(TNX George)+ set ocn default
sanatcumar Aug 14, 2023
e0d86d3
updated fv3gfs_driver_grid.sh comments to the correct sequence of calls
sanatcumar Aug 14, 2023
2c9b502
updated fv3gfs_driver_grid.sh comments to the correct sequence of calls
sanatcumar Aug 14, 2023
98caf8b
Update orion driver script to use additional resources
GeorgeGayno-NOAA Aug 15, 2023
6179b24
Update jet grid driver script to request more resources
GeorgeGayno-NOAA Aug 15, 2023
fc17593
Minor updates to the wcoss2 driver grid script.
GeorgeGayno-NOAA Aug 15, 2023
22dadfe
Merge branch 'develop' into bugfix/bnu_soil
GeorgeGayno-NOAA Aug 16, 2023
6f3fe9e
Update some script comments. Update sfc_climo_gen script to use
GeorgeGayno-NOAA Aug 16, 2023
64fdfd7
Update comments in the sfc_climo_gen utility script.
GeorgeGayno-NOAA Aug 16, 2023
6e1c9b4
clean up before merge
sanatcumar Aug 17, 2023
df89e12
Update ccpp-physics submodule.
sanatcumar Aug 17, 2023
d4cfcc0
Update ccpp-physics
sanatcumar Aug 17, 2023
1105547
Merge branch 'develop' into single_step
sanatcumar Aug 17, 2023
05659d9
removed unnecessary files
sanatcumar Aug 17, 2023
6b30462
fixed a gnu compile issue split the ocean merge into a driver and script
sanatcumar Aug 17, 2023
4b3b25f
cleaned up the driver, fix gnu compile, split the ocean merge
sanatcumar Aug 17, 2023
156bd27
Merge branch 'bugfix/bnu_soil' into single_step
sanatcumar Aug 18, 2023
8284cbe
Cleaned up old directories and included print messages for debugging …
sanatcumar Aug 25, 2023
0f60b72
fixed possible misleading errors in merge_lake_ochmsk.f90, fixed logi…
sanatcumar Aug 29, 2023
36d6ec4
inlcudes a readme file for all options
sanatcumar Sep 5, 2023
5dc234d
included logic to bypass when ocn is not set
sanatcumar Sep 8, 2023
ce8b596
Do not use the prev #.
sanatcumar Sep 8, 2023
276f846
Now can run other grid type options as usual
sanatcumar Sep 11, 2023
4769aea
Fixed issues with running other versions
sanatcumar Sep 11, 2023
df2420b
Updated the comments in the driver scripts
sanatcumar Sep 12, 2023
b24724f
updated origin and formated coments
sanatcumar Sep 12, 2023
28f6ef4
Merge branch 'ufs-community:develop' into single_step
sanatcumar Sep 12, 2023
df0788d
Merge remote-tracking branch 'upstream/develop' into develop
sanatcumar Sep 27, 2023
54b5564
Merge branch 'develop' into single_step
sanatcumar Sep 27, 2023
d0e2978
Modified the ocean merge and scriptto pass the binary_lake
sanatcumar Nov 6, 2023
eadcd71
Merge remote-tracking branch 'upstream/develop' into single_step
sanatcumar Nov 6, 2023
e2fbc56
changed the output file names to follow /scratch1/NCEPDEV/global/glop…
sanatcumar Nov 8, 2023
13145aa
Fixed a typo in file name changes
sanatcumar Nov 8, 2023
e1c28f8
included the lake source data in the readme
sanatcumar Nov 9, 2023
49b131d
fixed file names to run gsl suite
sanatcumar Nov 13, 2023
a0bfb00
Merge remote-tracking branch 'upstream/develop' into single_step
sanatcumar Nov 14, 2023
1c53ea1
Included logic to work with different filenames
sanatcumar Nov 15, 2023
6e18c0f
Fixed issues with nck commands with the new libaries from last PR
sanatcumar Nov 15, 2023
76dd01a
Made filenames consistent
sanatcumar Nov 16, 2023
2941924
Included creation date to readme
sanatcumar Nov 17, 2023
eb31490
Includes Mike's fix for coastal ORO issue
sanatcumar Nov 21, 2023
7e64969
Includes Mike's coastal oro fix
sanatcumar Nov 22, 2023
451d13c
Merge remote-tracking branch 'upstream/develop' into single_step
sanatcumar Nov 22, 2023
5563ce4
tweaks to get the grid_gen test working
sanatcumar Nov 22, 2023
29774b1
inlcuding lake source data for all gtypes
sanatcumar Nov 28, 2023
10a3524
Merge remote-tracking branch 'upstream/develop' into single_step
sanatcumar Nov 28, 2023
9977d8b
Tweaks to get gridgen tests working. Includes checking for uniform an…
sanatcumar Nov 29, 2023
3151f77
includes Doxygen edits
sanatcumar Nov 30, 2023
28a4cdb
Included newer variables in driver scripts for other machines
sanatcumar Nov 30, 2023
ccc72e3
Updated path for ocean merge files on orion
sanatcumar Nov 30, 2023
291ba43
Includes logic by George to stop on error in the ocean merge routines
sanatcumar Nov 30, 2023
07fdec3
Removed personal links except "ocean merge" and merged conflicts
sanatcumar Dec 1, 2023
c11ddcf
Changes to test the new location for ocean masks
sanatcumar Dec 6, 2023
cefff38
testing with new fix locations
sanatcumar Dec 7, 2023
58da591
edited driver scripts for each machine
sanatcumar Dec 7, 2023
5dcb766
Tweaks to make it run with the new soft linked orog
sanatcumar Dec 7, 2023
2b362b5
Cleaned up unused variables
sanatcumar Dec 7, 2023
30e2834
Cleaning up the unnecessary changes to use the fix files
sanatcumar Dec 7, 2023
a2082c0
Tweaks recomended by George to read long filenames
sanatcumar Dec 8, 2023
2f2cb70
Reverted non relevant edits for this PR and removed a personal link
sanatcumar Dec 8, 2023
27532c9
Removed personal link in readme
sanatcumar Dec 8, 2023
d5c01f6
Includes edits by george to grid_gen tests to accomodate the change f…
sanatcumar Dec 8, 2023
9d60740
Tweaks to inlcude the hash automatically in the readme file. Nice ide…
sanatcumar Dec 8, 2023
d0d1e8f
last edits to sfc_gen
sanatcumar Dec 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option(FVCOMTOOLS "Enable building fvcom_tools.fd" ON)
option(GBLEVENTS "Enable building gblevents.fd" ON)
option(CPLD_GRIDGEN "Enable building cpld_gridgen.fd" ON)
option(WEIGHT_GEN "Enable building weight_gen.fd" ON)
option(OCEAN_MERGE "Enable building ocean_merge.fd" ON)

# Option to build application specific utilities
option(GFS "Enable building GFS-only utilities" OFF)
Expand All @@ -46,6 +47,7 @@ if(GFS)
set(GBLEVENTS OFF CACHE BOOL "Disable building gblevents.fd" FORCE)
set(CPLD_GRIDGEN OFF CACHE BOOL "Disable building cpld_gridgen.fd" FORCE)
set(WEIGHT_GEN OFF CACHE BOOL "Disable building weight_gen.fd" FORCE)
set(OCEAN_MERGE OFF CACHE BOOL "Disable building ocean_merge.fd" FORCE)
endif()

SET(TEST_FILE_DIR "." CACHE STRING "Check this directory for test files before using FTP.")
Expand Down
2 changes: 1 addition & 1 deletion cmake/mpiexec.hera
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# $2+ - Executable and its arguments
#

ACCOUNT=gsd-fv3
ACCOUNT=fv3-cpu
QOS=debug

NP=$1
Expand Down
20 changes: 12 additions & 8 deletions docs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ https://github.com/ufs-community/UFS_UTILS.
- <a href="chgres_cube/index.html">chgres_cube</a> - Creates cold
start initial conditions for FV3 model runs.

- <a href="cpld_gridgen/index.html">cpld_gridgen</a> - Utility to
create the Fix and IC files for the S2SW and S2S applications

- <a href="emcsfc_ice_blend/index.html">emcsfc_ice_blend</a> - Blends
National Ice Center sea ice cover and EMC sea ice concentration data
to create a global sea ice analysis used to update the GFS once per
Expand Down Expand Up @@ -57,6 +60,15 @@ https://github.com/ufs-community/UFS_UTILS.
gnomonic grids, and to compute the equivalent global resolution of a
regional grid.

- <a href="lsm_routines/index.html">lsm_routines</a> - Land surface
model-specific routines that are utilised elsewhere within UFS_UTILS.
Currently, contains the routines required by global_cycle to
perform data assimilation updates to land model states

- <a href="ocean_merge/index.html">ocean_merge</a> - Utility to
determine the water mask by merging a lake mask with a mapped
ocean mask from MOM6.

- <a href="orog_mask_tools/index.html">orog_mask_tools</a> - Utilities
to create land mask, terrain and gravity wave drag fields; set lake
fraction and depth; creates an inland land mask.
Expand All @@ -70,14 +82,6 @@ https://github.com/ufs-community/UFS_UTILS.
top and the number of vertical levels. Outputs the 'ak' and 'bk'
parameters used by the forecast model to define the hybrid levels.

- <a href="lsm_routines/index.html">lsm_routines</a> - Land surface
model-specific routines that are utilised elsewhere within UFS_UTILS.
Currently, contains the routines required by global_cycle to
perform data assimilation updates to land model states

- <a href="cpld_gridgen/index.html">cpld_gridgen</a> - Utility to
create the Fix and IC files for the S2SW and S2S applications

- <a href="weight_gen/index.html">weight_gen</a> - Utility to
create gaussian grid ESMF 'scrip' files for use in creating
ESMF interpolation weight files.
10 changes: 6 additions & 4 deletions driver_scripts/driver_grid.hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#SBATCH --open-mode=truncate
#SBATCH -o log.fv3_grid_driver
#SBATCH -e log.fv3_grid_driver
#SBATCH --nodes=1 --ntasks-per-node=24
#SBATCH --nodes=6 --ntasks-per-node=12
#SBATCH --partition=bigmem
#SBATCH -q debug
#SBATCH -t 00:20:00
#SBATCH -t 00:30:00

#-----------------------------------------------------------------------
# Driver script to create a cubic-sphere based model grid on Hera.
Expand Down Expand Up @@ -103,7 +103,7 @@ export soil_type_src="bnu.v3.30s" # Soil type data.
# 3) "statsgo.conus.30s" for CONUS 30s data
# 4) "statsgo.nh.30s" for NH 30s data
# 5) "statsgo.30s" for global 30s data
# For Beijing Norm. Univ. data
# For Beijing Norm. Univ. data
# 1) "bnu.v3.30s" for global 30s data.

# choose dataset sources for lakefrac & lakedepth so that lake_data_srce=LakeFrac_LakeDepth;
Expand All @@ -115,6 +115,7 @@ if [ $gtype = uniform ]; then
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # return 0 if lake_frac < lake_cutoff & add_lake=T
export binary_lake=1 # return 1 if lake_frac >= lake_cutoff & add_lake=T
export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -150,14 +151,15 @@ fi

#-----------------------------------------------------------------------
# Check paths.
#
# home_dir - location of repository.
# TEMP_DIR - working directory.
# out_dir - where files will be placed upon completion.
#-----------------------------------------------------------------------

export home_dir=$SLURM_SUBMIT_DIR/..
export TEMP_DIR=/scratch2/NCEPDEV/stmp1/$LOGNAME/fv3_grid.$gtype
export out_dir=/scratch2/NCEPDEV/stmp1/$LOGNAME/my_grids
export out_dir=/scratch2/NCEPDEV/stmp1/$LOGNAME/my_grids_ocean_fixed/

#-----------------------------------------------------------------------
# Should not need to change anything below here.
Expand Down
2 changes: 1 addition & 1 deletion driver_scripts/driver_grid.jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ if [ $gtype = uniform ]; then
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # return 0 if lake_frac < lake_cutoff & add_lake=T
export binary_lake=1 # return 1 if lake_frac >= lake_cutoff & add_lake=T
export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -156,7 +157,6 @@ fi
export home_dir=$SLURM_SUBMIT_DIR/..
export TEMP_DIR=/lfs4/HFIP/emcda/$LOGNAME/stmp/fv3_grid.$gtype
export out_dir=/lfs4/HFIP/emcda/$LOGNAME/stmp/my_grids

#-----------------------------------------------------------------------
# Should not need to change anything below here.
#-----------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions driver_scripts/driver_grid.orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ if [ $gtype = uniform ]; then
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # return 0 if lake_frac < lake_cutoff & add_lake=T
export binary_lake=1 # return 1 if lake_frac >= lake_cutoff & add_lake=T
export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down
2 changes: 1 addition & 1 deletion driver_scripts/driver_grid.wcoss2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ if [ $gtype = uniform ]; then
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # return 0 if lake_frac < lake_cutoff & add_lake=T
export binary_lake=1 # return 1 if lake_frac >= lake_cutoff & add_lake=T
export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -154,7 +155,6 @@ fi
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,
Expand Down
2 changes: 1 addition & 1 deletion fix/link_fixdirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ elif [ $machine = "s4" ]; then
fi

am_ver=${am_ver:-20220805}
orog_ver=${orog_ver:-20220805}
orog_ver=${orog_ver:-20231027}
sfc_climo_ver=${sfc_climo_ver:-20230925}

for dir in am orog orog_raw sfc_climo; do
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/c96.uniform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ echo "Ending at: " `date`
cd $out_dir/C96

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/c96.viirs.bnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ echo "Ending at: " `date`
cd $out_dir/C96

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/esg.regional.pct.cat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ echo "Ending at: " `date`
cd $out_dir/C3113

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/esg.regional.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ echo "Ending at: " `date`
cd $out_dir/C3113

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/gfdl.regional.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ echo "Ending at: " `date`
cd $out_dir/C424

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/regional.gsl.gwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ echo "Ending at: " `date`
cd $out_dir/C772

test_failed=0
for files in *tile*.nc ./fix_sfc/*tile*.nc
for files in *tile*.nc ./sfc/*tile*.nc
do
if [ -f $files ]; then
echo CHECK $files
Expand Down
4 changes: 4 additions & 0 deletions sorc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ endif()
if(WEIGHT_GEN)
add_subdirectory(weight_gen.fd)
endif()
if(OCEAN_MERGE)
add_subdirectory(ocean_merge.fd)
endif()

26 changes: 26 additions & 0 deletions sorc/ocean_merge.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
list(APPEND fortran_src
merge_lake_ocnmsk.f90
)

if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8 -i4 -convert big_endian")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdefault-real-8")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch")
endif()
endif()

set(exe_name ocean_merge)
add_executable(${exe_name} ${fortran_src})
target_link_libraries(
${exe_name}

NetCDF::NetCDF_Fortran)
GeorgeGayno-NOAA marked this conversation as resolved.
Show resolved Hide resolved

install(TARGETS ${exe_name})

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
add_subdirectory(docs)
endif()
15 changes: 15 additions & 0 deletions sorc/ocean_merge.fd/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This is the CMake file for building this docs directory.
#
# Ed Hartnett 3/9/21

# Create doxyfile.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

# Build documentation with target all.
add_custom_target(ocean_merge_doc ALL
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API Documentation with Doxygen" VERBATIM)

# Ensure top-level docs have been generated.
add_dependencies(ocean_merge_doc doc)
Loading