Skip to content

Commit

Permalink
Freeze hash of UFS_UTILS; clean up build scripts; get list of suites …
Browse files Browse the repository at this point in the history
…for which to build FV3 from valid_vals_CCPP_PHYS_SUITES (#25)

This PR must be merged at the same time as PR #[301](https://github.com/NOAA-EMC/regional_workflow/pull/301) into NOAA-EMC/regional_workflow.

## DESCRIPTION OF CHANGES:
* For stability, freeze version of UFS_UTILS in Externals.cfg to a specific hash.
* In build_forecast.sh, get the list of CCPP physics suites for which to build the FV3 executable from the array valid_vals_CCPP_PHYS_SUITES in the file valid_param_vals.sh in regional_worfklow.
* Delete build_global_equiv_resol.sh and build_mosaic_file.sh since those scripts are no longer needed.  The mosaic_file code has been removed, and the global_equiv_resol code is now in UFS_UTILS and is built in/by that repo.
* For consistency with the name of the code, change the name of the executable for building a regional grid that gets copied to ufs-srweather-app/exec from regional_grid to regional_esg_grid.
* Remove unneeded lines from regional_build.cfg.

## TESTS CONDUCTED: 
See PR #[301](https://github.com/NOAA-EMC/regional_workflow/pull/301) into NOAA-EMC/regional_workflow for tests conducted.
  • Loading branch information
gsketefian authored Sep 24, 2020
1 parent d1822a2 commit ba253d6
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 297 deletions.
4 changes: 2 additions & 2 deletions Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ required = True
protocol = git
repo_url = https://github.com/JeffBeck-NOAA/UFS_UTILS
# Specify either a branch name or a hash but not both.
branch = feature/regional_release
#hash = 6c9db728
#branch = feature/regional_release
hash = e5419633
local_path = src/UFS_UTILS
required = True

Expand Down
8 changes: 6 additions & 2 deletions src/build_UFS_UTILS.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/sh
#==========================================================================
#
# Description: Builds chgres, chgres_cube, orog, fre-nctools, sfc_climo_gen,
# regional_grid, global_equiv_resol, and mosaic_file.
# Description:
# Builds all codes in UFS_UTILS. Note that this script does not copy
# over the executables it builds to the eventual destination directory
# at ufs-srweather-app/exec. That step is performed in install_all.sh,
# and that script copies only a subset of the executables built by this
# one.
#
# Usage: ./build_UFS_UTILS.sh
#
Expand Down
21 changes: 11 additions & 10 deletions src/build_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ fi
# Build static executable using cmake for all valid suites in workflow
# defined in regional_workflow/ush/valid_param_vals.sh
#---------------------------------------------------------------------------------
export CCPP_SUITES="\
FV3_CPT_v0,\
FV3_GFS_2017_gfdlmp,\
FV3_GFS_2017_gfdlmp_regional,\
FV3_GSD_SAR,\
FV3_GSD_v0,\
FV3_GFS_v15p2,\
FV3_GFS_v16beta,\
FV3_RRFS_v1beta\
"

# Read in the array of valid physics suite from the file in the workflow
# that specifies valid values for various parameters. In this case, it
# is the valid values for CCPP_PHYS_SUITE. Note that the result (stored
# in CCPP_SUITES) is a string consisting of a comma-separated list of all
# the valid (allowed) CCPP physics suites.
CCPP_SUITES=$(
. ../../regional_workflow/ush/valid_param_vals.sh
printf "%s," "${valid_vals_CCPP_PHYS_SUITE[@]}"
)
export CCPP_SUITES="${CCPP_SUITES:0: -1}" # Remove comma after last suite.

./build.sh || echo "FAIL: build_forecast.sh failed, see ${cwd}/logs/build_forecast.log"

Expand Down
128 changes: 0 additions & 128 deletions src/build_global_equiv_resol.sh

This file was deleted.

128 changes: 0 additions & 128 deletions src/build_mosaic_file.sh

This file was deleted.

28 changes: 6 additions & 22 deletions src/install_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,26 @@ fi
#------------------------------------
# install post
#------------------------------------
$Build_post && {
${CP} EMC_post/exec/* ../exec/ncep_post
}

#------------------------------------
# install chgres
# install needed utilities from UFS_UTILS.
#------------------------------------
$Build_UFS_UTILS && {
# ${CP} regional_utils.fd/exec/global_chgres ../exec/regional_chgres.x

#------------------------------------
# install chgres_cube
#------------------------------------
${CP} UFS_UTILS/exec/chgres_cube ../exec/chgres_cube.exe

#------------------------------------
# install orog
#------------------------------------
${CP} UFS_UTILS/exec/orog ../exec/orog.x

#------------------------------------
# install sfc_climo_gen
#------------------------------------
${CP} UFS_UTILS/exec/sfc_climo_gen ../exec/sfc_climo_gen

#------------------------------------
# install regional_esg_grid
#------------------------------------
${CP} UFS_UTILS/exec/regional_esg_grid ../exec/regional_grid

#------------------------------------
# install other utilities
#------------------------------------
${CP} UFS_UTILS/exec/regional_esg_grid ../exec/regional_esg_grid
${CP} UFS_UTILS/exec/make_hgrid ../exec/make_hgrid
${CP} UFS_UTILS/exec/make_solo_mosaic ../exec/make_solo_mosaic
${CP} UFS_UTILS/exec/fregrid ../exec/fregrid
${CP} UFS_UTILS/exec/filter_topo ../exec/filter_topo
${CP} UFS_UTILS/exec/shave ../exec/shave.x
${CP} UFS_UTILS/exec/global_equiv_resol ../exec/global_equiv_resol
}

#------------------------------------
# install gsi
Expand Down
3 changes: 1 addition & 2 deletions src/partial_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
# define the array of the name of build program
#
declare -a Build_prg=("Build_libs" "Build_forecast" "Build_gsi" \
"Build_post" "Build_UFS_UTILS" "Build_regional_grid" \
"Build_mosaic_file" "Build_global_equiv_resol")
"Build_post" "Build_UFS_UTILS" )

#
# function parse_cfg: read config file and retrieve the values
Expand Down
3 changes: 0 additions & 3 deletions src/regional_build.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Building gsi (gsi) .................................... no
Building post (post) .................................. yes
Building UFS_UTILS (UFS_UTILS) ........................ yes
Building regional_grid (regional_grid) ................ yes
Building mosaic_file (mosaic_file) .................... yes
Building global_equiv_resol (global_equiv_resol) ...... yes

# -- END --

0 comments on commit ba253d6

Please sign in to comment.