-
Notifications
You must be signed in to change notification settings - Fork 28
Description
POP has an io_read_fallback_mod
module that can be used to tell the model "if [tracer name] isn't available in the initial condition file, initialize it some other way"; that other way could be "read a different tracer," "read a different tracer but scale it by some factor", or "set it to a constant." (The implementation for the MARBL tracers is here.)
Given the general design principal that the GCM should have as little semantic knowledge of MARBL as possible, it makes sense for MARBL to provide the GCM information on what to do if the tracer is not available in the IC file. I think it would make the most sense to extend tracer_metadata_type
:
type, public :: marbl_tracer_metadata_type
character(len=char_len) :: short_name
character(len=char_len) :: long_name
character(len=char_len) :: units
character(len=char_len) :: tend_units
character(len=char_len) :: flux_units
logical :: lfull_depth_tavg
character(len=char_len) :: tracer_module_name
+ character(len=char_len) :: fallback_option
+ character(len=char_len) :: fallback_tracer
+ real(r8) :: fallback_const
+ real(r8) :: fallback_scalef
end type marbl_tracer_metadata_type
Where fallback_option
could be 'none'
, 'alt_tracer'
, or 'const'
and the other new variables are pretty self-explanatory. POP could continue to use io_read_fallback
, but instead of explicitly defining the fallbacks in the linked code snippet, it would just loop through the tracer metadata and register any tracer where fallback_option
is not 'none'
.