From d37f1cfd5213952b04f9a8f35d4150e612225fbb Mon Sep 17 00:00:00 2001 From: Matthew Harrison Date: Wed, 1 Sep 2021 10:24:50 -0400 Subject: [PATCH] Add documentation for correct_leap_year_inconsistency argument --- config_src/infra/FMS1/MOM_interp_infra.F90 | 8 +++++++- config_src/infra/FMS2/MOM_interp_infra.F90 | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config_src/infra/FMS1/MOM_interp_infra.F90 b/config_src/infra/FMS1/MOM_interp_infra.F90 index 98ad5663bf..e0f86a9ff0 100644 --- a/config_src/infra/FMS1/MOM_interp_infra.F90 +++ b/config_src/infra/FMS1/MOM_interp_infra.F90 @@ -247,7 +247,13 @@ integer function init_extern_field(file, fieldname, MOM_domain, domain, verbose, !! fatal error if the axis Cartesian attribute is !! not set to a recognized value. logical, optional, intent(in) :: correct_leap_year_inconsistency !< If present and true, - !! then allow for leap year inconsistency + !! Turns on a kluge for an inconsistency which may occur in a special case. + !! When the modulo time period (i.e. Time_end - Time_beg) is a whole number of years + !! and is not a multiple of 4, and the calendar in use has leap years, then it is + !! likely that the interpolation will involve mapping a common year onto a leap year. + !! In this case it is often desirable, but not absolutely necessary, to use data for + !! Feb 28 of the leap year when it is mapped onto a common year. + !! To turn this on, set correct_leap_year_inconsistency=.true. if (present(MOM_Domain)) then diff --git a/config_src/infra/FMS2/MOM_interp_infra.F90 b/config_src/infra/FMS2/MOM_interp_infra.F90 index 0f17fb5cf8..e0f86a9ff0 100644 --- a/config_src/infra/FMS2/MOM_interp_infra.F90 +++ b/config_src/infra/FMS2/MOM_interp_infra.F90 @@ -247,7 +247,14 @@ integer function init_extern_field(file, fieldname, MOM_domain, domain, verbose, !! fatal error if the axis Cartesian attribute is !! not set to a recognized value. logical, optional, intent(in) :: correct_leap_year_inconsistency !< If present and true, - !! then allow for leap year inconsistency + !! Turns on a kluge for an inconsistency which may occur in a special case. + !! When the modulo time period (i.e. Time_end - Time_beg) is a whole number of years + !! and is not a multiple of 4, and the calendar in use has leap years, then it is + !! likely that the interpolation will involve mapping a common year onto a leap year. + !! In this case it is often desirable, but not absolutely necessary, to use data for + !! Feb 28 of the leap year when it is mapped onto a common year. + !! To turn this on, set correct_leap_year_inconsistency=.true. + if (present(MOM_Domain)) then init_extern_field = init_external_field(file, fieldname, domain=MOM_domain%mpp_domain, &