Skip to content

Commit

Permalink
Merge branch 'develop' into tempo
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersJensen-NOAA committed Dec 18, 2024
2 parents 3e39d1b + e119370 commit 39a41f0
Show file tree
Hide file tree
Showing 210 changed files with 11,427 additions and 6,333 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ tests/fv3_conf/compile_slurm.IN
tests/fv3_conf/compile_qsub.IN
tests/fv3_conf/fv3_slurm.IN
tests/fv3_conf/fv3_qsub.IN
tests/rt_temp.conf
build*.log*
rocoto_workflow*
fail_compile_*
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
path = NOAHMP-interface/noahmp
url = https://github.com/NOAA-EMC/noahmp
branch = develop
[submodule "LM4-driver"]
path = LM4-driver
url = https://github.com/NOAA-GFDL/LM4-NUOPC-driver
branch = develop
[submodule "fire_behavior"]
path = fire_behavior
url = https://github.com/NOAA-EMC/fire_behavior
Expand Down
2 changes: 1 addition & 1 deletion CDEPS-interface/CDEPS
Submodule CDEPS updated 69 files
+4 −4 .github/workflows/extbuild.yml
+3 −0 .gitmodules
+1 −18 CMakeLists.txt
+43 −25 cime_config/buildlib
+21 −0 cime_config/stream_cdeps.py
+2 −1 cime_config/stream_definition_v2.0.xsd
+0 −150 cime_config/testdefs/testlist_cdeps.xml
+63 −77 datm/atm_comp_nuopc.F90
+12 −5 datm/cime_config/buildnml
+13 −2 datm/cime_config/config_component.xml
+40 −7 datm/cime_config/namelist_definition_datm.xml
+334 −9 datm/cime_config/stream_definition_datm.xml
+39 −34 datm/cime_config/testdefs/testlist_datm.xml
+0 −38 datm/datm_datamode_clmncep_mod.F90
+12 −39 datm/datm_datamode_core2_mod.F90
+2 −41 datm/datm_datamode_cplhist_mod.F90
+2 −40 datm/datm_datamode_era5_mod.F90
+0 −39 datm/datm_datamode_gefs_mod.F90
+18 −39 datm/datm_datamode_jra_mod.F90
+0 −39 datm/datm_datamode_simple_mod.F90
+34 −0 dglc/CMakeLists.txt
+1 −0 dglc/cime_config/buildlib
+197 −0 dglc/cime_config/buildnml
+11 −0 dglc/cime_config/config_archive.xml
+92 −0 dglc/cime_config/config_component.xml
+140 −0 dglc/cime_config/namelist_definition_dglc.xml
+49 −0 dglc/cime_config/stream_definition_dglc.xml
+42 −0 dglc/cime_config/testdefs/testlist_dglc.xml
+13 −0 dglc/cime_config/user_nl_dglc
+33 −0 dglc/cime_config/user_nl_dglc_streams
+697 −0 dglc/dglc_datamode_noevolve_mod.F90
+842 −0 dglc/glc_comp_nuopc.F90
+6 −4 dice/cime_config/testdefs/testlist_dice.xml
+12 −6 dice/dice_datamode_cplhist_mod.F90
+12 −9 dice/dice_datamode_ssmi_mod.F90
+16 −10 dice/ice_comp_nuopc.F90
+3 −2 dlnd/cime_config/testdefs/testlist_dlnd.xml
+19 −10 dlnd/lnd_comp_nuopc.F90
+4 −1 doc/source/datm.rst
+117 −0 doc/source/dglc.rst
+1 −0 doc/source/index.rst
+2 −1 doc/source/introduction.rst
+3 −1 doc/source/streams.rst
+2 −0 docn/CMakeLists.txt
+6 −2 docn/cime_config/config_component.xml
+5 −1 docn/cime_config/namelist_definition_docn.xml
+99 −1 docn/cime_config/stream_definition_docn.xml
+10 −7 docn/cime_config/testdefs/testlist_docn.xml
+0 −39 docn/docn_datamode_copyall_mod.F90
+0 −39 docn/docn_datamode_cplhist_mod.F90
+0 −44 docn/docn_datamode_iaf_mod.F90
+221 −0 docn/docn_datamode_multilev_dom_mod.F90
+186 −0 docn/docn_datamode_multilev_mod.F90
+15 −9 docn/docn_datamode_som_mod.F90
+77 −35 docn/ocn_comp_nuopc.F90
+4 −2 drof/cime_config/config_component.xml
+2 −1 drof/cime_config/namelist_definition_drof.xml
+32 −0 drof/cime_config/stream_definition_drof.xml
+3 −2 drof/cime_config/testdefs/testlist_drof.xml
+18 −11 drof/rof_comp_nuopc.F90
+16 −4 dshr/dshr_dfield_mod.F90
+16 −23 dshr/dshr_mod.F90
+3 −2 dwav/cime_config/testdefs/testlist_dwav.xml
+17 −9 dwav/wav_comp_nuopc.F90
+2 −1 share/CMakeLists.txt
+936 −0 share/nuopc_shr_methods.F90
+6 −3 streams/dshr_methods_mod.F90
+50 −18 streams/dshr_strdata_mod.F90
+8 −8 streams/dshr_stream_mod.F90
11 changes: 10 additions & 1 deletion CDEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ target_include_directories(dwav PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY
target_link_libraries(dwav PRIVATE dshr share streams)
target_link_libraries(dwav PRIVATE esmf)

# CDEPS/dglc
add_library(dglc OBJECT ${cdeps_dglc_files})
add_dependencies(dglc share streams dshr)
set_target_properties(dglc PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
target_include_directories(dglc PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>)
target_link_libraries(dglc PRIVATE dshr share streams)
target_link_libraries(dglc PRIVATE esmf PIO::PIO_Fortran)

# CDEPS
add_library(cdeps STATIC $<TARGET_OBJECTS:share>
$<TARGET_OBJECTS:streams>
Expand All @@ -104,7 +112,8 @@ add_library(cdeps STATIC $<TARGET_OBJECTS:share>
$<TARGET_OBJECTS:dlnd>
$<TARGET_OBJECTS:docn>
$<TARGET_OBJECTS:drof>
$<TARGET_OBJECTS:dwav>)
$<TARGET_OBJECTS:dwav>
$<TARGET_OBJECTS:dglc>)
add_library(cdeps::cdeps ALIAS cdeps)
target_include_directories(cdeps PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/mod>
$<INSTALL_INTERFACE:mod>)
Expand Down
9 changes: 9 additions & 0 deletions CDEPS-interface/cdeps_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ list(APPEND ufs_cdeps_share_files
ufs/cdeps_share/shr_assert_mod.F90
ufs/cdeps_share/shr_frz_mod.F90
ufs/cdeps_share/shr_infnan_mod.F90
ufs/cdeps_share/shr_is_restart_fh_mod.F90
)

list(APPEND cdeps_share_files
Expand All @@ -24,6 +25,7 @@ list(APPEND cdeps_share_files
CDEPS/share/shr_timer_mod.F90
CDEPS/share/shr_file_mod.F90
CDEPS/share/shr_nl_mod.F90
CDEPS/share/nuopc_shr_methods.F90
)

list(APPEND cdeps_streams_files
Expand Down Expand Up @@ -67,6 +69,8 @@ list(APPEND cdeps_docn_files
CDEPS/docn/docn_datamode_iaf_mod.F90
CDEPS/docn/docn_datamode_som_mod.F90
CDEPS/docn/docn_datamode_cplhist_mod.F90
CDEPS/docn/docn_datamode_multilev_mod.F90
CDEPS/docn/docn_datamode_multilev_dom_mod.F90
CDEPS/docn/docn_import_data_mod.F90
CDEPS/docn/ocn_comp_nuopc.F90
)
Expand All @@ -78,3 +82,8 @@ list(APPEND cdeps_drof_files
list(APPEND cdeps_dwav_files
CDEPS/dwav/wav_comp_nuopc.F90
)

list(APPEND cdeps_dglc_files
CDEPS/dglc/dglc_datamode_noevolve_mod.F90
CDEPS/dglc/glc_comp_nuopc.F90
)
137 changes: 137 additions & 0 deletions CDEPS-interface/ufs/cdeps_share/shr_is_restart_fh_mod.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
module shr_is_restart_fh_mod

! Common methods for components to check if it's time to write forecast hour-based restarts

!use dshr_methods_mod , only : chkerr
use ESMF, only : ESMF_ConfigCreate, ESMF_ConfigDestroy, ESMF_ConfigLoadFile, &
ESMF_ConfigGetLen, ESMF_ConfigGetAttribute, ESMF_TimePrint, &
ESMF_LOGMSG_INFO, ESMF_LogWrite, ESMF_TimeInterval, &
ESMF_Time, ESMF_KIND_R8, ESMF_Config, ESMF_Clock, &
ESMF_TimeIntervalSet, ESMF_TimePrint, operator(+), operator(==), &
ESMF_LogFoundError, ESMF_LOGERR_PASSTHRU

implicit none
private

type :: is_restart_fh_type
logical :: write_restartfh = .false.
type(ESMF_Time), allocatable :: restartFhTimes(:)
end type is_restart_fh_type

public :: init_is_restart_fh, is_restart_fh, finalize_restart_fh, is_restart_fh_type

contains

!-----------------------------------------------------------------------
subroutine init_is_restart_fh(currentTime, dtime, lLog, restartfh_info)
!
! !DESCRIPTION:
! Process restart_fh attribute from model_configure in UFS
!
! !USES:
!
! !ARGUMENTS:
type(ESMF_Time), intent(in) :: currentTime
integer, intent(in) :: dtime ! time step (s)
logical, intent(in) :: lLog ! If true, this task logs restart_fh info
type(is_restart_fh_type), intent(out) :: restartfh_info !restart_fh info for each task
!
! !LOCAL VARIABLES:
character(len=256) :: timestr
integer :: n, nfh, fh_s, rc
logical :: isPresent
real(kind=ESMF_KIND_R8), allocatable :: restart_fh(:)
type(ESMF_TimeInterval) :: fhInterval
type(ESMF_Config) :: CF_mc
!-----------------------------------------------------------------------

! set up Times to write non-interval restarts
inquire(FILE='model_configure', EXIST=isPresent)
if (isPresent) then !model_configure exists. this is ufs run
CF_mc = ESMF_ConfigCreate(rc=rc)
call ESMF_ConfigLoadFile(config=CF_mc,filename='model_configure' ,rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return

nfh = ESMF_ConfigGetLen(config=CF_mc, label ='restart_fh:',rc=rc)
if (nfh .gt. 0) then
allocate(restart_fh(1:nfh))
allocate(restartfh_info%restartFhTimes(1:nfh)) !not deallocated here

call ESMF_ConfigGetAttribute(CF_mc,valueList=restart_fh,label='restart_fh:', rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
! create a list of times at each restart_fh
do n = 1,nfh
fh_s = NINT(3600*restart_fh(n))
call ESMF_TimeIntervalSet(fhInterval, s=fh_s, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
restartfh_info%restartFhTimes(n) = currentTime + fhInterval
call ESMF_TimePrint(restartfh_info%restartFhTimes(n), options="string", &
preString="restart_fh at ", unit=timestr, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (lLog) then
if (mod(fh_s,dtime) /= 0) then
call ESMF_LogWrite('restart time NOT to be written for '//trim(timestr), ESMF_LOGMSG_INFO)
else
call ESMF_LogWrite('restart time to be written for '//trim(timestr), ESMF_LOGMSG_INFO)
end if
end if
end do
deallocate(restart_fh)
end if !nfh>0
call ESMF_ConfigDestroy(CF_mc, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
end if !model_configure

end subroutine init_is_restart_fh

subroutine is_restart_fh(clock, restartfh_info, lWrite)
!
! !DESCRIPTION:
! True/false if time to write restart
!
! !USES:
use ESMF, only : ESMF_ClockGetNextTime

!
! !ARGUMENTS:
type(ESMF_Clock), intent(in) :: clock
type(is_restart_fh_type), intent(inout) :: restartfh_info
logical, intent(out) :: lWrite ! time to write?
!
! !LOCAL VARIABLES:
integer :: nfh, rc
type(ESMF_Time) :: nextTime
!-----------------------------------------------------------------------

restartfh_info%write_restartfh = .false.
if (allocated(restartfh_info%restartFhTimes)) then
! check if next time is == to any restartfhtime
do nfh = 1,size(restartfh_info%restartFhTimes)
call ESMF_ClockGetNextTime(clock, nextTime=nexttime, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return
if (nextTime == restartfh_info%restartFhTimes(nfh)) restartfh_info%write_restartfh = .true.
end do
end if

lWrite = restartfh_info%write_restartfh

end subroutine is_restart_fh

subroutine finalize_restart_fh(restartfh_info)
!
! !DESCRIPTION:
! Clean-up...release allocated memory
!
! !USES:
!
! !ARGUMENTS:
type(is_restart_fh_type), intent(inout) :: restartfh_info
!
! !LOCAL VARIABLES:
!-----------------------------------------------------------------------

if (allocated(restartfh_info%restartFhTimes)) deallocate(restartfh_info%restartFhTimes)

end subroutine finalize_restart_fh

end module shr_is_restart_fh_mod
2 changes: 1 addition & 1 deletion CICE-interface/CICE
Submodule CICE updated 63 files
+4 −0 cicecore/cicedyn/analysis/ice_history.F90
+1 −1 cicecore/cicedyn/analysis/ice_history_shared.F90
+1 −2 cicecore/cicedyn/dynamics/ice_dyn_eap.F90
+2 −4 cicecore/cicedyn/dynamics/ice_dyn_evp.F90
+6 −7 cicecore/cicedyn/dynamics/ice_dyn_vp.F90
+1 −2 cicecore/cicedyn/dynamics/ice_transport_driver.F90
+2 −4 cicecore/cicedyn/general/ice_flux.F90
+8 −9 cicecore/cicedyn/general/ice_forcing.F90
+19 −12 cicecore/cicedyn/general/ice_init.F90
+56 −77 cicecore/cicedyn/general/ice_step_mod.F90
+1 −2 cicecore/cicedyn/infrastructure/ice_domain.F90
+142 −192 cicecore/cicedyn/infrastructure/ice_grid.F90
+49 −106 cicecore/cicedyn/infrastructure/ice_read_write.F90
+2 −6 cicecore/cicedyn/infrastructure/ice_restart_driver.F90
+0 −1 cicecore/cicedyn/infrastructure/ice_restoring.F90
+1 −1 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90
+6 −0 cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90
+22 −0 cicecore/cicedyn/infrastructure/io/io_pio2/ice_pio.F90
+14 −5 cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
+8 −11 cicecore/drivers/direct/hadgem3/CICE_InitMod.F90
+8 −11 cicecore/drivers/direct/nemo_concepts/CICE_InitMod.F90
+14 −19 cicecore/drivers/mct/cesm1/CICE_InitMod.F90
+1 −3 cicecore/drivers/mct/cesm1/ice_prescribed_mod.F90
+8 −10 cicecore/drivers/nuopc/cmeps/CICE_InitMod.F90
+52 −33 cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
+1 −3 cicecore/drivers/nuopc/cmeps/ice_prescribed_mod.F90
+10 −1 cicecore/drivers/nuopc/cmeps/ice_shr_methods.F90
+9 −11 cicecore/drivers/nuopc/dmi/CICE_InitMod.F90
+8 −11 cicecore/drivers/standalone/cice/CICE_InitMod.F90
+10 −12 cicecore/drivers/unittest/gridavgchk/CICE_InitMod.F90
+10 −12 cicecore/drivers/unittest/halochk/CICE_InitMod.F90
+8 −11 cicecore/drivers/unittest/opticep/CICE_InitMod.F90
+259 −307 cicecore/drivers/unittest/opticep/ice_init_column.F90
+58 −78 cicecore/drivers/unittest/opticep/ice_step_mod.F90
+10 −12 cicecore/drivers/unittest/sumchk/CICE_InitMod.F90
+2 −6 cicecore/shared/ice_arrays_column.F90
+1 −1 cicecore/shared/ice_distribution.F90
+258 −305 cicecore/shared/ice_init_column.F90
+1 −1 cicecore/version.txt
+17 −1 configuration/scripts/cice.batch.csh
+54 −55 configuration/scripts/ice_in
+1 −1 configuration/scripts/machines/Macros.derecho_intelclassic
+6 −5 configuration/scripts/machines/Macros.derecho_inteloneapi
+2 −2 configuration/scripts/machines/Macros.gadi_intel
+6 −6 configuration/scripts/machines/env.derecho_cray
+6 −6 configuration/scripts/machines/env.derecho_intel
+8 −7 configuration/scripts/machines/env.derecho_inteloneapi
+6 −6 configuration/scripts/machines/env.derecho_nvhpc
+1 −0 configuration/scripts/options/set_env.gx1
+17 −5 configuration/scripts/options/set_nml.bgcz
+25 −11 configuration/scripts/options/set_nml.bgczclim
+17 −5 configuration/scripts/options/set_nml.bgczm
+7 −7 configuration/scripts/options/set_nml.e3smbgc
+8 −0 configuration/scripts/options/set_nml.histhrly
+7 −0 configuration/scripts/options/set_nml.zaero
+15 −17 configuration/scripts/tests/base_suite.ts
+9 −5 configuration/scripts/tests/io_suite.ts
+2 −1 configuration/scripts/tests/nothread_suite.ts
+2 −2 doc/source/conf.py
+55 −56 doc/source/user_guide/ug_case_settings.rst
+17 −8 doc/source/user_guide/ug_implementation.rst
+4 −2 doc/source/user_guide/ug_testing.rst
+1 −1 icepack
Loading

0 comments on commit 39a41f0

Please sign in to comment.