Skip to content

Commit

Permalink
chgres_cube: Split input_data module into to 3 separate modules (#744)
Browse files Browse the repository at this point in the history
Split input_data.F90 into new modules atm_input_data.F90, nst_input_data.F90 and
sfc_input_data.F90.

Update all unit tests for new modules.

Update 'readthedocs'.

Fixes #460.
  • Loading branch information
LarissaReames-NOAA committed Dec 28, 2022
1 parent 6ab86d3 commit 71af3f8
Show file tree
Hide file tree
Showing 34 changed files with 7,898 additions and 7,775 deletions.
1 change: 1 addition & 0 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This workflow tests all developer options including
# documentation check, and test code coverage.
#
#
# Ed Hartnett 12/11/22
name: developer
on:
Expand Down
5 changes: 3 additions & 2 deletions build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This build script is only used on officially supported machines. All other
# users should set module files as needed, and build directly with CMake.
#
#
# George Gayno

set -eux
Expand Down Expand Up @@ -31,7 +32,7 @@ fi
# Those with access to the EMC ftp site are: Orion and Hera.

if [[ "$target" == "hera" || "$target" == "orion" || "$target" == "wcoss2" ]]; then
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=OFF"
CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=OFF"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DBUILD_TESTING=ON"
#CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=../ -DCMAKE_INSTALL_BINDIR=exec -DENABLE_DOCS=ON -DBUILD_TESTING=ON"
else
Expand All @@ -47,7 +48,7 @@ cmake .. ${CMAKE_FLAGS}
make -j 8 VERBOSE=1
make install

#make test
#ctest
#ctest -I 4,5

exit
4 changes: 3 additions & 1 deletion docs/source/chgres_cube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ The program assumes Noah/Noah-MP LSM coefficients for certain soil thresholds. I
* model_grid.F90 - Sets up the ESMF grid objects for the input data grid and target FV3 grid.
* static_data.F90 - Reads static surface climatological data for the target FV3 grid (such as soil type and vegetation type). Time interpolates time-varying fields, such as monthly plant greenness, to the model run time. Set path to these files via the fix_dir_target_grid namelist variable.
* write_data.F90 - Writes the tiled and header files expected by the forecast model.
* input_data.F90 - Contains routines to read atmospheric and surface data from GRIB2, NEMSIO and NetCDF files.
* atm_input_data.F90 - Contains routines to read input atmospheric data from GRIB2, NEMSIO and NetCDF files.
* nst_input_data.F90 - Contains routines to read input NSST data from NEMSIO and NetCDF files.
* sfc_input_data.F90 - Contains routines to read input surface data from GRIB2, NEMSIO and NetCDF files.
* utils.F90 - Contains utility routines, such as error handling.
* grib2_util.F90 - Routines to (1) convert from RH to specific humidity; (2) convert from omega to dzdt. Required for GRIB2 input data.
* atmosphere.F90 - Process atmospheric fields. Horizontally interpolate from input to target FV3 grid using ESMF regridding. Adjust surface pressure according to terrain differences between input and target grid. Vertically interpolate to target FV3 grid vertical levels. Description of main routines:
Expand Down
6 changes: 4 additions & 2 deletions sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# This is the CMake build file for the chgres_cube utility in the
# UFS_UTILS package.
#
# George Gayno, Mark Potts, Kyle Gerheiser
# George Gayno, Mark Potts, Kyle Gerheiser, Larissa Reames

set(lib_src
atmosphere.F90
atmosphere_target_data.F90
grib2_util.F90
input_data.F90
atm_input_data.F90
sfc_input_data.F90
nst_input_data.F90
model_grid.F90
program_setup.F90
search_util.F90
Expand Down
Loading

0 comments on commit 71af3f8

Please sign in to comment.