Skip to content
Closed
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
17 changes: 13 additions & 4 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr,
real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys
real(kind=kind_dbl_prec) :: rinc8(5)

integer :: iw3jdn
integer :: w3kindreal, w3kindint
integer :: iw3jdn
integer :: jd0, jd1
real :: fjd

Expand All @@ -113,9 +114,17 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr,

!--- jdat is being updated directly inside of FV3GFS_cap.F90
!--- update calendars and triggers
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
sec = rinc8(4)
call w3kind(w3kindreal, w3kindint)
!--- CCPP uses w3emc_d, therefore expecting the following values
if (w3kindreal == 8 .and. w3kindint==4) then
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
sec = rinc8(4)
else
write(errmsg,'(*(a))') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint
errflg = 1
return
end if
phour = sec/con_hr
!--- set current bucket hour
zhour = phour
Expand Down
19 changes: 14 additions & 5 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ subroutine GFS_time_vary_pre_init (errmsg, errflg)
errflg = 0

if (is_initialized) return

!--- Call gfuncphys (funcphys.f) to compute all physics function tables.
call gfuncphys ()

Expand Down Expand Up @@ -93,7 +93,8 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, &
real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys
real(kind=kind_dbl_prec) :: rinc8(5)

integer :: iw3jdn
integer :: w3kindreal, w3kindint
integer :: iw3jdn
integer :: jd0, jd1
real :: fjd

Expand All @@ -112,9 +113,17 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, &
!--- jdat is being updated directly inside of the time integration
!--- loop of scm.F90
!--- update calendars and triggers
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
sec = rinc8(4)
call w3kind(w3kindreal, w3kindint)
!--- CCPP uses w3emc_d, therefore expecting the following values
if (w3kindreal == 8 .and. w3kindint==4) then
rinc8(1:5) = 0
call w3difdat(jdat,idat,4,rinc8)
sec = rinc8(4)
else
write(errmsg,'(*(a))') "FATAL ERROR: Invalid w3kindreal or w3kindint:", w3kindreal, w3kindint
errflg = 1
return
end if
phour = sec/con_hr
!--- set current bucket hour
zhour = phour
Expand Down
Loading