Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 16 additions & 5 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ module cdeps_datm_comp
integer :: ny_global ! global ny
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 :: skip_field_check = .false. ! true => no not check all fields are provided or not
integer :: qsat_algorithm = 0 ! qsat algorithm 0: previous impl., 1: Gill, 82
logical :: first_call = .true.

! linked lists
Expand Down Expand Up @@ -225,7 +227,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
! local variables
integer :: nu ! unit number
integer :: ierr ! error code
integer :: bcasttmp(10)
integer :: bcasttmp(11)
character(CL) :: nextsw_cday_calc
type(ESMF_VM) :: vm
character(len=*),parameter :: subname=trim(modName) // ':(InitializeAdvertise) '
Expand All @@ -249,7 +251,9 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
skip_restart_read, &
flds_presndep, &
flds_preso3, &
export_all
export_all, &
skip_field_check, &
qsat_algorithm

rc = ESMF_SUCCESS

Expand Down Expand Up @@ -305,6 +309,8 @@ 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,'(2a,l6)') subname,' skip_field_check = ',skip_field_check
write(logunit,'(2a,i0)') subname,' qsat_algorithm = ',qsat_algorithm

bcasttmp = 0
bcasttmp(1) = nx_global
Expand All @@ -316,6 +322,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
if(flds_co2) bcasttmp(7) = 1
if(skip_restart_read) bcasttmp(8) = 1
if(export_all) bcasttmp(9) = 1
if(skip_field_check) bcasttmp(10) = 1
bcasttmp(11) = qsat_algorithm
end if

! Broadcast namelist input
Expand All @@ -339,7 +347,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, nextsw_cday_calc, CL, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, bcasttmp, 10, main_task, rc=rc)
call ESMF_VMBroadcast(vm, bcasttmp, 11, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

nx_global = bcasttmp(1)
Expand All @@ -351,6 +359,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
flds_co2 = (bcasttmp(7) == 1)
skip_restart_read = (bcasttmp(8) == 1)
export_all = (bcasttmp(9) == 1)
skip_field_check = (bcasttmp(10) == 1)
qsat_algorithm = bcasttmp(11)

if (nextsw_cday_calc == 'cam7') then
nextsw_cday_calc_cam7 = .true.
Expand Down Expand Up @@ -669,7 +679,7 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
call datm_datamode_cplhist_init_pointers(importState, exportState, sdat, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('ERA5')
call datm_datamode_era5_init_pointers(exportState, sdat, rc)
call datm_datamode_era5_init_pointers(exportState, sdat, skip_field_check, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('GEFS')
call datm_datamode_gefs_init_pointers(exportState, sdat, logunit, mainproc, rc)
Expand Down Expand Up @@ -747,7 +757,8 @@ subroutine datm_comp_run(gcomp, importState, exportState, target_ymd, target_tod
call datm_datamode_cplhist_advance(rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('ERA5')
call datm_datamode_era5_advance(exportstate, mainproc, logunit, rc)
call datm_datamode_era5_advance(exportstate, mainproc, logunit, target_ymd, target_tod, &
sdat%model_calendar, qsat_algorithm, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
case('GEFS')
call datm_datamode_gefs_advance(exportstate, sdat, mainproc, logunit, rc)
Expand Down
Loading
Loading