Skip to content

Commit

Permalink
added warning for MOSAiC leg 4-5 transition
Browse files Browse the repository at this point in the history
  • Loading branch information
davidclemenssewall committed Oct 11, 2024
1 parent b15d4d5 commit 429e824
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions configuration/driver/icedrv_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,9 @@ subroutine atm_MOSAiC

real (kind=dbl_kind), parameter :: &
Gregorian_year = 365.2425, & ! days in Gregorian year per cf standard
model_miss_val = -9999.00 ! missing value for internal use
model_miss_val = -9999.00, & ! missing value for internal use
leg4_end_time = 1596034800, &! end of leg 4 in seconds since 1970
leg5_start_time= 1598451600 ! start of leg 5 in seconds since 1970

character(len=*), parameter :: subname='(atm_MOSAiC)'

Expand All @@ -1103,6 +1105,14 @@ subroutine atm_MOSAiC
model_time(nt) = int(model_time0 + dt * nt, kind=8)
enddo

! Warn if simulation includes leg 4-5 transition
if ((model_time(1) < leg5_start_time) .and. &
(model_time(ntime) > leg4_end_time)) then
write(nu_diag,*) subname
write(nu_diag,*) 'WARNING: Time includes leg 4-5 transition'
write(nu_diag,*) 'WARNING: forcing interpolation is not valid'
endif

! Read, average, and interpolate forcing data from each variable
! Moving average forcing values into model arrays
call load_var_MOSAiC("tas", Tair_data, ncid, model_time)
Expand Down Expand Up @@ -1554,7 +1564,9 @@ subroutine ocn_MOSAiC

real (kind=dbl_kind), parameter :: &
Gregorian_year = 365.2425, & ! days in Gregorian year per cf standard
model_miss_val = -9999.00 ! missing value for internal use
model_miss_val = -9999.00, & ! missing value for internal use
leg4_end_time = 1596034800, &! end of leg 4 in seconds since 1970
leg5_start_time= 1598451600 ! start of leg 5 in seconds since 1970

character(len=*), parameter :: subname='(ocn_MOSAiC)'

Expand All @@ -1580,6 +1592,14 @@ subroutine ocn_MOSAiC
model_time(nt) = int(model_time0 + dt * nt, kind=8)
enddo

! Warn if simulation includes leg 4-5 transition
if ((model_time(1) < leg5_start_time) .and. &
(model_time(ntime) > leg4_end_time)) then
write(nu_diag,*) subname
write(nu_diag,*) 'WARNING: Time includes leg 4-5 transition'
write(nu_diag,*) 'WARNING: forcing interpolation is not valid'
endif

! Read, average, and interpolate forcing data from each variable
! Moving average forcing values into model arrays
call load_var_MOSAiC("so", sss_data, ncid, model_time)
Expand Down

0 comments on commit 429e824

Please sign in to comment.