Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fa70b1b
Require specific package version in top-level CMakeLists.txt
DusanJovic-NOAA May 25, 2022
bfae59a
Rename EARTH_GRID_COMP to UFSDriver
DusanJovic-NOAA May 25, 2022
faf46b6
Set bacio and w3nco versions to 2.4.0
DusanJovic-NOAA Jun 1, 2022
9473145
Merge branch 'ufs-community:develop' into cmake_package_versions
DusanJovic-NOAA Jun 1, 2022
e7d4281
allow non-integer fhrot (#29)
junwang-noaa Jun 1, 2022
631d732
Merge branch 'ufs-community:develop' into cmake_package_versions
DusanJovic-NOAA Jun 2, 2022
3f4cb05
Update s4 support (#31)
DavidHuber-NOAA Jun 3, 2022
e1d9218
Single dt output (#30)
pjpegion Jun 3, 2022
58442f7
Resolve conflicts in RegressionTests_hera.intel.log
DusanJovic-NOAA Jun 3, 2022
d663c42
Merge remote-tracking branch 'origin/develop' into cmake_package_vers…
DusanJovic-NOAA Jun 3, 2022
75abfd6
[AutoRT] cheyenne.gnu Job Completed.
BrianCurtis-NOAA Jun 3, 2022
de4b11f
[AutoRT] orion.intel Job Completed.
BrianCurtis-NOAA Jun 3, 2022
6f1a790
[AutoRT] hera.gnu Job Completed.
BrianCurtis-NOAA Jun 3, 2022
b88de8a
[AutoRT] jet.intel Job Completed.
BrianCurtis-NOAA Jun 3, 2022
ae646cc
[AutoRT] hera.intel Job Completed.
BrianCurtis-NOAA Jun 4, 2022
e651a76
[AutoRT] gaea.intel Job Completed.
BrianCurtis-NOAA Jun 4, 2022
cf6b7e3
[AutoRT] cheyenne.intel Job Completed.
BrianCurtis-NOAA Jun 4, 2022
345a13a
Add wcoss cray RT log: all tests passed
MinsukJi-NOAA Jun 4, 2022
6cc7049
Add wcoss dell RT log: all tests passed
MinsukJi-NOAA Jun 4, 2022
9464838
Add tests/RegressionTests_wcoss2.intel.log
DusanJovic-NOAA Jun 6, 2022
fb8ec3f
Revert .gitmodules and update FV3
DusanJovic-NOAA Jun 6, 2022
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
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,24 @@ find_package(MPI REQUIRED)
if(OPENMP)
find_package(OpenMP REQUIRED)
endif()
find_package(NetCDF REQUIRED C Fortran)
find_package(ESMF MODULE REQUIRED)

find_package(NetCDF 4.7.4 REQUIRED C Fortran)
find_package(ESMF 8.3.0 MODULE REQUIRED)
if(FMS)
find_package(FMS REQUIRED COMPONENTS R4 R8)
find_package(FMS 2022.01 REQUIRED COMPONENTS R4 R8)
if(32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
add_library(fms ALIAS FMS::fms_r8)
endif()
endif()
if(CMEPS)
find_package(PIO REQUIRED COMPONENTS C Fortran STATIC)
find_package(PIO 2.5.3 REQUIRED COMPONENTS C Fortran STATIC)
endif()

find_package(bacio REQUIRED)
find_package(sp REQUIRED)
find_package(w3nco REQUIRED)
find_package(bacio 2.4.0 REQUIRED)
find_package(sp 2.3.3 REQUIRED)
find_package(w3nco 2.4.0 REQUIRED)

# Configure Python
find_package(Python 3.6 REQUIRED COMPONENTS Interpreter)
Expand Down Expand Up @@ -208,7 +209,7 @@ endif()
###############################################################################
### UFS Library
###############################################################################
add_library(ufs driver/EARTH_GRID_COMP.F90)
add_library(ufs driver/UFSDriver.F90)
set_target_properties(ufs PROPERTIES Fortran_MODULE_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(ufs INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
Expand Down
2 changes: 1 addition & 1 deletion FV3
Submodule FV3 updated from 61f060 to ca1d0c
64 changes: 32 additions & 32 deletions driver/UFS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ PROGRAM UFS
USE ESMF
!
!-----------------------------------------------------------------------
!*** USE the EARTH gridded component module. Although it
!*** USE the UFSDriver module. Although it
!*** contains the calls to Register and the top level Initialize,
!*** Run, and Finalize, only the Register routine is public.
!-----------------------------------------------------------------------
!
USE module_EARTH_GRID_COMP
USE UFSDriver, only : UFSDriver_SS
!
!-----------------------------------------------------------------------
!
Expand All @@ -54,8 +54,9 @@ PROGRAM UFS
INTEGER :: MYPE & !<-- The MPI task ID
,NSECONDS_FCST & !<-- Length of forecast in seconds
,YY,MM,DD & !<-- Time variables for date
,HH,MNS,SEC & !<-- Time variables for time of day
,fhrot
,HH,MNS,SEC !<-- Time variables for time of day

REAL(ESMF_KIND_R8) :: fhrot !< forecast hour at restart time
!
REAL :: NHOURS_FCST !<-- Length of forecast in hours

Expand All @@ -71,7 +72,7 @@ PROGRAM UFS
! the computer CPU resource
! for the ESMF grid components.
!
TYPE(ESMF_GridComp) :: EARTH_GRID_COMP !<-- The EARTH gridded component.
TYPE(ESMF_GridComp) :: UFSDriverComp !<-- The UFS Driver gridded component.
!
TYPE(ESMF_Clock) :: CLOCK_MAIN !<-- The ESMF time management clock
!
Expand Down Expand Up @@ -158,33 +159,33 @@ PROGRAM UFS
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
!-----------------------------------------------------------------------
!*** Create the EARTH gridded component which will create and
!*** Create the UFS Driver gridded component which will create and
!*** control the ATM (atmoshpere), OCN (ocean), ICE (sea ice), etc.
!*** gridded components.
!-----------------------------------------------------------------------
!
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
MESSAGE_CHECK="Create the EARTH Gridded Component"
MESSAGE_CHECK="Create the UFS Driver Gridded Component"
! CALL ESMF_LogWrite(MESSAGE_CHECK,ESMF_LOGMSG_INFO,rc=RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
EARTH_GRID_COMP=ESMF_GridCompCreate(name ='EARTH Grid Comp' & !<-- EARTH component name
UFSDriverComp=ESMF_GridCompCreate(name ='UFS Driver Grid Comp' &
,rc = RC)
ESMF_ERR_ABORT(RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
!-----------------------------------------------------------------------
!*** Register the EARTH gridded component's Initialize, Run and
!*** Register the UFS Driver gridded component's Initialize, Run and
!*** Finalize routines.
!-----------------------------------------------------------------------
!
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
MESSAGE_CHECK="Register EARTH Gridded Component Init, Run, Finalize"
MESSAGE_CHECK="Register UFS Driver Gridded Component Init, Run, Finalize"
! CALL ESMF_LogWrite(MESSAGE_CHECK,ESMF_LOGMSG_INFO,rc=RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
CALL ESMF_GridCompSetServices(EARTH_GRID_COMP & !<-- The EARTH component
,EARTH_REGISTER & !<-- User's subroutineName
CALL ESMF_GridCompSetServices(UFSDriverComp &
,UFSDriver_SS &
,rc=RC)
ESMF_ERR_ABORT(RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Expand Down Expand Up @@ -344,19 +345,18 @@ PROGRAM UFS
!-----------------------------------------------------------------------
!*** Adjust the currTime of the main clock: CLOCK_MAIN
!*** if the fhrot is > 0
!*** This will correctly set the EARTH clocks in case of
!*** This will correctly set the UFS Driver clocks in case of
!*** Restart-From-History.
!-----------------------------------------------------------------------

CALL ESMF_ConfigGetAttribute(config = CF_MAIN &
,value = fhrot &
,label = 'fhrot:' &
,default = 0 &
CALL ESMF_ConfigGetAttribute(config = CF_MAIN &
,value = fhrot &
,label = 'fhrot:' &
,default = 0.0_ESMF_KIND_R8 &
,rc = RC)
ESMF_ERR_ABORT(RC)

if (fhrot > 0) then
CALL ESMF_TimeIntervalSet(restartOffset, h=fhrot, rc=RC)
CALL ESMF_TimeIntervalSet(restartOffset, h_r8=fhrot, rc=RC)
ESMF_ERR_ABORT(RC)
CURRTIME = STARTTIME + restartOffset
call ESMF_ClockSet(CLOCK_MAIN, currTime=CURRTIME, &
Expand All @@ -367,53 +367,53 @@ PROGRAM UFS
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
!-----------------------------------------------------------------------
!*** Execute the INITIALIZE step for the EARTH component.
!*** Execute the INITIALIZE step for the UFS Driver component.
!*** The Initialize routine that is called here as well as the
!*** Run and Finalize routines invoked below are those specified
!*** in the Register routine called in ESMF_GridCompSetServices above.
!-----------------------------------------------------------------------
!
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
MESSAGE_CHECK="Execute the EARTH Component Initialize Step"
MESSAGE_CHECK="Execute the UFS Driver Component Initialize Step"
! CALL ESMF_LogWrite(MESSAGE_CHECK,ESMF_LOGMSG_INFO,rc=RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
CALL ESMF_GridCompInitialize(gridcomp =EARTH_GRID_COMP & !<-- The EARTH component
,clock =CLOCK_MAIN & !<-- The ESMF clock
CALL ESMF_GridCompInitialize(gridcomp =UFSDriverComp &
,clock =CLOCK_MAIN &
,userRc =RC_USER &
,rc =RC)
ESMF_ERR_ABORT(RC)
ESMF_ERR_ABORT(RC_USER)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
!-----------------------------------------------------------------------
!*** Execute the RUN step for the EARTH component.
!*** Execute the RUN step for the UFS Driver component.
!-----------------------------------------------------------------------
!
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
MESSAGE_CHECK="Execute the EARTH Component Run Step"
MESSAGE_CHECK="Execute the UFS Driver Component Run Step"
! CALL ESMF_LogWrite(MESSAGE_CHECK,ESMF_LOGMSG_INFO,rc=RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
CALL ESMF_GridCompRun(gridcomp =EARTH_GRID_COMP & !<-- The EARTH component
,clock =CLOCK_MAIN & !<-- The ESMF clock
CALL ESMF_GridCompRun(gridcomp =UFSDriverComp &
,clock =CLOCK_MAIN &
,userRc =RC_USER &
,rc =RC)
ESMF_ERR_ABORT(RC)
ESMF_ERR_ABORT(RC_USER)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
!-----------------------------------------------------------------------
!*** Execute the FINALIZE step for the EARTH component.
!*** Execute the FINALIZE step for the UFS Driver component.
!-----------------------------------------------------------------------
!
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
MESSAGE_CHECK="Execute the EARTH Component Finalize Step"
MESSAGE_CHECK="Execute the UFS Driver Component Finalize Step"
! CALL ESMF_LogWrite(MESSAGE_CHECK,ESMF_LOGMSG_INFO,rc=RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
CALL ESMF_GridCompFinalize(gridcomp =EARTH_GRID_COMP & !<-- The EARTH component
,clock =CLOCK_MAIN & !<-- The Main ESMF clock
CALL ESMF_GridCompFinalize(gridcomp =UFSDriverComp &
,clock =CLOCK_MAIN &
,userRc =RC_USER &
,rc =RC)
ESMF_ERR_ABORT(RC)
Expand Down Expand Up @@ -451,7 +451,7 @@ PROGRAM UFS
! CALL ESMF_LogWrite(MESSAGE_CHECK, ESMF_LOGMSG_INFO, rc = RC)
! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!
CALL ESMF_GridCompDestroy(gridcomp=EARTH_GRID_COMP &
CALL ESMF_GridCompDestroy(gridcomp=UFSDriverComp &
,rc =RC)
ESMF_ERR_ABORT(RC)

Expand Down
Loading