Go to the documentation of this file.
10 use diag_manager_mod,
only : register_static_field_fms=>register_static_field
12 implicit none ;
private
14 #include <MOM_memory.h>
26 #include "version_variable.h"
28 character(len=40) :: mdl =
"MOM_obsolete_diagnostics"
29 logical :: foundentry, causefatal
33 call get_param(param_file, mdl,
"OBSOLETE_DIAGNOSTIC_IS_FATAL", causefatal, &
34 "If an obsolete diagnostic variable appears in the diag_table, "// &
35 "cause a FATAL error rather than issue a WARNING.", default=.true.)
39 if (
found_in_diagtable(diag,
'Net_Heat',
'net_heat_surface or net_heat_coupler')) foundentry = .true.
46 if (
found_in_diagtable(diag,
'calving_heat_content',
'heat_content_frunoff')) foundentry = .true.
47 if (
found_in_diagtable(diag,
'precip_heat_content',
'heat_content_lprec')) foundentry = .true.
48 if (
found_in_diagtable(diag,
'evap_heat_content',
'heat_content_massout')) foundentry = .true.
49 if (
found_in_diagtable(diag,
'runoff_heat_content',
'heat_content_lrunoff')) foundentry = .true.
56 if (causefatal) then; errtype = fatal
57 else ; errtype = warning ;
endif
59 call mom_error(errtype,
'MOM_obsolete_diagnostics: '//&
60 'Obsolete diagnostics found in diag_table')
68 character(len=*),
intent(in) :: varname
69 character(len=*),
optional,
intent(in) :: newvarname
75 handle = register_static_field_fms(
'ocean_model', varname, &
76 diag%axesT1%handles,
'Obsolete parameter',
'N/A')
81 if (
present(newvarname))
then
82 call mom_error(warning,
'MOM_obsolete_params: '// &
83 'diag_table entry "'//trim(varname)//
'" found. Use '// &
84 '"'//trim(newvarname)//
'" instead.' )
86 call mom_error(warning,
'MOM_obsolete_params: '// &
87 'diag_table entry "'//trim(varname)//
'" is obsolete.' )
subroutine, public register_obsolete_diagnostics(param_file, diag)
Scan through the diag_table searching for obsolete parameters and issue informational messages and op...
An overloaded interface to log version information about modules.
Provides a mechanism for recording diagnostic variables that are no longer valid, along with their re...
A structure that can be parsed to read and document run-time parameters.
An overloaded interface to read and log the values of various types of parameters.
The MOM6 facility to parse input files for runtime parameters.
logical function found_in_diagtable(diag, varName, newVarName)
Fakes a register of a diagnostic to find out if an obsolete parameter appears in the diag_table.
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
subroutine, public mom_error(level, message, all_print)
This provides a convenient interface for writing an mpp_error message with run-time filter based on a...
Routines for error handling and I/O management.