Skip to content

Commit

Permalink
Add optional argument to FMS2 interface to init_extern_field
Browse files Browse the repository at this point in the history
  • Loading branch information
MJHarrison-GFDL committed Jul 30, 2021
1 parent 9c0a735 commit 090fa83
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions config_src/infra/FMS2/MOM_interp_infra.F90
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ end subroutine time_interp_extern_3d

!> initialize an external field
integer function init_extern_field(file, fieldname, MOM_domain, domain, verbose, &
threading, ierr, ignore_axis_atts )
threading, ierr, ignore_axis_atts, correct_leap_year_inconsistency )

character(len=*), intent(in) :: file !< The name of the file to read
character(len=*), intent(in) :: fieldname !< The name of the field in the file
Expand All @@ -246,13 +246,17 @@ integer function init_extern_field(file, fieldname, MOM_domain, domain, verbose,
logical, optional, intent(in) :: ignore_axis_atts !< If present and true, do not issue a
!! 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

if (present(MOM_Domain)) then
init_extern_field = init_external_field(file, fieldname, domain=MOM_domain%mpp_domain, &
verbose=verbose, threading=threading, ierr=ierr, ignore_axis_atts=ignore_axis_atts)
verbose=verbose, threading=threading, ierr=ierr, ignore_axis_atts=ignore_axis_atts, &
correct_leap_year_inconsistency=correct_leap_year_inconsistency)
else
init_extern_field = init_external_field(file, fieldname, domain=domain, &
verbose=verbose, threading=threading, ierr=ierr, ignore_axis_atts=ignore_axis_atts)
verbose=verbose, threading=threading, ierr=ierr, ignore_axis_atts=ignore_axis_atts, &
correct_leap_year_inconsistency=correct_leap_year_inconsistency)
endif

end function init_extern_field
Expand Down

0 comments on commit 090fa83

Please sign in to comment.