Skip to content

Commit

Permalink
Use nuopc labels in fv3cap. Refactor ModelAdvance in fv3cap (#654)
Browse files Browse the repository at this point in the history
* Update fv3atm to use NUOPC semantic labels in fv3cap, and refactor ModelAdvance.
* Update NEMS. Removed NEMS grid component (no need to set PE_MEMBER01: in model_configure anymore)
* Cleanup CMakeLists.txt
  • Loading branch information
DusanJovic-NOAA authored Jul 16, 2021
1 parent 766f511 commit 6ccea3e
Show file tree
Hide file tree
Showing 21 changed files with 2,201 additions and 2,251 deletions.
37 changes: 3 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if(INLINE_POST)
endif()

# See https://github.com/NOAA-EMC/NCEPLIBS-nemsio/pull/22
target_link_libraries(nemsio::nemsio INTERFACE w3emc::w3emc_d bacio::bacio_4)
target_link_libraries(nemsio::nemsio INTERFACE w3nco::w3nco_d bacio::bacio_4)

# Configure Python
find_package(Python 3 REQUIRED COMPONENTS Interpreter)
Expand Down Expand Up @@ -217,21 +217,16 @@ endif()
###############################################################################
### UFS Library [NEMS]
###############################################################################
list(APPEND _nems_srcs NEMS/src/module_NEMS_UTILS.F90
NEMS/src/module_EARTH_GRID_COMP.F90
NEMS/src/module_NEMS_GRID_COMP.F90
list(APPEND _nems_srcs NEMS/src/module_EARTH_GRID_COMP.F90
NEMS/src/module_NEMS_Rusage.F90
NEMS/src/nems_c_rusage.c)

add_library(ufs ${_nems_srcs})
set_target_properties(ufs PROPERTIES Fortran_MODULE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(ufs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/NEMS/src)
target_include_directories(ufs INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)

list(APPEND _ufs_defs_private ESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR})

if(JEDI_DRIVER)
list(APPEND _ufs_defs_private JEDI_DRIVER=ON)
endif()
Expand All @@ -255,11 +250,6 @@ if(STOCH_PHYS)
list(APPEND _ufs_libs_public stochastic_physics)
endif()

if(FMS)
add_dependencies(ufs fms)
list(APPEND _ufs_defs_private FRONT_FMS)
endif()

if(NEMSdatm)
add_dependencies(ufs datatm)
list(APPEND _ufs_defs_private FRONT_NEMS_DATM=datm)
Expand Down Expand Up @@ -304,28 +294,7 @@ target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
###############################################################################
add_executable(ufs_model NEMS/src/MAIN_NEMS.F90)
add_dependencies(ufs_model ufs)

list(APPEND _ufs_model_defs_private ESMF_VERSION_MAJOR=${ESMF_VERSION_MAJOR})

set_target_properties(ufs_model PROPERTIES Fortran_MODULE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/mod)

target_include_directories(ufs_model PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/NEMS/src)

if(WW3)
list(APPEND _ufs_model_defs_private FRONT_WW3=WMESMFMD)
target_include_directories(ufs_model PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/WW3/model/mod)
endif()

target_compile_definitions(ufs_model PRIVATE "${_ufs_model_defs_private}")

if(NEMSdatm OR CDEPS)
target_link_libraries(ufs_model PUBLIC ufs w3nco::w3nco_d)
endif()

target_link_libraries(ufs_model PRIVATE ufs
esmf
NetCDF::NetCDF_Fortran)
target_link_libraries(ufs_model ufs esmf w3nco::w3nco_d)

###############################################################################
### Install
Expand Down
2 changes: 1 addition & 1 deletion FV3
2 changes: 1 addition & 1 deletion NEMS
178 changes: 89 additions & 89 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

608 changes: 304 additions & 304 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

596 changes: 298 additions & 298 deletions tests/RegressionTests_gaea.intel.log

Large diffs are not rendered by default.

198 changes: 99 additions & 99 deletions tests/RegressionTests_hera.gnu.log

Large diffs are not rendered by default.

626 changes: 313 additions & 313 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

582 changes: 291 additions & 291 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

620 changes: 310 additions & 310 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

350 changes: 175 additions & 175 deletions tests/RegressionTests_wcoss_cray.log

Large diffs are not rendered by default.

620 changes: 310 additions & 310 deletions tests/RegressionTests_wcoss_dell_p3.log

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions tests/parm/datm_cdeps_configure.IN
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
print_esmf: .true.
total_member: 1
PE_MEMBER01: @[TASKS]
start_year: @[SYEAR]
start_month: @[SMONTH]
start_day: @[SDAY]
Expand Down
7 changes: 2 additions & 5 deletions tests/parm/datm_configure.IN
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
total_member: 1
print_esmf: .true.
PE_MEMBER01: @[TASKS]
start_year: @[SYEAR]
start_month: @[SMONTH]
start_day: @[SDAY]
start_hour: @[SHOUR]
start_minute: 0
start_second: 0
nhours_fcst: @[FHMAX]
RUN_CONTINUE: .false.
ENS_SPS: .false.
calendar: 'julian'
fhrot: @[FHROT]

calendar: 'julian'

dt_atmos: @[DT_ATMOS]
atm_coupling_interval_sec: @[coupling_interval_fast_sec]

Expand Down
5 changes: 1 addition & 4 deletions tests/parm/esg_HAFS_v0_hwrf-model_configure.IN
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
total_member: 1
PE_MEMBER01: 80
print_esmf: .false.
start_year: 2020
start_month: 08
start_day: 10
Expand Down Expand Up @@ -38,5 +37,3 @@ nfhout: 3
nfhmax_hf: 12
nfhout_hf: 1
nsout: -1

print_esmf: .false.
4 changes: 1 addition & 3 deletions tests/parm/gsd_sar-model_configure.IN
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
total_member: 1
PE_MEMBER01: 24
print_esmf: .false.
start_year: 2019
start_month: 05
start_day: 20
Expand All @@ -13,7 +12,6 @@ restart_interval: 0
output_1st_tstep_rst: .false.

quilting: .true.
print_esmf: .false.
write_groups: 1
write_tasks_per_group: 4
num_files: 2
Expand Down
4 changes: 1 addition & 3 deletions tests/parm/model_configure.IN
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
total_member: @[ENS_NUM]
print_esmf: .true.
PE_MEMBER01: @[TASKS]
start_year: @[SYEAR]
start_month: @[SMONTH]
start_day: @[SDAY]
start_hour: @[SHOUR]
start_minute: 0
start_second: 0
nhours_fcst: @[FHMAX]
fhrot: @[FHROT]

dt_atmos: @[DT_ATMOS]
calendar: 'julian'
restart_interval: @[RESTART_INTERVAL]
fhrot: @[FHROT]
output_1st_tstep_rst: .false.
atm_coupling_interval_sec: @[coupling_interval_fast_sec]

Expand Down
5 changes: 1 addition & 4 deletions tests/parm/model_configure_hafs.IN
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
print_esmf: .true.

total_member: 1
PE_MEMBER01: @[TASKS]

start_year: 2018
start_month: 10
start_day: 15
start_hour: 00
start_minute: 0
start_second: 0
nhours_fcst: 24

dt_atmos: 225
calendar: 'julian'
restart_interval: 0
Expand Down
2 changes: 0 additions & 2 deletions tests/parm/model_configure_regional.IN
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
print_esmf: .true.
PE_MEMBER01: @[TASKS]

start_year: 2018
start_month: 10
start_day: 15
Expand Down
2 changes: 0 additions & 2 deletions tests/parm/stretched-nest-quilt-model_configure.IN
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
total_member: 1
print_esmf: .true.
PE_MEMBER01: 108
start_year: 2018
start_month: 10
start_day: 15
Expand Down
2 changes: 1 addition & 1 deletion tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ if [[ $TESTS_FILE =~ '35d' ]]; then
TEST_35D=true
fi

BL_DATE=20210714
BL_DATE=20210716
if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]]; then
RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}}
else
Expand Down

0 comments on commit 6ccea3e

Please sign in to comment.