Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e4663bd
Updates CDEPS to latest ESCOMP/master with HAFS coupling related chan…
BinLiu-NOAA Aug 4, 2021
bfbba9b
Update develop branch of cdeps to the most recent version of ESCOMP/C…
binli2337 Oct 18, 2021
5775513
Merge branch 'ESCOMP:master' into develop
binli2337 Nov 23, 2021
b1c8946
Add Fortran code used by GFS v16 data mode (#40)
binli2337 Dec 16, 2021
ad4282a
Update develop branch to include the most recent changes from ESCOMP/…
binli2337 Jan 20, 2022
4eb7f24
Merge branch 'master' into develop
binli2337 Mar 18, 2022
7e2dc6c
update datm/atm_comp_nuopc.F90
binli2337 Mar 18, 2022
f1ed1b8
Merge pull request #45 from binli2337/feature/update_cdeps
binli2337 Apr 29, 2022
c509d89
Update CDEPS to include the recent changes from ESCOMP/CDEPS (#47)
binli2337 Jul 26, 2022
20df7e1
Merge branch 'master' into feature/update_cdeps
binli2337 Aug 16, 2022
edaef5b
Merge pull request #49 from binli2337/feature/update_cdeps
junwang-noaa Aug 22, 2022
530c262
Update CDEPS (#50)
uturuncoglu Oct 27, 2022
8e9672d
Merge branch 'main' into update_cdeps
binli2337 Jan 30, 2023
0d073f8
update datm/datm_datamode_gfs_mod.F90
binli2337 Jan 30, 2023
94acf25
Merge pull request #52 from binli2337/update_cdeps
junwang-noaa Feb 21, 2023
30279a9
Merge branch 'ESCOMP:main' into develop
binli2337 May 4, 2023
2aa6bfb
Update CDEPS to include the GFS_HAFS datamode (#55)
binli2337 May 25, 2023
89603d1
Update CDEPS (#58)
uturuncoglu Jan 26, 2024
3d7067a
sync CDEPS with ESCOMP (#60)
uturuncoglu Feb 5, 2024
fbdf684
Create cplhist mode for dice (#62)
NickSzapiro-NOAA Jun 11, 2024
1f9eaaa
Unify gfs, cfsr, and gefs datm datamodes (#63)
NickSzapiro-NOAA Aug 27, 2024
26cb593
Merge ESCOMP/main into sync_escomp_2024-10
NickSzapiro-NOAA Oct 7, 2024
7a18189
Remove duplicate SIMPLE case statements (from merge)
NickSzapiro-NOAA Oct 7, 2024
395f9dd
Remove duplicate use datm_datamode_simple_mod in atm_comp_nuopc.F90
NickSzapiro-NOAA Oct 8, 2024
c9d1dac
Merge 'ESCOMP/main' into sync_escomp_2024-10
NickSzapiro-NOAA Dec 10, 2024
51f8cd2
Compile fixes
NickSzapiro-NOAA Dec 10, 2024
34d1eab
Sync with ESCOMP/CDEPS/main (2024-12-10)
NickSzapiro-NOAA Dec 16, 2024
c7ea491
Merge 'ESCOMP/main' into sync_escomp_2024-12-16
NickSzapiro-NOAA Dec 17, 2024
2eccb9f
Merge 'ESCOMP/main' into sync_escomp_2024-12-16
NickSzapiro-NOAA Dec 23, 2024
5868cdb
Merge ESCOMP/main into sync_escomp_202503
NickSzapiro-NOAA Mar 21, 2025
79edd44
Merge ESCOMP/main
NickSzapiro-NOAA Mar 21, 2025
132fa69
Sync with ESCOMP/CDEPS (2025-03-23)
NickSzapiro-NOAA Mar 27, 2025
18f4255
Merge ESCOMP/main into sync_escomp_202508
NickSzapiro-NOAA Aug 13, 2025
9f53664
Sync with ESCOMP/main (2025-08)
NickSzapiro-NOAA Aug 25, 2025
35ecdbd
Merge ESCOMP/main into sync_escomp_202609
NickSzapiro-NOAA Sep 23, 2026
7477bea
Start datm_datamode_ufs_mod.F90
NickSzapiro-NOAA Sep 25, 2026
cf94bfd
Next version of datm/datm_datamode_ufs_mod.F90 following API of other…
NickSzapiro-NOAA Sep 25, 2026
57e7cfa
Use __FILE_
NickSzapiro-NOAA Sep 25, 2026
b338384
add datamode to datm/atm_comp_nuopc.F90
NickSzapiro-NOAA Sep 25, 2026
ac0999e
Better datm_datamode_ufs_advertise
NickSzapiro-NOAA Sep 25, 2026
79a3673
Update datamode_ufs APIs in datm/atm_comp_nuopc.F90
NickSzapiro-NOAA Sep 25, 2026
b94bb36
Compiles
NickSzapiro-NOAA Sep 25, 2026
41fbe24
Fix write format
NickSzapiro-NOAA Sep 25, 2026
999400e
Getting stream_variables via shr_stream_init_from_esmfconfig is messy…
NickSzapiro-NOAA Sep 27, 2026
e3beee4
TODO: finish add_stream_variables_to_export
NickSzapiro-NOAA Sep 27, 2026
aed2483
filled in add_stream_variables_to_export in datm/datm_datamode_ufs_mo…
NickSzapiro-NOAA Sep 28, 2026
9597a94
Runs on Ursa
NickSzapiro-NOAA Sep 28, 2026
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,9 @@
*.out
*.app

# Externals
fox
share/genf90

# ignore pycache
__pycache__
13 changes: 0 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# This is a git-fleximod adapted .gitmodules file. Any field with a name starting in fx is a git-fleximod
# specific field. See https://github.com/ESMCI/git-fleximod for details.

[submodule "fox"]
path = fox
url = https://github.com/ESMCI/fox.git
fxtag = 4.1.2.4
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESMCI/fox.git

[submodule "genf90"]
path = share/genf90
url = https://github.com/PARALLELIO/genf90
fxtag = 4816965
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/PARALLELIO/genf90
1 change: 0 additions & 1 deletion datm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ set(SRCFILES atm_comp_nuopc.F90
datm_pres_ndep_mod.F90
datm_pres_o3_mod.F90)


foreach(FILE ${SRCFILES})
if(EXISTS "${CASEROOT}/SourceMods/src.datm/${FILE}")
list(REMOVE_ITEM SRCFILES ${FILE})
Expand Down
31 changes: 26 additions & 5 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ module cdeps_datm_comp
use datm_datamode_gefs_mod , only : datm_datamode_gefs_init_pointers
use datm_datamode_gefs_mod , only : datm_datamode_gefs_advance

use datm_datamode_ufs_mod , only : datm_datamode_ufs_advertise
use datm_datamode_ufs_mod , only : datm_datamode_ufs_init_pointers
use datm_datamode_ufs_mod , only : datm_datamode_ufs_advance
use datm_datamode_ufs_mod , only : ufs_datamode_state

use datm_datamode_simple_mod , only : datm_datamode_simple_advertise
use datm_datamode_simple_mod , only : datm_datamode_simple_init_pointers
use datm_datamode_simple_mod , only : datm_datamode_simple_advance
Expand Down Expand Up @@ -115,6 +120,7 @@ module cdeps_datm_comp
logical :: restart_read ! start from restart
character(CL) :: case_name ! case name
character(len=*) , parameter :: nullstr = 'null'
type(ufs_datamode_state) :: ufs_state

! datm_in namelist input
character(CX) :: nlfilename = nullstr ! filename to obtain namelist info from
Expand All @@ -141,6 +147,8 @@ module cdeps_datm_comp
logical :: skip_restart_read = .false. ! true => skip restart read in continuation run
logical :: export_all = .false. ! true => export all fields, do not check connected or not
logical :: first_call = .true.

character(CX) :: calc_opts = nullstr ! derived variable calculation options

! linked lists
type(fldList_type) , pointer :: fldsImport => null()
Expand Down Expand Up @@ -249,7 +257,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
skip_restart_read, &
flds_presndep, &
flds_preso3, &
export_all
export_all, &
calc_opts

rc = ESMF_SUCCESS

Expand Down Expand Up @@ -305,6 +314,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
write(logunit,'(2a,l6)') subname,' flds_co2 = ',flds_co2
write(logunit,'(2a,l6)') subname,' skip_restart_read = ',skip_restart_read
write(logunit,'(2a,l6)') subname,' export_all = ',export_all
write(logunit,'(3a)') subname,' calc_opts = ',trim(calc_opts)

bcasttmp = 0
bcasttmp(1) = nx_global
Expand Down Expand Up @@ -341,6 +351,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, bcasttmp, 10, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, calc_opts, CX, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

nx_global = bcasttmp(1)
ny_global = bcasttmp(2)
Expand All @@ -366,7 +378,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
select case (trim(datamode))
case ('CORE2_NYF','CORE2_IAF','CORE_IAF_JRA', 'JRA55do', &
'CORE_RYF6162_JRA','CORE_RYF8485_JRA','CORE_RYF9091_JRA','CORE_RYF0304_JRA', &
'CLMNCEP','CPLHIST','GEFS','ERA5','SIMPLE')
'CLMNCEP','CPLHIST','GEFS','UFS','ERA5','SIMPLE')
if (mainproc) write(logunit,'(3a)') subname,'datm datamode = ',trim(datamode)
case default
call shr_log_error(' ERROR illegal datm datamode = '//trim(datamode), rc=rc)
Expand Down Expand Up @@ -407,6 +419,9 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
case ('GEFS')
call datm_datamode_gefs_advertise(exportState, fldsExport, flds_scalar_name, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case ('UFS')
call datm_datamode_ufs_advertise(exportState, fldsExport, ufs_state, flds_scalar_name, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case ('SIMPLE')
call datm_datamode_simple_advertise(exportState, fldsExport, flds_scalar_name, &
nlfilename, my_task, vm, rc)
Expand Down Expand Up @@ -532,7 +547,7 @@ subroutine ModelAdvance(gcomp, rc)
type(ESMF_Time) :: nextTime
type(ESMF_TimeInterval) :: timeStep
real(r8) :: nextsw_cday
logical :: restart_write ! restart alarm is ringing
logical :: restart_write ! restart alarm is ringing
integer :: next_ymd ! model date
integer :: next_tod ! model sec into model date
integer :: yr, mon, day ! year, month, day
Expand Down Expand Up @@ -674,6 +689,9 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
case('GEFS')
call datm_datamode_gefs_init_pointers(exportState, sdat, logunit, mainproc, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('UFS')
call datm_datamode_ufs_init_pointers(exportState, sdat, ufs_state, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('SIMPLE')
call datm_datamode_simple_init_pointers(exportState, sdat, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand All @@ -687,7 +705,7 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
case('CORE2_NYF','CORE2_IAF','CORE_IAF_JRA',&
'CORE_RYF6162_JRA','CORE_RYF8485_JRA' ,&
'CORE_RYF9091_JRA','CORE_RYF0304_JRA' , 'JRA55do', &
'CLMNCEP','CPLHIST','ERA5','GEFS','SIMPLE')
'CLMNCEP','CPLHIST','ERA5','GEFS','UFS','SIMPLE')
call dshr_restart_read(restfilm, rpfile, logunit, my_task, mpicom, sdat, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case default
Expand Down Expand Up @@ -752,6 +770,9 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
case('GEFS')
call datm_datamode_gefs_advance(exportstate, sdat, mainproc, logunit, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('UFS')
call datm_datamode_ufs_advance(exportState, ufs_state, calc_opts, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('SIMPLE')
call datm_datamode_simple_advance(target_ymd, target_tod, target_mon, sdat%model_calendar, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand All @@ -765,7 +786,7 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
case('CORE2_NYF','CORE2_IAF','CORE_IAF_JRA',&
'CORE_RYF6162_JRA','CORE_RYF8485_JRA' ,&
'CORE_RYF9091_JRA','CORE_RYF0304_JRA','JRA55do' ,&
'CLMNCEP','CPLHIST','ERA5','GEFS','SIMPLE')
'CLMNCEP','CPLHIST','ERA5','GEFS','UFS','SIMPLE')
call dshr_restart_write(rpfile, case_name, 'datm', inst_suffix, &
target_ymd, target_tod, logunit, my_task, sdat, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down
13 changes: 1 addition & 12 deletions datm/datm_datamode_gefs_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module datm_datamode_gefs_mod
real(r8), pointer :: Faxa_swvdf(:) => null()

! stream data
real(r8), pointer :: strm_Sa_mask(:) => null()
real(r8), pointer :: strm_Sa_z(:) => null()
real(r8), pointer :: strm_Sa_u(:) => null()
real(r8), pointer :: strm_Sa_v(:) => null()
Expand Down Expand Up @@ -135,9 +134,6 @@ subroutine datm_datamode_gefs_init_pointers(exportState, sdat, logunit, mainproc
rc = ESMF_SUCCESS

! initialize pointers for module level stream arrays
call shr_strdata_get_stream_pointer( sdat, 'Sa_mask', strm_Sa_mask , requirePointer=.true., &
errmsg=subname//'ERROR: strm_Sa_mask must be associated for gefs datamode', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call shr_strdata_get_stream_pointer( sdat, 'Sa_z', strm_Sa_z , requirePointer=.true., &
errmsg=subname//'ERROR: strm_Sa_z must be associated for gefs datamode', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down Expand Up @@ -256,7 +252,7 @@ subroutine datm_datamode_gefs_advance(exportstate, sdat, mainproc, logunit, rc)

rc = ESMF_SUCCESS

lsize = size(strm_Sa_mask)
lsize = size(strm_Sa_tbot)

if (first_time) then
call ESMF_VMGetCurrent(vm, rc=rc)
Expand All @@ -270,13 +266,6 @@ subroutine datm_datamode_gefs_advance(exportstate, sdat, mainproc, logunit, rc)

if (mainproc) write(logunit,*) subname,' tbotmax = ',tbotmax

! determine maskmax (see below for use)
rtmp(1) = maxval(strm_Sa_mask(:))
call ESMF_VMAllReduce(vm, rtmp, rtmp(2:), 1, ESMF_REDUCE_MAX, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
maskmax = rtmp(2)
if (mainproc) write(logunit,*) subname,' maskmax = ',maskmax

! reset first_time
first_time = .false.
end if
Expand Down
Loading
Loading