From 429e824a5f538ccda10d93ab0dc7a152c8a15731 Mon Sep 17 00:00:00 2001 From: David Clemens-Sewall Date: Fri, 11 Oct 2024 15:35:07 -0600 Subject: [PATCH] added warning for MOSAiC leg 4-5 transition --- configuration/driver/icedrv_forcing.F90 | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/configuration/driver/icedrv_forcing.F90 b/configuration/driver/icedrv_forcing.F90 index 143e33dc..be0283f3 100644 --- a/configuration/driver/icedrv_forcing.F90 +++ b/configuration/driver/icedrv_forcing.F90 @@ -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)' @@ -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) @@ -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)' @@ -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)