Skip to content

Commit

Permalink
Lightning threat indexes (#1642)
Browse files Browse the repository at this point in the history
* use the latest postxconfig-NT-fv3lam.txt to run ifi

* rename postxconfig-NT-fv3lam-ifi.txt to postxconfig-NT-fv3lam-new.txt since it is, in fact, the new postxconfig-NT-fv3lam.txt

* add lightning threat indexes to rrfs 13km tests

* pass w to model & fixes to ccpp/physics changes

* FV3: turn off lightning_threat by default since it allocates wgrs and passes w

* do not output ltg*_max variables since they're all zeroes anyway because the 13km run cannot make enough graupel

* FV3: missing `active = (lightning_threat_indices_enabled)` for wgrd

* enable ltg*_max variables in diag_table_hrrr

* alternative POSTAPP for C96 versions of regional configurations

* rap & hrrr variants use POSTAPP=fv3lam_global

* new tests for ifi on acorn

* fix out-of-bounds access in upp calslr_roebbr

* fix another out-of-bounds access and move a message to stdout
  • Loading branch information
SamuelTrahanNOAA authored Mar 24, 2023
1 parent 10ceadd commit 36d6e16
Show file tree
Hide file tree
Showing 25 changed files with 4,930 additions and 4,500 deletions.
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ if(CMAKE_Platform)
endif()
endif()

option(BUILD_WITH_IFI "Build NCEPpost with In-Flight Icing (IFI) library if present" OFF)
option(REQUIRE_IFI "Abort if libIFI is not found ; enables BUILD_WITH_IFI=ON" OFF)
option(INTERNAL_IFI "Compile with IFI inside the executable, instead of a library" OFF)

if(INTERNAL_IFI)
message("Building with libIFI inside executable. Do not distribute executable outside of WCOSS2.")
set(BUILD_WITH_IFI OFF)
set(REQUIRE_IFI OFF)
endif()

if(REQUIRE_IFI)
set(BUILD_WITH_IFI ON)
endif()

if(BUILD_WITH_IFI)
if(REQUIRE_IFI)
find_package(IFI CONFIG REQUIRED)
else()
find_package(IFI CONFIG)
endif()
endif()

message("")
message("32BIT ............ ${32BIT}")
message("CCPP_32BIT ....... ${CCPP_32BIT}")
Expand Down Expand Up @@ -316,6 +338,7 @@ target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
add_executable(ufs_model driver/UFS.F90)
add_dependencies(ufs_model ufs)
target_link_libraries(ufs_model ufs esmf w3emc::w3emc_d)
set_target_properties(ufs_model PROPERTIES LINKER_LANGUAGE Fortran)

###############################################################################
### Install
Expand Down
2 changes: 1 addition & 1 deletion FV3
3 changes: 3 additions & 0 deletions modulefiles/ufs_acorn.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ load(pathJoin("hpc-cray-mpich", hpc_cray_mpich_ver))

load("ufs_common")

prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/UPP_IFI/modulefiles")
load("ifi/20230118-intel-19.1.3.304")

setenv("CC", "cc")
setenv("CXX", "CC")
setenv("FC", "ftn")
Expand Down
3 changes: 3 additions & 0 deletions modulefiles/ufs_acorn.intel_debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ load(pathJoin("hpc-cray-mpich", hpc_cray_mpich_ver))

load("ufs_common_debug")

prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/UPP_IFI/modulefiles")
load("ifi/20230118-intel-19.1.3.304")

setenv("CC", "cc")
setenv("CXX", "CC")
setenv("FC", "ftn")
Expand Down
3 changes: 3 additions & 0 deletions modulefiles/ufs_hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("CMAKE_Platform", "hera.intel")

prepend_path("MODULEPATH", "/scratch2/BMC/ifi/modulefiles")
try_load("ifi/20230118-intel-2022.1.2")

whatis("Description: UFS build environment")
3 changes: 3 additions & 0 deletions modulefiles/ufs_hera.intel_debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,7 @@ setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("CMAKE_Platform", "hera.intel")

prepend_path("MODULEPATH", "/scratch2/BMC/ifi/modulefiles")
try_load("ifi/20230118-intel-2022.1.2")

whatis("Description: UFS build environment")
3 changes: 3 additions & 0 deletions modulefiles/ufs_jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("CMAKE_Platform", "jet.intel")

prepend_path("MODULEPATH", "/lfs4/BMC/ifi/modulefiles")
try_load("ifi/20230118-intel-2022.1.2")

whatis("Description: UFS build environment")
3 changes: 3 additions & 0 deletions modulefiles/ufs_jet.intel_debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("CMAKE_Platform", "jet.intel")

prepend_path("MODULEPATH", "/lfs4/BMC/ifi/modulefiles")
try_load("ifi/20230118-intel-2022.1.2")

whatis("Description: UFS build environment")
1,735 changes: 889 additions & 846 deletions tests/RegressionTests_acorn.intel.log

Large diffs are not rendered by default.

418 changes: 209 additions & 209 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

1,302 changes: 651 additions & 651 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

422 changes: 211 additions & 211 deletions tests/RegressionTests_hera.gnu.log

Large diffs are not rendered by default.

1,326 changes: 663 additions & 663 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

1,212 changes: 606 additions & 606 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

1,326 changes: 663 additions & 663 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

1,231 changes: 621 additions & 610 deletions tests/RegressionTests_wcoss2.intel.log

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions tests/fv3_conf/rrfs_warm_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ if [ $IMP_PHYSICS = 8 ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/CCN_ACTIVATE.BIN .
fi

cp ${PATHRT}/parm/postxconfig-NT-fv3lam.txt postxconfig-NT.txt

if [ $DO_RRTMGP = .true. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_RRTMGP/* .
fi
6 changes: 6 additions & 0 deletions tests/parm/diag_table/diag_table_hrrr
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@
"gfs_phys", "skebv_wts", "skebv_wts", "fv3_history", "all", .false., "none", 2
"gfs_phys", "shum_wts", "shum_wts", "fv3_history", "all", .false., "none", 2


# Lightning threat indexes
"gfs_sfc", "ltg1_max", "ltg1_max", "fv3_history2d", "all", .false., "none", 2
"gfs_sfc", "ltg2_max", "ltg2_max", "fv3_history2d", "all", .false., "none", 2
"gfs_sfc", "ltg3_max", "ltg3_max", "fv3_history2d", "all", .false., "none", 2

#=============================================================================================
#
#====> This file can be used with diag_manager/v2.0a (or higher) <====
Expand Down
263 changes: 224 additions & 39 deletions tests/parm/postxconfig-NT-fv3lam.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
2
219
264
225
263
PRSLEV
32769
ncep_nco
Expand Down Expand Up @@ -9341,43 +9341,6 @@ surface
?
?
?
444
LTNG_ON_SURFACE
lightning
1
tmpl4_0
LTNG
NCEP
?
surface
0
?
0
?
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
1.0
0
0
0
?
?
?
581
VIL_ON_ENTIRE_ATMOS
entire atmosphere Vertically Integrated Liquid (kg/m-2)
Expand Down Expand Up @@ -17904,3 +17867,225 @@ surface
?
?
?
704
GSD_MAX_LTG_THREAT3_ON_ENTIRE_ATMOS
?
1
tmpl4_8
LTNG
NCEP
MAX
entire_atmos
0
?
0
?
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
4.0
0
0
0
?
?
?
1006
SDEN_ON_SURFACE
?
1
tmpl4_0
SDEN
?
?
surface
0
?
0
?
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
6.0
0
0
0
?
?
?
1007
ICE_PROB_IFI_FLIGHT_LEVEL
?
1
tmpl4_0
ICPRB
NCEP
?
spec_alt_above_mean_sea_lvl
1
1
60
5000. 10000. 15000. 20000. 25000. 30000. 35000. 40000. 45000. 50000. 55000. 60000. 65000. 70000. 75000. 80000. 85000. 90000. 95000. 100000. 105000. 110000. 115000. 120000. 125000. 130000. 135000. 140000. 145000. 150000. 155000. 160000. 165000. 170000. 175000. 180000. 185000. 190000. 195000. 200000. 205000. 210000. 215000. 220000. 225000. 230000. 235000. 240000. 245000. 250000. 255000. 260000. 265000. 270000. 275000. 280000. 285000. 290000. 295000. 300000.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
4.0
0
0
0
?
?
?
1008
SLD_IFI_FLIGHT_LEVEL
?
1
tmpl4_0
SIPD
NCEP
?
spec_alt_above_mean_sea_lvl
1
1
60
5000. 10000. 15000. 20000. 25000. 30000. 35000. 40000. 45000. 50000. 55000. 60000. 65000. 70000. 75000. 80000. 85000. 90000. 95000. 100000. 105000. 110000. 115000. 120000. 125000. 130000. 135000. 140000. 145000. 150000. 155000. 160000. 165000. 170000. 175000. 180000. 185000. 190000. 195000. 200000. 205000. 210000. 215000. 220000. 225000. 230000. 235000. 240000. 245000. 250000. 255000. 260000. 265000. 270000. 275000. 280000. 285000. 290000. 295000. 300000.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
4.0
0
0
0
?
?
?
1009
ICE_SEV_CAT_IFI_FLIGHT_LEVEL
?
1
tmpl4_0
ICSEV
NCEP
?
spec_alt_above_mean_sea_lvl
1
1
60
5000. 10000. 15000. 20000. 25000. 30000. 35000. 40000. 45000. 50000. 55000. 60000. 65000. 70000. 75000. 80000. 85000. 90000. 95000. 100000. 105000. 110000. 115000. 120000. 125000. 130000. 135000. 140000. 145000. 150000. 155000. 160000. 165000. 170000. 175000. 180000. 185000. 190000. 195000. 200000. 205000. 210000. 215000. 220000. 225000. 230000. 235000. 240000. 245000. 250000. 255000. 260000. 265000. 270000. 275000. 280000. 285000. 290000. 295000. 300000.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
4.0
0
0
0
?
?
?
1010
WMO_ICE_SEV_CAT_IFI_FLIGHT_LEVEL
?
1
tmpl4_0
ICESEV
?
?
spec_alt_above_mean_sea_lvl
1
1
60
5000. 10000. 15000. 20000. 25000. 30000. 35000. 40000. 45000. 50000. 55000. 60000. 65000. 70000. 75000. 80000. 85000. 90000. 95000. 100000. 105000. 110000. 115000. 120000. 125000. 130000. 135000. 140000. 145000. 150000. 155000. 160000. 165000. 170000. 175000. 180000. 185000. 190000. 195000. 200000. 205000. 210000. 215000. 220000. 225000. 230000. 235000. 240000. 245000. 250000. 255000. 260000. 265000. 270000. 275000. 280000. 285000. 290000. 295000. 300000.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
4.0
0
0
0
?
?
?
Loading

0 comments on commit 36d6e16

Please sign in to comment.