Skip to content

Commit

Permalink
+Make units argument mandatory for get_param_real
Browse files Browse the repository at this point in the history
  This commit includes changes to the get_param_real and log_param_real
interfaces to make the units arguments mandatory.  It also adds an optional
unscale argument to the log_param_real interfaces.  Without other changes in the
previous commits, it will cause the MOM6 code to fail to compile.  However, by
itself this commit does not change any answers or output.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Jun 27, 2023
1 parent 1f0c92f commit 201e705
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/framework/MOM_file_parser.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ subroutine log_param_real(CS, modulename, varname, value, desc, units, &
real, intent(in) :: value !< The value of the parameter to log
character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
!! present, this parameter is not written to a doc file
character(len=*), optional, intent(in) :: units !< The units of this parameter
character(len=*), intent(in) :: units !< The units of this parameter
real, optional, intent(in) :: default !< The default value of the parameter
logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
!! logged in the debugging parameter file
Expand Down Expand Up @@ -1457,7 +1457,7 @@ subroutine log_param_real_array(CS, modulename, varname, value, desc, &
real, dimension(:), intent(in) :: value !< The value of the parameter to log
character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
!! present, this parameter is not written to a doc file
character(len=*), optional, intent(in) :: units !< The units of this parameter
character(len=*), intent(in) :: units !< The units of this parameter
real, optional, intent(in) :: default !< The default value of the parameter
logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
!! logged in the debugging parameter file
Expand Down Expand Up @@ -1782,7 +1782,7 @@ subroutine get_param_real(CS, modulename, varname, value, desc, units, &
!! read from the parameter file and logged
character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
!! present, this parameter is not written to a doc file
character(len=*), optional, intent(in) :: units !< The units of this parameter
character(len=*), intent(in) :: units !< The units of this parameter
real, optional, intent(in) :: default !< The default value of the parameter
logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
!! if this variable is not found in the parameter file
Expand Down Expand Up @@ -1830,7 +1830,7 @@ subroutine get_param_real_array(CS, modulename, varname, value, desc, units, &
!! read from the parameter file and logged
character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
!! present, this parameter is not written to a doc file
character(len=*), optional, intent(in) :: units !< The units of this parameter
character(len=*), intent(in) :: units !< The units of this parameter
real, optional, intent(in) :: default !< The default value of the parameter
logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
!! if this variable is not found in the parameter file
Expand Down

0 comments on commit 201e705

Please sign in to comment.