From db2e531e3f95ca41ce18889f012cc3415bbb7235 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 31 Aug 2023 10:23:31 -0600 Subject: [PATCH 01/64] First steps towards implementing abiotic tracers Added base_tracers_on and abio_on to the list of MARBL parameters, and then added ABIO_DIC and ABIO_DI14C to the tracer list if abio_on = .true. At this point, we initialize the tracers correctly when abio_on = .true. (and also handle abio_on = .true. and base_tracers_on = .false. correctly), but there are no base_tracer_on checks in surface_flux_compute() or interior_tendency_compute(). --- defaults/json/settings_latest.json | 99 ++++++++++++++++- defaults/settings_latest.yaml | 69 ++++++++++++ src/marbl_abio_init_mod.F90 | 66 +++++++++++ src/marbl_init_mod.F90 | 20 +++- src/marbl_interface_private_types.F90 | 152 ++++++++++++++------------ src/marbl_settings_mod.F90 | 22 ++++ 6 files changed, 355 insertions(+), 73 deletions(-) create mode 100644 src/marbl_abio_init_mod.F90 diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index 4794d1dd..c11f8e04 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -665,6 +665,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -686,21 +689,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_tracers_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -708,20 +719,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -740,10 +775,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -762,54 +803,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -884,6 +964,13 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, + "abio_on": { + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, @@ -898,6 +985,13 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, + "base_tracers_on": { + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, @@ -1367,6 +1461,7 @@ "ALK", "ALK_ALT_CO2" ], + "base_tracers_on == .false.": "", "default": "" }, "longname": "Tracer names for tracers that are restored", diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 377839d4..0d70bd06 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -51,56 +51,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_tracers_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_tracers_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_tracers_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +170,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_tracers_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_tracers_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_tracers_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +228,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -214,6 +270,18 @@ general_parms : - diat_zoo - diaz_zoo _append_to_config_keywords : true + base_tracers_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .true. + abio_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .false. ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags @@ -1197,3 +1265,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + base_tracers_on == .false.: '' diff --git a/src/marbl_abio_init_mod.F90 b/src/marbl_abio_init_mod.F90 new file mode 100644 index 00000000..638b16f3 --- /dev/null +++ b/src/marbl_abio_init_mod.F90 @@ -0,0 +1,66 @@ +module marbl_abio_init_mod + + use marbl_kinds_mod, only : int_kind + use marbl_settings_mod, only : abio_on + use marbl_interface_public_types, only : marbl_tracer_metadata_type + use marbl_interface_private_types, only : marbl_tracer_index_type + + implicit none + private + + public :: marbl_abio_init_tracer_metadata + +contains + + !***************************************************************************** + + subroutine marbl_abio_init_tracer_metadata(unit_system, & + marbl_tracer_indices, & + marbl_tracer_metadata) + + ! Set tracer and forcing metadata + use marbl_settings_mod, only : unit_system_type + + type(unit_system_type), intent(in) :: unit_system + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer + + !----------------------------------------------------------------------- + ! local variables + !----------------------------------------------------------------------- + integer (int_kind) :: n ! tracer index + + if (.not. abio_on) return + + !----------------------------------------------------------------------- + ! initialize non-autotroph metadata values + !----------------------------------------------------------------------- + + associate(abio_dic_ind => marbl_tracer_indices%abio_dic_ind, & + abio_di14c_ind => marbl_tracer_indices%abio_di14c_ind, & + abio_ind_beg => marbl_tracer_indices%abio%ind_beg, & + abio_ind_end => marbl_tracer_indices%abio%ind_end & + ) + + ! All abio tracers share units, tend_units, flux_units, and + ! tracer_module_name + do n=abio_ind_beg,abio_ind_end + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + marbl_tracer_metadata(n)%tracer_module_name = 'abio' + end do + marbl_tracer_metadata(abio_dic_ind)%short_name='ABIO_DIC' + marbl_tracer_metadata(abio_dic_ind)%long_name='Abiotic Dissolved Inorganic Carbon' + + marbl_tracer_metadata(abio_di14c_ind)%short_name='ABIO_DI14C' + marbl_tracer_metadata(abio_di14c_ind)%long_name='Abiotic Dissolved Inorganic Carbon-14' + + + end associate + + end subroutine marbl_abio_init_tracer_metadata + + !***************************************************************************** + +end module marbl_abio_init_mod diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index d1ac9351..730487f5 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -137,11 +137,14 @@ subroutine marbl_init_tracers(num_levels, & tracer_metadata, & marbl_status_log) + use marbl_settings_mod, only : base_tracers_on + use marbl_settings_mod, only : abio_on use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : lvariable_PtoC use marbl_settings_mod, only : autotroph_settings use marbl_settings_mod, only : zooplankton_settings use marbl_settings_mod, only : tracer_restore_vars + use marbl_abio_init_mod, only : marbl_abio_init_tracer_metadata use marbl_ciso_init_mod, only : marbl_ciso_init_tracer_metadata integer(int_kind), intent(in) :: num_levels @@ -163,8 +166,8 @@ subroutine marbl_init_tracers(num_levels, & ! Construct tracer indices allocate(tracer_indices) - call tracer_indices%construct(ciso_on, lvariable_PtoC, autotroph_settings, zooplankton_settings, & - marbl_status_log) + call tracer_indices%construct(base_tracers_on, abio_on, ciso_on, lvariable_PtoC, & + autotroph_settings, zooplankton_settings, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("tracer_indices%construct", subname) return @@ -182,6 +185,7 @@ subroutine marbl_init_tracers(num_levels, & ! Set up tracer metadata call marbl_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) + call marbl_abio_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) call marbl_ciso_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) ! Log what tracers are being used @@ -193,12 +197,19 @@ subroutine marbl_init_tracers(num_levels, & 100 format(A, ' tracer module contains ', I0, ' tracers; indices are ', I0, ' to ', I0) if (tracer_indices%ecosys_base%cnt.gt.0) then - write(log_message, 100) 'ecosys_base', & + write(log_message, 100) 'base tracers', & tracer_indices%ecosys_base%cnt, & tracer_indices%ecosys_base%ind_beg, & tracer_indices%ecosys_base%ind_end call marbl_status_log%log_noerror(log_message, subname) end if + if (tracer_indices%abio%cnt.gt.0) then + write(log_message, 100) 'abio', & + tracer_indices%ciso%cnt, & + tracer_indices%ciso%ind_beg, & + tracer_indices%ciso%ind_end + call marbl_status_log%log_noerror(log_message, subname) + end if if (tracer_indices%ciso%cnt.gt.0) then write(log_message, 100) 'ciso', & tracer_indices%ciso%cnt, & @@ -215,6 +226,7 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! Set tracer and forcing metadata + use marbl_settings_mod, only : base_tracers_on use marbl_settings_mod, only : lecovars_full_depth_tavg type(unit_system_type), intent(in) :: unit_system @@ -233,6 +245,8 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! initialize tracer metatdata !----------------------------------------------------------------------- + if (.not. base_tracers_on) return + marbl_tracer_metadata(:)%lfull_depth_tavg = .true. marbl_tracer_metadata(:)%tracer_module_name = 'ecosys' diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index cba7999c..1195846d 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -333,9 +333,10 @@ module marbl_interface_private_types ! Book-keeping (tracer count and index ranges) integer (int_kind) :: total_cnt = 0 type (marbl_tracer_count_type) :: ecosys_base + type (marbl_tracer_count_type) :: abio type (marbl_tracer_count_type) :: ciso - ! General tracers + ! base tracers integer (int_kind) :: po4_ind = 0 ! dissolved inorganic phosphate integer (int_kind) :: no3_ind = 0 ! dissolved inorganic nitrate integer (int_kind) :: sio3_ind = 0 ! dissolved inorganic silicate @@ -354,6 +355,10 @@ module marbl_interface_private_types integer (int_kind) :: donr_ind = 0 ! refractory DON integer (int_kind) :: docr_ind = 0 ! refractory DOC + ! ABIO tracers + integer (int_kind) :: abio_dic_ind = 0 ! abiotic dissolved inorganic carbon + integer (int_kind) :: abio_di14c_ind = 0 ! abiotic dissolved inorganic carbon 14 + ! CISO tracers integer (int_kind) :: di13c_ind = 0 ! dissolved inorganic carbon 13 integer (int_kind) :: do13ctot_ind = 0 ! dissolved organic carbon 13 (semi-labile+refractory) @@ -1422,8 +1427,8 @@ end subroutine marbl_interior_tendency_share_destructor !***************************************************************************** - subroutine tracer_index_constructor(this, ciso_on, lvariable_PtoC, autotroph_settings, & - zooplankton_settings, marbl_status_log) + subroutine tracer_index_constructor(this, base_tracers_on, abio_on, ciso_on, lvariable_PtoC, & + autotroph_settings, zooplankton_settings, marbl_status_log) ! This subroutine sets the tracer indices for the non-autotroph tracers. To ! know where to start the indexing for the autotroph tracers, it increments @@ -1434,6 +1439,8 @@ subroutine tracer_index_constructor(this, ciso_on, lvariable_PtoC, autotroph_set use marbl_pft_mod, only : zooplankton_settings_type class(marbl_tracer_index_type), intent(out) :: this + logical, intent(in) :: base_tracers_on + logical, intent(in) :: abio_on logical, intent(in) :: ciso_on logical, intent(in) :: lvariable_PtoC type(autotroph_settings_type), intent(in) :: autotroph_settings(:) @@ -1452,80 +1459,87 @@ subroutine tracer_index_constructor(this, ciso_on, lvariable_PtoC, autotroph_set allocate(this%zoo_inds(zooplankton_cnt)) ! General ecosys tracers - call this%add_tracer_index('po4', 'ecosys_base', this%po4_ind, marbl_status_log) - call this%add_tracer_index('no3', 'ecosys_base', this%no3_ind, marbl_status_log) - call this%add_tracer_index('sio3', 'ecosys_base', this%sio3_ind, marbl_status_log) - call this%add_tracer_index('nh4', 'ecosys_base', this%nh4_ind, marbl_status_log) - call this%add_tracer_index('fe', 'ecosys_base', this%fe_ind, marbl_status_log) - call this%add_tracer_index('lig', 'ecosys_base', this%lig_ind, marbl_status_log) - call this%add_tracer_index('o2', 'ecosys_base', this%o2_ind, marbl_status_log) - call this%add_tracer_index('dic', 'ecosys_base', this%dic_ind, marbl_status_log) - call this%add_tracer_index('dic_alt_co2', 'ecosys_base', this%dic_alt_co2_ind, marbl_status_log) - call this%add_tracer_index('alk', 'ecosys_base', this%alk_ind, marbl_status_log) - call this%add_tracer_index('alk_alt_co2', 'ecosys_base', this%alk_alt_co2_ind, marbl_status_log) - call this%add_tracer_index('doc', 'ecosys_base', this%doc_ind, marbl_status_log) - call this%add_tracer_index('don', 'ecosys_base', this%don_ind, marbl_status_log) - call this%add_tracer_index('dop', 'ecosys_base', this%dop_ind, marbl_status_log) - call this%add_tracer_index('dopr', 'ecosys_base', this%dopr_ind, marbl_status_log) - call this%add_tracer_index('donr', 'ecosys_base', this%donr_ind, marbl_status_log) - call this%add_tracer_index('docr', 'ecosys_base', this%docr_ind, marbl_status_log) - - do n=1,zooplankton_cnt - write(ind_name, "(2A)") trim(zooplankton_settings(n)%sname), "C" - call this%add_tracer_index(ind_name, 'ecosys_base', this%zoo_inds(n)%C_ind, marbl_status_log) - end do - - do n=1,autotroph_cnt - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Chl" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Chl_ind, marbl_status_log) - - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%C_ind, marbl_status_log) - - if (lvariable_PtoC) then - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "P" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%P_ind, marbl_status_log) - end if - - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Fe" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Fe_ind, marbl_status_log) + if (base_tracers_on) then + call this%add_tracer_index('po4', 'ecosys_base', this%po4_ind, marbl_status_log) + call this%add_tracer_index('no3', 'ecosys_base', this%no3_ind, marbl_status_log) + call this%add_tracer_index('sio3', 'ecosys_base', this%sio3_ind, marbl_status_log) + call this%add_tracer_index('nh4', 'ecosys_base', this%nh4_ind, marbl_status_log) + call this%add_tracer_index('fe', 'ecosys_base', this%fe_ind, marbl_status_log) + call this%add_tracer_index('lig', 'ecosys_base', this%lig_ind, marbl_status_log) + call this%add_tracer_index('o2', 'ecosys_base', this%o2_ind, marbl_status_log) + call this%add_tracer_index('dic', 'ecosys_base', this%dic_ind, marbl_status_log) + call this%add_tracer_index('dic_alt_co2', 'ecosys_base', this%dic_alt_co2_ind, marbl_status_log) + call this%add_tracer_index('alk', 'ecosys_base', this%alk_ind, marbl_status_log) + call this%add_tracer_index('alk_alt_co2', 'ecosys_base', this%alk_alt_co2_ind, marbl_status_log) + call this%add_tracer_index('doc', 'ecosys_base', this%doc_ind, marbl_status_log) + call this%add_tracer_index('don', 'ecosys_base', this%don_ind, marbl_status_log) + call this%add_tracer_index('dop', 'ecosys_base', this%dop_ind, marbl_status_log) + call this%add_tracer_index('dopr', 'ecosys_base', this%dopr_ind, marbl_status_log) + call this%add_tracer_index('donr', 'ecosys_base', this%donr_ind, marbl_status_log) + call this%add_tracer_index('docr', 'ecosys_base', this%docr_ind, marbl_status_log) + + do n=1,zooplankton_cnt + write(ind_name, "(2A)") trim(zooplankton_settings(n)%sname), "C" + call this%add_tracer_index(ind_name, 'ecosys_base', this%zoo_inds(n)%C_ind, marbl_status_log) + end do - if (autotroph_settings(n)%silicifier) then - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Si" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Si_ind, marbl_status_log) - end if + do n=1,autotroph_cnt + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Chl" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Chl_ind, marbl_status_log) - if (autotroph_settings(n)%imp_calcifier.or. & - autotroph_settings(n)%exp_calcifier) then - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "CaCO3" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%CaCO3_ind, marbl_status_log) - end if - end do + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%C_ind, marbl_status_log) - if (ciso_on) then - call this%add_tracer_index('di13c', 'ciso', this%di13c_ind, marbl_status_log) - call this%add_tracer_index('do13ctot', 'ciso', this%do13ctot_ind, marbl_status_log) - call this%add_tracer_index('di14c', 'ciso', this%di14c_ind, marbl_status_log) - call this%add_tracer_index('do14ctot', 'ciso', this%do14ctot_ind, marbl_status_log) - call this%add_tracer_index('zootot13C', 'ciso', this%zootot13C_ind, marbl_status_log) - call this%add_tracer_index('zootot14C', 'ciso', this%zootot14C_ind, marbl_status_log) + if (lvariable_PtoC) then + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "P" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%P_ind, marbl_status_log) + end if - do n=1,autotroph_cnt - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C13" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C13_ind, marbl_status_log) + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Fe" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Fe_ind, marbl_status_log) - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C14" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C14_ind, marbl_status_log) + if (autotroph_settings(n)%silicifier) then + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Si" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Si_ind, marbl_status_log) + end if - if (autotroph_settings(n)%imp_calcifier .or. & + if (autotroph_settings(n)%imp_calcifier.or. & autotroph_settings(n)%exp_calcifier) then - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca13CO3" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca13CO3_ind, marbl_status_log) - - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca14CO3" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca14CO3_ind, marbl_status_log) + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "CaCO3" + call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%CaCO3_ind, marbl_status_log) end if end do + + if (ciso_on) then + call this%add_tracer_index('di13c', 'ciso', this%di13c_ind, marbl_status_log) + call this%add_tracer_index('do13ctot', 'ciso', this%do13ctot_ind, marbl_status_log) + call this%add_tracer_index('di14c', 'ciso', this%di14c_ind, marbl_status_log) + call this%add_tracer_index('do14ctot', 'ciso', this%do14ctot_ind, marbl_status_log) + call this%add_tracer_index('zootot13C', 'ciso', this%zootot13C_ind, marbl_status_log) + call this%add_tracer_index('zootot14C', 'ciso', this%zootot14C_ind, marbl_status_log) + + do n=1,autotroph_cnt + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C13" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C13_ind, marbl_status_log) + + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C14" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C14_ind, marbl_status_log) + + if (autotroph_settings(n)%imp_calcifier .or. & + autotroph_settings(n)%exp_calcifier) then + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca13CO3" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca13CO3_ind, marbl_status_log) + + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca14CO3" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca14CO3_ind, marbl_status_log) + end if + end do + end if + end if + + if (abio_on) then + call this%add_tracer_index('abio_dic', 'abio', this%abio_dic_ind, marbl_status_log) + call this%add_tracer_index('abio_di14c', 'abio', this%abio_di14c_ind, marbl_status_log) end if if (marbl_status_log%labort_marbl) then @@ -1585,6 +1599,8 @@ subroutine add_tracer_index(this, ind_name, category, ind, marbl_status_log) select case (trim(category)) case ('ecosys_base') call this%ecosys_base%update_count(ind, marbl_status_log) + case ('abio') + call this%abio%update_count(ind, marbl_status_log) case ('ciso') call this%ciso%update_count(ind, marbl_status_log) case DEFAULT diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index 7d3815d3..fe5da3e5 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -237,6 +237,8 @@ module marbl_settings_mod character(len=char_len), target :: PFT_defaults ! Set up PFT parameters based on known classes, e.g. 'CESM2' ! (or set to 'user-specified' and use put_setting()) + logical(log_kind), target :: base_tracers_on ! control whether base tracer module is active + logical(log_kind), target :: abio_on ! control whether abio tracer module is active logical(log_kind), target :: ciso_on ! control whether ciso tracer module is active logical(log_kind), target :: lsource_sink ! control which portion of code is executed, useful for debugging logical(log_kind), target :: ciso_lsource_sink ! control which portion of carbon isotope code is executed, useful for debugging @@ -402,6 +404,8 @@ subroutine marbl_settings_set_defaults_general_parms(unit_system) type(unit_system_type), intent(in) :: unit_system PFT_defaults = 'CESM2' ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + base_tracers_on = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + abio_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above ciso_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above ciso_lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above @@ -621,6 +625,24 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) category = 'config flags' ! ----------------------- + sname = 'base_tracers_on' + lname = 'Control whether base tracer module is active' + units = 'unitless' + datatype = 'logical' + lptr => base_tracers_on + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + + sname = 'abio_on' + lname = 'Control whether abiotic tracer module is active' + units = 'unitless' + datatype = 'logical' + lptr => abio_on + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'ciso_on' lname = 'Control whether CISO tracer module is active' units = 'unitless' From 26f994a38cccb809bb896731d8d92a81ec74d58b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 31 Aug 2023 10:39:59 -0600 Subject: [PATCH 02/64] Add abiotic to rest of settings_latest* files This supports creating marbl_in with abio tracers when running with 4p2z or cocco (4p1z) --- defaults/json/settings_latest+4p2z.json | 98 +++++++++++++++++++++++- defaults/json/settings_latest+cocco.json | 98 +++++++++++++++++++++++- defaults/settings_latest+4p2z.yaml | 68 ++++++++++++++++ defaults/settings_latest+cocco.yaml | 68 ++++++++++++++++ 4 files changed, 328 insertions(+), 4 deletions(-) diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index 747e184d..1539e505 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -753,6 +753,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -774,21 +777,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_tracers_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -796,20 +807,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -828,10 +863,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -850,54 +891,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -979,6 +1059,13 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, + "abio_on": { + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, @@ -993,6 +1080,13 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, + "base_tracers_on": { + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 18f900d2..9440ff7e 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -705,6 +705,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -726,21 +729,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_tracers_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -748,20 +759,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_tracers_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -780,10 +815,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -802,54 +843,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_tracers_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -926,6 +1006,13 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, + "abio_on": { + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, @@ -940,6 +1027,13 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, + "base_tracers_on": { + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "2. config flags", + "units": "unitless" + }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 9b167289..433e4569 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -51,56 +51,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_tracers_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_tracers_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_tracers_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +170,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_tracers_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_tracers_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_tracers_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +228,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -221,6 +277,18 @@ general_parms : - "null" - microzoo_mesozoo _append_to_config_keywords : true + base_tracers_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .true. + abio_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .false. ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 967ec968..6266e4fa 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -51,56 +51,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_tracers_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_tracers_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_tracers_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_tracers_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_tracers_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_tracers_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +170,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_tracers_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_tracers_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_tracers_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_tracers_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +228,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_tracers_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -216,6 +272,18 @@ general_parms : - diaz_zoo - cocco_zoo _append_to_config_keywords : true + base_tracers_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .true. + abio_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 2. config flags + units : unitless + datatype : logical + default_value : .false. ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags From 474f2f89f967386eb80a8a5a980361ef0bae2b3a Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 1 Sep 2023 14:06:09 -0600 Subject: [PATCH 03/64] Some variable renaming We'll refer to the abiotic carbon tracer module as abio_dic so abio_on -> abio_dic_on (and a few other similar renamings). Also changed base_tracers_on -> base_bio_on; at the same time, I changed references to "ecosys_base" to be "base_tracers" instead (e.g. tracer indexing type). Also cleaned up the stand-alone "request *" tests to be consistent in output when there are none of whatever is being requested... e.g. abio_dic does not request any forcing fields for the interior tendency computation. --- defaults/json/settings_latest+4p2z.json | 56 ++--- defaults/json/settings_latest+cocco.json | 56 ++--- defaults/json/settings_latest.json | 58 ++--- defaults/settings_latest+4p2z.yaml | 56 ++--- defaults/settings_latest+cocco.yaml | 56 ++--- defaults/settings_latest.yaml | 58 ++--- docs/src/dev-guide/add-tracer.rst | 4 +- src/marbl_abio_init_mod.F90 | 12 +- src/marbl_init_mod.F90 | 37 +-- src/marbl_interface_private_types.F90 | 283 ++++++++++++----------- src/marbl_settings_mod.F90 | 20 +- tests/driver_src/marbl.F90 | 7 + 12 files changed, 367 insertions(+), 336 deletions(-) diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index 1539e505..a716f9e1 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -754,7 +754,7 @@ }, "((autotroph_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" @@ -778,28 +778,28 @@ "((autotroph_sname))CaCO3": { "dependencies": { "((autotroph_calcifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { - "base_tracers_on": ".true.", + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -808,42 +808,42 @@ "((autotroph_sname))Si": { "dependencies": { "((autotroph_silicifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, "ABIO_DI14C": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon-14", "units": "mmol/m^3" }, "ABIO_DIC": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "ALK": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" @@ -864,14 +864,14 @@ }, "DIC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" @@ -892,91 +892,91 @@ }, "DOC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" @@ -1059,7 +1059,7 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_on": { + "abio_dic_on": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether abiotic carbon tracer module is active", @@ -1080,7 +1080,7 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, - "base_tracers_on": { + "base_bio_on": { "datatype": "logical", "default_value": ".true.", "longname": "Control whether the base ecosystem tracer module is active", diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 9440ff7e..93216e90 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -706,7 +706,7 @@ }, "((autotroph_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" @@ -730,28 +730,28 @@ "((autotroph_sname))CaCO3": { "dependencies": { "((autotroph_calcifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { - "base_tracers_on": ".true.", + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -760,42 +760,42 @@ "((autotroph_sname))Si": { "dependencies": { "((autotroph_silicifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, "ABIO_DI14C": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon-14", "units": "mmol/m^3" }, "ABIO_DIC": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "ALK": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" @@ -816,14 +816,14 @@ }, "DIC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" @@ -844,91 +844,91 @@ }, "DOC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" @@ -1006,7 +1006,7 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_on": { + "abio_dic_on": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether abiotic carbon tracer module is active", @@ -1027,7 +1027,7 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, - "base_tracers_on": { + "base_bio_on": { "datatype": "logical", "default_value": ".true.", "longname": "Control whether the base ecosystem tracer module is active", diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index c11f8e04..be3a4c78 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -666,7 +666,7 @@ }, "((autotroph_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" @@ -690,28 +690,28 @@ "((autotroph_sname))CaCO3": { "dependencies": { "((autotroph_calcifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { - "base_tracers_on": ".true.", + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -720,42 +720,42 @@ "((autotroph_sname))Si": { "dependencies": { "((autotroph_silicifier))": true, - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, "ABIO_DI14C": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon-14", "units": "mmol/m^3" }, "ABIO_DIC": { "dependencies": { - "abio_on": ".true." + "abio_dic_on": ".true." }, "long_name": "Abiotic Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "ALK": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" @@ -776,14 +776,14 @@ }, "DIC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" @@ -804,91 +804,91 @@ }, "DOC": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { "dependencies": { - "base_tracers_on": ".true." + "base_bio_on": ".true." }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" @@ -964,7 +964,7 @@ "subcategory": "4. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_on": { + "abio_dic_on": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether abiotic carbon tracer module is active", @@ -985,7 +985,7 @@ "subcategory": "4. general parameters (bury coeffs)", "units": "unitless" }, - "base_tracers_on": { + "base_bio_on": { "datatype": "logical", "default_value": ".true.", "longname": "Control whether the base ecosystem tracer module is active", @@ -1461,7 +1461,7 @@ "ALK", "ALK_ALT_CO2" ], - "base_tracers_on == .false.": "", + "base_bio_on == .false.": "", "default": "" }, "longname": "Tracer names for tracers that are restored", diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 433e4569..fcaacffe 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -52,98 +52,98 @@ _tracer_list : # Non-living tracers PO4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 # Non-living (abiotic only) ABIO_DIC : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon units : mmol/m^3 ABIO_DI14C : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon-14 units : mmol/m^3 # Non-living (ciso only) @@ -171,34 +171,34 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : - base_tracers_on : .true. + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -229,7 +229,7 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -277,13 +277,13 @@ general_parms : - "null" - microzoo_mesozoo _append_to_config_keywords : true - base_tracers_on : + base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags units : unitless datatype : logical default_value : .true. - abio_on : + abio_dic_on : longname : Control whether abiotic carbon tracer module is active subcategory : 2. config flags units : unitless diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 6266e4fa..63a22117 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -52,98 +52,98 @@ _tracer_list : # Non-living tracers PO4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 # Non-living (abiotic only) ABIO_DIC : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon units : mmol/m^3 ABIO_DI14C : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon-14 units : mmol/m^3 # Non-living (ciso only) @@ -171,34 +171,34 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : - base_tracers_on : .true. + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -229,7 +229,7 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -272,13 +272,13 @@ general_parms : - diaz_zoo - cocco_zoo _append_to_config_keywords : true - base_tracers_on : + base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags units : unitless datatype : logical default_value : .true. - abio_on : + abio_dic_on : longname : Control whether abiotic carbon tracer module is active subcategory : 2. config flags units : unitless diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 0d70bd06..a8a074a5 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -52,98 +52,98 @@ _tracer_list : # Non-living tracers PO4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 # Non-living (abiotic only) ABIO_DIC : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon units : mmol/m^3 ABIO_DI14C : dependencies : - abio_on : .true. + abio_dic_on : .true. long_name : Abiotic Dissolved Inorganic Carbon-14 units : mmol/m^3 # Non-living (ciso only) @@ -171,34 +171,34 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : - base_tracers_on : .true. + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : - base_tracers_on : .true. + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -229,7 +229,7 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : dependencies : - base_tracers_on : .true. + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -270,13 +270,13 @@ general_parms : - diat_zoo - diaz_zoo _append_to_config_keywords : true - base_tracers_on : + base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags units : unitless datatype : logical default_value : .true. - abio_on : + abio_dic_on : longname : Control whether abiotic carbon tracer module is active subcategory : 2. config flags units : unitless @@ -1265,4 +1265,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE - base_tracers_on == .false.: '' + base_bio_on == .false.: '' diff --git a/docs/src/dev-guide/add-tracer.rst b/docs/src/dev-guide/add-tracer.rst index cf66c878..5a4eb0da 100644 --- a/docs/src/dev-guide/add-tracer.rst +++ b/docs/src/dev-guide/add-tracer.rst @@ -26,7 +26,7 @@ Due to the many ways to introduce tracers (different modules, living tracers, et type, public :: marbl_tracer_index_type ! Book-keeping (tracer count and index ranges) integer (int_kind) :: total_cnt = 0 - type (marbl_tracer_count_type) :: ecosys_base + type (marbl_tracer_count_type) :: base_bio type (marbl_tracer_count_type) :: ciso ! General tracers @@ -75,7 +75,7 @@ For example, here we set in index for the refractory DOC tracer: . . . - call this%add_tracer_index('docr', 'ecosys_base', this%docr_ind, marbl_status_log) + call this%add_tracer_index('docr', 'base_bio', this%docr_ind, marbl_status_log) . . . diff --git a/src/marbl_abio_init_mod.F90 b/src/marbl_abio_init_mod.F90 index 638b16f3..b9eab900 100644 --- a/src/marbl_abio_init_mod.F90 +++ b/src/marbl_abio_init_mod.F90 @@ -1,7 +1,7 @@ module marbl_abio_init_mod use marbl_kinds_mod, only : int_kind - use marbl_settings_mod, only : abio_on + use marbl_settings_mod, only : abio_dic_on use marbl_interface_public_types, only : marbl_tracer_metadata_type use marbl_interface_private_types, only : marbl_tracer_index_type @@ -30,16 +30,16 @@ subroutine marbl_abio_init_tracer_metadata(unit_system, & !----------------------------------------------------------------------- integer (int_kind) :: n ! tracer index - if (.not. abio_on) return + if (.not. abio_dic_on) return !----------------------------------------------------------------------- ! initialize non-autotroph metadata values !----------------------------------------------------------------------- - associate(abio_dic_ind => marbl_tracer_indices%abio_dic_ind, & - abio_di14c_ind => marbl_tracer_indices%abio_di14c_ind, & - abio_ind_beg => marbl_tracer_indices%abio%ind_beg, & - abio_ind_end => marbl_tracer_indices%abio%ind_end & + associate(abio_dic_ind => marbl_tracer_indices%abio_dic_ind, & + abio_di14c_ind => marbl_tracer_indices%abio_di14c_ind, & + abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & + abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & ) ! All abio tracers share units, tend_units, flux_units, and diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index 730487f5..043be89e 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -137,8 +137,8 @@ subroutine marbl_init_tracers(num_levels, & tracer_metadata, & marbl_status_log) - use marbl_settings_mod, only : base_tracers_on - use marbl_settings_mod, only : abio_on + use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : lvariable_PtoC use marbl_settings_mod, only : autotroph_settings @@ -166,7 +166,7 @@ subroutine marbl_init_tracers(num_levels, & ! Construct tracer indices allocate(tracer_indices) - call tracer_indices%construct(base_tracers_on, abio_on, ciso_on, lvariable_PtoC, & + call tracer_indices%construct(base_bio_on, abio_dic_on, ciso_on, lvariable_PtoC, & autotroph_settings, zooplankton_settings, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("tracer_indices%construct", subname) @@ -196,18 +196,18 @@ subroutine marbl_init_tracers(num_levels, & end do 100 format(A, ' tracer module contains ', I0, ' tracers; indices are ', I0, ' to ', I0) - if (tracer_indices%ecosys_base%cnt.gt.0) then - write(log_message, 100) 'base tracers', & - tracer_indices%ecosys_base%cnt, & - tracer_indices%ecosys_base%ind_beg, & - tracer_indices%ecosys_base%ind_end + if (tracer_indices%base_bio%cnt.gt.0) then + write(log_message, 100) 'base biotic tracers', & + tracer_indices%base_bio%cnt, & + tracer_indices%base_bio%ind_beg, & + tracer_indices%base_bio%ind_end call marbl_status_log%log_noerror(log_message, subname) end if - if (tracer_indices%abio%cnt.gt.0) then + if (tracer_indices%abio_dic%cnt.gt.0) then write(log_message, 100) 'abio', & - tracer_indices%ciso%cnt, & - tracer_indices%ciso%ind_beg, & - tracer_indices%ciso%ind_end + tracer_indices%abio_dic%cnt, & + tracer_indices%abio_dic%ind_beg, & + tracer_indices%abio_dic%ind_end call marbl_status_log%log_noerror(log_message, subname) end if if (tracer_indices%ciso%cnt.gt.0) then @@ -226,7 +226,7 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! Set tracer and forcing metadata - use marbl_settings_mod, only : base_tracers_on + use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : lecovars_full_depth_tavg type(unit_system_type), intent(in) :: unit_system @@ -245,7 +245,7 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! initialize tracer metatdata !----------------------------------------------------------------------- - if (.not. base_tracers_on) return + if (.not. base_bio_on) return marbl_tracer_metadata(:)%lfull_depth_tavg = .true. marbl_tracer_metadata(:)%tracer_module_name = 'ecosys' @@ -379,6 +379,8 @@ subroutine marbl_init_forcing_fields(domain, & use marbl_interface_public_types, only : marbl_domain_type use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type use marbl_interface_private_types, only : marbl_interior_tendency_forcing_indexing_type + use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : lflux_gas_o2 use marbl_settings_mod, only : lflux_gas_co2 @@ -408,12 +410,15 @@ subroutine marbl_init_forcing_fields(domain, & ) ! Construct indices for surface and interior forcing - call surface_flux_forcing_ind%construct(ciso_on, & + call surface_flux_forcing_ind%construct(base_bio_on, & + abio_dic_on, & + ciso_on, & lflux_gas_o2, & lflux_gas_co2, & ladjust_bury_coeff, & num_surface_flux_forcing_fields) - call interior_tendency_forcing_ind%construct(tracer_metadata%short_name, & + call interior_tendency_forcing_ind%construct(base_bio_on, & + tracer_metadata%short_name, & tracer_restore_vars, & domain%num_PAR_subcols, & num_interior_tendency_forcing_fields, & diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 1195846d..bfbecb91 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -332,8 +332,8 @@ module marbl_interface_private_types type, public :: marbl_tracer_index_type ! Book-keeping (tracer count and index ranges) integer (int_kind) :: total_cnt = 0 - type (marbl_tracer_count_type) :: ecosys_base - type (marbl_tracer_count_type) :: abio + type (marbl_tracer_count_type) :: base_bio + type (marbl_tracer_count_type) :: abio_dic type (marbl_tracer_count_type) :: ciso ! base tracers @@ -1427,7 +1427,7 @@ end subroutine marbl_interior_tendency_share_destructor !***************************************************************************** - subroutine tracer_index_constructor(this, base_tracers_on, abio_on, ciso_on, lvariable_PtoC, & + subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lvariable_PtoC, & autotroph_settings, zooplankton_settings, marbl_status_log) ! This subroutine sets the tracer indices for the non-autotroph tracers. To @@ -1439,8 +1439,8 @@ subroutine tracer_index_constructor(this, base_tracers_on, abio_on, ciso_on, lva use marbl_pft_mod, only : zooplankton_settings_type class(marbl_tracer_index_type), intent(out) :: this - logical, intent(in) :: base_tracers_on - logical, intent(in) :: abio_on + logical, intent(in) :: base_bio_on + logical, intent(in) :: abio_dic_on logical, intent(in) :: ciso_on logical, intent(in) :: lvariable_PtoC type(autotroph_settings_type), intent(in) :: autotroph_settings(:) @@ -1459,54 +1459,54 @@ subroutine tracer_index_constructor(this, base_tracers_on, abio_on, ciso_on, lva allocate(this%zoo_inds(zooplankton_cnt)) ! General ecosys tracers - if (base_tracers_on) then - call this%add_tracer_index('po4', 'ecosys_base', this%po4_ind, marbl_status_log) - call this%add_tracer_index('no3', 'ecosys_base', this%no3_ind, marbl_status_log) - call this%add_tracer_index('sio3', 'ecosys_base', this%sio3_ind, marbl_status_log) - call this%add_tracer_index('nh4', 'ecosys_base', this%nh4_ind, marbl_status_log) - call this%add_tracer_index('fe', 'ecosys_base', this%fe_ind, marbl_status_log) - call this%add_tracer_index('lig', 'ecosys_base', this%lig_ind, marbl_status_log) - call this%add_tracer_index('o2', 'ecosys_base', this%o2_ind, marbl_status_log) - call this%add_tracer_index('dic', 'ecosys_base', this%dic_ind, marbl_status_log) - call this%add_tracer_index('dic_alt_co2', 'ecosys_base', this%dic_alt_co2_ind, marbl_status_log) - call this%add_tracer_index('alk', 'ecosys_base', this%alk_ind, marbl_status_log) - call this%add_tracer_index('alk_alt_co2', 'ecosys_base', this%alk_alt_co2_ind, marbl_status_log) - call this%add_tracer_index('doc', 'ecosys_base', this%doc_ind, marbl_status_log) - call this%add_tracer_index('don', 'ecosys_base', this%don_ind, marbl_status_log) - call this%add_tracer_index('dop', 'ecosys_base', this%dop_ind, marbl_status_log) - call this%add_tracer_index('dopr', 'ecosys_base', this%dopr_ind, marbl_status_log) - call this%add_tracer_index('donr', 'ecosys_base', this%donr_ind, marbl_status_log) - call this%add_tracer_index('docr', 'ecosys_base', this%docr_ind, marbl_status_log) + if (base_bio_on) then + call this%add_tracer_index('po4', 'base_bio', this%po4_ind, marbl_status_log) + call this%add_tracer_index('no3', 'base_bio', this%no3_ind, marbl_status_log) + call this%add_tracer_index('sio3', 'base_bio', this%sio3_ind, marbl_status_log) + call this%add_tracer_index('nh4', 'base_bio', this%nh4_ind, marbl_status_log) + call this%add_tracer_index('fe', 'base_bio', this%fe_ind, marbl_status_log) + call this%add_tracer_index('lig', 'base_bio', this%lig_ind, marbl_status_log) + call this%add_tracer_index('o2', 'base_bio', this%o2_ind, marbl_status_log) + call this%add_tracer_index('dic', 'base_bio', this%dic_ind, marbl_status_log) + call this%add_tracer_index('dic_alt_co2', 'base_bio', this%dic_alt_co2_ind, marbl_status_log) + call this%add_tracer_index('alk', 'base_bio', this%alk_ind, marbl_status_log) + call this%add_tracer_index('alk_alt_co2', 'base_bio', this%alk_alt_co2_ind, marbl_status_log) + call this%add_tracer_index('doc', 'base_bio', this%doc_ind, marbl_status_log) + call this%add_tracer_index('don', 'base_bio', this%don_ind, marbl_status_log) + call this%add_tracer_index('dop', 'base_bio', this%dop_ind, marbl_status_log) + call this%add_tracer_index('dopr', 'base_bio', this%dopr_ind, marbl_status_log) + call this%add_tracer_index('donr', 'base_bio', this%donr_ind, marbl_status_log) + call this%add_tracer_index('docr', 'base_bio', this%docr_ind, marbl_status_log) do n=1,zooplankton_cnt write(ind_name, "(2A)") trim(zooplankton_settings(n)%sname), "C" - call this%add_tracer_index(ind_name, 'ecosys_base', this%zoo_inds(n)%C_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%zoo_inds(n)%C_ind, marbl_status_log) end do do n=1,autotroph_cnt write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Chl" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Chl_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%Chl_ind, marbl_status_log) write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%C_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%C_ind, marbl_status_log) if (lvariable_PtoC) then write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "P" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%P_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%P_ind, marbl_status_log) end if write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Fe" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Fe_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%Fe_ind, marbl_status_log) if (autotroph_settings(n)%silicifier) then write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Si" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%Si_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%Si_ind, marbl_status_log) end if if (autotroph_settings(n)%imp_calcifier.or. & autotroph_settings(n)%exp_calcifier) then write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "CaCO3" - call this%add_tracer_index(ind_name, 'ecosys_base', this%auto_inds(n)%CaCO3_ind, marbl_status_log) + call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%CaCO3_ind, marbl_status_log) end if end do @@ -1537,7 +1537,7 @@ subroutine tracer_index_constructor(this, base_tracers_on, abio_on, ciso_on, lva end if end if - if (abio_on) then + if (abio_dic_on) then call this%add_tracer_index('abio_dic', 'abio', this%abio_dic_ind, marbl_status_log) call this%add_tracer_index('abio_di14c', 'abio', this%abio_di14c_ind, marbl_status_log) end if @@ -1557,7 +1557,7 @@ subroutine tracer_index_destructor(this) ! Zero out counts this%total_cnt = 0 - call this%ecosys_base%reset() + call this%base_bio%reset() call this%ciso%reset() ! Deallocate memory @@ -1597,10 +1597,10 @@ subroutine add_tracer_index(this, ind_name, category, ind, marbl_status_log) ind = this%total_cnt+1 select case (trim(category)) - case ('ecosys_base') - call this%ecosys_base%update_count(ind, marbl_status_log) + case ('base_bio') + call this%base_bio%update_count(ind, marbl_status_log) case ('abio') - call this%abio%update_count(ind, marbl_status_log) + call this%abio_dic%update_count(ind, marbl_status_log) case ('ciso') call this%ciso%update_count(ind, marbl_status_log) case DEFAULT @@ -1656,13 +1656,15 @@ end subroutine update_count !***************************************************************************** - subroutine surface_flux_forcing_index_constructor(this, ciso_on, lflux_gas_o2, & - lflux_gas_co2, ladjust_bury_coeff, num_surface_flux_forcing_fields) + subroutine surface_flux_forcing_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, & + lflux_gas_o2, lflux_gas_co2, ladjust_bury_coeff, num_surface_flux_forcing_fields) ! This subroutine sets the surface forcing indices, which are used to ! determine what forcing fields are required from the driver. class(marbl_surface_flux_forcing_indexing_type), intent(out) :: this + logical, intent(in) :: base_bio_on + logical, intent(in) :: abio_dic_on logical, intent(in) :: ciso_on logical, intent(in) :: lflux_gas_o2 logical, intent(in) :: lflux_gas_co2 @@ -1673,94 +1675,107 @@ subroutine surface_flux_forcing_index_constructor(this, ciso_on, lflux_gas_o2, forcing_cnt = 0 - ! ------------------------------- - ! | Always request these fields | - ! ------------------------------- + ! ------------------------------------------------------- + ! | Request these fields if abio or base tracers are on | + ! ------------------------------------------------------- - ! Square of 10m wind - forcing_cnt = forcing_cnt + 1 - this%u10_sqr_id = forcing_cnt + if (base_bio_on .or. abio_dic_on) then + ! Square of 10m wind + forcing_cnt = forcing_cnt + 1 + this%u10_sqr_id = forcing_cnt - ! Sea-surface salinity - forcing_cnt = forcing_cnt + 1 - this%sss_id = forcing_cnt + ! Sea-surface salinity + forcing_cnt = forcing_cnt + 1 + this%sss_id = forcing_cnt - ! Sea-surface temp - forcing_cnt = forcing_cnt + 1 - this%sst_id = forcing_cnt + ! Sea-surface temp + forcing_cnt = forcing_cnt + 1 + this%sst_id = forcing_cnt - ! Ice Fraction - forcing_cnt = forcing_cnt + 1 - this%ifrac_id = forcing_cnt + ! Ice Fraction + forcing_cnt = forcing_cnt + 1 + this%ifrac_id = forcing_cnt - ! Dust Flux - forcing_cnt = forcing_cnt + 1 - this%dust_flux_id = forcing_cnt + ! ------------------------------------------ + ! | Request these if gas fluxes are needed | + ! ------------------------------------------ - ! Iron Flux - forcing_cnt = forcing_cnt + 1 - this%iron_flux_id = forcing_cnt + if (lflux_gas_o2 .or. lflux_gas_co2) then + ! atm pressure + forcing_cnt = forcing_cnt + 1 + this%atm_pressure_id = forcing_cnt + end if - ! NOx Flux - forcing_cnt = forcing_cnt + 1 - this%nox_flux_id = forcing_cnt + if (lflux_gas_co2) then + ! xco2 + forcing_cnt = forcing_cnt + 1 + this%xco2_id = forcing_cnt - ! NHy Flux - forcing_cnt = forcing_cnt + 1 - this%nhy_flux_id = forcing_cnt + ! xco2_alt_co2 + if (base_bio_on) then + forcing_cnt = forcing_cnt + 1 + this%xco2_alt_co2_id = forcing_cnt + end if + end if - ! --------------------------------------------------------- - ! | Request these if bury coefficients are being adjusted | - ! --------------------------------------------------------- + end if - if (ladjust_bury_coeff) then - ! external C Flux - forcing_cnt = forcing_cnt + 1 - this%ext_C_flux_id = forcing_cnt + ! ----------------------------------------------- + ! | Request these fields if base tracers are on | + ! ----------------------------------------------- - ! external P Flux + if (base_bio_on) then + ! Dust Flux forcing_cnt = forcing_cnt + 1 - this%ext_P_flux_id = forcing_cnt + this%dust_flux_id = forcing_cnt - ! external Si Flux + ! Iron Flux forcing_cnt = forcing_cnt + 1 - this%ext_Si_flux_id = forcing_cnt - end if - - ! ------------------------------------------ - ! | Request these if gas fluxes are needed | - ! ------------------------------------------ + this%iron_flux_id = forcing_cnt - if (lflux_gas_o2.or.lflux_gas_co2) then - ! atm pressure + ! NOx Flux forcing_cnt = forcing_cnt + 1 - this%atm_pressure_id = forcing_cnt - end if + this%nox_flux_id = forcing_cnt - if (lflux_gas_co2) then - ! xco2 + ! NHy Flux forcing_cnt = forcing_cnt + 1 - this%xco2_id = forcing_cnt + this%nhy_flux_id = forcing_cnt - ! xco2_alt_co2 - forcing_cnt = forcing_cnt + 1 - this%xco2_alt_co2_id = forcing_cnt - end if + ! --------------------------------------------------------- + ! | Request these if bury coefficients are being adjusted | + ! --------------------------------------------------------- - ! ----------------------------------- - ! | Request these fields if ciso_on | - ! ----------------------------------- + if (ladjust_bury_coeff) then + ! external C Flux + forcing_cnt = forcing_cnt + 1 + this%ext_C_flux_id = forcing_cnt - if (ciso_on) then + ! external P Flux + forcing_cnt = forcing_cnt + 1 + this%ext_P_flux_id = forcing_cnt - ! d13c - forcing_cnt = forcing_cnt + 1 - this%d13c_id = forcing_cnt + ! external Si Flux + forcing_cnt = forcing_cnt + 1 + this%ext_Si_flux_id = forcing_cnt + end if + + ! ----------------------------------- + ! | Request these fields if ciso_on | + ! ----------------------------------- - ! d14c + if (ciso_on) then + + ! d13c + forcing_cnt = forcing_cnt + 1 + this%d13c_id = forcing_cnt + + end if + end if + + if (abio_dic_on .or. ciso_on) then + ! d14c forcing_cnt = forcing_cnt + 1 this%d14c_id = forcing_cnt - end if end associate @@ -1770,6 +1785,7 @@ end subroutine surface_flux_forcing_index_constructor !***************************************************************************** subroutine interior_tendency_forcing_index_constructor(this, & + base_bio_on, & tracer_names, & tracer_restore_vars, & num_PAR_subcols, & @@ -1783,6 +1799,7 @@ subroutine interior_tendency_forcing_index_constructor(this, use marbl_settings_mod, only : lp_remin_scalef class(marbl_interior_tendency_forcing_indexing_type), intent(out) :: this + logical, intent(in) :: base_bio_on character(len=char_len), dimension(:), intent(in) :: tracer_names character(len=char_len), dimension(:), intent(in) :: tracer_restore_vars integer(int_kind), intent(in) :: num_PAR_subcols @@ -1801,47 +1818,49 @@ subroutine interior_tendency_forcing_index_constructor(this, forcing_cnt = 0 - ! Dust Flux - forcing_cnt = forcing_cnt + 1 - this%dustflux_id = forcing_cnt - - ! PAR column fraction (not needed if num_PAR_subcols = 1) - if (num_PAR_subcols .gt. 1) then + if (base_bio_on) then + ! Dust Flux forcing_cnt = forcing_cnt + 1 - this%PAR_col_frac_id = forcing_cnt - end if - - ! PAR column shortwave - forcing_cnt = forcing_cnt + 1 - this%surf_shortwave_id = forcing_cnt + this%dustflux_id = forcing_cnt - ! Potential Temperature - forcing_cnt = forcing_cnt + 1 - this%potemp_id = forcing_cnt + ! PAR column fraction (not needed if num_PAR_subcols = 1) + if (num_PAR_subcols .gt. 1) then + forcing_cnt = forcing_cnt + 1 + this%PAR_col_frac_id = forcing_cnt + end if - ! Salinity - forcing_cnt = forcing_cnt + 1 - this%salinity_id = forcing_cnt + ! PAR column shortwave + forcing_cnt = forcing_cnt + 1 + this%surf_shortwave_id = forcing_cnt - ! Pressure - forcing_cnt = forcing_cnt + 1 - this%pressure_id = forcing_cnt + ! Potential Temperature + forcing_cnt = forcing_cnt + 1 + this%potemp_id = forcing_cnt - ! Iron Sediment Flux - forcing_cnt = forcing_cnt + 1 - this%fesedflux_id = forcing_cnt + ! Salinity + forcing_cnt = forcing_cnt + 1 + this%salinity_id = forcing_cnt - ! O2 Consumption Scale Factor - if (lo2_consumption_scalef) then + ! Pressure forcing_cnt = forcing_cnt + 1 - this%o2_consumption_scalef_id = forcing_cnt - endif + this%pressure_id = forcing_cnt - ! Particulate Remin Scale Factor - if (lp_remin_scalef) then + ! Iron Sediment Flux forcing_cnt = forcing_cnt + 1 - this%p_remin_scalef_id = forcing_cnt - endif + this%fesedflux_id = forcing_cnt + + ! O2 Consumption Scale Factor + if (lo2_consumption_scalef) then + forcing_cnt = forcing_cnt + 1 + this%o2_consumption_scalef_id = forcing_cnt + end if + + ! Particulate Remin Scale Factor + if (lp_remin_scalef) then + forcing_cnt = forcing_cnt + 1 + this%p_remin_scalef_id = forcing_cnt + end if + end if ! Tracer restoring ! Note that this section diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index fe5da3e5..969e36d2 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -237,15 +237,15 @@ module marbl_settings_mod character(len=char_len), target :: PFT_defaults ! Set up PFT parameters based on known classes, e.g. 'CESM2' ! (or set to 'user-specified' and use put_setting()) - logical(log_kind), target :: base_tracers_on ! control whether base tracer module is active - logical(log_kind), target :: abio_on ! control whether abio tracer module is active + logical(log_kind), target :: base_bio_on ! control whether base tracer module is active + logical(log_kind), target :: abio_dic_on ! control whether abio tracer module is active logical(log_kind), target :: ciso_on ! control whether ciso tracer module is active logical(log_kind), target :: lsource_sink ! control which portion of code is executed, useful for debugging logical(log_kind), target :: ciso_lsource_sink ! control which portion of carbon isotope code is executed, useful for debugging logical(log_kind), target :: lcheck_forcing ! control whether consistency checks are performed on forcing input logical(log_kind), target :: lecovars_full_depth_tavg ! If .false., MARBL will recommend truncating the column for some diagnostics - logical(log_kind), target :: lflux_gas_o2 ! controls which portion of code are executed usefull for debugging - logical(log_kind), target :: lflux_gas_co2 ! controls which portion of code are executed usefull for debugging + logical(log_kind), target :: lflux_gas_o2 ! controls which portion of code are executed useful for debugging + logical(log_kind), target :: lflux_gas_co2 ! controls which portion of code are executed useful for debugging logical(log_kind), target :: lcompute_nhx_surface_emis ! control if NHx emissions are computed logical(log_kind), target :: lvariable_PtoC ! control if PtoC ratios in autotroph_settings vary logical(log_kind), target :: ladjust_bury_coeff ! control if bury coefficients are adjusted (rather than constant) @@ -404,8 +404,8 @@ subroutine marbl_settings_set_defaults_general_parms(unit_system) type(unit_system_type), intent(in) :: unit_system PFT_defaults = 'CESM2' ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - base_tracers_on = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - abio_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + base_bio_on = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + abio_dic_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above ciso_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above ciso_lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above @@ -625,20 +625,20 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) category = 'config flags' ! ----------------------- - sname = 'base_tracers_on' + sname = 'base_bio_on' lname = 'Control whether base tracer module is active' units = 'unitless' datatype = 'logical' - lptr => base_tracers_on + lptr => base_bio_on call this%add_var(sname, lname, units, datatype, category, & marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'abio_on' + sname = 'abio_dic_on' lname = 'Control whether abiotic tracer module is active' units = 'unitless' datatype = 'logical' - lptr => abio_on + lptr => abio_dic_on call this%add_var(sname, lname, units, datatype, category, & marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) diff --git a/tests/driver_src/marbl.F90 b/tests/driver_src/marbl.F90 index 76916a2e..836bf0bf 100644 --- a/tests/driver_src/marbl.F90 +++ b/tests/driver_src/marbl.F90 @@ -373,6 +373,8 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log tracers requested for initialization call driver_status_log%log_header('Requested tracers', subname) + if (size(marbl_instances(1)%tracer_metadata) == 0) & + call driver_status_log%log_noerror('No tracers requested!', subname) do n=1, size(marbl_instances(1)%tracer_metadata) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%tracer_metadata(n)%short_name), ' (units: ', & @@ -390,6 +392,8 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log requested surface forcing fields call driver_status_log%log_header('Requested surface forcing fields', subname) + if (size(marbl_instances(1)%surface_flux_forcings) == 0) & + call driver_status_log%log_noerror('No forcing fields requested!', subname) do n=1,size(marbl_instances(1)%surface_flux_forcings) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%surface_flux_forcings(n)%metadata%varname), & @@ -398,12 +402,15 @@ Program marbl end do ! Log requested interior forcing fields call driver_status_log%log_header('Requested interior forcing fields', subname) + if (size(marbl_instances(1)%interior_tendency_forcings) == 0) & + call driver_status_log%log_noerror('No forcing fields requested!', subname) do n=1,size(marbl_instances(1)%interior_tendency_forcings) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%interior_tendency_forcings(n)%metadata%varname), & ' (units: ', trim(marbl_instances(1)%interior_tendency_forcings(n)%metadata%field_units),')' call driver_status_log%log_noerror(log_message, subname) end do + ! Provide message if no forcings are requested call marbl_instances(1)%shutdown() end if From 5d6d4b8472d2c8158ae2d9d89d3c7487203fb809 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 1 Sep 2023 14:29:57 -0600 Subject: [PATCH 04/64] Update consistency checks MARBL will abort in either of the following two situations: 1. user tries to run without any tracer packages (i.e. base_bio_on, abio_dic_on, and ciso_on all set to .false.) 2. user tries to run with ciso tracers but not base biotic tracers (i.e. ciso_on = .true. while base_bio_on = .false.) I also modified how init defines the ciso tracer indices; even though MARBL will not run with base_bio_on = .false. and ciso_on = .true., allowing the tracer_index_type to define the indices for the CISO tracers in that situation lets the initialization process get to the consistency check and report the actual error rather than crashing because the DI13C index is -1 --- src/marbl_interface_private_types.F90 | 50 +++++++++++++-------------- src/marbl_settings_mod.F90 | 15 ++++++-- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index bfbecb91..1151cac4 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -1509,32 +1509,32 @@ subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lva call this%add_tracer_index(ind_name, 'base_bio', this%auto_inds(n)%CaCO3_ind, marbl_status_log) end if end do + end if - if (ciso_on) then - call this%add_tracer_index('di13c', 'ciso', this%di13c_ind, marbl_status_log) - call this%add_tracer_index('do13ctot', 'ciso', this%do13ctot_ind, marbl_status_log) - call this%add_tracer_index('di14c', 'ciso', this%di14c_ind, marbl_status_log) - call this%add_tracer_index('do14ctot', 'ciso', this%do14ctot_ind, marbl_status_log) - call this%add_tracer_index('zootot13C', 'ciso', this%zootot13C_ind, marbl_status_log) - call this%add_tracer_index('zootot14C', 'ciso', this%zootot14C_ind, marbl_status_log) - - do n=1,autotroph_cnt - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C13" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C13_ind, marbl_status_log) - - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C14" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C14_ind, marbl_status_log) - - if (autotroph_settings(n)%imp_calcifier .or. & - autotroph_settings(n)%exp_calcifier) then - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca13CO3" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca13CO3_ind, marbl_status_log) - - write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca14CO3" - call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca14CO3_ind, marbl_status_log) - end if - end do - end if + if (ciso_on) then + call this%add_tracer_index('di13c', 'ciso', this%di13c_ind, marbl_status_log) + call this%add_tracer_index('do13ctot', 'ciso', this%do13ctot_ind, marbl_status_log) + call this%add_tracer_index('di14c', 'ciso', this%di14c_ind, marbl_status_log) + call this%add_tracer_index('do14ctot', 'ciso', this%do14ctot_ind, marbl_status_log) + call this%add_tracer_index('zootot13C', 'ciso', this%zootot13C_ind, marbl_status_log) + call this%add_tracer_index('zootot14C', 'ciso', this%zootot14C_ind, marbl_status_log) + + do n=1,autotroph_cnt + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C13" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C13_ind, marbl_status_log) + + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "C14" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%C14_ind, marbl_status_log) + + if (autotroph_settings(n)%imp_calcifier .or. & + autotroph_settings(n)%exp_calcifier) then + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca13CO3" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca13CO3_ind, marbl_status_log) + + write(ind_name, "(2A)") trim(autotroph_settings(n)%sname), "Ca14CO3" + call this%add_tracer_index(ind_name, 'ciso', this%auto_inds(n)%Ca14CO3_ind, marbl_status_log) + end if + end do end if if (abio_dic_on) then diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index 969e36d2..73aec7f1 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -2142,12 +2142,23 @@ subroutine marbl_settings_consistency_check(lallow_glo_ops, marbl_status_log) character(len=*), parameter :: subname = 'marbl_settings_mod:marbl_settings_consistency_check' character(len=char_len) :: log_message - ! Abort if GCM doesn't support global ops but configuration requires them + ! Abort if no tracer modules are enabled + if (.not. (base_bio_on .or. abio_dic_on .or. ciso_on)) then + write(log_message, '(A)') 'You must enable at least one tracer package in MARBL' + call marbl_status_log%log_error(log_message, subname) + end if + + ! Abort if ciso is on but base_bio is not + if (ciso_on .and. (.not.base_bio_on)) then + write(log_message, '(A)') 'You can not run with carbon isotopes without the base biotic tracers' + call marbl_status_log%log_error(log_message, subname) + end if + + ! Abort if GCM doesn't support global ops but configuration requires them if (ladjust_bury_coeff .and. (.not.lallow_glo_ops)) then write(log_message,'(2A)') 'Can not run with ladjust_bury_coeff = ', & '.true. unless GCM can perform global operations' call marbl_status_log%log_error(log_message, subname) - return end if end subroutine marbl_settings_consistency_check From 4e8098fcec51512dcc6f0cdbd69013ba9dfd790f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 7 Sep 2023 12:58:12 -0600 Subject: [PATCH 05/64] Create a couple new abio_dic modules marbl_abio_dic_surface_flux_mod contains marbl_abio_dic_surface_flux_compute(), which currently sets the abio surface fluxes to 0 and then returns (assuming abio_dic_on = .true.) but will eventually compute the correct surface fluxes. marbl_abio_dic_interior_tendency_mod contains marbl_abio_dic_interior_tendency_compute(), which doesn't really do anything but will return immediately if abio_dic_on = .false. I also added a couple of return statements so that we can run with abio_dic_on = .true. and base_bio_on = .false. without running into memory / indexing issues. This will be useful for testing the next set of commits, when we start computing surface fluxes and interior tendencies for the abio_dic tracers and when we start turning off settings / diagnostics when base_bio is turned off. --- ...it_mod.F90 => marbl_abio_dic_init_mod.F90} | 14 +++--- src/marbl_abio_dic_interior_tendency_mod.F90 | 19 ++++++++ src/marbl_abio_dic_surface_flux_mod.F90 | 43 +++++++++++++++++++ src/marbl_init_mod.F90 | 4 +- src/marbl_interior_tendency_mod.F90 | 16 ++++--- src/marbl_surface_flux_mod.F90 | 15 +++++++ tests/driver_src/marbl_io_mod.F90 | 7 +++ .../settings/marbl_with_abio_only.settings | 2 + 8 files changed, 106 insertions(+), 14 deletions(-) rename src/{marbl_abio_init_mod.F90 => marbl_abio_dic_init_mod.F90} (85%) create mode 100644 src/marbl_abio_dic_interior_tendency_mod.F90 create mode 100644 src/marbl_abio_dic_surface_flux_mod.F90 create mode 100644 tests/input_files/settings/marbl_with_abio_only.settings diff --git a/src/marbl_abio_init_mod.F90 b/src/marbl_abio_dic_init_mod.F90 similarity index 85% rename from src/marbl_abio_init_mod.F90 rename to src/marbl_abio_dic_init_mod.F90 index b9eab900..0b0d9762 100644 --- a/src/marbl_abio_init_mod.F90 +++ b/src/marbl_abio_dic_init_mod.F90 @@ -1,4 +1,4 @@ -module marbl_abio_init_mod +module marbl_abio_dic_init_mod use marbl_kinds_mod, only : int_kind use marbl_settings_mod, only : abio_dic_on @@ -8,15 +8,15 @@ module marbl_abio_init_mod implicit none private - public :: marbl_abio_init_tracer_metadata + public :: marbl_abio_dic_init_tracer_metadata contains !***************************************************************************** - subroutine marbl_abio_init_tracer_metadata(unit_system, & - marbl_tracer_indices, & - marbl_tracer_metadata) + subroutine marbl_abio_dic_init_tracer_metadata(unit_system, & + marbl_tracer_indices, & + marbl_tracer_metadata) ! Set tracer and forcing metadata use marbl_settings_mod, only : unit_system_type @@ -59,8 +59,8 @@ subroutine marbl_abio_init_tracer_metadata(unit_system, & end associate - end subroutine marbl_abio_init_tracer_metadata + end subroutine marbl_abio_dic_init_tracer_metadata !***************************************************************************** -end module marbl_abio_init_mod +end module marbl_abio_dic_init_mod diff --git a/src/marbl_abio_dic_interior_tendency_mod.F90 b/src/marbl_abio_dic_interior_tendency_mod.F90 new file mode 100644 index 00000000..a1cdefa0 --- /dev/null +++ b/src/marbl_abio_dic_interior_tendency_mod.F90 @@ -0,0 +1,19 @@ +module marbl_abio_dic_interior_tendency_mod + + use marbl_settings_mod, only : abio_dic_on + + implicit none + private + + public :: marbl_abio_dic_interior_tendency_compute + +contains + + subroutine marbl_abio_dic_interior_tendency_compute() + + ! Return immediately if not running with abiotic dic tracer module + if (.not. abio_dic_on) return + + end subroutine marbl_abio_dic_interior_tendency_compute + +end module marbl_abio_dic_interior_tendency_mod diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 new file mode 100644 index 00000000..cd620041 --- /dev/null +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -0,0 +1,43 @@ +module marbl_abio_dic_surface_flux_mod + + use marbl_kinds_mod, only : r8 + + use marbl_constants_mod, only : c0 + + use marbl_interface_private_types, only : marbl_tracer_index_type + + use marbl_settings_mod, only : abio_dic_on + + implicit none + private + + public :: marbl_abio_dic_surface_flux_compute + +contains + + subroutine marbl_abio_dic_surface_flux_compute(surface_fluxes, marbl_tracer_indices) + + + real(r8), intent(inout) :: surface_fluxes(:, :) + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + + ! Return immediately if not running with abiotic dic tracer module + if (.not. abio_dic_on) return + + associate( & + abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & + abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & + ) + + !----------------------------------------------------------------------- + ! abio fluxes initially set to 0 + !----------------------------------------------------------------------- + + surface_fluxes(:,abio_ind_beg:abio_ind_end) = c0 + + end associate + + + end subroutine marbl_abio_dic_surface_flux_compute + +end module marbl_abio_dic_surface_flux_mod diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index 043be89e..2720eef8 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -144,7 +144,7 @@ subroutine marbl_init_tracers(num_levels, & use marbl_settings_mod, only : autotroph_settings use marbl_settings_mod, only : zooplankton_settings use marbl_settings_mod, only : tracer_restore_vars - use marbl_abio_init_mod, only : marbl_abio_init_tracer_metadata + use marbl_abio_dic_init_mod, only : marbl_abio_dic_init_tracer_metadata use marbl_ciso_init_mod, only : marbl_ciso_init_tracer_metadata integer(int_kind), intent(in) :: num_levels @@ -185,7 +185,7 @@ subroutine marbl_init_tracers(num_levels, & ! Set up tracer metadata call marbl_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) - call marbl_abio_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) + call marbl_abio_dic_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) call marbl_ciso_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) ! Log what tracers are being used diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index 7f7aeec5..f5f9603d 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -40,6 +40,7 @@ module marbl_interior_tendency_mod use marbl_logging, only : marbl_log_type + use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : autotroph_cnt use marbl_settings_mod, only : zooplankton_cnt use marbl_settings_mod, only : max_grazer_prey_cnt @@ -126,6 +127,7 @@ subroutine marbl_interior_tendency_compute( & ! Compute time derivatives for ecosystem state variables use marbl_temperature, only : marbl_temperature_potemp + use marbl_abio_dic_interior_tendency_mod, only : marbl_abio_dic_interior_tendency_compute use marbl_ciso_interior_tendency_mod, only : marbl_ciso_interior_tendency_compute use marbl_diagnostics_mod , only : marbl_diagnostics_interior_tendency_compute use marbl_interface_private_types, only : marbl_internal_timers_type @@ -229,12 +231,16 @@ subroutine marbl_interior_tendency_compute( & return end if - if (.not. lsource_sink) then - !----------------------------------------------------------------------- - ! exit immediately if computations are not to be performed - !----------------------------------------------------------------------- + call marbl_abio_dic_interior_tendency_compute() + + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace(& + 'marbl_abio_dic_interior_tendency_compute()', subname) return - endif + end if + + ! Return if not using base biotic tracers or not performing computations + if (.not. (base_bio_on .and. lsource_sink)) return ! Verify forcing is consistent if (lcheck_forcing) & diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 504a2302..b3f576a1 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -85,9 +85,11 @@ subroutine marbl_surface_flux_compute( & use marbl_co2calc_mod, only : marbl_co2calc_surface use marbl_oxygen, only : o2sat_surf use marbl_nhx_surface_emis_mod, only : marbl_nhx_surface_emis_compute + use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : lcompute_nhx_surface_emis use marbl_settings_mod, only : xkw_coeff use marbl_surface_flux_share_mod, only : marbl_surface_flux_share_export_variables + use marbl_abio_dic_surface_flux_mod, only : marbl_abio_dic_surface_flux_compute use marbl_ciso_surface_flux_mod, only : marbl_ciso_surface_flux_compute use marbl_glo_avg_mod, only : glo_avg_field_ind_surface_flux_C_input use marbl_glo_avg_mod, only : glo_avg_field_ind_surface_flux_P_input @@ -180,6 +182,19 @@ subroutine marbl_surface_flux_compute( & surface_fluxes(:, :) = c0 + !----------------------------------------------------------------------- + ! Compute carbon isotopes surface fluxes + !----------------------------------------------------------------------- + + call marbl_abio_dic_surface_flux_compute( & + surface_fluxes = surface_fluxes, & + marbl_tracer_indices = marbl_tracer_indices) + + !----------------------------------------------------------------------- + + ! Return if not using base biotic tracers + if (.not. base_bio_on) return + !----------------------------------------------------------------------- ! Compute surface chlorophyll !----------------------------------------------------------------------- diff --git a/tests/driver_src/marbl_io_mod.F90 b/tests/driver_src/marbl_io_mod.F90 index 6a4c74e6..cf806d3b 100644 --- a/tests/driver_src/marbl_io_mod.F90 +++ b/tests/driver_src/marbl_io_mod.F90 @@ -615,6 +615,12 @@ subroutine get_tracer_name_file_and_scale_factor(tracer_name, tracer_name_file, case('diaz14C') tracer_name_file = 'diazC' scale_factor = c1 + case('ABIO_DIC') + tracer_name_file = 'DIC' + scale_factor = 1.025_r8 + case('ABIO_DI14C') + tracer_name_file = 'DIC' + scale_factor = 0.9225_r8 case DEFAULT write(log_message, "(3A)") "Can not read ", trim(tracer_name), " and no fallback field provided!" call driver_status_log%log_error(log_message, subname) @@ -645,6 +651,7 @@ subroutine marbl_io_read_tracers(col_id, tracer_metadata, tracers, driver_status ! Hard-code in mechanism for falling back: ! 1. read 3p1z tracers when 4p2z tracers are not available ! 2. read non-isotopic tracers when CISO tracers are not available + ! 3. read DIC when ABIO tracers are not available call get_tracer_name_file_and_scale_factor(tracer_metadata(n)%short_name, tracer_name_file, & scale_factor, driver_status_log) if (driver_status_log%labort_marbl) then diff --git a/tests/input_files/settings/marbl_with_abio_only.settings b/tests/input_files/settings/marbl_with_abio_only.settings new file mode 100644 index 00000000..aa4dabf1 --- /dev/null +++ b/tests/input_files/settings/marbl_with_abio_only.settings @@ -0,0 +1,2 @@ +abio_dic_on = .true. +base_bio_on = .false. From b746ef6b879a0e6901bbb5b674a9bc8c5f0d3f5c Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 12 Sep 2023 10:15:53 -0600 Subject: [PATCH 06/64] Clean up lsource_sink behavior If lsource_sink is false, we want to return 0s for the tendencies right away; no need to call abio routines. --- src/marbl_interior_tendency_mod.F90 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index f5f9603d..0db72c94 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -212,12 +212,11 @@ subroutine marbl_interior_tendency_compute( & ! can probably be vectorized over k and / or c! !----------------------------------------------------------------------- - ! NOTE(bja, 2015-07) interior_tendencies=0 must come before the "not - ! lsource_sink check to ensure correct answer when not doing - ! computations. - interior_tendencies(:, :) = c0 + ! Return with interior_tendencies = 0 if not performing computations + if (.not. lsource_sink) return + if (abs(c1 - sum(domain%delta_z(:) * bot_flux_to_tend(:))) > bftt_dz_sum_thres) then write(log_message, "(A, E11.3, A)") "1 - sum(bot_flux_to_tend * dz) = ", & c1 - sum(domain%delta_z(:) * bot_flux_to_tend(:)), & @@ -240,7 +239,7 @@ subroutine marbl_interior_tendency_compute( & end if ! Return if not using base biotic tracers or not performing computations - if (.not. (base_bio_on .and. lsource_sink)) return + if (.not. base_bio_on) return ! Verify forcing is consistent if (lcheck_forcing) & From 8dd636a6b583dd979087dee93ebeeeebd8556ae5 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 15 Sep 2023 09:21:24 -0600 Subject: [PATCH 07/64] marbl_abio_dic_surface_flux_compute returns fluxes First pass at the marbl_abio_dic_surface_flux_compute() so it doesn't just return 0s. Still need to compare these fluxes to those computed by the POP module. Note that I updated the saved state type to add an abiotic surface pH (and updated the internal metadata to specify the existing saved state variables were for the biotic tracers). --- src/marbl_abio_dic_surface_flux_mod.F90 | 167 +++++++++++++++++++++++- src/marbl_diagnostics_mod.F90 | 6 +- src/marbl_interface_private_types.F90 | 5 +- src/marbl_saved_state_mod.F90 | 20 ++- src/marbl_surface_flux_mod.F90 | 21 ++- 5 files changed, 198 insertions(+), 21 deletions(-) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index cd620041..fb9a3012 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -1,12 +1,34 @@ module marbl_abio_dic_surface_flux_mod + use marbl_kinds_mod, only : int_kind use marbl_kinds_mod, only : r8 use marbl_constants_mod, only : c0 + use marbl_constants_mod, only : c1 + use marbl_constants_mod, only : rho_sw + + use marbl_settings_mod, only : unit_system_type + use marbl_settings_mod, only : xkw_coeff + use marbl_settings_mod, only : del_ph + use marbl_settings_mod, only : phlo_surf_init + use marbl_settings_mod, only : phhi_surf_init + use marbl_settings_mod, only : abio_dic_on use marbl_interface_private_types, only : marbl_tracer_index_type + use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type + use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type + use marbl_interface_private_types, only : marbl_surface_flux_internal_type + use marbl_interface_private_types, only : co2calc_coeffs_type + use marbl_interface_private_types, only : co2calc_state_type - use marbl_settings_mod, only : abio_dic_on + use marbl_interface_public_types, only : marbl_saved_state_type + use marbl_interface_public_types, only : marbl_forcing_fields_type + + use marbl_co2calc_mod, only : marbl_co2calc_surface + + use marbl_schmidt_number_mod, only : schmidt_co2_surf + + use marbl_logging, only : marbl_log_type implicit none private @@ -15,18 +37,74 @@ module marbl_abio_dic_surface_flux_mod contains - subroutine marbl_abio_dic_surface_flux_compute(surface_fluxes, marbl_tracer_indices) + subroutine marbl_abio_dic_surface_flux_compute(& + num_elements, & + tracers_at_surface, & + marbl_tracer_indices, & + saved_state_ind, & + surface_flux_forcing_ind, & + surface_flux_forcings, & + unit_system, & + surface_flux_internal, & + saved_state, & + surface_fluxes, & + co2calc_coeffs, & + co2calc_state, & + marbl_status_log) + + integer(int_kind), intent(in) :: num_elements + real (r8), intent(in) :: tracers_at_surface(:,:) + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + type(marbl_surface_flux_saved_state_indexing_type), intent(in) :: saved_state_ind + type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind + type(marbl_forcing_fields_type), intent(in) :: surface_flux_forcings(:) + type(unit_system_type), intent(in) :: unit_system + type(marbl_surface_flux_internal_type), intent(inout) :: surface_flux_internal + type(marbl_saved_state_type), intent(inout) :: saved_state + real(r8), intent(inout) :: surface_fluxes(:, :) + type(co2calc_coeffs_type), intent(inout) :: co2calc_coeffs + type(co2calc_state_type), intent(inout) :: co2calc_state + type(marbl_log_type), intent(inout) :: marbl_status_log + + real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) + real(r8) :: alk(num_elements) ! local alkalinity + real(r8) :: phlo(num_elements) ! lower bound for ph in solver + real(r8) :: phhi(num_elements) ! upper bound for ph in solver + real(r8) :: SiO2(num_elements) ! Abiotic silicate + real(r8) :: PO4(num_elements) ! Abiotic phosphate + real(r8) :: R14C_ocn(num_elements) ! Rocn = DIC14/DIC + real(r8) :: R14C_atm(num_elements) ! Ratm = 1+ D14C/1000 - real(r8), intent(inout) :: surface_fluxes(:, :) - type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices - ! Return immediately if not running with abiotic dic tracer module if (.not. abio_dic_on) return - associate( & + associate(& + ! Forcing fields from GCM + ifrac => surface_flux_forcings(surface_flux_forcing_ind%ifrac_id)%field_0d, & + sst => surface_flux_forcings(surface_flux_forcing_ind%sst_id)%field_0d, & + sss => surface_flux_forcings(surface_flux_forcing_ind%sss_id)%field_0d, & + ! TODO: need to add abio_xco2_id to surface flux forcing inds + xco2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_id)%field_0d, & + ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & + u10_sqr => surface_flux_forcings(surface_flux_forcing_ind%u10_sqr_id)%field_0d, & + ! Intermediate computations (saved for diagnostics) + piston_velocity => surface_flux_internal%piston_velocity(:), & + flux_co2 => surface_flux_internal%flux_co2(:), & + co2star => surface_flux_internal%co2star(:), & + dco2star => surface_flux_internal%dco2star(:), & + pco2surf => surface_flux_internal%pco2surf(:), & + dpco2 => surface_flux_internal%dpco2(:), & + schmidt_co2 => surface_flux_internal%schmidt_co2(:), & + co3 => surface_flux_internal%co3(:), & + pv_co2 => surface_flux_internal%pv_co2(:), & + ! Saved state + ph_prev_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & + ! Tracer indices + dic_ind => marbl_tracer_indices%abio_dic_ind, & + di14c_ind => marbl_tracer_indices%abio_di14c_ind, & abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & - abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & + abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & ) !----------------------------------------------------------------------- @@ -35,6 +113,81 @@ subroutine marbl_abio_dic_surface_flux_compute(surface_fluxes, marbl_tracer_indi surface_fluxes(:,abio_ind_beg:abio_ind_end) = c0 + !----------------------------------------------------------------------- + ! Set C14 ratios + !----------------------------------------------------------------------- + where (tracers_at_surface(:,dic_ind) > c0) + R14C_ocn = tracers_at_surface(:,di14c_ind) / tracers_at_surface(:,dic_ind) + else where + R14C_ocn = c0 + end where + R14C_atm = c1 + R14C_ocn + + !----------------------------------------------------------------------- + ! Use constant concentrations of silicate and phosphate + !----------------------------------------------------------------------- + + ! These come from Orr et al. GMD 2017 + ! 7.5 nmol / g -> mmol/m3 or nmol/cm3 + SiO2 = (7.5_r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw + ! 0.5 nmol / g -> mmol/m3 or nmol/cm3 + PO4 = (0.5_r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw + + !----------------------------------------------------------------------- + ! Compute CO2 flux + !----------------------------------------------------------------------- + + piston_velocity = xkw_coeff*u10_sqr(:) + xkw_ice(:) = (c1 - ifrac(:)) * piston_velocity + schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) + pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) + + where (ph_prev_surf(:) /= c0) + phlo(:) = ph_prev_surf(:) - del_ph + phhi(:) = ph_prev_surf(:) + del_ph + elsewhere + phlo(:) = phlo_surf_init + phhi(:) = phhi_surf_init + end where + + ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g + ! and ocn_ref_salinity comes from shr_const (TODO: verify SHR_CONST_OCN_REF_SAL = 34.7) + ! Orr et al eq (27): + ! 2297 micromol / kg + ! Sbar = "global- and annual- mean salinity" + alk(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) / 34.7_r8 + + ! Note the following computes a new ph_prev_surf + ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .true., & + dic_in = tracers_at_surface(:,dic_ind), & + xco2_in = xco2(:), & + ta_in = alk(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co3 = co3(:), & + co2star = co2star, & + dco2star = dco2star, & + pco2surf = pco2surf, & + dpco2 = dpco2, & + phlo = phlo, & + phhi = phhi, & + ph = ph_prev_surf, & + marbl_status_log = marbl_status_log) + + flux_co2(:) = pv_co2(:) * dco2star(:) + surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) + surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + (flux_co2(:) * R14C_atm) & + + pv_co2(:) * co2star(:) * (R14C_atm(:) - R14C_ocn) + end associate diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 46a76f2c..1ea7c0c9 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -3319,12 +3319,12 @@ subroutine marbl_diagnostics_surface_flux_compute( & nhx_surface_emis => surface_flux_internal%nhx_surface_emis, & - ph_prev => saved_state%state(saved_state_ind%ph_surf)%field_2d, & - ph_prev_alt_co2 => saved_state%state(saved_state_ind%ph_alt_co2_surf)%field_2d, & + ph_prev => saved_state%state(saved_state_ind%base_ph_surf)%field_2d, & + ph_prev_alt_co2 => saved_state%state(saved_state_ind%base_ph_alt_co2_surf)%field_2d, & po4_ind => marbl_tracer_indices%po4_ind, & no3_ind => marbl_tracer_indices%no3_ind, & - sio3_ind => marbl_tracer_indices%sio3_ind, & + sio3_ind => marbl_tracer_indices%sio3_ind, & nh4_ind => marbl_tracer_indices%nh4_ind, & fe_ind => marbl_tracer_indices%fe_ind, & o2_ind => marbl_tracer_indices%o2_ind, & diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 1151cac4..7f9bea36 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -435,8 +435,9 @@ module marbl_interface_private_types !***************************************************************************** type, public :: marbl_surface_flux_saved_state_indexing_type - integer :: ph_surf = 0 - integer :: ph_alt_co2_surf = 0 + integer :: base_ph_surf = 0 + integer :: base_ph_alt_co2_surf = 0 + integer :: abio_ph_surf = 0 end type marbl_surface_flux_saved_state_indexing_type !***************************************************************************** diff --git a/src/marbl_saved_state_mod.F90 b/src/marbl_saved_state_mod.F90 index 222c591f..16b3c95a 100644 --- a/src/marbl_saved_state_mod.F90 +++ b/src/marbl_saved_state_mod.F90 @@ -35,25 +35,37 @@ subroutine marbl_saved_state_init(surface_state, interior_state, surf_ind, & call surface_state%construct(num_elements_surface_flux, num_levels) - lname = 'surface pH' + lname = 'surface pH for base biotic tracers' sname = 'PH_SURF' units = 'pH' vgrid = 'none' rank = 2 call surface_state%add_state(lname, sname, units, vgrid, rank, & - surf_ind%ph_surf, marbl_status_log) + surf_ind%base_ph_surf, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("add_state(PH_SURF)", subname) return end if - lname = 'surface pH (alternate CO2)' + lname = 'surface pH for abiotic tracers' + sname = 'ABIO_PH_SURF' + units = 'pH' + vgrid = 'none' + rank = 2 + call surface_state%add_state(lname, sname, units, vgrid, rank, & + surf_ind%abio_ph_surf, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace("add_state(ABIO_PH_SURF)", subname) + return + end if + + lname = 'surface pH for base biotic tracers (alternate CO2)' sname = 'PH_SURF_ALT_CO2' units = 'pH' vgrid = 'none' rank = 2 call surface_state%add_state(lname, sname, units, vgrid, rank, & - surf_ind%ph_alt_co2_surf, marbl_status_log) + surf_ind%base_ph_alt_co2_surf, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("add_state(PH_SURF_ALT_CO2)", subname) return diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index b3f576a1..a86437a6 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -161,8 +161,8 @@ subroutine marbl_surface_flux_compute( & flux_alt_co2 => surface_flux_internal%flux_alt_co2(:), & nhx_surface_emis => surface_flux_internal%nhx_surface_emis(:), & - ph_prev_surf => saved_state%state(saved_state_ind%ph_surf)%field_2d, & - ph_prev_alt_co2_surf => saved_state%state(saved_state_ind%ph_alt_co2_surf)%field_2d, & + ph_prev_surf => saved_state%state(saved_state_ind%base_ph_surf)%field_2d, & + ph_prev_alt_co2_surf => saved_state%state(saved_state_ind%base_ph_alt_co2_surf)%field_2d, & po4_ind => marbl_tracer_indices%po4_ind, & no3_ind => marbl_tracer_indices%no3_ind, & @@ -186,9 +186,20 @@ subroutine marbl_surface_flux_compute( & ! Compute carbon isotopes surface fluxes !----------------------------------------------------------------------- - call marbl_abio_dic_surface_flux_compute( & - surface_fluxes = surface_fluxes, & - marbl_tracer_indices = marbl_tracer_indices) + call marbl_abio_dic_surface_flux_compute(& + num_elements = num_elements, & + tracers_at_surface = tracers_at_surface, & + marbl_tracer_indices = marbl_tracer_indices, & + saved_state_ind = saved_state_ind, & + surface_flux_forcing_ind = surface_flux_forcing_ind, & + surface_flux_forcings = surface_flux_forcings, & + unit_system = unit_system, & + surface_flux_internal = surface_flux_internal, & + saved_state = saved_state, & + surface_fluxes = surface_fluxes, & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + marbl_status_log = marbl_status_log) !----------------------------------------------------------------------- From c59cbe0cce0c7159036878bfad835f1fd43b30a1 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 15 Sep 2023 10:29:57 -0600 Subject: [PATCH 08/64] Return abio tendencies marbl_abio_dic_interior_tendency_compute() returns tendencies. I also cleaned up how the CISO module handles C14 decay, because those terms are also needed in the abio module. --- src/marbl_abio_dic_interior_tendency_mod.F90 | 28 ++++++++++++++- src/marbl_abio_dic_surface_flux_mod.F90 | 2 +- src/marbl_ciso_interior_tendency_mod.F90 | 36 ++++++-------------- src/marbl_constants_mod.F90 | 4 +-- src/marbl_interior_tendency_mod.F90 | 29 +++++++++++----- 5 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/marbl_abio_dic_interior_tendency_mod.F90 b/src/marbl_abio_dic_interior_tendency_mod.F90 index a1cdefa0..c78ec24a 100644 --- a/src/marbl_abio_dic_interior_tendency_mod.F90 +++ b/src/marbl_abio_dic_interior_tendency_mod.F90 @@ -1,7 +1,14 @@ module marbl_abio_dic_interior_tendency_mod + use marbl_kinds_mod, only : r8 + + use marbl_constants_mod, only : c0 + use marbl_constants_mod, only : c14_lambda + use marbl_settings_mod, only : abio_dic_on + use marbl_interface_private_types, only : marbl_tracer_index_type + implicit none private @@ -9,11 +16,30 @@ module marbl_abio_dic_interior_tendency_mod contains - subroutine marbl_abio_dic_interior_tendency_compute() + subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, tracer_local, interior_tendencies) + + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + real (r8), intent(in) :: tracer_local(:,:) + real(r8), intent(inout) :: interior_tendencies(:,:) ! (tracer_cnt, km) computed source/sink terms + ! Return immediately if not running with abiotic dic tracer module if (.not. abio_dic_on) return + associate(& + ! Tracer + di14c => tracer_local(marbl_tracer_indices%abio_di14c_ind, :), & + ! Tracer indices + di14c_ind => marbl_tracer_indices%abio_di14c_ind, & + abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & + abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & + ) + + interior_tendencies(abio_ind_beg:abio_ind_end, :) = c0 + interior_tendencies(di14c_ind, :) = -c14_lambda * di14c(:) + + end associate + end subroutine marbl_abio_dic_interior_tendency_compute end module marbl_abio_dic_interior_tendency_mod diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index fb9a3012..dbee3e88 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -151,7 +151,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& end where ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g - ! and ocn_ref_salinity comes from shr_const (TODO: verify SHR_CONST_OCN_REF_SAL = 34.7) + ! and ocn_ref_salinity comes from shr_const (SHR_CONST_OCN_REF_SAL = 34.7) ! Orr et al eq (27): ! 2297 micromol / kg ! Sbar = "global- and annual- mean salinity" diff --git a/src/marbl_ciso_interior_tendency_mod.F90 b/src/marbl_ciso_interior_tendency_mod.F90 index d4b8d888..8f6ac1ec 100644 --- a/src/marbl_ciso_interior_tendency_mod.F90 +++ b/src/marbl_ciso_interior_tendency_mod.F90 @@ -9,6 +9,7 @@ module marbl_ciso_interior_tendency_mod use marbl_constants_mod, only : c2 use marbl_constants_mod, only : c1000 use marbl_constants_mod, only : mpercm + use marbl_constants_mod, only : c14_lambda use marbl_settings_mod, only : autotroph_cnt use marbl_settings_mod, only : autotroph_settings @@ -34,13 +35,6 @@ module marbl_ciso_interior_tendency_mod public :: marbl_ciso_interior_tendency_compute public :: marbl_ciso_interior_tendency_autotroph_zero_consistency_enforce - !----------------------------------------------------------------------- - ! scalar constants for 14C decay calculation - !----------------------------------------------------------------------- - - real (r8), parameter :: c14_halflife_years = 5730.0_r8 !C14 half file - real (r8) :: c14_lambda_inv_sec ! Decay variable in seconds - contains !*********************************************************************** @@ -70,7 +64,6 @@ subroutine marbl_ciso_interior_tendency_compute( & use marbl_constants_mod, only : R13C_std use marbl_constants_mod, only : R14C_std use marbl_constants_mod, only : spd - use marbl_constants_mod, only : spy use marbl_ciso_diagnostics_mod, only : store_diagnostics_ciso_interior type(marbl_domain_type), intent(in) :: marbl_domain @@ -242,13 +235,6 @@ subroutine marbl_ciso_interior_tendency_compute( & call P_Ca13CO3%construct(num_levels=column_km) call P_Ca14CO3%construct(num_levels=column_km) - !----------------------------------------------------------------------- - ! Set module variables - !----------------------------------------------------------------------- - - ! Define decay variable for DI14C, using earlier defined half-life of 14C - c14_lambda_inv_sec = log(c2) / (c14_halflife_years * spy) - !---------------------------------------------------------------------------------------- ! Set cell attributes !---------------------------------------------------------------------------------------- @@ -586,9 +572,9 @@ subroutine marbl_ciso_interior_tendency_compute( & n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind interior_tendencies(n,k) = photo14C(auto_ind,k) - work1 * R14C_autotroph(auto_ind,k) - & - c14_lambda_inv_sec * autotroph_local%C14(auto_ind,k) + c14_lambda * autotroph_local%C14(auto_ind,k) - decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda_inv_sec * autotroph_local%C14(auto_ind,k) + decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda * autotroph_local%C14(auto_ind,k) n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind if (n > 0) then @@ -600,9 +586,9 @@ subroutine marbl_ciso_interior_tendency_compute( & if (n > 0) then interior_tendencies(n,k) = Ca14CO3_PROD(auto_ind,k) - QCaCO3(auto_ind,k) & * work1 * R14C_autotrophCaCO3(auto_ind,k) & - - c14_lambda_inv_sec * autotroph_local%Ca14CO3(auto_ind,k) + - c14_lambda * autotroph_local%Ca14CO3(auto_ind,k) - decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda_inv_sec * autotroph_local%Ca14CO3(auto_ind,k) + decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda * autotroph_local%Ca14CO3(auto_ind,k) endif end do @@ -618,9 +604,9 @@ subroutine marbl_ciso_interior_tendency_compute( & interior_tendencies(zootot14C_ind,k) = & sum(auto_graze_zoo(:,k) * R14C_autotroph(:,k),dim=1) & + (zootot_graze_zoo(k) - zootot_graze(k) - zootot_loss(k)) & - * R14C_zoototC(k) - c14_lambda_inv_sec * zootot14C_loc(k) + * R14C_zoototC(k) - c14_lambda * zootot14C_loc(k) - decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda_inv_sec * zootot14C_loc(k) + decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda * zootot14C_loc(k) !----------------------------------------------------------------------- ! interior_tendencies: dissolved organic Matter 13C and 14C @@ -628,9 +614,9 @@ subroutine marbl_ciso_interior_tendency_compute( & interior_tendencies(do13ctot_ind,k) = DO13Ctot_prod(k) - DO13Ctot_remin(k) - interior_tendencies(do14ctot_ind,k) = DO14Ctot_prod(k) - DO14Ctot_remin(k) - c14_lambda_inv_sec * DO14Ctot_loc(k) + interior_tendencies(do14ctot_ind,k) = DO14Ctot_prod(k) - DO14Ctot_remin(k) - c14_lambda * DO14Ctot_loc(k) - decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda_inv_sec * DO14Ctot_loc(k) + decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda * DO14Ctot_loc(k) !----------------------------------------------------------------------- ! interior_tendencies: dissolved inorganic Carbon 13 and 14 @@ -649,9 +635,9 @@ subroutine marbl_ciso_interior_tendency_compute( & + DO14Ctot_remin(k) + PO14C%remin(k) & + (zootot_loss_dic(k) + zootot_graze_dic(k)) * R14C_zoototC(k) & + P_Ca14CO3%remin(k) & - - c14_lambda_inv_sec * DI14C_loc(k) + - c14_lambda * DI14C_loc(k) - decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda_inv_sec * DI14C_loc(k) + decay_14Ctot(k) = decay_14Ctot(k) + c14_lambda * DI14C_loc(k) do auto_ind = 1, autotroph_cnt if (marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind > 0) then diff --git a/src/marbl_constants_mod.F90 b/src/marbl_constants_mod.F90 index d8c6bcd5..917ddca5 100644 --- a/src/marbl_constants_mod.F90 +++ b/src/marbl_constants_mod.F90 @@ -61,8 +61,8 @@ module marbl_constants_mod molw_P = 30.974_r8, & ! molecular weight of phosphorus (gP / mol P) molw_Si = 28.085_r8, & ! molecular weight of silicon (gSi / mol Si) R13C_std = 1.0_r8, & ! actual 13C/12C PDB standard ratio (Craig, 1957) = 1123.72e-5_r8 - R14C_std = 1.0_r8 ! actual 14C/12C NOSAMS standard ratio = 11.76e-13_r8 - + R14C_std = 1.0_r8, & ! actual 14C/12C NOSAMS standard ratio = 11.76e-13_r8 + c14_lambda = log(c2) / (5730.0_r8 * spy) ! C14 decay factor (1/sec); note halflife of 5730 years !--------------------------------------------------------------------- ! Physical constants that need to be set after unit system ! has been chosen diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index 0db72c94..2a713808 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -230,7 +230,21 @@ subroutine marbl_interior_tendency_compute( & return end if - call marbl_abio_dic_interior_tendency_compute() + !----------------------------------------------------------------------- + ! create local copies of model tracers + !----------------------------------------------------------------------- + + call setup_local_tracers(domain%kmt, marbl_tracer_indices, tracers(:,:), autotroph_local, & + tracer_local(:,:), zooplankton_local, totalChl_local) + + !----------------------------------------------------------------------- + ! Compute tendencies for abiotic tracers + !----------------------------------------------------------------------- + + call marbl_abio_dic_interior_tendency_compute(& + marbl_tracer_indices = marbl_tracer_indices, & + tracer_local = tracer_local, & + interior_tendencies = interior_tendencies) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace(& @@ -324,13 +338,6 @@ subroutine marbl_interior_tendency_compute( & interior_tendency_forcing_indices, & interior_restore) - !----------------------------------------------------------------------- - ! create local copies of model tracers - !----------------------------------------------------------------------- - - call setup_local_tracers(kmt, marbl_tracer_indices, tracers(:,:), autotroph_local, & - tracer_local(:,:), zooplankton_local, totalChl_local) - call set_surface_particulate_terms(surface_flux_forcing_indices, unit_system, POC, POP, & P_CaCO3, P_CaCO3_ALT_CO2, P_SiO2, dust, P_iron, QA_dust_def(:), dust_flux_in) @@ -826,7 +833,11 @@ subroutine setup_local_tracers(column_kmt, marbl_tracer_indices, tracers, & call autotroph_zero_consistency_enforce(column_kmt, marbl_tracer_indices, autotroph_local) ! set totalChl_local - totalChl_local = sum(autotroph_local%Chl(:,:), dim=1) + if (autotroph_cnt > 0) then + totalChl_local = sum(autotroph_local%Chl(:,:), dim=1) + else + totalChl_local = c0 + end if end subroutine setup_local_tracers From feb15e6756f41ec785489e46f7fdcb7dd5b3c675 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 15 Sep 2023 10:49:16 -0600 Subject: [PATCH 09/64] Clean up bot_flux_to_tend in driver I don't know how the test suite didn't catch this, but the local bot_flux_to_tend was the wrong type and never actually used. --- .../marbl_call_compute_subroutines_drv.F90 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/driver_src/marbl_call_compute_subroutines_drv.F90 b/tests/driver_src/marbl_call_compute_subroutines_drv.F90 index cee14855..37ed82fc 100644 --- a/tests/driver_src/marbl_call_compute_subroutines_drv.F90 +++ b/tests/driver_src/marbl_call_compute_subroutines_drv.F90 @@ -1,5 +1,6 @@ module marbl_call_compute_subroutines_drv + use marbl_constants_mod, only : c0 use marbl_interface, only : marbl_interface_class use marbl_kinds_mod, only : r8, char_len use marbl_logging, only : marbl_log_type @@ -42,7 +43,7 @@ subroutine test(marbl_instances, hist_file, unit_system_opt, driver_status_log) real(r8), allocatable, dimension(:,:) :: surface_flux_output ! num_cols x num_vars real(r8), allocatable, dimension(:,:,:) :: interior_tendencies ! num_tracers x num_levels x num_cols real(r8), allocatable, dimension(:,:) :: total_Chl ! num_levels x num_cols - type(forcing_fields_type), allocatable, dimension(:) :: bot_flux_to_tend ! num_levels + real(r8), allocatable, dimension(:,:) :: bot_flux_to_tend ! num_levels x num_cols real(r8), allocatable, dimension(:,:,:) :: tracer_initial_vals ! num_tracers x num_levels x num_cols real(r8), allocatable, dimension(:) :: lat ! num_cols type(forcing_fields_type), allocatable, dimension(:) :: surface_flux_forcings ! num_forcings @@ -129,7 +130,10 @@ subroutine test(marbl_instances, hist_file, unit_system_opt, driver_status_log) ! as well as fields that driver reads (forcing fields) allocate(surface_fluxes(num_cols, num_tracers)) allocate(interior_tendencies(num_tracers, num_levels, num_cols)) - allocate(bot_flux_to_tend(num_levels)) + allocate(bot_flux_to_tend(num_levels, num_cols), source=c0) + do col_id = 1, num_cols + bot_flux_to_tend(active_level_cnt(col_id),col_id) = 1._r8 / grid_data%delta_z(active_level_cnt(col_id)) + end do allocate(tracer_initial_vals(num_tracers, num_levels, num_cols)) allocate(surface_flux_forcings(size(marbl_instances(1)%surface_flux_forcings))) allocate(interior_tendency_forcings(size(marbl_instances(1)%interior_tendency_forcings))) @@ -213,7 +217,7 @@ subroutine test(marbl_instances, hist_file, unit_system_opt, driver_status_log) ! (d) populate marbl_instances(n)%surface_flux_saved_state (with 0s) do m=1, size(marbl_instances(n)%surface_flux_saved_state%state) - marbl_instances(n)%surface_flux_saved_state%state(m)%field_2d(:) = 0._r8 + marbl_instances(n)%surface_flux_saved_state%state(m)%field_2d(:) = c0 end do ! (e) call surface_flux_compute() @@ -266,15 +270,14 @@ subroutine test(marbl_instances, hist_file, unit_system_opt, driver_status_log) ! (e) populate marbl_instances(n)%interior_tendency_saved_state (with 0s) do m=1, size(marbl_instances(n)%interior_tendency_saved_state%state) if (allocated(marbl_instances(n)%interior_tendency_saved_state%state(m)%field_2d)) then - marbl_instances(n)%interior_tendency_saved_state%state(m)%field_2d(:) = 0._r8 + marbl_instances(n)%interior_tendency_saved_state%state(m)%field_2d(:) = c0 else - marbl_instances(n)%interior_tendency_saved_state%state(m)%field_3d(:,1) = 0._r8 + marbl_instances(n)%interior_tendency_saved_state%state(m)%field_3d(:,1) = c0 end if end do ! (f) set bot_flux_to_tend(:) [1/dz in level kmt, 0 elsewhere] - marbl_instances(n)%bot_flux_to_tend(:) = 0._r8 - marbl_instances(n)%bot_flux_to_tend(active_level_cnt(col_id)) = 1._r8 / grid_data%delta_z(active_level_cnt(col_id)) + marbl_instances(n)%bot_flux_to_tend(:) = bot_flux_to_tend(:,col_id) ! (g) call interior_tendency_compute() call marbl_instances(n)%interior_tendency_compute() From 96796db3b59f08a2ef2194adb0b55bd826e9ef1e Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Sat, 16 Sep 2023 08:50:19 -0600 Subject: [PATCH 10/64] A little clean-up in abio module, still not right Updated some of the scripts to get base biotic diagnostics right when running in cgs (was creating CaCO3_FLUX_10000m instead of _100m). Also updated the R14C_atm computation, but there are still differences in the first time step when comparing MARBL abio to POP; I think something funny is happening with ice fraction, because STF maps show large differences in the polar regions. --- MARBL_tools/MARBL_diagnostics_file_class.py | 4 ++-- MARBL_tools/MARBL_settings_file_class.py | 11 ++++++---- MARBL_tools/MARBL_share.py | 7 ++++-- src/marbl_abio_dic_surface_flux_mod.F90 | 24 +++++++++++---------- src/marbl_init_mod.F90 | 2 +- 5 files changed, 28 insertions(+), 20 deletions(-) diff --git a/MARBL_tools/MARBL_diagnostics_file_class.py b/MARBL_tools/MARBL_diagnostics_file_class.py index 1eadde4f..1db85b91 100644 --- a/MARBL_tools/MARBL_diagnostics_file_class.py +++ b/MARBL_tools/MARBL_diagnostics_file_class.py @@ -15,7 +15,7 @@ class MARBL_diagnostics_class(object): # CONSTRUCTOR # ############### - def __init__(self, default_diagnostics_file, MARBL_settings): + def __init__(self, default_diagnostics_file, MARBL_settings, unit_system): """ Class constructor: read the JSON file and then construct self.diagnostics_dict """ @@ -44,7 +44,7 @@ def __init__(self, default_diagnostics_file, MARBL_settings): self.diagnostics_dict[diag_name] = dict(self._diagnostics[diag_name]) else: # (Also determine correct frequency if 'frequency' is a dict) - self.diagnostics_dict.update(MARBL_tools.expand_template_value(diag_name, MARBL_settings, self._diagnostics[diag_name], check_freq=True)) + self.diagnostics_dict.update(MARBL_tools.expand_template_value(diag_name, MARBL_settings, unit_system, self._diagnostics[diag_name], check_freq=True)) # ii. Delete diagnostics where dependencies are not met # (Some diagnostics have already been removed via expand_template_value()) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index beada5ce..2fe1b2a5 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -51,7 +51,7 @@ def __init__(self, default_settings_file, saved_state_vars_source="settings_file # 5b. Need tracer count after determining PFT_derived_types, which means # determining which tracers are active if cat_name == "PFT_derived_types": - self.tracers_dict = self._get_tracers() + self.tracers_dict = self._get_tracers(unit_system) # 6. Abort if not all values from input file were processed # (That implies at least one variable from input file was not recognized) @@ -180,7 +180,7 @@ def get_settings_dict_variable_names(self, subcategory): ################################################################################ - def _get_tracers(self): + def _get_tracers(self, unit_system): """ Parses self._settings['_tracer_list'] to determine what tracers are enabled given other MARBL settings """ @@ -196,7 +196,7 @@ def _get_tracers(self): if re.search('\(\(.*\)\)', tracer_name) == None: tracer_dict[tracer_name] = dict(self._settings['_tracer_list'][tracer_name]) else: - tracer_dict.update(MARBL_tools.expand_template_value(tracer_name, self, self._settings['_tracer_list'][tracer_name])) + tracer_dict.update(MARBL_tools.expand_template_value(tracer_name, self, unit_system, self._settings['_tracer_list'][tracer_name])) # 2. Delete tracers where dependencies are not met # (Some tracers have already been removed via expand_template_value()) @@ -207,7 +207,10 @@ def _get_tracers(self): # 3. Add tend_units and flux_units to dictionary tracer_dict[tracer_name][u'tend_units'] = tracer_dict[tracer_name]['units'] + '/s' - tracer_dict[tracer_name][u'flux_units'] = tracer_dict[tracer_name]['units'] + ' cm/s' + if unit_system == 'cgs': + tracer_dict[tracer_name][u'flux_units'] = tracer_dict[tracer_name]['units'] + ' cm/s' + else: + tracer_dict[tracer_name][u'flux_units'] = tracer_dict[tracer_name]['units'] + ' m/s' for tracer_name in tracers_to_delete: del tracer_dict[tracer_name] diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 6891baeb..7000ef35 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -30,7 +30,7 @@ def natural_sort_key(string_): ################################################################################ -def expand_template_value(key_name, MARBL_settings, unprocessed_dict, check_freq=False): +def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dict, check_freq=False): """ unprocessed_dict is a dictionary whose keys / values have templated strings (e.g. strings that depend on tracer name or PFT name). This subroutine replaces the templated values and adds the appropriate entry / entries to processed_dict @@ -67,7 +67,10 @@ def expand_template_value(key_name, MARBL_settings, unprocessed_dict, check_freq fill_source = 'zoo_graze_zoo' elif template == '((particulate_flux_ref_depth_str))': fill_source = 'strings' - particulate_flux_ref_depth_str = '%dm' % MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + particulate_flux_ref_depth = MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + if unit_system == 'cgs': + particulate_flux_ref_depth = particulate_flux_ref_depth / 100. + particulate_flux_ref_depth_str = '%dm' % particulate_flux_ref_depth loop_for_replacement = [ particulate_flux_ref_depth_str ] else: logger.error("%s is not a valid template value" % template) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index dbee3e88..3eb0d35c 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -66,14 +66,15 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(co2calc_state_type), intent(inout) :: co2calc_state type(marbl_log_type), intent(inout) :: marbl_status_log - real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) - real(r8) :: alk(num_elements) ! local alkalinity - real(r8) :: phlo(num_elements) ! lower bound for ph in solver - real(r8) :: phhi(num_elements) ! upper bound for ph in solver - real(r8) :: SiO2(num_elements) ! Abiotic silicate - real(r8) :: PO4(num_elements) ! Abiotic phosphate - real(r8) :: R14C_ocn(num_elements) ! Rocn = DIC14/DIC - real(r8) :: R14C_atm(num_elements) ! Ratm = 1+ D14C/1000 + real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) + real(r8) :: alk(num_elements) ! local alkalinity + real(r8) :: phlo(num_elements) ! lower bound for ph in solver + real(r8) :: phhi(num_elements) ! upper bound for ph in solver + real(r8) :: SiO2(num_elements) ! Abiotic silicate + real(r8) :: PO4(num_elements) ! Abiotic phosphate + real(r8) :: R14C_ocn(num_elements) ! Rocn = DIC14/DIC + real(r8) :: R14C_atm(num_elements) ! Ratm = 1+ D14C/1000 + real(r8) :: flux14_co2(num_elements) ! Isotopic gas flux ! Return immediately if not running with abiotic dic tracer module @@ -88,6 +89,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& xco2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_id)%field_0d, & ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & u10_sqr => surface_flux_forcings(surface_flux_forcing_ind%u10_sqr_id)%field_0d, & + d14c => surface_flux_forcings(surface_flux_forcing_ind%d14c_id)%field_0d, & ! Intermediate computations (saved for diagnostics) piston_velocity => surface_flux_internal%piston_velocity(:), & flux_co2 => surface_flux_internal%flux_co2(:), & @@ -121,7 +123,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& else where R14C_ocn = c0 end where - R14C_atm = c1 + R14C_ocn + R14C_atm = c1 + d14c(:) / 1000._r8 !----------------------------------------------------------------------- ! Use constant concentrations of silicate and phosphate @@ -184,9 +186,9 @@ subroutine marbl_abio_dic_surface_flux_compute(& marbl_status_log = marbl_status_log) flux_co2(:) = pv_co2(:) * dco2star(:) + flux14_co2(:) = pv_co2(:) * ((dco2star(:) + co2star(:)) * R14C_atm(:) - co2star(:) * R14C_ocn(:)) surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) - surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + (flux_co2(:) * R14C_atm) & - + pv_co2(:) * co2star(:) * (R14C_atm(:) - R14C_ocn) + surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + flux14_co2(:) end associate diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index 2720eef8..af08154f 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -248,7 +248,7 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t if (.not. base_bio_on) return marbl_tracer_metadata(:)%lfull_depth_tavg = .true. - marbl_tracer_metadata(:)%tracer_module_name = 'ecosys' + marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' call marbl_init_non_autotroph_tracers_metadata(marbl_tracer_metadata, & marbl_tracer_indices, unit_system) From 652c150bc342e1d13773b7f117fe6da9b8f39b62 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Sat, 16 Sep 2023 09:51:39 -0600 Subject: [PATCH 11/64] Add unit system to diagnostic script MARBL_generate_diagnostics_file.py needs to pass unit system to the settings_class and diagnostics_class --- MARBL_tools/MARBL_generate_diagnostics_file.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/MARBL_tools/MARBL_generate_diagnostics_file.py b/MARBL_tools/MARBL_generate_diagnostics_file.py index cf1564e3..4b66b8a7 100755 --- a/MARBL_tools/MARBL_generate_diagnostics_file.py +++ b/MARBL_tools/MARBL_generate_diagnostics_file.py @@ -40,7 +40,9 @@ (default: None) -o DIAGNOSTICS_FILE_OUT, --diagnostics_file_out DIAGNOSTICS_FILE_OUT Name of file to be written (default: marbl.diags) - + -u {cgs,mks}, --unit_system {cgs,mks} + Unit system for parameter values (default: cgs) + -a, --append Append to existing diagnostics file (default: False) """ ####################################### @@ -129,9 +131,14 @@ def _parse_args(marbl_root): parser.add_argument('-o', '--diagnostics_file_out', action='store', dest='diagnostics_file_out', default='marbl.diags', help='Name of file to be written') + # Command line argument to where to write the settings file being generated + parser.add_argument('-u', '--unit_system', action='store', dest='unit_system', default='cgs', + choices=['cgs', 'mks'], help='Unit system for parameter values') + # Append to existing diagnostics file? parser.add_argument('-a', '--append', action='store_true', dest='append', help='Append to existing diagnostics file') + return parser.parse_args() ####################################### @@ -151,8 +158,8 @@ def _parse_args(marbl_root): from MARBL_tools import MARBL_settings_class from MARBL_tools import MARBL_diagnostics_class - DefaultSettings = MARBL_settings_class(args.default_settings_file, args.saved_state_vars_source, args.grid, args.settings_file_in) - MARBL_diagnostics = MARBL_diagnostics_class(args.default_diagnostics_file, DefaultSettings) + DefaultSettings = MARBL_settings_class(args.default_settings_file, args.saved_state_vars_source, args.grid, args.settings_file_in, args.unit_system) + MARBL_diagnostics = MARBL_diagnostics_class(args.default_diagnostics_file, DefaultSettings, args.unit_system) # Write the diagnostic file generate_diagnostics_file(MARBL_diagnostics, args.diagnostics_file_out, args.append) From c064bad96a05b1bcedb271278d2f9963a1d6f858 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Sat, 16 Sep 2023 10:35:34 -0600 Subject: [PATCH 12/64] Add some ABIO diagnostics Starting with just a handful of the diagnostics provided by POP while I investigate differences between POP's abio_dic_dic14 module and the new abio_dic module in MARBL Also changed the long name of a couple of the existing ECOSYS_ diagnostics to clarify they are only used by the base biotic module --- defaults/diagnostics_latest.yaml | 68 +++++++- defaults/json/diagnostics_latest.json | 76 ++++++++- src/marbl_abio_dic_diagnostics_mod.F90 | 197 ++++++++++++++++++++++++ src/marbl_abio_dic_surface_flux_mod.F90 | 50 ++++-- src/marbl_diagnostics_mod.F90 | 17 +- src/marbl_interface_private_types.F90 | 8 + src/marbl_surface_flux_mod.F90 | 1 + 7 files changed, 392 insertions(+), 25 deletions(-) create mode 100644 src/marbl_abio_dic_diagnostics_mod.F90 diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index a30f3322..80b12095 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -22,7 +22,7 @@ ############### ECOSYS_IFRAC : - longname : Ice Fraction for ecosys fluxes # Want more consistent capitalization + longname : Ice Fraction for base biotic tracer fluxes # Want more consistent capitalization units : fraction vertical_grid : none frequency : @@ -32,7 +32,7 @@ ECOSYS_IFRAC : - average - average ECOSYS_XKW : - longname : XKW for ecosys fluxes # Want more consistent capitalization + longname : XKW for base biotic tracer fluxes # Want more consistent capitalization units : cm/s vertical_grid : none frequency : @@ -42,7 +42,7 @@ ECOSYS_XKW : - average - average ECOSYS_ATM_PRESS : - longname : Atmospheric Pressure for ecosys fluxes # Want more consistent capitalization + longname : Atmospheric Pressure for base biotic tracer fluxes # Want more consistent capitalization units : atmospheres vertical_grid : none frequency : medium @@ -1055,6 +1055,68 @@ Nfix : frequency : never operator : average +############### +# abio module # +############### + +# 2D fields +ABIO_IFRAC : + dependencies : + abio_dic_on : .true. + longname : Ice Fraction for Abiotic DIC tracer fluxes + units : fraction + vertical_grid : none + frequency : medium + operator : average +ABIO_XKW : + dependencies : + abio_dic_on : .true. + longname : XKW for Abiotic DIC tracer fluxes + units : cm/s + vertical_grid : none + frequency : medium + operator : average +ABIO_ALK_SURF : + dependencies : + abio_dic_on : .true. + longname : Surface Alkalinity for Abiotic DIC tracer fluxes + units : meq/m^3 + vertical_grid : none + frequency : medium + operator : average +ABIO_pCO2 : + dependencies : + abio_dic_on : .true. + longname : CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes + units : ppm + vertical_grid : none + frequency : medium + operator : average +ABIO_pCO2SURF : + dependencies : + abio_dic_on : .true. + longname : Surface pCO2 for Abiotic DIC tracer fluxes + units : ppmv + vertical_grid : none + frequency : medium + operator : average +ABIO_DCO2STAR : + dependencies : + abio_dic_on : .true. + longname : D CO2 Star for Abiotic DIC tracer fluxes + units : mmol/m^3 + vertical_grid : none + frequency : medium + operator : average +ABIO_CO2STAR : + dependencies : + abio_dic_on : .true. + longname : CO2 Star for Abiotic DIC tracer fluxes + units : mmol/m^3 + vertical_grid : none + frequency : medium + operator : average + ############### # ciso module # ############### diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 33cac2cf..8487327b 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -358,6 +358,76 @@ "units": "mmol/m^3 cm/s", "vertical_grid": "none" }, + "ABIO_ALK_SURF": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface Alkalinity for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "meq/m^3", + "vertical_grid": "none" + }, + "ABIO_CO2STAR": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "CO2 Star for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "mmol/m^3", + "vertical_grid": "none" + }, + "ABIO_DCO2STAR": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "D CO2 Star for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "mmol/m^3", + "vertical_grid": "none" + }, + "ABIO_IFRAC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Ice Fraction for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "fraction", + "vertical_grid": "none" + }, + "ABIO_XKW": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "XKW for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "cm/s", + "vertical_grid": "none" + }, + "ABIO_pCO2": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "ppm", + "vertical_grid": "none" + }, + "ABIO_pCO2SURF": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface pCO2 for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "ppmv", + "vertical_grid": "none" + }, "AOU": { "frequency": "medium", "longname": "Apparent O2 Utilization", @@ -1291,7 +1361,7 @@ }, "ECOSYS_ATM_PRESS": { "frequency": "medium", - "longname": "Atmospheric Pressure for ecosys fluxes", + "longname": "Atmospheric Pressure for base biotic tracer fluxes", "operator": "average", "units": "atmospheres", "vertical_grid": "none" @@ -1301,7 +1371,7 @@ "medium", "high" ], - "longname": "Ice Fraction for ecosys fluxes", + "longname": "Ice Fraction for base biotic tracer fluxes", "operator": [ "average", "average" @@ -1314,7 +1384,7 @@ "medium", "high" ], - "longname": "XKW for ecosys fluxes", + "longname": "XKW for base biotic tracer fluxes", "operator": [ "average", "average" diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 new file mode 100644 index 00000000..90b13af3 --- /dev/null +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -0,0 +1,197 @@ +module marbl_abio_dic_diagnostics_mod + + use marbl_kinds_mod, only : r8 + use marbl_kinds_mod, only : int_kind + use marbl_kinds_mod, only : char_len + + use marbl_settings_mod, only : unit_system_type + + use marbl_interface_public_types, only : marbl_diagnostics_type + + use marbl_logging, only : marbl_log_type + use marbl_logging, only : marbl_logging_add_diagnostics_error + + use marbl_diagnostics_share_mod, only : marbl_surface_flux_diag_ind + + implicit none + private + + public :: marbl_abio_dic_diagnostics_init + public :: marbl_abio_dic_diagnostics_surface_flux_compute + +contains + + !*********************************************************************** + + subroutine marbl_abio_dic_diagnostics_init( & + unit_system, & + marbl_surface_flux_diags, & + marbl_status_log) + + use marbl_settings_mod, only : abio_dic_on + + type(unit_system_type), intent(in) :: unit_system + type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags + type(marbl_log_type), intent(inout) :: marbl_status_log + + !----------------------------------------------------------------------- + ! local variables + !----------------------------------------------------------------------- + character(len=*), parameter :: subname = 'marbl_abio_dic_diagnostics_mod:marbl_abio_dic_diagnostics_init' + integer :: n + logical :: truncate + character(len=char_len) :: lname, sname, units, vgrid + character(len=char_len) :: vel_units + + if (.not. abio_dic_on) return + + !----------------------------------------------------------------- + ! Units for some diagnostics depend on unit system + !----------------------------------------------------------------- + write(vel_units, "(2A)") trim(unit_system%L), '/s' + + !----------------------------------------------------------------- + ! Surface forcing diagnostics + !----------------------------------------------------------------- + + associate( & + ind => marbl_surface_flux_diag_ind, & + diags => marbl_surface_flux_diags & + ) + + lname = 'Ice Fraction for Abiotic DIC tracer fluxes' + sname = 'ABIO_IFRAC' + units = 'fraction' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_IFRAC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'XKW for Abiotic DIC tracer fluxes' + sname = 'ABIO_XKW' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_XKW, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface Alkalinity for Abiotic DIC tracer fluxes' + sname = 'ABIO_ALK_SURF' + units = unit_system%alk_conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_XKW, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes' + sname = 'ABIO_pCO2' + units = 'ppm' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_pCO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface pCO2 for Abiotic DIC tracer fluxes' + sname = 'ABIO_pCO2SURF' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_pCO2SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'D CO2 Star for Abiotic DIC tracer fluxes' + sname = 'ABIO_DCO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_DCO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'CO2 Star for Abiotic DIC tracer fluxes' + sname = 'ABIO_CO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_CO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + end associate + + end subroutine marbl_abio_dic_diagnostics_init + + !*********************************************************************** + + subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & + num_elements, & + ifrac, & + xkw, & + alk_surf, & + pco2, & + pco2surf, & + dco2star, & + co2star, & + marbl_surface_flux_diags) + + ! !DESCRIPTION: + ! Compute surface fluxes for ecosys tracer module. + + use marbl_constants_mod, only : R13C_std, R14C_std + + integer (int_kind), intent(in) :: num_elements + real (r8), dimension(num_elements), intent(in) :: ifrac + real (r8), dimension(num_elements), intent(in) :: xkw + real (r8), dimension(num_elements), intent(in) :: alk_surf + real (r8), dimension(num_elements), intent(in) :: pco2 + real (r8), dimension(num_elements), intent(in) :: pco2surf + real (r8), dimension(num_elements), intent(in) :: dco2star + real (r8), dimension(num_elements), intent(in) :: co2star + type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags + + associate( & + diags => marbl_surface_flux_diags%diags, & + ind => marbl_surface_flux_diag_ind & + ) + + diags(ind%ABIO_IFRAC)%field_2d(:) = ifrac(:) + diags(ind%ABIO_XKW)%field_2d(:) = xkw(:) + diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) + diags(ind%ABIO_pCO2)%field_2d(:) = pco2(:) + diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) + diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) + diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) + + end associate + + end subroutine marbl_abio_dic_diagnostics_surface_flux_compute + + !*********************************************************************** + +end module marbl_abio_dic_diagnostics_mod diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 3eb0d35c..9868f21d 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -21,6 +21,7 @@ module marbl_abio_dic_surface_flux_mod use marbl_interface_private_types, only : co2calc_coeffs_type use marbl_interface_private_types, only : co2calc_state_type + use marbl_interface_public_types, only : marbl_diagnostics_type use marbl_interface_public_types, only : marbl_saved_state_type use marbl_interface_public_types, only : marbl_forcing_fields_type @@ -28,6 +29,8 @@ module marbl_abio_dic_surface_flux_mod use marbl_schmidt_number_mod, only : schmidt_co2_surf + use marbl_abio_dic_diagnostics_mod, only : marbl_abio_dic_diagnostics_surface_flux_compute + use marbl_logging, only : marbl_log_type implicit none @@ -47,6 +50,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& unit_system, & surface_flux_internal, & saved_state, & + surface_flux_diags, & surface_fluxes, & co2calc_coeffs, & co2calc_state, & @@ -61,13 +65,14 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(unit_system_type), intent(in) :: unit_system type(marbl_surface_flux_internal_type), intent(inout) :: surface_flux_internal type(marbl_saved_state_type), intent(inout) :: saved_state + type(marbl_diagnostics_type), intent(inout) :: surface_flux_diags real(r8), intent(inout) :: surface_fluxes(:, :) type(co2calc_coeffs_type), intent(inout) :: co2calc_coeffs type(co2calc_state_type), intent(inout) :: co2calc_state type(marbl_log_type), intent(inout) :: marbl_status_log real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) - real(r8) :: alk(num_elements) ! local alkalinity + real(r8) :: alk_surf(num_elements) ! local alkalinity real(r8) :: phlo(num_elements) ! lower bound for ph in solver real(r8) :: phhi(num_elements) ! upper bound for ph in solver real(r8) :: SiO2(num_elements) ! Abiotic silicate @@ -157,7 +162,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Orr et al eq (27): ! 2297 micromol / kg ! Sbar = "global- and annual- mean salinity" - alk(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) / 34.7_r8 + alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) / 34.7_r8 ! Note the following computes a new ph_prev_surf ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 @@ -166,23 +171,23 @@ subroutine marbl_abio_dic_surface_flux_compute(& lcomp_co2calc_coeffs = .true., & dic_in = tracers_at_surface(:,dic_ind), & xco2_in = xco2(:), & - ta_in = alk(:), & - pt_in = PO4(:), & - sit_in = SiO2(:), & - temp = sst(:), & - salt = sss(:), & - atmpres = ap_used(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & unit_system = unit_system, & co2calc_coeffs = co2calc_coeffs, & co2calc_state = co2calc_state, & - co3 = co3(:), & - co2star = co2star, & - dco2star = dco2star, & - pco2surf = pco2surf, & - dpco2 = dpco2, & - phlo = phlo, & - phhi = phhi, & - ph = ph_prev_surf, & + co3 = co3(:), & + co2star = co2star, & + dco2star = dco2star, & + pco2surf = pco2surf, & + dpco2 = dpco2, & + phlo = phlo, & + phhi = phhi, & + ph = ph_prev_surf, & marbl_status_log = marbl_status_log) flux_co2(:) = pv_co2(:) * dco2star(:) @@ -190,6 +195,19 @@ subroutine marbl_abio_dic_surface_flux_compute(& surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + flux14_co2(:) + ! update abiotic DIC diagnostics + + call marbl_abio_dic_diagnostics_surface_flux_compute( & + num_elements, & + ifrac, & + piston_velocity, & + alk_surf, & + xco2, & + pco2surf, & + dco2star, & + co2star, & + surface_flux_diags) + end associate diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 1ea7c0c9..74f371ae 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -88,6 +88,7 @@ subroutine marbl_diagnostics_init( & use marbl_settings_mod, only : lvariable_PtoC use marbl_settings_mod, only : particulate_flux_ref_depth use marbl_settings_mod, only : lecovars_full_depth_tavg + use marbl_abio_dic_diagnostics_mod, only : marbl_abio_dic_diagnostics_init use marbl_ciso_diagnostics_mod, only : marbl_ciso_diagnostics_init type(marbl_domain_type) , intent(in) :: marbl_domain @@ -127,7 +128,7 @@ subroutine marbl_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'Ice Fraction for ecosys fluxes' + lname = 'Ice Fraction for base biotic tracer fluxes' sname = 'ECOSYS_IFRAC' units = 'fraction' vgrid = 'none' @@ -139,7 +140,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'XKW for ecosys fluxes' + lname = 'XKW for base biotic tracer fluxes' sname = 'ECOSYS_XKW' units = vel_units vgrid = 'none' @@ -151,7 +152,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'Atmospheric Pressure for ecosys fluxes' + lname = 'Atmospheric Pressure for base biotic tracer fluxes' sname = 'ECOSYS_ATM_PRESS' units = 'atmospheres' vgrid = 'none' @@ -3025,6 +3026,16 @@ subroutine marbl_diagnostics_init( & end do + !----------------------------------------------------------------- + ! Abiotic DIC diagnostics + !----------------------------------------------------------------- + + call marbl_abio_dic_diagnostics_init(unit_system, marbl_surface_flux_diags, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace("marbl_abio_dic_diagnostics_init()", subname) + return + end if + !----------------------------------------------------------------- ! CISO diagnostics !----------------------------------------------------------------- diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 7f9bea36..3ff7b8f5 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -478,6 +478,14 @@ module marbl_interface_private_types integer(int_kind) :: NHy_FLUX integer(int_kind) :: NHx_SURFACE_EMIS + integer(int_kind) :: ABIO_IFRAC + integer(int_kind) :: ABIO_XKW + integer(int_kind) :: ABIO_ALK_SURF + integer(int_kind) :: ABIO_pCO2 + integer(int_kind) :: ABIO_pCO2SURF + integer(int_kind) :: ABIO_DCO2STAR + integer(int_kind) :: ABIO_CO2STAR + integer(int_kind) :: CISO_DI13C_GAS_FLUX ! di13c flux integer(int_kind) :: CISO_DI14C_GAS_FLUX ! di14c flux integer(int_kind) :: CISO_DI13C_AS_GAS_FLUX ! air-sea di13c flux diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index a86437a6..5b0c5a6c 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -196,6 +196,7 @@ subroutine marbl_surface_flux_compute( & unit_system = unit_system, & surface_flux_internal = surface_flux_internal, & saved_state = saved_state, & + surface_flux_diags = surface_flux_diags, & surface_fluxes = surface_fluxes, & co2calc_coeffs = co2calc_coeffs, & co2calc_state = co2calc_state, & From 34c4a1563c517b38c64b3c437e0939229f06e17f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Sat, 16 Sep 2023 10:50:12 -0600 Subject: [PATCH 13/64] Clean up abio_dic_diags module Had a couple of unused variables, and also wasn't setting the right index for the ABIO_ALK_SURF diagnostic --- src/marbl_abio_dic_diagnostics_mod.F90 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 90b13af3..37618107 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -38,7 +38,6 @@ subroutine marbl_abio_dic_diagnostics_init( & ! local variables !----------------------------------------------------------------------- character(len=*), parameter :: subname = 'marbl_abio_dic_diagnostics_mod:marbl_abio_dic_diagnostics_init' - integer :: n logical :: truncate character(len=char_len) :: lname, sname, units, vgrid character(len=char_len) :: vel_units @@ -89,7 +88,7 @@ subroutine marbl_abio_dic_diagnostics_init( & vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_XKW, marbl_status_log) + ind%ABIO_ALK_SURF, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -163,8 +162,6 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ! !DESCRIPTION: ! Compute surface fluxes for ecosys tracer module. - use marbl_constants_mod, only : R13C_std, R14C_std - integer (int_kind), intent(in) :: num_elements real (r8), dimension(num_elements), intent(in) :: ifrac real (r8), dimension(num_elements), intent(in) :: xkw From 0197cbd44bb557c7b1eb2c68686b498c06ac054b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 19 Sep 2023 19:55:52 -0600 Subject: [PATCH 14/64] Add more surface flux diagnostics With the exception of the derivative terms, all surface flux diagnostics from the POP abio module are available in MARBL now. --- defaults/diagnostics_latest.yaml | 86 +++++++++-- defaults/json/diagnostics_latest.json | 83 ++++++++++- src/marbl_abio_dic_diagnostics_mod.F90 | 183 ++++++++++++++++++++---- src/marbl_abio_dic_surface_flux_mod.F90 | 67 ++++----- src/marbl_diagnostics_mod.F90 | 6 +- src/marbl_interface_private_types.F90 | 14 +- src/marbl_surface_flux_mod.F90 | 1 - 7 files changed, 356 insertions(+), 84 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 80b12095..6e983ce4 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -95,7 +95,7 @@ pCO2SURF_ALT_CO2 : frequency : never operator : average DpCO2 : &DpCO2 - longname : D pCO2 + longname : D pCO2 for base biotic tracer fluxes units : ppmv vertical_grid : none frequency : @@ -110,13 +110,13 @@ DpCO2_ALT_CO2 : frequency : medium operator : average PV_CO2 : - longname : CO2 Piston Velocity + longname : CO2 Piston Velocity for base biotic tracer fluxes units : cm/s vertical_grid : none frequency : never operator : average SCHMIDT_CO2 : - longname : CO2 Schmidt Number + longname : CO2 Schmidt Number for base biotic tracers fluxes units : 1 vertical_grid : none frequency : medium @@ -1076,11 +1076,11 @@ ABIO_XKW : vertical_grid : none frequency : medium operator : average -ABIO_ALK_SURF : +ABIO_ATM_PRESS : dependencies : abio_dic_on : .true. - longname : Surface Alkalinity for Abiotic DIC tracer fluxes - units : meq/m^3 + longname : Atmospheric Pressure for Abiotic DIC tracer fluxes + units : atmospheres vertical_grid : none frequency : medium operator : average @@ -1092,19 +1092,25 @@ ABIO_pCO2 : vertical_grid : none frequency : medium operator : average -ABIO_pCO2SURF : +ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO version dependencies : abio_dic_on : .true. - longname : Surface pCO2 for Abiotic DIC tracer fluxes - units : ppmv + longname : Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes + units : permil vertical_grid : none frequency : medium operator : average -ABIO_DCO2STAR : +ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version + longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes + units : 1 + vertical_grid : none + frequency : medium + operator : average +ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version dependencies : abio_dic_on : .true. - longname : D CO2 Star for Abiotic DIC tracer fluxes - units : mmol/m^3 + longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes + units : cm/s vertical_grid : none frequency : medium operator : average @@ -1116,6 +1122,62 @@ ABIO_CO2STAR : vertical_grid : none frequency : medium operator : average +ABIO_DCO2STAR : + dependencies : + abio_dic_on : .true. + longname : D CO2 Star for Abiotic DIC tracer fluxes + units : mmol/m^3 + vertical_grid : none + frequency : medium + operator : average +ABIO_pCO2SURF : + dependencies : + abio_dic_on : .true. + longname : Surface pCO2 for Abiotic DIC tracer fluxes + units : ppmv + vertical_grid : none + frequency : medium + operator : average +ABIO_DpCO2 : + dependencies : + abio_dic_on : .true. + longname : D pCO2 for Abiotic DIC tracer fluxes + units : ppmv + vertical_grid : none + frequency : medium + operator : average +ABIO_PH_SURF : # todo: for base biotic tracers, there is no _SURF + dependencies : + abio_dic_on : .true. + longname : Surface pH for Abiotic DIC tracer fluxes + units : 1 + vertical_grid : none + frequency : medium + operator : average +ABIO_ALK_SURF : + dependencies : + abio_dic_on : .true. + longname : Surface Alkalinity for Abiotic DIC tracer fluxes + units : meq/m^3 + vertical_grid : none + frequency : medium + operator : average +FG_ABIO_DIC : + dependencies : + abio_dic_on : .true. + longname : Surface gas flux of abiotic DIC + units : mmol/m^3 cm/s + vertical_grid : none + frequency : medium + operator : average +FG_ABIO_DIC14 : + dependencies : + abio_dic_on : .true. + longname : Surface gas flux of abiotic DI14C + units : mmol/m^3 cm/s + vertical_grid : none + frequency : medium + operator : average ############### # ciso module # diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 8487327b..b00174d5 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -368,6 +368,16 @@ "units": "meq/m^3", "vertical_grid": "none" }, + "ABIO_ATM_PRESS": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Atmospheric Pressure for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "atmospheres", + "vertical_grid": "none" + }, "ABIO_CO2STAR": { "dependencies": { "abio_dic_on": ".true." @@ -378,6 +388,33 @@ "units": "mmol/m^3", "vertical_grid": "none" }, + "ABIO_CO2_PV": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "CO2 Piston Velocity for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "cm/s", + "vertical_grid": "none" + }, + "ABIO_CO2_SCHMIDT": { + "frequency": "medium", + "longname": "CO2 Schmidt Number for Abiotic DIC tracer fluxes", + "operator": "average", + "units": 1, + "vertical_grid": "none" + }, + "ABIO_D14Catm": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "permil", + "vertical_grid": "none" + }, "ABIO_DCO2STAR": { "dependencies": { "abio_dic_on": ".true." @@ -388,6 +425,16 @@ "units": "mmol/m^3", "vertical_grid": "none" }, + "ABIO_DpCO2": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "D pCO2 for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "ppmv", + "vertical_grid": "none" + }, "ABIO_IFRAC": { "dependencies": { "abio_dic_on": ".true." @@ -398,6 +445,16 @@ "units": "fraction", "vertical_grid": "none" }, + "ABIO_PH_SURF": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface pH for Abiotic DIC tracer fluxes", + "operator": "average", + "units": 1, + "vertical_grid": "none" + }, "ABIO_XKW": { "dependencies": { "abio_dic_on": ".true." @@ -1344,7 +1401,7 @@ "medium", "high" ], - "longname": "D pCO2", + "longname": "D pCO2 for base biotic tracer fluxes", "operator": [ "average", "average" @@ -1399,6 +1456,26 @@ "units": "nmol/cm^2/s", "vertical_grid": "layer_avg" }, + "FG_ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface gas flux of abiotic DIC", + "operator": "average", + "units": "mmol/m^3 cm/s", + "vertical_grid": "none" + }, + "FG_ABIO_DIC14": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface gas flux of abiotic DI14C", + "operator": "average", + "units": "mmol/m^3 cm/s", + "vertical_grid": "none" + }, "FG_ALT_CO2": { "frequency": "medium", "longname": "DIC Surface Gas Flux, Alternative CO2", @@ -1803,7 +1880,7 @@ }, "PV_CO2": { "frequency": "never", - "longname": "CO2 Piston Velocity", + "longname": "CO2 Piston Velocity for base biotic tracer fluxes", "operator": "average", "units": "cm/s", "vertical_grid": "none" @@ -1855,7 +1932,7 @@ }, "SCHMIDT_CO2": { "frequency": "medium", - "longname": "CO2 Schmidt Number", + "longname": "CO2 Schmidt Number for base biotic tracers fluxes", "operator": "average", "units": 1, "vertical_grid": "none" diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 37618107..955b5307 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -82,13 +82,13 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface Alkalinity for Abiotic DIC tracer fluxes' - sname = 'ABIO_ALK_SURF' - units = unit_system%alk_conc_units + lname = 'Atmospheric Pressure for Abiotic DIC tracer fluxes' + sname = 'ABIO_ATM_PRESS' + units = 'atmospheres' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_ALK_SURF, marbl_status_log) + ind%ABIO_ATM_PRESS, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -106,25 +106,37 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface pCO2 for Abiotic DIC tracer fluxes' - sname = 'ABIO_pCO2SURF' - units = 'ppmv' + lname = 'Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes' + sname = 'ABIO_D14Catm' + units = 'permil' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_pCO2SURF, marbl_status_log) + ind%ABIO_D14Catm, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = 'D CO2 Star for Abiotic DIC tracer fluxes' - sname = 'ABIO_DCO2STAR' - units = unit_system%conc_units + lname = 'CO2 Schmidt Number for Abiotic DIC tracer fluxes' + sname = 'ABIO_CO2_SCHMIDT' + units = '1' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_DCO2STAR, marbl_status_log) + ind%ABIO_CO2_SCHMIDT, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'CO2 Piston Velocity for Abiotic DIC tracer fluxes' + sname = 'ABIO_CO2_PV' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_CO2_PV, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -142,6 +154,95 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if + lname = 'D CO2 Star for Abiotic DIC tracer fluxes' + sname = 'ABIO_DCO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_DCO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface pCO2 for Abiotic DIC tracer fluxes' + sname = 'ABIO_pCO2SURF' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_pCO2SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'D pCO2 for Abiotic DIC tracer fluxes' + sname = 'ABIO_DpCO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_DpCO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface pH for Abiotic DIC tracer fluxes' + sname = 'ABIO_PH_SURF' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_PH_SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + + lname = 'Surface Alkalinity for Abiotic DIC tracer fluxes' + sname = 'ABIO_ALK_SURF' + units = unit_system%alk_conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_ALK_SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface gas flux of abiotic DIC' + sname = 'FG_ABIO_DIC' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_FG_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Surface gas flux of abiotic DI14C' + sname = 'FG_ABIO_DIC14' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_FG_DI14C, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + ! d_SF_ABIO_DIC_d_ABIO_DIC + ! d_SF_ABIO_DIC14_d_ABIO_DIC + ! d_SF_ABIO_DIC14_d_ABIO_DIC14 + end associate end subroutine marbl_abio_dic_diagnostics_init @@ -149,28 +250,42 @@ end subroutine marbl_abio_dic_diagnostics_init !*********************************************************************** subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & - num_elements, & ifrac, & xkw, & - alk_surf, & - pco2, & - pco2surf, & - dco2star, & + ap_used, & + xco2, & + d14c, & + schmidt_co2, & + pv_co2, & co2star, & + dco2star, & + pco2surf, & + dpco2, & + ph_surf, & + alk_surf, & + fg_dic, & + fg_di14c, & marbl_surface_flux_diags) ! !DESCRIPTION: ! Compute surface fluxes for ecosys tracer module. - integer (int_kind), intent(in) :: num_elements - real (r8), dimension(num_elements), intent(in) :: ifrac - real (r8), dimension(num_elements), intent(in) :: xkw - real (r8), dimension(num_elements), intent(in) :: alk_surf - real (r8), dimension(num_elements), intent(in) :: pco2 - real (r8), dimension(num_elements), intent(in) :: pco2surf - real (r8), dimension(num_elements), intent(in) :: dco2star - real (r8), dimension(num_elements), intent(in) :: co2star - type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags + real (r8), dimension(:), intent(in) :: ifrac + real (r8), dimension(:), intent(in) :: xkw + real (r8), dimension(:), intent(in) :: ap_used + real (r8), dimension(:), intent(in) :: xco2 + real (r8), dimension(:), intent(in) :: d14c + real (r8), dimension(:), intent(in) :: schmidt_co2 + real (r8), dimension(:), intent(in) :: pv_co2 + real (r8), dimension(:), intent(in) :: co2star + real (r8), dimension(:), intent(in) :: dco2star + real (r8), dimension(:), intent(in) :: pco2surf + real (r8), dimension(:), intent(in) :: dpco2 + real (r8), dimension(:), intent(in) :: ph_surf + real (r8), dimension(:), intent(in) :: alk_surf + real (r8), dimension(:), intent(in) :: fg_dic + real (r8), dimension(:), intent(in) :: fg_di14c + type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags associate( & diags => marbl_surface_flux_diags%diags, & @@ -179,11 +294,19 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & diags(ind%ABIO_IFRAC)%field_2d(:) = ifrac(:) diags(ind%ABIO_XKW)%field_2d(:) = xkw(:) - diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) - diags(ind%ABIO_pCO2)%field_2d(:) = pco2(:) - diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) - diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) + diags(ind%ABIO_ATM_PRESS)%field_2d(:) = ap_used(:) + diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) + diags(ind%ABIO_D14Catm)%field_2d(:) = d14c(:) + diags(ind%ABIO_CO2_SCHMIDT)%field_2d(:) = schmidt_co2(:) + diags(ind%ABIO_CO2_PV)%field_2d(:) = pv_co2(:) diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) + diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) + diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) + diags(ind%ABIO_DpCO2)%field_2d(:) = dpco2(:) + diags(ind%ABIO_PH_SURF)%field_2d(:) = ph_surf(:) + diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) + diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) + diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) end associate diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 9868f21d..167eaac4 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -48,7 +48,6 @@ subroutine marbl_abio_dic_surface_flux_compute(& surface_flux_forcing_ind, & surface_flux_forcings, & unit_system, & - surface_flux_internal, & saved_state, & surface_flux_diags, & surface_fluxes, & @@ -63,7 +62,6 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind type(marbl_forcing_fields_type), intent(in) :: surface_flux_forcings(:) type(unit_system_type), intent(in) :: unit_system - type(marbl_surface_flux_internal_type), intent(inout) :: surface_flux_internal type(marbl_saved_state_type), intent(inout) :: saved_state type(marbl_diagnostics_type), intent(inout) :: surface_flux_diags real(r8), intent(inout) :: surface_fluxes(:, :) @@ -72,15 +70,23 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(marbl_log_type), intent(inout) :: marbl_status_log real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) - real(r8) :: alk_surf(num_elements) ! local alkalinity + real(r8) :: xkw(num_elements) ! piston velocity + real(r8) :: pv_co2(num_elements) ! piston velocity + real(r8) :: alk_surf(num_elements) ! local alkalinity real(r8) :: phlo(num_elements) ! lower bound for ph in solver real(r8) :: phhi(num_elements) ! upper bound for ph in solver real(r8) :: SiO2(num_elements) ! Abiotic silicate real(r8) :: PO4(num_elements) ! Abiotic phosphate real(r8) :: R14C_ocn(num_elements) ! Rocn = DIC14/DIC real(r8) :: R14C_atm(num_elements) ! Ratm = 1+ D14C/1000 - real(r8) :: flux14_co2(num_elements) ! Isotopic gas flux - + real(r8) :: fg_dic(num_elements) ! Carbon gas flux + real(r8) :: fg_di14c(num_elements) ! Isotopic carbon gas flux + real(r8) :: co2star(num_elements) + real(r8) :: dco2star(num_elements) + real(r8) :: pco2surf(num_elements) + real(r8) :: dpco2(num_elements) + real(r8) :: schmidt_co2(num_elements) + real(r8) :: co3(num_elements) ! Return immediately if not running with abiotic dic tracer module if (.not. abio_dic_on) return @@ -95,18 +101,8 @@ subroutine marbl_abio_dic_surface_flux_compute(& ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & u10_sqr => surface_flux_forcings(surface_flux_forcing_ind%u10_sqr_id)%field_0d, & d14c => surface_flux_forcings(surface_flux_forcing_ind%d14c_id)%field_0d, & - ! Intermediate computations (saved for diagnostics) - piston_velocity => surface_flux_internal%piston_velocity(:), & - flux_co2 => surface_flux_internal%flux_co2(:), & - co2star => surface_flux_internal%co2star(:), & - dco2star => surface_flux_internal%dco2star(:), & - pco2surf => surface_flux_internal%pco2surf(:), & - dpco2 => surface_flux_internal%dpco2(:), & - schmidt_co2 => surface_flux_internal%schmidt_co2(:), & - co3 => surface_flux_internal%co3(:), & - pv_co2 => surface_flux_internal%pv_co2(:), & ! Saved state - ph_prev_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & + ph_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & ! Tracer indices dic_ind => marbl_tracer_indices%abio_dic_ind, & di14c_ind => marbl_tracer_indices%abio_di14c_ind, & @@ -144,14 +140,14 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Compute CO2 flux !----------------------------------------------------------------------- - piston_velocity = xkw_coeff*u10_sqr(:) - xkw_ice(:) = (c1 - ifrac(:)) * piston_velocity + xkw(:) = xkw_coeff*u10_sqr(:) + xkw_ice(:) = (c1 - ifrac(:)) * xkw(:) schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) - where (ph_prev_surf(:) /= c0) - phlo(:) = ph_prev_surf(:) - del_ph - phhi(:) = ph_prev_surf(:) + del_ph + where (ph_surf(:) /= c0) + phlo(:) = ph_surf(:) - del_ph + phhi(:) = ph_surf(:) + del_ph elsewhere phlo(:) = phlo_surf_init phhi(:) = phhi_surf_init @@ -164,7 +160,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Sbar = "global- and annual- mean salinity" alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) / 34.7_r8 - ! Note the following computes a new ph_prev_surf + ! Note the following computes a new ph_surf ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 call marbl_co2calc_surface(& num_elements = num_elements, & @@ -187,25 +183,32 @@ subroutine marbl_abio_dic_surface_flux_compute(& dpco2 = dpco2, & phlo = phlo, & phhi = phhi, & - ph = ph_prev_surf, & + ph = ph_surf, & marbl_status_log = marbl_status_log) - flux_co2(:) = pv_co2(:) * dco2star(:) - flux14_co2(:) = pv_co2(:) * ((dco2star(:) + co2star(:)) * R14C_atm(:) - co2star(:) * R14C_ocn(:)) - surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) - surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + flux14_co2(:) + fg_dic(:) = pv_co2(:) * dco2star(:) + fg_di14c(:) = pv_co2(:) * ((dco2star(:) + co2star(:)) * R14C_atm(:) - co2star(:) * R14C_ocn(:)) + surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + fg_dic(:) + surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + fg_di14c(:) ! update abiotic DIC diagnostics call marbl_abio_dic_diagnostics_surface_flux_compute( & - num_elements, & ifrac, & - piston_velocity, & - alk_surf, & + xkw, & + ap_used, & xco2, & - pco2surf, & - dco2star, & + d14c, & + schmidt_co2, & + pv_co2, & co2star, & + dco2star, & + pco2surf, & + dpco2, & + ph_surf, & + alk_surf, & + fg_dic, & + fg_di14c, & surface_flux_diags) end associate diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 74f371ae..a059ec7e 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -236,7 +236,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'D pCO2' + lname = 'D pCO2 for base biotic tracer fluxes' sname = 'DpCO2' units = 'ppmv' vgrid = 'none' @@ -248,7 +248,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'CO2 Piston Velocity' + lname = 'CO2 Piston Velocity for base biotic tracer fluxes' sname = 'PV_CO2' units = vel_units vgrid = 'none' @@ -260,7 +260,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'CO2 Schmidt Number' + lname = 'CO2 Schmidt Number for base biotic tracers fluxes' sname = 'SCHMIDT_CO2' units = '1' vgrid = 'none' diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 3ff7b8f5..0bf495fd 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -480,11 +480,19 @@ module marbl_interface_private_types integer(int_kind) :: ABIO_IFRAC integer(int_kind) :: ABIO_XKW - integer(int_kind) :: ABIO_ALK_SURF + integer(int_kind) :: ABIO_ATM_PRESS integer(int_kind) :: ABIO_pCO2 - integer(int_kind) :: ABIO_pCO2SURF - integer(int_kind) :: ABIO_DCO2STAR + integer(int_kind) :: ABIO_D14Catm + integer(int_kind) :: ABIO_CO2_SCHMIDT + integer(int_kind) :: ABIO_CO2_PV integer(int_kind) :: ABIO_CO2STAR + integer(int_kind) :: ABIO_DCO2STAR + integer(int_kind) :: ABIO_pCO2SURF + integer(int_kind) :: ABIO_DpCO2 + integer(int_kind) :: ABIO_PH_SURF + integer(int_kind) :: ABIO_ALK_SURF + integer(int_kind) :: ABIO_FG_DIC + integer(int_kind) :: ABIO_FG_DI14C integer(int_kind) :: CISO_DI13C_GAS_FLUX ! di13c flux integer(int_kind) :: CISO_DI14C_GAS_FLUX ! di14c flux diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 5b0c5a6c..8f38fd37 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -194,7 +194,6 @@ subroutine marbl_surface_flux_compute( & surface_flux_forcing_ind = surface_flux_forcing_ind, & surface_flux_forcings = surface_flux_forcings, & unit_system = unit_system, & - surface_flux_internal = surface_flux_internal, & saved_state = saved_state, & surface_flux_diags = surface_flux_diags, & surface_fluxes = surface_fluxes, & From 54a38d62e3f90051d856378976b9a99c971f0329 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Wed, 20 Sep 2023 09:29:45 -0600 Subject: [PATCH 15/64] Rename ciso diagnostics routine store_diagnostics_ciso_interior() -> marbl_ciso_diagnostics_interior_tendency_compute() This change brings the routine in line with other public subroutines (by beginning with {module}_), and when I copy this function to the abio module it will also follow convention. --- src/marbl_ciso_diagnostics_mod.F90 | 8 ++++---- src/marbl_ciso_interior_tendency_mod.F90 | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/marbl_ciso_diagnostics_mod.F90 b/src/marbl_ciso_diagnostics_mod.F90 index 685beb1e..9cbda89d 100644 --- a/src/marbl_ciso_diagnostics_mod.F90 +++ b/src/marbl_ciso_diagnostics_mod.F90 @@ -26,7 +26,7 @@ module marbl_ciso_diagnostics_mod public :: marbl_ciso_diagnostics_init public :: marbl_ciso_diagnostics_surface_flux_compute - public :: store_diagnostics_ciso_interior + public :: marbl_ciso_diagnostics_interior_tendency_compute contains @@ -969,7 +969,7 @@ end subroutine marbl_ciso_diagnostics_surface_flux_compute !***************************************************************************** - subroutine store_diagnostics_ciso_interior(& + subroutine marbl_ciso_diagnostics_interior_tendency_compute(& marbl_domain, & autotroph_d13C, & autotroph_d14C, & @@ -1063,7 +1063,7 @@ subroutine store_diagnostics_ciso_interior(& !----------------------------------------------------------------------- ! local variables !----------------------------------------------------------------------- - character(len=*), parameter :: subname = 'marbl_ciso_diagnostics_mod:store_diagnostics_ciso_interior' + character(len=*), parameter :: subname = 'marbl_ciso_diagnostics_mod:marbl_ciso_diagnostics_interior_tendency_compute' character(len=char_len) :: log_message integer (int_kind) :: k, n, auto_ind real (r8) :: work(marbl_domain%km) @@ -1222,7 +1222,7 @@ subroutine store_diagnostics_ciso_interior(& end associate - end subroutine store_diagnostics_ciso_interior + end subroutine marbl_ciso_diagnostics_interior_tendency_compute !*********************************************************************** diff --git a/src/marbl_ciso_interior_tendency_mod.F90 b/src/marbl_ciso_interior_tendency_mod.F90 index 8f6ac1ec..103bb23e 100644 --- a/src/marbl_ciso_interior_tendency_mod.F90 +++ b/src/marbl_ciso_interior_tendency_mod.F90 @@ -64,7 +64,7 @@ subroutine marbl_ciso_interior_tendency_compute( & use marbl_constants_mod, only : R13C_std use marbl_constants_mod, only : R14C_std use marbl_constants_mod, only : spd - use marbl_ciso_diagnostics_mod, only : store_diagnostics_ciso_interior + use marbl_ciso_diagnostics_mod, only : marbl_ciso_diagnostics_interior_tendency_compute type(marbl_domain_type), intent(in) :: marbl_domain real (r8), intent(in) :: bot_flux_to_tend(:) @@ -671,7 +671,7 @@ subroutine marbl_ciso_interior_tendency_compute( & ! update carbon isotope diagnostics ! FIXME #18: the following arguments need to be group into a derived type - call store_diagnostics_ciso_interior(& + call marbl_ciso_diagnostics_interior_tendency_compute(& marbl_domain, & autotroph_d13C, & autotroph_d14C, & @@ -707,7 +707,7 @@ subroutine marbl_ciso_interior_tendency_compute( & marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace("store_diagnostics_ciso_interior", subname) + call marbl_status_log%log_error_trace("marbl_ciso_diagnostics_interior_tendency_compute", subname) return end if From 5a7eaa0cbc1c85436fb01676766f3dc7257f9801 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Wed, 20 Sep 2023 12:45:33 -0600 Subject: [PATCH 16/64] Add ABIO_D14Cocn diagnostic --- defaults/diagnostics_latest.yaml | 8 ++ defaults/json/diagnostics_latest.json | 10 ++ src/marbl_abio_dic_diagnostics_mod.F90 | 74 +++++++++++- src/marbl_abio_dic_interior_tendency_mod.F90 | 14 ++- src/marbl_diagnostics_mod.F90 | 2 +- src/marbl_interface_private_types.F90 | 119 ++++++++++--------- src/marbl_interior_tendency_mod.F90 | 1 + 7 files changed, 162 insertions(+), 66 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 6e983ce4..dc555ff8 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -1178,6 +1178,14 @@ FG_ABIO_DIC14 : vertical_grid : none frequency : medium operator : average +ABIO_D14Cocn : # todo add underscore after D14C to be consistent with CISO version + dependencies : + abio_dic_on : .true. + longname : Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes + units : permil + vertical_grid : layer_avg + frequency : medium + operator : average ############### # ciso module # diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index b00174d5..2760000c 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -415,6 +415,16 @@ "units": "permil", "vertical_grid": "none" }, + "ABIO_D14Cocn": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes", + "operator": "average", + "units": "permil", + "vertical_grid": "layer_avg" + }, "ABIO_DCO2STAR": { "dependencies": { "abio_dic_on": ".true." diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 955b5307..0d63d21b 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -1,16 +1,23 @@ module marbl_abio_dic_diagnostics_mod + use marbl_constants_mod, only : c0 + use marbl_constants_mod, only : c1 + use marbl_kinds_mod, only : r8 use marbl_kinds_mod, only : int_kind use marbl_kinds_mod, only : char_len use marbl_settings_mod, only : unit_system_type + use marbl_interface_private_types, only : marbl_tracer_index_type + use marbl_interface_public_types, only : marbl_diagnostics_type + use marbl_logging, only : marbl_log_type use marbl_logging, only : marbl_logging_add_diagnostics_error + use marbl_diagnostics_share_mod, only : marbl_interior_tendency_diag_ind use marbl_diagnostics_share_mod, only : marbl_surface_flux_diag_ind implicit none @@ -18,6 +25,7 @@ module marbl_abio_dic_diagnostics_mod public :: marbl_abio_dic_diagnostics_init public :: marbl_abio_dic_diagnostics_surface_flux_compute + public :: marbl_abio_dic_diagnostics_interior_tendency_compute contains @@ -25,12 +33,14 @@ module marbl_abio_dic_diagnostics_mod subroutine marbl_abio_dic_diagnostics_init( & unit_system, & - marbl_surface_flux_diags, & + marbl_interior_tendency_diags, & + marbl_surface_flux_diags, & marbl_status_log) use marbl_settings_mod, only : abio_dic_on type(unit_system_type), intent(in) :: unit_system + type(marbl_diagnostics_type), intent(inout) :: marbl_interior_tendency_diags type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags type(marbl_log_type), intent(inout) :: marbl_status_log @@ -53,9 +63,9 @@ subroutine marbl_abio_dic_diagnostics_init( & ! Surface forcing diagnostics !----------------------------------------------------------------- - associate( & + associate(& ind => marbl_surface_flux_diag_ind, & - diags => marbl_surface_flux_diags & + diags => marbl_surface_flux_diags & ) lname = 'Ice Fraction for Abiotic DIC tracer fluxes' @@ -221,7 +231,7 @@ subroutine marbl_abio_dic_diagnostics_init( & vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_FG_DIC, marbl_status_log) + ind%ABIO_FG_DIC, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -245,7 +255,30 @@ subroutine marbl_abio_dic_diagnostics_init( & end associate - end subroutine marbl_abio_dic_diagnostics_init + !----------------------------------------------------------------- + ! Surface forcing diagnostics + !----------------------------------------------------------------- + + associate(& + ind => marbl_interior_tendency_diag_ind, & + diags => marbl_interior_tendency_diags & + ) + + lname = 'Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes' + sname = 'ABIO_D14Cocn' + units = 'permil' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_D14Cocn, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + end associate + + end subroutine marbl_abio_dic_diagnostics_init !*********************************************************************** @@ -312,6 +345,37 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & end subroutine marbl_abio_dic_diagnostics_surface_flux_compute + !***************************************************************************** + + subroutine marbl_abio_dic_diagnostics_interior_tendency_compute(marbl_tracer_indices, tracer_local, & + interior_tendency_diags) + + !--------------------------------------------------------------------- + ! !DESCRIPTION: + ! Update marbl_interior_abio_dic_diags data type + !--------------------------------------------------------------------- + + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + real(r8), intent(in) :: tracer_local(:,:) + type(marbl_diagnostics_type), intent(inout) :: interior_tendency_diags + + associate(& + ! tracers + dic => tracer_local(marbl_tracer_indices%abio_dic_ind, :), & + di14c => tracer_local(marbl_tracer_indices%abio_di14c_ind, :), & + ! diagnostics + diags => interior_tendency_diags%diags, & + ind => marbl_interior_tendency_diag_ind & + ) + + where (dic == 0) + diags(ind%ABIO_D14Cocn)%field_3d(:,1) = c0 + elsewhere + diags(ind%ABIO_D14Cocn)%field_3d(:,1) = (di14c(:) / dic(:) -c1) * 1000._r8 + end where + end associate +end subroutine marbl_abio_dic_diagnostics_interior_tendency_compute + !*********************************************************************** end module marbl_abio_dic_diagnostics_mod diff --git a/src/marbl_abio_dic_interior_tendency_mod.F90 b/src/marbl_abio_dic_interior_tendency_mod.F90 index c78ec24a..89dd5eee 100644 --- a/src/marbl_abio_dic_interior_tendency_mod.F90 +++ b/src/marbl_abio_dic_interior_tendency_mod.F90 @@ -9,6 +9,10 @@ module marbl_abio_dic_interior_tendency_mod use marbl_interface_private_types, only : marbl_tracer_index_type + use marbl_interface_public_types, only : marbl_diagnostics_type + + use marbl_abio_dic_diagnostics_mod, only : marbl_abio_dic_diagnostics_interior_tendency_compute + implicit none private @@ -16,13 +20,16 @@ module marbl_abio_dic_interior_tendency_mod contains - subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, tracer_local, interior_tendencies) + subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, & + tracer_local, & + interior_tendency_diags, & + interior_tendencies) type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices real (r8), intent(in) :: tracer_local(:,:) + type(marbl_diagnostics_type), intent(inout) :: interior_tendency_diags real(r8), intent(inout) :: interior_tendencies(:,:) ! (tracer_cnt, km) computed source/sink terms - ! Return immediately if not running with abiotic dic tracer module if (.not. abio_dic_on) return @@ -38,6 +45,9 @@ subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, tracer interior_tendencies(abio_ind_beg:abio_ind_end, :) = c0 interior_tendencies(di14c_ind, :) = -c14_lambda * di14c(:) + call marbl_abio_dic_diagnostics_interior_tendency_compute(marbl_tracer_indices, tracer_local, & + interior_tendency_diags) + end associate end subroutine marbl_abio_dic_interior_tendency_compute diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index a059ec7e..83fa5602 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -3030,7 +3030,7 @@ subroutine marbl_diagnostics_init( & ! Abiotic DIC diagnostics !----------------------------------------------------------------- - call marbl_abio_dic_diagnostics_init(unit_system, marbl_surface_flux_diags, marbl_status_log) + call marbl_abio_dic_diagnostics_init(unit_system, marbl_interior_tendency_diags, marbl_surface_flux_diags, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("marbl_abio_dic_diagnostics_init()", subname) return diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 0bf495fd..c7a74aa4 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -733,64 +733,67 @@ module marbl_interface_private_types integer(int_kind), allocatable :: zoo_graze_zoo(:,:) integer(int_kind), allocatable :: x_graze_zoo(:) - ! ciso ids for nonstandard 3d fields - integer (int_kind) :: CISO_PO13C_FLUX_IN ! po13c flux into cell - integer (int_kind) :: CISO_PO14C_FLUX_IN ! po14c flux into cell - integer (int_kind) :: CISO_PO13C_PROD ! po13c production - integer (int_kind) :: CISO_PO14C_PROD ! po14c production - integer (int_kind) :: CISO_PO13C_REMIN ! po13c remineralization - integer (int_kind) :: CISO_PO14C_REMIN ! po14c remineralization - integer (int_kind) :: CISO_Ca13CO3_PROD ! ca13co3 production - integer (int_kind) :: CISO_Ca14CO3_PROD ! ca14co3 production - integer (int_kind) :: CISO_Ca13CO3_REMIN ! ca13co3 remineralization - integer (int_kind) :: CISO_Ca14CO3_REMIN ! ca14co3 remineralization - integer (int_kind) :: CISO_Ca13CO3_FLUX_IN ! ca13co3 flux into cell - integer (int_kind) :: CISO_Ca14CO3_FLUX_IN ! ca14co3 flux into cell - integer (int_kind) :: CISO_photo13C_TOT ! total 13C fixation - integer (int_kind) :: CISO_photo14C_TOT ! total 14C fixation - integer (int_kind) :: CISO_photo13C_TOT_zint ! total 13C fixation vertical integral - integer (int_kind) :: CISO_photo14C_TOT_zint ! total 14C fixation vertical integral - - ! ciso ids for MORE nonstandard 3d fields - integer (int_kind), allocatable :: CISO_eps_autotroph(:) ! epsilon for each autotroph - integer (int_kind), allocatable :: CISO_mui_to_co2star(:) ! mui_to_co2star for each autotroph - integer (int_kind), allocatable :: CISO_Ca13CO3_form(:) ! Ca13CO3 formation - integer (int_kind), allocatable :: CISO_Ca14CO3_form(:) ! Ca14CO3 formation - integer (int_kind), allocatable :: CISO_Ca13CO3_form_zint(:) ! Ca13CO3 formation vertical integral 0-100 m - integer (int_kind), allocatable :: CISO_Ca14CO3_form_zint(:) ! Ca14CO3 formation vertical integral 0-100 m - integer (int_kind), allocatable :: CISO_photo13C(:) ! 13C fixation - integer (int_kind), allocatable :: CISO_photo14C(:) ! 14C fixation - integer (int_kind), allocatable :: CISO_photo13C_zint(:) ! 13C fixation vertical integral - integer (int_kind), allocatable :: CISO_photo14C_zint(:) ! 14C fixation vertical integral - integer (int_kind), allocatable :: CISO_d13C(:) ! d13C of autotroph carbon - integer (int_kind), allocatable :: CISO_d14C(:) ! d14C of autotroph carbon - integer (int_kind), allocatable :: CISO_autotrophCaCO3_d14C(:) ! d14C of autotrophCaCO3 - integer (int_kind), allocatable :: CISO_autotrophCaCO3_d13C(:) ! d13C of autotrophCaCO3 - - integer (int_kind) :: CISO_eps_aq_g ! eps_aq_g - integer (int_kind) :: CISO_eps_dic_g ! eps_dic_g - integer (int_kind) :: CISO_DO13Ctot_prod ! do13ctot production - integer (int_kind) :: CISO_DO14Ctot_prod ! do14ctot production - integer (int_kind) :: CISO_DO13Ctot_remin ! do13ctot remineralization - integer (int_kind) :: CISO_DO14Ctot_remin ! do14ctot remineralization - integer (int_kind) :: CISO_Jint_13Ctot ! vertically integrated source sink term, 13Ctot - integer (int_kind) :: CISO_Jint_14Ctot ! vertically integrated source sink term, 14Ctot - integer (int_kind) :: CISO_zoototC_d13C ! d13C of total zooC - integer (int_kind) :: CISO_zoototC_d14C ! d14C of total zooC - integer (int_kind) :: CISO_DOCtot_d13C ! d13C of DOCtot - integer (int_kind) :: CISO_DOCtot_d14C ! d14C of DOCtot - integer (int_kind) :: CISO_DIC_d13C ! d13C of DIC - integer (int_kind) :: CISO_DIC_d14C ! d14C of DIC - integer (int_kind) :: calcToSed_13C ! calcite flux sedimentary burial - integer (int_kind) :: calcToSed_14C ! calcite flux sedimentary burial - integer (int_kind) :: pocToSed_13C ! poc burial flux to sediments - integer (int_kind) :: pocToSed_14C ! poc burial flux to sediments - - ! restoring 3D diags - integer(int_kind), dimension(:), allocatable :: restore_tend - contains - procedure, public :: lconstructed => interior_diag_ind_constructed - procedure, public :: destruct => interior_diag_ind_destructor + ! abio ids + integer(int_kind) :: ABIO_D14Cocn + + ! ciso ids for nonstandard 3d fields + integer (int_kind) :: CISO_PO13C_FLUX_IN ! po13c flux into cell + integer (int_kind) :: CISO_PO14C_FLUX_IN ! po14c flux into cell + integer (int_kind) :: CISO_PO13C_PROD ! po13c production + integer (int_kind) :: CISO_PO14C_PROD ! po14c production + integer (int_kind) :: CISO_PO13C_REMIN ! po13c remineralization + integer (int_kind) :: CISO_PO14C_REMIN ! po14c remineralization + integer (int_kind) :: CISO_Ca13CO3_PROD ! ca13co3 production + integer (int_kind) :: CISO_Ca14CO3_PROD ! ca14co3 production + integer (int_kind) :: CISO_Ca13CO3_REMIN ! ca13co3 remineralization + integer (int_kind) :: CISO_Ca14CO3_REMIN ! ca14co3 remineralization + integer (int_kind) :: CISO_Ca13CO3_FLUX_IN ! ca13co3 flux into cell + integer (int_kind) :: CISO_Ca14CO3_FLUX_IN ! ca14co3 flux into cell + integer (int_kind) :: CISO_photo13C_TOT ! total 13C fixation + integer (int_kind) :: CISO_photo14C_TOT ! total 14C fixation + integer (int_kind) :: CISO_photo13C_TOT_zint ! total 13C fixation vertical integral + integer (int_kind) :: CISO_photo14C_TOT_zint ! total 14C fixation vertical integral + + ! ciso ids for MORE nonstandard 3d fields + integer (int_kind), allocatable :: CISO_eps_autotroph(:) ! epsilon for each autotroph + integer (int_kind), allocatable :: CISO_mui_to_co2star(:) ! mui_to_co2star for each autotroph + integer (int_kind), allocatable :: CISO_Ca13CO3_form(:) ! Ca13CO3 formation + integer (int_kind), allocatable :: CISO_Ca14CO3_form(:) ! Ca14CO3 formation + integer (int_kind), allocatable :: CISO_Ca13CO3_form_zint(:) ! Ca13CO3 formation vertical integral 0-100 m + integer (int_kind), allocatable :: CISO_Ca14CO3_form_zint(:) ! Ca14CO3 formation vertical integral 0-100 m + integer (int_kind), allocatable :: CISO_photo13C(:) ! 13C fixation + integer (int_kind), allocatable :: CISO_photo14C(:) ! 14C fixation + integer (int_kind), allocatable :: CISO_photo13C_zint(:) ! 13C fixation vertical integral + integer (int_kind), allocatable :: CISO_photo14C_zint(:) ! 14C fixation vertical integral + integer (int_kind), allocatable :: CISO_d13C(:) ! d13C of autotroph carbon + integer (int_kind), allocatable :: CISO_d14C(:) ! d14C of autotroph carbon + integer (int_kind), allocatable :: CISO_autotrophCaCO3_d14C(:) ! d14C of autotrophCaCO3 + integer (int_kind), allocatable :: CISO_autotrophCaCO3_d13C(:) ! d13C of autotrophCaCO3 + + integer (int_kind) :: CISO_eps_aq_g ! eps_aq_g + integer (int_kind) :: CISO_eps_dic_g ! eps_dic_g + integer (int_kind) :: CISO_DO13Ctot_prod ! do13ctot production + integer (int_kind) :: CISO_DO14Ctot_prod ! do14ctot production + integer (int_kind) :: CISO_DO13Ctot_remin ! do13ctot remineralization + integer (int_kind) :: CISO_DO14Ctot_remin ! do14ctot remineralization + integer (int_kind) :: CISO_Jint_13Ctot ! vertically integrated source sink term, 13Ctot + integer (int_kind) :: CISO_Jint_14Ctot ! vertically integrated source sink term, 14Ctot + integer (int_kind) :: CISO_zoototC_d13C ! d13C of total zooC + integer (int_kind) :: CISO_zoototC_d14C ! d14C of total zooC + integer (int_kind) :: CISO_DOCtot_d13C ! d13C of DOCtot + integer (int_kind) :: CISO_DOCtot_d14C ! d14C of DOCtot + integer (int_kind) :: CISO_DIC_d13C ! d13C of DIC + integer (int_kind) :: CISO_DIC_d14C ! d14C of DIC + integer (int_kind) :: calcToSed_13C ! calcite flux sedimentary burial + integer (int_kind) :: calcToSed_14C ! calcite flux sedimentary burial + integer (int_kind) :: pocToSed_13C ! poc burial flux to sediments + integer (int_kind) :: pocToSed_14C ! poc burial flux to sediments + + ! restoring 3D diags + integer(int_kind), dimension(:), allocatable :: restore_tend + contains + procedure, public :: lconstructed => interior_diag_ind_constructed + procedure, public :: destruct => interior_diag_ind_destructor end type marbl_interior_tendency_diagnostics_indexing_type !*********************************************************************** diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index 2a713808..fb8e80bb 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -244,6 +244,7 @@ subroutine marbl_interior_tendency_compute( & call marbl_abio_dic_interior_tendency_compute(& marbl_tracer_indices = marbl_tracer_indices, & tracer_local = tracer_local, & + interior_tendency_diags = interior_tendency_diags, & interior_tendencies = interior_tendencies) if (marbl_status_log%labort_marbl) then From 1872b72a4121959dbed68eee4ef17ccc65e4ad3c Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Wed, 20 Sep 2023 12:46:04 -0600 Subject: [PATCH 17/64] Abio default diagnostics match what POP provides --- defaults/diagnostics_latest.yaml | 10 +++++----- defaults/json/diagnostics_latest.json | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index dc555ff8..fe103542 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -1066,7 +1066,7 @@ ABIO_IFRAC : longname : Ice Fraction for Abiotic DIC tracer fluxes units : fraction vertical_grid : none - frequency : medium + frequency : never operator : average ABIO_XKW : dependencies : @@ -1074,7 +1074,7 @@ ABIO_XKW : longname : XKW for Abiotic DIC tracer fluxes units : cm/s vertical_grid : none - frequency : medium + frequency : never operator : average ABIO_ATM_PRESS : dependencies : @@ -1082,7 +1082,7 @@ ABIO_ATM_PRESS : longname : Atmospheric Pressure for Abiotic DIC tracer fluxes units : atmospheres vertical_grid : none - frequency : medium + frequency : never operator : average ABIO_pCO2 : dependencies : @@ -1104,7 +1104,7 @@ ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes units : 1 vertical_grid : none - frequency : medium + frequency : never operator : average ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version dependencies : @@ -1112,7 +1112,7 @@ ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes units : cm/s vertical_grid : none - frequency : medium + frequency : never operator : average ABIO_CO2STAR : dependencies : diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 2760000c..759cd7be 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -372,7 +372,7 @@ "dependencies": { "abio_dic_on": ".true." }, - "frequency": "medium", + "frequency": "never", "longname": "Atmospheric Pressure for Abiotic DIC tracer fluxes", "operator": "average", "units": "atmospheres", @@ -392,14 +392,14 @@ "dependencies": { "abio_dic_on": ".true." }, - "frequency": "medium", + "frequency": "never", "longname": "CO2 Piston Velocity for Abiotic DIC tracer fluxes", "operator": "average", "units": "cm/s", "vertical_grid": "none" }, "ABIO_CO2_SCHMIDT": { - "frequency": "medium", + "frequency": "never", "longname": "CO2 Schmidt Number for Abiotic DIC tracer fluxes", "operator": "average", "units": 1, @@ -449,7 +449,7 @@ "dependencies": { "abio_dic_on": ".true." }, - "frequency": "medium", + "frequency": "never", "longname": "Ice Fraction for Abiotic DIC tracer fluxes", "operator": "average", "units": "fraction", @@ -469,7 +469,7 @@ "dependencies": { "abio_dic_on": ".true." }, - "frequency": "medium", + "frequency": "never", "longname": "XKW for Abiotic DIC tracer fluxes", "operator": "average", "units": "cm/s", From 818387b88a59b8637e94759c401995e3c832e5c6 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 21 Sep 2023 10:37:27 -0600 Subject: [PATCH 18/64] Clean up diagnostics set interior diagnostics to 0 in interior_tendency_compute() so we don't over-write the ABIO diagnostics; also, pass specific fields for abio interior tendency diag computation instead of tracer_local and indices. --- src/marbl_abio_dic_diagnostics_mod.F90 | 19 +++++++------------ src/marbl_abio_dic_interior_tendency_mod.F90 | 4 ++-- src/marbl_diagnostics_mod.F90 | 7 ------- src/marbl_interior_tendency_mod.F90 | 13 +++++++++++++ 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 0d63d21b..7e058601 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -9,8 +9,6 @@ module marbl_abio_dic_diagnostics_mod use marbl_settings_mod, only : unit_system_type - use marbl_interface_private_types, only : marbl_tracer_index_type - use marbl_interface_public_types, only : marbl_diagnostics_type @@ -256,7 +254,7 @@ subroutine marbl_abio_dic_diagnostics_init( & end associate !----------------------------------------------------------------- - ! Surface forcing diagnostics + ! Interior tendency diagnostics !----------------------------------------------------------------- associate(& @@ -347,33 +345,30 @@ end subroutine marbl_abio_dic_diagnostics_surface_flux_compute !***************************************************************************** - subroutine marbl_abio_dic_diagnostics_interior_tendency_compute(marbl_tracer_indices, tracer_local, & - interior_tendency_diags) + subroutine marbl_abio_dic_diagnostics_interior_tendency_compute(dic, di14c, interior_tendency_diags) !--------------------------------------------------------------------- ! !DESCRIPTION: ! Update marbl_interior_abio_dic_diags data type !--------------------------------------------------------------------- - type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices - real(r8), intent(in) :: tracer_local(:,:) + real(r8), intent(in) :: dic(:) + real(r8), intent(in) :: di14c(:) type(marbl_diagnostics_type), intent(inout) :: interior_tendency_diags associate(& - ! tracers - dic => tracer_local(marbl_tracer_indices%abio_dic_ind, :), & - di14c => tracer_local(marbl_tracer_indices%abio_di14c_ind, :), & ! diagnostics diags => interior_tendency_diags%diags, & ind => marbl_interior_tendency_diag_ind & ) - where (dic == 0) + where (dic(:) == c0) diags(ind%ABIO_D14Cocn)%field_3d(:,1) = c0 elsewhere - diags(ind%ABIO_D14Cocn)%field_3d(:,1) = (di14c(:) / dic(:) -c1) * 1000._r8 + diags(ind%ABIO_D14Cocn)%field_3d(:,1) = (di14c(:)/dic(:) - c1) * 1000._r8 end where end associate + end subroutine marbl_abio_dic_diagnostics_interior_tendency_compute !*********************************************************************** diff --git a/src/marbl_abio_dic_interior_tendency_mod.F90 b/src/marbl_abio_dic_interior_tendency_mod.F90 index 89dd5eee..9b774ee9 100644 --- a/src/marbl_abio_dic_interior_tendency_mod.F90 +++ b/src/marbl_abio_dic_interior_tendency_mod.F90 @@ -35,6 +35,7 @@ subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, & associate(& ! Tracer + dic => tracer_local(marbl_tracer_indices%abio_dic_ind, :), & di14c => tracer_local(marbl_tracer_indices%abio_di14c_ind, :), & ! Tracer indices di14c_ind => marbl_tracer_indices%abio_di14c_ind, & @@ -45,8 +46,7 @@ subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, & interior_tendencies(abio_ind_beg:abio_ind_end, :) = c0 interior_tendencies(di14c_ind, :) = -c14_lambda * di14c(:) - call marbl_abio_dic_diagnostics_interior_tendency_compute(marbl_tracer_indices, tracer_local, & - interior_tendency_diags) + call marbl_abio_dic_diagnostics_interior_tendency_compute(dic, di14c, interior_tendency_diags) end associate diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 83fa5602..95415400 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -3163,13 +3163,6 @@ subroutine marbl_diagnostics_interior_tendency_compute( & !----------------------------------------------------------------- - call marbl_interior_tendency_diags%set_to_zero(marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace(& - 'marbl_interior_tendency_diags%set_to_zero', subname) - return - end if - associate( & kmt => domain%kmt, & diags => marbl_interior_tendency_diags%diags, & diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index fb8e80bb..7659e6f8 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -237,6 +237,19 @@ subroutine marbl_interior_tendency_compute( & call setup_local_tracers(domain%kmt, marbl_tracer_indices, tracers(:,:), autotroph_local, & tracer_local(:,:), zooplankton_local, totalChl_local) + !----------------------------------------------------------------------- + ! Set all interior diagnostics to zero + ! This is useful to prevent deep values persisting + ! when computing diagnostics in shallow columns + !----------------------------------------------------------------------- + + call interior_tendency_diags%set_to_zero(marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace(& + 'interior_tendency_diags%set_to_zero', subname) + return + end if + !----------------------------------------------------------------------- ! Compute tendencies for abiotic tracers !----------------------------------------------------------------------- From 9a3077415d7a9f12eb4243d4e6574b550cba706f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 21 Sep 2023 11:31:47 -0600 Subject: [PATCH 19/64] Missed a dependency for abio diagnostic This was causing an issue in POP when trying to run without MARBL's abio because the ecosys_diagnostics_operators file still listed ABIO_CO2_SCHMIDT as a possible MARBL diagnostic even though it wasn't available --- defaults/diagnostics_latest.yaml | 2 ++ defaults/json/diagnostics_latest.json | 3 +++ 2 files changed, 5 insertions(+) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index fe103542..7e8e2afe 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -1101,6 +1101,8 @@ ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO versi frequency : medium operator : average ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version + dependencies : + abio_dic_on : .true. longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes units : 1 vertical_grid : none diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 759cd7be..efee221e 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -399,6 +399,9 @@ "vertical_grid": "none" }, "ABIO_CO2_SCHMIDT": { + "dependencies": { + "abio_dic_on": ".true." + }, "frequency": "never", "longname": "CO2 Schmidt Number for Abiotic DIC tracer fluxes", "operator": "average", From 741481164a1e4b7f77ecdb1f973a9d07e99d7565 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 08:58:59 -0600 Subject: [PATCH 20/64] Remove arrays of derived type with length zero if autotroph_cnt = 0, then we don't want to process autotroph_settings(:) when generating marbl_in --- MARBL_tools/MARBL_settings_file_class.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 2fe1b2a5..e2d2ca37 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -272,6 +272,8 @@ def _process_variable_value(self, category_name, variable_name, unit_system): if append_to_keys: # Remove PFT-specific key del self._config_keyword[-1] + if len(_get_array_info(this_var["_array_shape"], self.settings_dict, self.tracers_dict)) == 0: + del self._settings['PFT_derived_types'][variable_name] ################################################################################ From b93b88f973ab7fbc6b53fe9cef89abd337240af9 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 09:39:05 -0600 Subject: [PATCH 21/64] Add base_bio_on to config_keywords If base_bio_on == .false., autotroph_cnt, zooplankton_cnt, and max_grazer_prey_cnt should all be 0. Note that I also modified MARBL_settings_file_class to make sure that base_bio_on being false takes precendence over value of PFT_defaults when setting autotroph_cnt, etc --- MARBL_tools/MARBL_settings_file_class.py | 11 +++++++++++ defaults/json/settings_latest.json | 14 +++++++++----- defaults/settings_latest.yaml | 6 +++++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index e2d2ca37..774c9537 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -48,6 +48,15 @@ def __init__(self, default_settings_file, saved_state_vars_source="settings_file for cat_name in self.get_category_names(): for var_name in self.get_variable_names(cat_name): self._process_variable_value(cat_name, var_name, unit_system) + # 5a. Need to make sure base_bio_on appears after PFT_default in config_keywords + # So that it takes precedence when setting autotroph_cnt, zooplankton_cnt, and + # max_grazer_prey_cnt + config_keywords = self._config_keyword + if cat_name == "general_parms": + for n, key in enumerate(config_keywords): + if 'base_bio' in key: + self._config_keyword.pop(n) + self._config_keyword.append(key) # 5b. Need tracer count after determining PFT_derived_types, which means # determining which tracers are active if cat_name == "PFT_derived_types": @@ -272,6 +281,8 @@ def _process_variable_value(self, category_name, variable_name, unit_system): if append_to_keys: # Remove PFT-specific key del self._config_keyword[-1] + + # If array is length 0, remove it from settings dictionary if len(_get_array_info(this_var["_array_shape"], self.settings_dict, self.tracers_dict)) == 0: del self._settings['PFT_derived_types'][variable_name] diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index be3a4c78..d14caae7 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -5,7 +5,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 3, - "default": 1 + "default": 1, + "not base_bio_on": 0 }, "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", @@ -16,7 +17,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 3, - "default": 1 + "default": 1, + "not base_bio_on": 0 }, "longname": "Number of grazer prey classes", "subcategory": "1. config PFTs", @@ -26,7 +28,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 1, - "default": 1 + "default": 1, + "not base_bio_on": 0 }, "longname": "Number of zooplankton classes", "subcategory": "1. config PFTs", @@ -986,6 +989,7 @@ "units": "unitless" }, "base_bio_on": { + "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".true.", "longname": "Control whether the base ecosystem tracer module is active", @@ -1461,8 +1465,8 @@ "ALK", "ALK_ALT_CO2" ], - "base_bio_on == .false.": "", - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index a8a074a5..7ff949e6 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -276,6 +276,7 @@ general_parms : units : unitless datatype : logical default_value : .true. + _append_to_config_keywords : true abio_dic_on : longname : Control whether abiotic carbon tracer module is active subcategory : 2. config flags @@ -715,6 +716,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 3 + not base_bio_on : 0 cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : @@ -725,6 +727,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 1 + not base_bio_on : 0 max_grazer_prey_cnt : longname : Number of grazer prey classes subcategory : 1. config PFTs @@ -733,6 +736,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 3 + not base_bio_on : 0 ################################################################################ # Category 3: PFT_derived_types # @@ -1265,4 +1269,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE - base_bio_on == .false.: '' + not base_bio_on : '' From f47b462f6646979ce891dfb8522ff2f51fcc368d Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 10:29:17 -0600 Subject: [PATCH 22/64] More cleanup for running with base_bio_on = .false. If base_bio_on = .false. then PFT_defaults is treated as "None" regardless of its value (a message is added to the log, similar to the way cocco and 4p2z are treated as user-specified). Also realized a better solution to the problem addressed in the previous commit is to move PFT_defaults to general_parms2 so that its default can depend on base_bio_on; this means that autotroph_cnt and other _cnt variables can be set to zero when PFT_defaults = None, which is the new default for base_bio_on = .false. Lastly, cleaned up the diagnostics yaml file to note which diagnostics should only be defined when base_bio_on is true --- MARBL_tools/MARBL_settings_file_class.py | 9 - defaults/diagnostics_latest.yaml | 520 +++++++++++++++++------ defaults/json/diagnostics_latest.json | 431 +++++++++++++++++++ defaults/json/settings_latest.json | 70 +-- defaults/settings_latest.yaml | 51 +-- src/marbl_settings_mod.F90 | 14 + 6 files changed, 908 insertions(+), 187 deletions(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 774c9537..266c7b56 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -48,15 +48,6 @@ def __init__(self, default_settings_file, saved_state_vars_source="settings_file for cat_name in self.get_category_names(): for var_name in self.get_variable_names(cat_name): self._process_variable_value(cat_name, var_name, unit_system) - # 5a. Need to make sure base_bio_on appears after PFT_default in config_keywords - # So that it takes precedence when setting autotroph_cnt, zooplankton_cnt, and - # max_grazer_prey_cnt - config_keywords = self._config_keyword - if cat_name == "general_parms": - for n, key in enumerate(config_keywords): - if 'base_bio' in key: - self._config_keyword.pop(n) - self._config_keyword.append(key) # 5b. Need tracer count after determining PFT_derived_types, which means # determining which tracers are active if cat_name == "PFT_derived_types": diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 7e8e2afe..648f5f43 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -22,6 +22,8 @@ ############### ECOSYS_IFRAC : + dependencies : + base_bio_on : .true. longname : Ice Fraction for base biotic tracer fluxes # Want more consistent capitalization units : fraction vertical_grid : none @@ -32,6 +34,8 @@ ECOSYS_IFRAC : - average - average ECOSYS_XKW : + dependencies : + base_bio_on : .true. longname : XKW for base biotic tracer fluxes # Want more consistent capitalization units : cm/s vertical_grid : none @@ -42,30 +46,40 @@ ECOSYS_XKW : - average - average ECOSYS_ATM_PRESS : + dependencies : + base_bio_on : .true. longname : Atmospheric Pressure for base biotic tracer fluxes # Want more consistent capitalization units : atmospheres vertical_grid : none frequency : medium operator : average PV_O2 : + dependencies : + base_bio_on : .true. longname : PV_O2 # Should be "O2 Piston Velocity" to match PV_CO2? units : cm/s vertical_grid : none frequency : never operator : average SCHMIDT_O2 : + dependencies : + base_bio_on : .true. longname : O2 Schmidt Number units : 1 vertical_grid : none frequency : medium operator : average O2SAT : + dependencies : + base_bio_on : .true. longname : O2 Saturation units : mmol/m^3 vertical_grid : none frequency : medium operator : average CO2STAR : &CO2STAR + dependencies : + base_bio_on : .true. longname : CO2 Star units : mmol/m^3 vertical_grid : none @@ -75,6 +89,8 @@ CO2STAR_ALT_CO2 : << : *CO2STAR longname : CO2 Star, Alternate CO2 DCO2STAR : &DCO2STAR + dependencies : + base_bio_on : .true. longname : D CO2 Star units : mmol/m^3 vertical_grid : none @@ -84,6 +100,8 @@ DCO2STAR_ALT_CO2 : << : *DCO2STAR longname : D CO2 Star, Alternative CO2 pCO2SURF : &pCO2SURF + dependencies : + base_bio_on : .true. longname : surface pCO2 units : ppmv vertical_grid : none @@ -95,6 +113,8 @@ pCO2SURF_ALT_CO2 : frequency : never operator : average DpCO2 : &DpCO2 + dependencies : + base_bio_on : .true. longname : D pCO2 for base biotic tracer fluxes units : ppmv vertical_grid : none @@ -110,18 +130,24 @@ DpCO2_ALT_CO2 : frequency : medium operator : average PV_CO2 : + dependencies : + base_bio_on : .true. longname : CO2 Piston Velocity for base biotic tracer fluxes units : cm/s vertical_grid : none frequency : never operator : average SCHMIDT_CO2 : + dependencies : + base_bio_on : .true. longname : CO2 Schmidt Number for base biotic tracers fluxes units : 1 vertical_grid : none frequency : medium operator : average FG_CO2 : &FG_CO2 # rename ind%DIC_GAS_FLUX -> ind%FG_CO2 + dependencies : + base_bio_on : .true. longname : DIC Surface Gas Flux units : mmol/m^3 cm/s vertical_grid : none @@ -137,6 +163,8 @@ FG_ALT_CO2 : # rename ind%DIC_GAS_FLUX_ALT_CO2 -> ind%FG_ALT_CO2 frequency : medium operator : average PH : &PH + dependencies : + base_bio_on : .true. longname : Surface pH units : 1 vertical_grid : none @@ -146,6 +174,8 @@ PH_ALT_CO2 : << : *PH longname : Surface pH, Alternative CO2 ATM_CO2 : &ATM_CO2 + dependencies : + base_bio_on : .true. longname : Atomspheric CO2 units : ppmv vertical_grid : none @@ -155,36 +185,171 @@ ATM_ALT_CO2 : << : *ATM_CO2 longname : Atomspheric CO2 IRON_FLUX : + dependencies : + base_bio_on : .true. longname : Atmospheric Iron Flux units : mmol/m^2/s vertical_grid : none frequency : medium operator : average DUST_FLUX : + dependencies : + base_bio_on : .true. longname : Dust Flux # Should be "Atmospheric Dust Flux?" units : g/cm^2/s vertical_grid : none frequency : never operator : average NOx_FLUX : + dependencies : + base_bio_on : .true. longname : Flux of NOx from Atmosphere units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average NHy_FLUX : + dependencies : + base_bio_on : .true. longname : Flux of NHy from Atmosphere units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average NHx_SURFACE_EMIS : + dependencies : + base_bio_on : .true. longname : Emission of NHx to Atmosphere units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average +############### +# abio module # +############### + +ABIO_IFRAC : + dependencies : + abio_dic_on : .true. + longname : Ice Fraction for Abiotic DIC tracer fluxes + units : fraction + vertical_grid : none + frequency : never + operator : average +ABIO_XKW : + dependencies : + abio_dic_on : .true. + longname : XKW for Abiotic DIC tracer fluxes + units : cm/s + vertical_grid : none + frequency : never + operator : average +ABIO_ATM_PRESS : + dependencies : + abio_dic_on : .true. + longname : Atmospheric Pressure for Abiotic DIC tracer fluxes + units : atmospheres + vertical_grid : none + frequency : never + operator : average +ABIO_pCO2 : + dependencies : + abio_dic_on : .true. + longname : CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes + units : ppm + vertical_grid : none + frequency : medium + operator : average +ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO version + dependencies : + abio_dic_on : .true. + longname : Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes + units : permil + vertical_grid : none + frequency : medium + operator : average +ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version + dependencies : + abio_dic_on : .true. + longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes + units : 1 + vertical_grid : none + frequency : never + operator : average +ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version + dependencies : + abio_dic_on : .true. + longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes + units : cm/s + vertical_grid : none + frequency : never + operator : average +ABIO_CO2STAR : + dependencies : + abio_dic_on : .true. + longname : CO2 Star for Abiotic DIC tracer fluxes + units : mmol/m^3 + vertical_grid : none + frequency : medium + operator : average +ABIO_DCO2STAR : + dependencies : + abio_dic_on : .true. + longname : D CO2 Star for Abiotic DIC tracer fluxes + units : mmol/m^3 + vertical_grid : none + frequency : medium + operator : average +ABIO_pCO2SURF : + dependencies : + abio_dic_on : .true. + longname : Surface pCO2 for Abiotic DIC tracer fluxes + units : ppmv + vertical_grid : none + frequency : medium + operator : average +ABIO_DpCO2 : + dependencies : + abio_dic_on : .true. + longname : D pCO2 for Abiotic DIC tracer fluxes + units : ppmv + vertical_grid : none + frequency : medium + operator : average +ABIO_PH_SURF : # todo: for base biotic tracers, there is no _SURF + dependencies : + abio_dic_on : .true. + longname : Surface pH for Abiotic DIC tracer fluxes + units : 1 + vertical_grid : none + frequency : medium + operator : average +ABIO_ALK_SURF : + dependencies : + abio_dic_on : .true. + longname : Surface Alkalinity for Abiotic DIC tracer fluxes + units : meq/m^3 + vertical_grid : none + frequency : medium + operator : average +FG_ABIO_DIC : + dependencies : + abio_dic_on : .true. + longname : Surface gas flux of abiotic DIC + units : mmol/m^3 cm/s + vertical_grid : none + frequency : medium + operator : average +FG_ABIO_DIC14 : + dependencies : + abio_dic_on : .true. + longname : Surface gas flux of abiotic DI14C + units : mmol/m^3 cm/s + vertical_grid : none + frequency : medium + operator : average + ############### # ciso module # ############### @@ -327,114 +492,152 @@ CISO_R14C_atm : ############### zsatcalc : + dependencies : + base_bio_on : .true. longname : Calcite Saturation Depth units : cm vertical_grid : none frequency : medium operator : average zsatarag : + dependencies : + base_bio_on : .true. longname : Aragonite Saturation Depth units : cm vertical_grid : none frequency : medium operator : average O2_ZMIN : + dependencies : + base_bio_on : .true. longname : Vertical Minimum of O2 units : mmol/m^3 vertical_grid : none frequency : medium operator : average O2_ZMIN_DEPTH : + dependencies : + base_bio_on : .true. longname : Vertical Minimum of O2 units : cm vertical_grid : none frequency : medium operator : average photoC_TOT_zint : + dependencies : + base_bio_on : .true. longname : Total C Fixation Vertical Integral units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average photoC_TOT_zint_100m : + dependencies : + base_bio_on : .true. longname : Total C Fixation Vertical Integral, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average photoC_NO3_TOT_zint : + dependencies : + base_bio_on : .true. longname : Total C Fixation from NO3 Vertical Integral units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average photoC_NO3_TOT_zint_100m : + dependencies : + base_bio_on : .true. longname : Total C Fixation from NO3 Vertical Integral, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOC_prod_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOC Production units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOC_prod_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOC Production, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOC_remin_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOC Remineralization units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOC_remin_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOC Remineralization, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOCr_remin_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOCr Remineralization units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average DOCr_remin_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of DOCr Remineralization, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average Jint_Ctot : + dependencies : + base_bio_on : .true. longname : Vertical Integral of Conservative Subterms of Source Sink Term for Ctot units : mmol/m^3 cm/s vertical_grid : none frequency : never operator : average Jint_Ntot : + dependencies : + base_bio_on : .true. longname : Vertical Integral of Conservative Subterms of Source Sink Term for Ntot units : mmol/m^3 cm/s vertical_grid : none frequency : never operator : average Jint_Ptot : + dependencies : + base_bio_on : .true. longname : Vertical Integral of Conservative Subterms of Source Sink Term for Ptot units : mmol/m^3 cm/s vertical_grid : none frequency : never operator : average Jint_Sitot : + dependencies : + base_bio_on : .true. longname : Vertical Integral of Conservative Subterms of Source Sink Term for Sitot units : mmol/m^3 cm/s vertical_grid : none frequency : never operator : average Jint_Fetot : + dependencies : + base_bio_on : .true. longname : Vertical Integral of Conservative Subterms of Source Sink Term for Fetot units : mmol/m^3 cm/s vertical_grid : none @@ -443,24 +646,32 @@ Jint_Fetot : # Particulate 2D diags calcToFloor : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux Hitting Sea Floor units : nmol/cm^2/s vertical_grid : none frequency : never operator : average calcToSed : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average calcToSed_ALT_CO2 : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux to Sediments, Alternative CO2 units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average pocToFloor : + dependencies : + base_bio_on : .true. longname : POC Flux Hitting Sea Floor units : nmol/cm^2/s vertical_grid : none @@ -471,54 +682,72 @@ pocToFloor : - average - average pocToSed : + dependencies : + base_bio_on : .true. longname : POC Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average ponToSed : + dependencies : + base_bio_on : .true. longname : nitrogen burial Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average SedDenitrif : + dependencies : + base_bio_on : .true. longname : nitrogen loss in Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average OtherRemin : + dependencies : + base_bio_on : .true. longname : non-oxic,non-dentr remin in Sediments units : nmol/cm^2/s vertical_grid : none frequency : never operator : average popToSed : + dependencies : + base_bio_on : .true. longname : phosphorus Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average bsiToSed : + dependencies : + base_bio_on : .true. longname : biogenic Si Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average dustToSed : + dependencies : + base_bio_on : .true. longname : dust Flux to Sediments units : g/cm^2/s vertical_grid : none frequency : medium operator : average pfeToSed : + dependencies : + base_bio_on : .true. longname : pFe Flux to Sediments units : nmol/cm^2/s vertical_grid : none frequency : medium operator : average CaCO3_form_zint : + dependencies : + base_bio_on : .true. longname : Total CaCO3 Formation Vertical Integral units : mmol/m^3 cm/s vertical_grid : none @@ -529,6 +758,8 @@ CaCO3_form_zint : - average - average CaCO3_form_zint_100m : + dependencies : + base_bio_on : .true. longname : Total CaCO3 Formation Vertical Integral, 0-100m units : mmol/m^3 cm/s vertical_grid : none @@ -537,84 +768,112 @@ CaCO3_form_zint_100m : # General 3D diags insitu_temp : + dependencies : + base_bio_on : .true. longname : in situ temperature units : degC vertical_grid : layer_avg frequency : medium operator : average CO3 : + dependencies : + base_bio_on : .true. longname : Carbonate Ion Concentration units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average HCO3 : + dependencies : + base_bio_on : .true. longname : Bicarbonate Ion Concentration units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average H2CO3 : + dependencies : + base_bio_on : .true. longname : Carbonic Acid Concentration units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average pH_3D : + dependencies : + base_bio_on : .true. longname : pH units : 1 vertical_grid : layer_avg frequency : medium operator : average CO3_ALT_CO2 : + dependencies : + base_bio_on : .true. longname : Carbonate Ion Concentration, Alternative CO2 units : mmol/m^3 vertical_grid : layer_avg frequency : never operator : average HCO3_ALT_CO2 : + dependencies : + base_bio_on : .true. longname : Bicarbonate Ion Concentration, Alternative CO2 units : mmol/m^3 vertical_grid : layer_avg frequency : never operator : average H2CO3_ALT_CO2 : + dependencies : + base_bio_on : .true. longname : Carbonic Acid Concentration, Alternative CO2 units : mmol/m^3 vertical_grid : layer_avg frequency : never operator : average pH_3D_ALT_CO2 : + dependencies : + base_bio_on : .true. longname : pH, Alternative CO2 units : 1 vertical_grid : layer_avg frequency : never operator : average co3_sat_calc : + dependencies : + base_bio_on : .true. longname : CO3 concentration at calcite saturation units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average co3_sat_arag : + dependencies : + base_bio_on : .true. longname : CO3 concentration at aragonite saturation units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average NITRIF : + dependencies : + base_bio_on : .true. longname : Nitrification units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average DENITRIF : + dependencies : + base_bio_on : .true. longname : Denitrification units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average O2_PRODUCTION : + dependencies : + base_bio_on : .true. longname : O2 Production units : mmol/m^3/s vertical_grid : layer_avg @@ -622,6 +881,7 @@ O2_PRODUCTION : operator : average O2_CONSUMPTION_SCALEF : dependencies : + base_bio_on : .true. lo2_consumption_scalef : .true. longname : O2 Consumption Scale Factor units : 1 @@ -629,150 +889,200 @@ O2_CONSUMPTION_SCALEF : frequency : never operator : average O2_CONSUMPTION : + dependencies : + base_bio_on : .true. longname : O2 Consumption units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average AOU : + dependencies : + base_bio_on : .true. longname : Apparent O2 Utilization units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average PAR_avg : + dependencies : + base_bio_on : .true. longname : PAR Average over Model Cell units : W/m^2 vertical_grid : layer_avg frequency : medium operator : average graze_auto_TOT : + dependencies : + base_bio_on : .true. longname : Total Autotroph Grazing units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average photoC_TOT : + dependencies : + base_bio_on : .true. longname : Total C Fixation units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average photoC_NO3_TOT : + dependencies : + base_bio_on : .true. longname : Total C Fixation from NO3 units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average DOC_prod : + dependencies : + base_bio_on : .true. longname : DOC Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average DOC_remin : + dependencies : + base_bio_on : .true. longname : DOC Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DOCr_remin : + dependencies : + base_bio_on : .true. longname : DOCr Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DON_prod : + dependencies : + base_bio_on : .true. longname : DON Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average DON_remin : + dependencies : + base_bio_on : .true. longname : DON Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DONr_remin : + dependencies : + base_bio_on : .true. longname : DONr Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DOP_prod : + dependencies : + base_bio_on : .true. longname : DOP Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average DOP_remin : + dependencies : + base_bio_on : .true. longname : DOP Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DOPr_remin : + dependencies : + base_bio_on : .true. longname : DOPr Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average DOP_loss_P_bal : + dependencies : + base_bio_on : .true. longname : DOP loss, due to P budget balancing units : mmol/m^3/s vertical_grid : layer_avg frequency : never operator : average Fe_scavenge : + dependencies : + base_bio_on : .true. longname : Iron Scavenging units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average Fe_scavenge_rate : + dependencies : + base_bio_on : .true. longname : Iron Scavenging Rate units : 1/y vertical_grid : layer_avg frequency : medium operator : average Lig_prod : + dependencies : + base_bio_on : .true. longname : Production of Fe-binding Ligand units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average Lig_loss : + dependencies : + base_bio_on : .true. longname : Loss of Fe-binding Ligand units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average Lig_scavenge : + dependencies : + base_bio_on : .true. longname : Fe not bound to Ligand units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average Fefree : + dependencies : + base_bio_on : .true. longname : Fe not bound to Ligand units : mmol/m^3 vertical_grid : layer_avg frequency : medium operator : average Lig_photochem : + dependencies : + base_bio_on : .true. longname : Loss of Fe-binding Ligand from UV radiation units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average Lig_deg : + dependencies : + base_bio_on : .true. longname : Loss of Fe-binding Ligand from Bacterial Degradation units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average FESEDFLUX : + dependencies : + base_bio_on : .true. longname : Iron Sediment Flux units : nmol/cm^2/s vertical_grid : layer_avg @@ -781,90 +1091,120 @@ FESEDFLUX : # Particulate 2D diags POC_FLUX_((particulate_flux_ref_depth_str)) : + dependencies : + base_bio_on : .true. longname : POC Flux at ((particulate_flux_ref_depth_str)) units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POP_FLUX_((particulate_flux_ref_depth_str)) : + dependencies : + base_bio_on : .true. longname : POP Flux at ((particulate_flux_ref_depth_str)) units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average CaCO3_FLUX_((particulate_flux_ref_depth_str)) : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux at ((particulate_flux_ref_depth_str)) units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average SiO2_FLUX_((particulate_flux_ref_depth_str)) : + dependencies : + base_bio_on : .true. longname : SiO2 Flux at ((particulate_flux_ref_depth_str)) units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average P_iron_FLUX_((particulate_flux_ref_depth_str)) : + dependencies : + base_bio_on : .true. longname : P_iron Flux at ((particulate_flux_ref_depth_str)) units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_PROD_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Production units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_PROD_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Production, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_REMIN_DOCr_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Remineralization routed to DOCr units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_REMIN_DOCr_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Remineralization routed to DOCr, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_REMIN_DIC_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Remineralization routed to DIC units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average POC_REMIN_DIC_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of POC Remineralization routed to DIC, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average CaCO3_PROD_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of CaCO3 Production units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average CaCO3_PROD_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of CaCO3 Production, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average CaCO3_REMIN_zint : + dependencies : + base_bio_on : .true. longname : Vertical Integral of CaCO3 Remineralization units : mmol/m^3 cm/s vertical_grid : none frequency : medium operator : average CaCO3_REMIN_zint_100m : + dependencies : + base_bio_on : .true. longname : Vertical Integral of CaCO3 Remineralization, 0-100m units : mmol/m^3 cm/s vertical_grid : none @@ -874,6 +1214,7 @@ CaCO3_REMIN_zint_100m : # Particulate 3D diags P_REMIN_SCALEF : dependencies : + base_bio_on : .true. lp_remin_scalef : .true. longname : Particulate Remin Scale Factor units : 1 @@ -881,174 +1222,232 @@ P_REMIN_SCALEF : frequency : never operator : average POC_FLUX_IN : + dependencies : + base_bio_on : .true. longname : POC Flux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : medium operator : average POC_sFLUX_IN : + dependencies : + base_bio_on : .true. longname : POC sFlux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : never operator : average POC_hFLUX_IN : + dependencies : + base_bio_on : .true. longname : POC hFlux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : never operator : average POC_PROD : + dependencies : + base_bio_on : .true. longname : POC Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average POC_REMIN_DOCr : + dependencies : + base_bio_on : .true. longname : POC Remineralization routed to DOCr units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average POC_REMIN_DIC : + dependencies : + base_bio_on : .true. longname : POC Remineralization routed to DIC units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average POP_FLUX_IN : + dependencies : + base_bio_on : .true. longname : POP Flux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : medium operator : average POP_PROD : + dependencies : + base_bio_on : .true. longname : POP Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average POP_REMIN_DOPr : + dependencies : + base_bio_on : .true. longname : POP Remineralization routed to DOPr units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average POP_REMIN_PO4 : + dependencies : + base_bio_on : .true. longname : POP Remineralization routed to PO4 units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average PON_REMIN_DONr : + dependencies : + base_bio_on : .true. longname : PON Remineralization routed to DONr units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average PON_REMIN_NH4 : + dependencies : + base_bio_on : .true. longname : PON Remineralization routed to NH4 units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average CaCO3_FLUX_IN : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : low operator : average CaCO3_PROD : + dependencies : + base_bio_on : .true. longname : CaCO3 Production units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average CaCO3_REMIN : + dependencies : + base_bio_on : .true. longname : CaCO3 Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average CaCO3_ALT_CO2_FLUX_IN : + dependencies : + base_bio_on : .true. longname : CaCO3 Flux into Cell, Alternative CO2 units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : low operator : average CaCO3_ALT_CO2_PROD : + dependencies : + base_bio_on : .true. longname : CaCO3 Production, Alternative CO2 units : mmol/m^3/s vertical_grid : layer_avg frequency : never operator : average CaCO3_ALT_CO2_REMIN : + dependencies : + base_bio_on : .true. longname : CaCO3 Remineralization, Alternative CO2 units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average SiO2_FLUX_IN : + dependencies : + base_bio_on : .true. longname : SiO2 Flux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : medium operator : average SiO2_PROD : + dependencies : + base_bio_on : .true. longname : SiO2 Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average SiO2_REMIN : + dependencies : + base_bio_on : .true. longname : SiO2 Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : never operator : average dust_FLUX_IN : + dependencies : + base_bio_on : .true. longname : Dust Flux into Cell units : g/cm^2/s vertical_grid : layer_avg frequency : medium operator : average dust_REMIN : + dependencies : + base_bio_on : .true. longname : Dust Remineralization units : g/cm^3/s vertical_grid : layer_avg frequency : medium operator : average P_iron_FLUX_IN : + dependencies : + base_bio_on : .true. longname : P_iron Flux into Cell units : mmol/m^3 cm/s vertical_grid : layer_avg frequency : medium operator : average P_iron_PROD : + dependencies : + base_bio_on : .true. longname : P_iron Production units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average P_iron_REMIN : + dependencies : + base_bio_on : .true. longname : P_iron Remineralization units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average bSi_form : + dependencies : + base_bio_on : .true. longname : Total Si Uptake units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average CaCO3_form : + dependencies : + base_bio_on : .true. longname : Total CaCO3 Formation units : mmol/m^3/s vertical_grid : layer_avg frequency : low operator : average Nfix : + dependencies : + base_bio_on : .true. longname : Total N Fixation units : mmol/m^3/s vertical_grid : layer_avg @@ -1059,127 +1458,6 @@ Nfix : # abio module # ############### -# 2D fields -ABIO_IFRAC : - dependencies : - abio_dic_on : .true. - longname : Ice Fraction for Abiotic DIC tracer fluxes - units : fraction - vertical_grid : none - frequency : never - operator : average -ABIO_XKW : - dependencies : - abio_dic_on : .true. - longname : XKW for Abiotic DIC tracer fluxes - units : cm/s - vertical_grid : none - frequency : never - operator : average -ABIO_ATM_PRESS : - dependencies : - abio_dic_on : .true. - longname : Atmospheric Pressure for Abiotic DIC tracer fluxes - units : atmospheres - vertical_grid : none - frequency : never - operator : average -ABIO_pCO2 : - dependencies : - abio_dic_on : .true. - longname : CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes - units : ppm - vertical_grid : none - frequency : medium - operator : average -ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO version - dependencies : - abio_dic_on : .true. - longname : Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes - units : permil - vertical_grid : none - frequency : medium - operator : average -ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version - dependencies : - abio_dic_on : .true. - longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes - units : 1 - vertical_grid : none - frequency : never - operator : average -ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version - dependencies : - abio_dic_on : .true. - longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes - units : cm/s - vertical_grid : none - frequency : never - operator : average -ABIO_CO2STAR : - dependencies : - abio_dic_on : .true. - longname : CO2 Star for Abiotic DIC tracer fluxes - units : mmol/m^3 - vertical_grid : none - frequency : medium - operator : average -ABIO_DCO2STAR : - dependencies : - abio_dic_on : .true. - longname : D CO2 Star for Abiotic DIC tracer fluxes - units : mmol/m^3 - vertical_grid : none - frequency : medium - operator : average -ABIO_pCO2SURF : - dependencies : - abio_dic_on : .true. - longname : Surface pCO2 for Abiotic DIC tracer fluxes - units : ppmv - vertical_grid : none - frequency : medium - operator : average -ABIO_DpCO2 : - dependencies : - abio_dic_on : .true. - longname : D pCO2 for Abiotic DIC tracer fluxes - units : ppmv - vertical_grid : none - frequency : medium - operator : average -ABIO_PH_SURF : # todo: for base biotic tracers, there is no _SURF - dependencies : - abio_dic_on : .true. - longname : Surface pH for Abiotic DIC tracer fluxes - units : 1 - vertical_grid : none - frequency : medium - operator : average -ABIO_ALK_SURF : - dependencies : - abio_dic_on : .true. - longname : Surface Alkalinity for Abiotic DIC tracer fluxes - units : meq/m^3 - vertical_grid : none - frequency : medium - operator : average -FG_ABIO_DIC : - dependencies : - abio_dic_on : .true. - longname : Surface gas flux of abiotic DIC - units : mmol/m^3 cm/s - vertical_grid : none - frequency : medium - operator : average -FG_ABIO_DIC14 : - dependencies : - abio_dic_on : .true. - longname : Surface gas flux of abiotic DI14C - units : mmol/m^3 cm/s - vertical_grid : none - frequency : medium - operator : average ABIO_D14Cocn : # todo add underscore after D14C to be consistent with CISO version dependencies : abio_dic_on : .true. diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index efee221e..d3465949 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -499,6 +499,9 @@ "vertical_grid": "none" }, "AOU": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Apparent O2 Utilization", "operator": "average", @@ -506,6 +509,9 @@ "vertical_grid": "layer_avg" }, "ATM_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Atomspheric CO2", "operator": "average", @@ -513,6 +519,9 @@ "vertical_grid": "none" }, "ATM_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Atomspheric CO2", "operator": "average", @@ -1130,6 +1139,9 @@ "vertical_grid": "layer_avg" }, "CO2STAR": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CO2 Star", "operator": "average", @@ -1137,6 +1149,9 @@ "vertical_grid": "none" }, "CO2STAR_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CO2 Star, Alternate CO2", "operator": "average", @@ -1144,6 +1159,9 @@ "vertical_grid": "none" }, "CO3": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Carbonate Ion Concentration", "operator": "average", @@ -1151,6 +1169,9 @@ "vertical_grid": "layer_avg" }, "CO3_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Carbonate Ion Concentration, Alternative CO2", "operator": "average", @@ -1158,6 +1179,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_ALT_CO2_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "CaCO3 Flux into Cell, Alternative CO2", "operator": "average", @@ -1165,6 +1189,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_ALT_CO2_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "CaCO3 Production, Alternative CO2", "operator": "average", @@ -1172,6 +1199,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_ALT_CO2_REMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "CaCO3 Remineralization, Alternative CO2", "operator": "average", @@ -1179,6 +1209,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_FLUX_((particulate_flux_ref_depth_str))": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CaCO3 Flux at ((particulate_flux_ref_depth_str))", "operator": "average", @@ -1186,6 +1219,9 @@ "vertical_grid": "none" }, "CaCO3_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "CaCO3 Flux into Cell", "operator": "average", @@ -1193,6 +1229,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "CaCO3 Production", "operator": "average", @@ -1200,6 +1239,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_PROD_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of CaCO3 Production", "operator": "average", @@ -1207,6 +1249,9 @@ "vertical_grid": "none" }, "CaCO3_PROD_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of CaCO3 Production, 0-100m", "operator": "average", @@ -1214,6 +1259,9 @@ "vertical_grid": "none" }, "CaCO3_REMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "CaCO3 Remineralization", "operator": "average", @@ -1221,6 +1269,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_REMIN_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of CaCO3 Remineralization", "operator": "average", @@ -1228,6 +1279,9 @@ "vertical_grid": "none" }, "CaCO3_REMIN_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of CaCO3 Remineralization, 0-100m", "operator": "average", @@ -1235,6 +1289,9 @@ "vertical_grid": "none" }, "CaCO3_form": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "Total CaCO3 Formation", "operator": "average", @@ -1242,6 +1299,9 @@ "vertical_grid": "layer_avg" }, "CaCO3_form_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -1255,6 +1315,9 @@ "vertical_grid": "none" }, "CaCO3_form_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total CaCO3 Formation Vertical Integral, 0-100m", "operator": "average", @@ -1262,6 +1325,9 @@ "vertical_grid": "none" }, "DCO2STAR": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "D CO2 Star", "operator": "average", @@ -1269,6 +1335,9 @@ "vertical_grid": "none" }, "DCO2STAR_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "D CO2 Star, Alternative CO2", "operator": "average", @@ -1276,6 +1345,9 @@ "vertical_grid": "none" }, "DENITRIF": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Denitrification", "operator": "average", @@ -1283,6 +1355,9 @@ "vertical_grid": "layer_avg" }, "DOC_prod": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "DOC Production", "operator": "average", @@ -1290,6 +1365,9 @@ "vertical_grid": "layer_avg" }, "DOC_prod_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOC Production", "operator": "average", @@ -1297,6 +1375,9 @@ "vertical_grid": "none" }, "DOC_prod_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOC Production, 0-100m", "operator": "average", @@ -1304,6 +1385,9 @@ "vertical_grid": "none" }, "DOC_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DOC Remineralization", "operator": "average", @@ -1311,6 +1395,9 @@ "vertical_grid": "layer_avg" }, "DOC_remin_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOC Remineralization", "operator": "average", @@ -1318,6 +1405,9 @@ "vertical_grid": "none" }, "DOC_remin_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOC Remineralization, 0-100m", "operator": "average", @@ -1325,6 +1415,9 @@ "vertical_grid": "none" }, "DOCr_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DOCr Remineralization", "operator": "average", @@ -1332,6 +1425,9 @@ "vertical_grid": "layer_avg" }, "DOCr_remin_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOCr Remineralization", "operator": "average", @@ -1339,6 +1435,9 @@ "vertical_grid": "none" }, "DOCr_remin_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of DOCr Remineralization, 0-100m", "operator": "average", @@ -1346,6 +1445,9 @@ "vertical_grid": "none" }, "DON_prod": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "DON Production", "operator": "average", @@ -1353,6 +1455,9 @@ "vertical_grid": "layer_avg" }, "DON_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DON Remineralization", "operator": "average", @@ -1360,6 +1465,9 @@ "vertical_grid": "layer_avg" }, "DONr_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DONr Remineralization", "operator": "average", @@ -1375,6 +1483,9 @@ "vertical_grid": "layer_avg" }, "DOP_loss_P_bal": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "DOP loss, due to P budget balancing", "operator": "average", @@ -1382,6 +1493,9 @@ "vertical_grid": "layer_avg" }, "DOP_prod": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "DOP Production", "operator": "average", @@ -1389,6 +1503,9 @@ "vertical_grid": "layer_avg" }, "DOP_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DOP Remineralization", "operator": "average", @@ -1396,6 +1513,9 @@ "vertical_grid": "layer_avg" }, "DOPr_remin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "DOPr Remineralization", "operator": "average", @@ -1403,6 +1523,9 @@ "vertical_grid": "layer_avg" }, "DUST_FLUX": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Dust Flux", "operator": "average", @@ -1410,6 +1533,9 @@ "vertical_grid": "none" }, "DpCO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -1423,6 +1549,9 @@ "vertical_grid": "none" }, "DpCO2_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "D pCO2, Alternative CO2", "operator": "average", @@ -1430,6 +1559,9 @@ "vertical_grid": "none" }, "ECOSYS_ATM_PRESS": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Atmospheric Pressure for base biotic tracer fluxes", "operator": "average", @@ -1437,6 +1569,9 @@ "vertical_grid": "none" }, "ECOSYS_IFRAC": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -1450,6 +1585,9 @@ "vertical_grid": "none" }, "ECOSYS_XKW": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -1463,6 +1601,9 @@ "vertical_grid": "none" }, "FESEDFLUX": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Iron Sediment Flux", "operator": "average", @@ -1490,6 +1631,9 @@ "vertical_grid": "none" }, "FG_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "DIC Surface Gas Flux, Alternative CO2", "operator": "average", @@ -1497,6 +1641,9 @@ "vertical_grid": "none" }, "FG_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -1510,6 +1657,9 @@ "vertical_grid": "none" }, "Fe_scavenge": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Iron Scavenging", "operator": "average", @@ -1517,6 +1667,9 @@ "vertical_grid": "layer_avg" }, "Fe_scavenge_rate": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Iron Scavenging Rate", "operator": "average", @@ -1524,6 +1677,9 @@ "vertical_grid": "layer_avg" }, "Fefree": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Fe not bound to Ligand", "operator": "average", @@ -1531,6 +1687,9 @@ "vertical_grid": "layer_avg" }, "H2CO3": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Carbonic Acid Concentration", "operator": "average", @@ -1538,6 +1697,9 @@ "vertical_grid": "layer_avg" }, "H2CO3_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Carbonic Acid Concentration, Alternative CO2", "operator": "average", @@ -1545,6 +1707,9 @@ "vertical_grid": "layer_avg" }, "HCO3": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Bicarbonate Ion Concentration", "operator": "average", @@ -1552,6 +1717,9 @@ "vertical_grid": "layer_avg" }, "HCO3_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Bicarbonate Ion Concentration, Alternative CO2", "operator": "average", @@ -1559,6 +1727,9 @@ "vertical_grid": "layer_avg" }, "IRON_FLUX": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Atmospheric Iron Flux", "operator": "average", @@ -1566,6 +1737,9 @@ "vertical_grid": "none" }, "Jint_Ctot": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Vertical Integral of Conservative Subterms of Source Sink Term for Ctot", "operator": "average", @@ -1573,6 +1747,9 @@ "vertical_grid": "none" }, "Jint_Fetot": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Vertical Integral of Conservative Subterms of Source Sink Term for Fetot", "operator": "average", @@ -1580,6 +1757,9 @@ "vertical_grid": "none" }, "Jint_Ntot": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Vertical Integral of Conservative Subterms of Source Sink Term for Ntot", "operator": "average", @@ -1587,6 +1767,9 @@ "vertical_grid": "none" }, "Jint_Ptot": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Vertical Integral of Conservative Subterms of Source Sink Term for Ptot", "operator": "average", @@ -1594,6 +1777,9 @@ "vertical_grid": "none" }, "Jint_Sitot": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Vertical Integral of Conservative Subterms of Source Sink Term for Sitot", "operator": "average", @@ -1601,6 +1787,9 @@ "vertical_grid": "none" }, "Lig_deg": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Loss of Fe-binding Ligand from Bacterial Degradation", "operator": "average", @@ -1608,6 +1797,9 @@ "vertical_grid": "layer_avg" }, "Lig_loss": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Loss of Fe-binding Ligand", "operator": "average", @@ -1615,6 +1807,9 @@ "vertical_grid": "layer_avg" }, "Lig_photochem": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Loss of Fe-binding Ligand from UV radiation", "operator": "average", @@ -1622,6 +1817,9 @@ "vertical_grid": "layer_avg" }, "Lig_prod": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Production of Fe-binding Ligand", "operator": "average", @@ -1629,6 +1827,9 @@ "vertical_grid": "layer_avg" }, "Lig_scavenge": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Fe not bound to Ligand", "operator": "average", @@ -1636,6 +1837,9 @@ "vertical_grid": "layer_avg" }, "NHx_SURFACE_EMIS": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Emission of NHx to Atmosphere", "operator": "average", @@ -1643,6 +1847,9 @@ "vertical_grid": "none" }, "NHy_FLUX": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Flux of NHy from Atmosphere", "operator": "average", @@ -1650,6 +1857,9 @@ "vertical_grid": "none" }, "NITRIF": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Nitrification", "operator": "average", @@ -1657,6 +1867,9 @@ "vertical_grid": "layer_avg" }, "NOx_FLUX": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Flux of NOx from Atmosphere", "operator": "average", @@ -1664,6 +1877,9 @@ "vertical_grid": "none" }, "Nfix": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "Total N Fixation", "operator": "average", @@ -1671,6 +1887,9 @@ "vertical_grid": "layer_avg" }, "O2SAT": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "O2 Saturation", "operator": "average", @@ -1678,6 +1897,9 @@ "vertical_grid": "none" }, "O2_CONSUMPTION": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "O2 Consumption", "operator": "average", @@ -1686,6 +1908,7 @@ }, "O2_CONSUMPTION_SCALEF": { "dependencies": { + "base_bio_on": ".true.", "lo2_consumption_scalef": ".true." }, "frequency": "never", @@ -1695,6 +1918,9 @@ "vertical_grid": "layer_avg" }, "O2_PRODUCTION": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "O2 Production", "operator": "average", @@ -1702,6 +1928,9 @@ "vertical_grid": "layer_avg" }, "O2_ZMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Minimum of O2", "operator": "average", @@ -1709,6 +1938,9 @@ "vertical_grid": "none" }, "O2_ZMIN_DEPTH": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Minimum of O2", "operator": "average", @@ -1716,6 +1948,9 @@ "vertical_grid": "none" }, "OtherRemin": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "non-oxic,non-dentr remin in Sediments", "operator": "average", @@ -1723,6 +1958,9 @@ "vertical_grid": "none" }, "PAR_avg": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "PAR Average over Model Cell", "operator": "average", @@ -1730,6 +1968,9 @@ "vertical_grid": "layer_avg" }, "PH": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Surface pH", "operator": "average", @@ -1737,6 +1978,9 @@ "vertical_grid": "none" }, "PH_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Surface pH, Alternative CO2", "operator": "average", @@ -1752,6 +1996,9 @@ "vertical_grid": "layer_avg" }, "POC_FLUX_((particulate_flux_ref_depth_str))": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POC Flux at ((particulate_flux_ref_depth_str))", "operator": "average", @@ -1759,6 +2006,9 @@ "vertical_grid": "none" }, "POC_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POC Flux into Cell", "operator": "average", @@ -1766,6 +2016,9 @@ "vertical_grid": "layer_avg" }, "POC_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POC Production", "operator": "average", @@ -1773,6 +2026,9 @@ "vertical_grid": "layer_avg" }, "POC_PROD_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Production", "operator": "average", @@ -1780,6 +2036,9 @@ "vertical_grid": "none" }, "POC_PROD_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Production, 0-100m", "operator": "average", @@ -1787,6 +2046,9 @@ "vertical_grid": "none" }, "POC_REMIN_DIC": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "POC Remineralization routed to DIC", "operator": "average", @@ -1794,6 +2056,9 @@ "vertical_grid": "layer_avg" }, "POC_REMIN_DIC_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Remineralization routed to DIC", "operator": "average", @@ -1801,6 +2066,9 @@ "vertical_grid": "none" }, "POC_REMIN_DIC_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Remineralization routed to DIC, 0-100m", "operator": "average", @@ -1808,6 +2076,9 @@ "vertical_grid": "none" }, "POC_REMIN_DOCr": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "POC Remineralization routed to DOCr", "operator": "average", @@ -1815,6 +2086,9 @@ "vertical_grid": "layer_avg" }, "POC_REMIN_DOCr_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Remineralization routed to DOCr", "operator": "average", @@ -1822,6 +2096,9 @@ "vertical_grid": "none" }, "POC_REMIN_DOCr_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Vertical Integral of POC Remineralization routed to DOCr, 0-100m", "operator": "average", @@ -1829,6 +2106,9 @@ "vertical_grid": "none" }, "POC_hFLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "POC hFlux into Cell", "operator": "average", @@ -1836,6 +2116,9 @@ "vertical_grid": "layer_avg" }, "POC_sFLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "POC sFlux into Cell", "operator": "average", @@ -1843,6 +2126,9 @@ "vertical_grid": "layer_avg" }, "PON_REMIN_DONr": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "PON Remineralization routed to DONr", "operator": "average", @@ -1850,6 +2136,9 @@ "vertical_grid": "layer_avg" }, "PON_REMIN_NH4": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "PON Remineralization routed to NH4", "operator": "average", @@ -1857,6 +2146,9 @@ "vertical_grid": "layer_avg" }, "POP_FLUX_((particulate_flux_ref_depth_str))": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POP Flux at ((particulate_flux_ref_depth_str))", "operator": "average", @@ -1864,6 +2156,9 @@ "vertical_grid": "none" }, "POP_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POP Flux into Cell", "operator": "average", @@ -1871,6 +2166,9 @@ "vertical_grid": "layer_avg" }, "POP_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POP Production", "operator": "average", @@ -1878,6 +2176,9 @@ "vertical_grid": "layer_avg" }, "POP_REMIN_DOPr": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "POP Remineralization routed to DOPr", "operator": "average", @@ -1885,6 +2186,9 @@ "vertical_grid": "layer_avg" }, "POP_REMIN_PO4": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "POP Remineralization routed to PO4", "operator": "average", @@ -1892,6 +2196,9 @@ "vertical_grid": "layer_avg" }, "PV_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "CO2 Piston Velocity for base biotic tracer fluxes", "operator": "average", @@ -1899,6 +2206,9 @@ "vertical_grid": "none" }, "PV_O2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "PV_O2", "operator": "average", @@ -1907,6 +2217,7 @@ }, "P_REMIN_SCALEF": { "dependencies": { + "base_bio_on": ".true.", "lp_remin_scalef": ".true." }, "frequency": "never", @@ -1916,6 +2227,9 @@ "vertical_grid": "layer_avg" }, "P_iron_FLUX_((particulate_flux_ref_depth_str))": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "P_iron Flux at ((particulate_flux_ref_depth_str))", "operator": "average", @@ -1923,6 +2237,9 @@ "vertical_grid": "none" }, "P_iron_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "P_iron Flux into Cell", "operator": "average", @@ -1930,6 +2247,9 @@ "vertical_grid": "layer_avg" }, "P_iron_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "P_iron Production", "operator": "average", @@ -1937,6 +2257,9 @@ "vertical_grid": "layer_avg" }, "P_iron_REMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "P_iron Remineralization", "operator": "average", @@ -1944,6 +2267,9 @@ "vertical_grid": "layer_avg" }, "SCHMIDT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CO2 Schmidt Number for base biotic tracers fluxes", "operator": "average", @@ -1951,6 +2277,9 @@ "vertical_grid": "none" }, "SCHMIDT_O2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "O2 Schmidt Number", "operator": "average", @@ -1958,6 +2287,9 @@ "vertical_grid": "none" }, "SedDenitrif": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "nitrogen loss in Sediments", "operator": "average", @@ -1965,6 +2297,9 @@ "vertical_grid": "none" }, "SiO2_FLUX_((particulate_flux_ref_depth_str))": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "SiO2 Flux at ((particulate_flux_ref_depth_str))", "operator": "average", @@ -1972,6 +2307,9 @@ "vertical_grid": "none" }, "SiO2_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "SiO2 Flux into Cell", "operator": "average", @@ -1979,6 +2317,9 @@ "vertical_grid": "layer_avg" }, "SiO2_PROD": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "SiO2 Production", "operator": "average", @@ -1986,6 +2327,9 @@ "vertical_grid": "layer_avg" }, "SiO2_REMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "SiO2 Remineralization", "operator": "average", @@ -1993,6 +2337,9 @@ "vertical_grid": "layer_avg" }, "bSi_form": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total Si Uptake", "operator": "average", @@ -2000,6 +2347,9 @@ "vertical_grid": "layer_avg" }, "bsiToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "biogenic Si Flux to Sediments", "operator": "average", @@ -2007,6 +2357,9 @@ "vertical_grid": "none" }, "calcToFloor": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "CaCO3 Flux Hitting Sea Floor", "operator": "average", @@ -2014,6 +2367,9 @@ "vertical_grid": "none" }, "calcToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CaCO3 Flux to Sediments", "operator": "average", @@ -2041,6 +2397,9 @@ "vertical_grid": "none" }, "calcToSed_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CaCO3 Flux to Sediments, Alternative CO2", "operator": "average", @@ -2048,6 +2407,9 @@ "vertical_grid": "none" }, "co3_sat_arag": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CO3 concentration at aragonite saturation", "operator": "average", @@ -2055,6 +2417,9 @@ "vertical_grid": "layer_avg" }, "co3_sat_calc": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "CO3 concentration at calcite saturation", "operator": "average", @@ -2062,6 +2427,9 @@ "vertical_grid": "layer_avg" }, "dustToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "dust Flux to Sediments", "operator": "average", @@ -2069,6 +2437,9 @@ "vertical_grid": "none" }, "dust_FLUX_IN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Dust Flux into Cell", "operator": "average", @@ -2076,6 +2447,9 @@ "vertical_grid": "layer_avg" }, "dust_REMIN": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Dust Remineralization", "operator": "average", @@ -2275,6 +2649,9 @@ "vertical_grid": "layer_avg" }, "graze_auto_TOT": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "low", "longname": "Total Autotroph Grazing", "operator": "average", @@ -2282,6 +2659,9 @@ "vertical_grid": "layer_avg" }, "insitu_temp": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "in situ temperature", "operator": "average", @@ -2289,6 +2669,9 @@ "vertical_grid": "layer_avg" }, "pCO2SURF": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "surface pCO2", "operator": "average", @@ -2296,6 +2679,9 @@ "vertical_grid": "none" }, "pCO2SURF_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "surface pCO2, Alternative CO2", "operator": "average", @@ -2303,6 +2689,9 @@ "vertical_grid": "none" }, "pH_3D": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "pH", "operator": "average", @@ -2310,6 +2699,9 @@ "vertical_grid": "layer_avg" }, "pH_3D_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "never", "longname": "pH, Alternative CO2", "operator": "average", @@ -2317,6 +2709,9 @@ "vertical_grid": "layer_avg" }, "pfeToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "pFe Flux to Sediments", "operator": "average", @@ -2367,6 +2762,9 @@ "vertical_grid": "none" }, "photoC_NO3_TOT": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation from NO3", "operator": "average", @@ -2374,6 +2772,9 @@ "vertical_grid": "layer_avg" }, "photoC_NO3_TOT_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation from NO3 Vertical Integral", "operator": "average", @@ -2381,6 +2782,9 @@ "vertical_grid": "none" }, "photoC_NO3_TOT_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation from NO3 Vertical Integral, 0-100m", "operator": "average", @@ -2388,6 +2792,9 @@ "vertical_grid": "none" }, "photoC_TOT": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation", "operator": "average", @@ -2395,6 +2802,9 @@ "vertical_grid": "layer_avg" }, "photoC_TOT_zint": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation Vertical Integral", "operator": "average", @@ -2402,6 +2812,9 @@ "vertical_grid": "none" }, "photoC_TOT_zint_100m": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Total C Fixation Vertical Integral, 0-100m", "operator": "average", @@ -2433,6 +2846,9 @@ "vertical_grid": "layer_avg" }, "pocToFloor": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": [ "medium", "high" @@ -2446,6 +2862,9 @@ "vertical_grid": "none" }, "pocToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "POC Flux to Sediments", "operator": "average", @@ -2473,6 +2892,9 @@ "vertical_grid": "none" }, "ponToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "nitrogen burial Flux to Sediments", "operator": "average", @@ -2480,6 +2902,9 @@ "vertical_grid": "none" }, "popToSed": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "phosphorus Flux to Sediments", "operator": "average", @@ -2509,6 +2934,9 @@ "vertical_grid": "none" }, "zsatarag": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Aragonite Saturation Depth", "operator": "average", @@ -2516,6 +2944,9 @@ "vertical_grid": "none" }, "zsatcalc": { + "dependencies": { + "base_bio_on": ".true." + }, "frequency": "medium", "longname": "Calcite Saturation Depth", "operator": "average", diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index d14caae7..ccca83ef 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -5,8 +5,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 3, - "default": 1, - "not base_bio_on": 0 + "PFT_defaults == \"None\"": 0, + "default": 1 }, "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", @@ -17,8 +17,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 3, - "default": 1, - "not base_bio_on": 0 + "PFT_defaults == \"None\"": 0, + "default": 1 }, "longname": "Number of grazer prey classes", "subcategory": "1. config PFTs", @@ -28,8 +28,8 @@ "datatype": "integer", "default_value": { "PFT_defaults == \"CESM2\"": 1, - "default": 1, - "not base_bio_on": 0 + "PFT_defaults == \"None\"": 0, + "default": 1 }, "longname": "Number of zooplankton classes", "subcategory": "1. config PFTs", @@ -919,33 +919,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1426,6 +1399,37 @@ } }, "general_parms2": { + "PFT_defaults": { + "_CESM2_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": { + "default": "CESM2", + "not base_bio_on": "None" + }, + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2", + "None", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 7ff949e6..36064083 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -249,27 +249,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2 - valid_values : - - CESM2 - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags @@ -687,6 +666,30 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : + default : CESM2 + not base_bio_on : None + valid_values : + - CESM2 + - None + - user-specified + _CESM2_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings @@ -716,7 +719,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 3 - not base_bio_on : 0 + PFT_defaults == "None" : 0 cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : @@ -727,7 +730,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 1 - not base_bio_on : 0 + PFT_defaults == "None" : 0 max_grazer_prey_cnt : longname : Number of grazer prey classes subcategory : 1. config PFTs @@ -736,7 +739,7 @@ PFT_counts : default_value : default : 1 PFT_defaults == "CESM2" : 3 - not base_bio_on : 0 + PFT_defaults == "None" : 0 ################################################################################ # Category 3: PFT_derived_types # diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index 73aec7f1..ef9e5937 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -498,6 +498,14 @@ subroutine marbl_settings_set_defaults_PFT_counts(marbl_status_log) PFT_defaults = 'user-specified' end if + if ((.not. base_bio_on) .and. (trim(PFT_defaults) .ne. 'None')) then + write(log_message, '(4A)') 'PFT_defaults = "', trim(PFT_defaults), & + '" in input file, but being treated as "None"', & + ' since base_bio_on = .false.' + call marbl_status_log%log_noerror(log_message, subname) + PFT_defaults = 'None' + end if + select case (trim(PFT_defaults)) case ('CESM2') autotroph_cnt = 3 @@ -508,6 +516,11 @@ subroutine marbl_settings_set_defaults_PFT_counts(marbl_status_log) autotroph_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above zooplankton_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above max_grazer_prey_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + case ('None') + ! User must change these with put_setting() + autotroph_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + zooplankton_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + max_grazer_prey_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above case DEFAULT write(log_message, "(3A)") "'", trim(PFT_defaults), "' is not a valid value for PFT_defaults" call marbl_status_log%log_error(log_message, subname) @@ -542,6 +555,7 @@ subroutine marbl_settings_set_defaults_PFT_derived_types(marbl_status_log) call grazing_relationship_settings(1,1)%set_to_default('sp_zoo', marbl_status_log) call grazing_relationship_settings(2,1)%set_to_default('diat_zoo', marbl_status_log) call grazing_relationship_settings(3,1)%set_to_default('diaz_zoo', marbl_status_log) + case ('None') case ('user-specified') do m=1,autotroph_cnt call autotroph_settings(m)%set_to_default('unset', marbl_status_log) From 2d6303fe52994c9d29c2612e1a870ec93581ec64 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 10:48:34 -0600 Subject: [PATCH 23/64] Update MARBL_settings_file_class.py Moving PFT_defaults from general_parms to general_parms2 affected this script --- MARBL_tools/MARBL_settings_file_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 266c7b56..c5e93c56 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -239,7 +239,7 @@ def _process_variable_value(self, category_name, variable_name, unit_system): append_to_keys = 'PFT_defaults == "{}"'.format(valid_PFT_default) in self._config_keyword if append_to_keys: settings_key = '_{}_PFT_keys'.format(valid_PFT_default) - PFT_keys = self._settings['general_parms']['PFT_defaults'][settings_key][variable_name] + PFT_keys = self._settings['general_parms2']['PFT_defaults'][settings_key][variable_name] break # Is the derived type an array? If so, treat each entry separately From fb8ca39b94b8c08b3ad71fa2e2563cb149f16921 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 11:13:19 -0600 Subject: [PATCH 24/64] Update other YAML files to pass tests need to move PFT_defaults to general_parms2 --- defaults/json/settings_cesm2.0.json | 54 +++++++++--------- defaults/json/settings_cesm2.1+cocco.json | 58 +++++++++---------- defaults/json/settings_cesm2.1.json | 54 +++++++++--------- defaults/json/settings_latest+4p2z.json | 68 +++++++++++------------ defaults/json/settings_latest+cocco.json | 58 +++++++++---------- defaults/settings_cesm2.0.yaml | 42 +++++++------- defaults/settings_cesm2.1+cocco.yaml | 46 +++++++-------- defaults/settings_cesm2.1.yaml | 42 +++++++------- defaults/settings_latest+4p2z.yaml | 56 +++++++++---------- defaults/settings_latest+cocco.yaml | 46 +++++++-------- 10 files changed, 262 insertions(+), 262 deletions(-) diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index cbe2b2c8..35e87fed 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -836,33 +836,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1325,6 +1298,33 @@ } }, "general_parms2": { + "PFT_defaults": { + "_CESM2_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2", + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 9bdd30a3..b658ff98 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -876,35 +876,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo", - "cocco_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2+cocco", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2+cocco", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1370,6 +1341,35 @@ } }, "general_parms2": { + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index 16b395a7..34d61029 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -836,33 +836,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1328,6 +1301,33 @@ } }, "general_parms2": { + "PFT_defaults": { + "_CESM2_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2", + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index a716f9e1..120112d1 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -1004,40 +1004,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_4p2z_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_microzoo", - "diat_mesozoo", - "diaz_microzoo", - "cocco_mesozoo", - "cocco_microzoo", - "diaz_mesozoo", - "null", - "microzoo_mesozoo" - ], - "zooplankton_settings": [ - "microzoo", - "mesozoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "4p2z", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "4p2z", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1517,6 +1483,40 @@ } }, "general_parms2": { + "PFT_defaults": { + "_4p2z_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_microzoo", + "diat_mesozoo", + "diaz_microzoo", + "cocco_mesozoo", + "cocco_microzoo", + "diaz_mesozoo", + "null", + "microzoo_mesozoo" + ], + "zooplankton_settings": [ + "microzoo", + "mesozoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "4p2z", + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "4p2z", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 93216e90..7c3d9123 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -956,35 +956,6 @@ "subcategory": "4. general parameters", "units": "mol m-2 yr-1" }, - "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo", - "cocco_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2+cocco", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2+cocco", - "user-specified" - ] - }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, @@ -1457,6 +1428,35 @@ } }, "general_parms2": { + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "longname": "Define how PFTs are initialized", + "subcategory": "1. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 070428db..56bf9122 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -193,27 +193,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2 - valid_values : - - CESM2 - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags @@ -617,6 +596,27 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : CESM2 + valid_values : + - CESM2 + - user-specified + _CESM2_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index e8c93f2f..91d1959c 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -193,29 +193,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2+cocco - valid_values : - - CESM2+cocco - - user-specified - _CESM2+cocco_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - - cocco_zoo - _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags @@ -620,6 +597,29 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index 39e8de1e..ea1caf8d 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -193,27 +193,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2 - valid_values : - - CESM2 - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active subcategory : 2. config flags @@ -618,6 +597,27 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : CESM2 + valid_values : + - CESM2 + - user-specified + _CESM2_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index fcaacffe..7f28def0 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -249,34 +249,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : 4p2z - valid_values : - - 4p2z - - user-specified - _4p2z_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - microzoo - - mesozoo - grazing_relationship_settings : - - sp_microzoo - - diat_mesozoo - - diaz_microzoo - - cocco_mesozoo - - cocco_microzoo - - diaz_mesozoo - - "null" - - microzoo_mesozoo - _append_to_config_keywords : true base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags @@ -693,6 +665,34 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : 4p2z + valid_values : + - 4p2z + - user-specified + _4p2z_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - microzoo + - mesozoo + grazing_relationship_settings : + - sp_microzoo + - diat_mesozoo + - diaz_microzoo + - cocco_mesozoo + - cocco_microzoo + - diaz_mesozoo + - "null" + - microzoo_mesozoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 63a22117..5f9629b6 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -249,29 +249,6 @@ _tracer_list : ################################################################################ general_parms : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2+cocco - valid_values : - - CESM2+cocco - - user-specified - _CESM2+cocco_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - - cocco_zoo - _append_to_config_keywords : true base_bio_on : longname : Control whether the base ecosystem tracer module is active subcategory : 2. config flags @@ -682,6 +659,29 @@ general_parms : ################################################################################ general_parms2 : + PFT_defaults : + longname : Define how PFTs are initialized + subcategory : 1. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true init_bury_coeff_opt : longname : Source of initial burial coefficient subcategory : 3. config strings From f2efd7e3641c7f081595ec922e85770196791f6d Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 12:22:46 -0600 Subject: [PATCH 25/64] Share some computations between abio and base piston_velocity, xkw_ice, schmidt_co2, and pv_co2 can be computed once and stored in surface_flux_internal rather than being computed in both abio and base surface_flux_compute() routines. --- src/marbl_abio_dic_diagnostics_mod.F90 | 6 +- src/marbl_abio_dic_surface_flux_mod.F90 | 20 +++--- src/marbl_interface_private_types.F90 | 91 +++++++++++-------------- src/marbl_surface_flux_mod.F90 | 28 ++++---- 4 files changed, 66 insertions(+), 79 deletions(-) diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 7e058601..8c376943 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -282,7 +282,7 @@ end subroutine marbl_abio_dic_diagnostics_init subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ifrac, & - xkw, & + piston_velocity, & ap_used, & xco2, & d14c, & @@ -302,7 +302,7 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ! Compute surface fluxes for ecosys tracer module. real (r8), dimension(:), intent(in) :: ifrac - real (r8), dimension(:), intent(in) :: xkw + real (r8), dimension(:), intent(in) :: piston_velocity real (r8), dimension(:), intent(in) :: ap_used real (r8), dimension(:), intent(in) :: xco2 real (r8), dimension(:), intent(in) :: d14c @@ -324,7 +324,7 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ) diags(ind%ABIO_IFRAC)%field_2d(:) = ifrac(:) - diags(ind%ABIO_XKW)%field_2d(:) = xkw(:) + diags(ind%ABIO_XKW)%field_2d(:) = piston_velocity(:) diags(ind%ABIO_ATM_PRESS)%field_2d(:) = ap_used(:) diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) diags(ind%ABIO_D14Catm)%field_2d(:) = d14c(:) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 167eaac4..55e59f46 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -49,6 +49,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& surface_flux_forcings, & unit_system, & saved_state, & + surface_flux_internal, & surface_flux_diags, & surface_fluxes, & co2calc_coeffs, & @@ -63,15 +64,13 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(marbl_forcing_fields_type), intent(in) :: surface_flux_forcings(:) type(unit_system_type), intent(in) :: unit_system type(marbl_saved_state_type), intent(inout) :: saved_state + type(marbl_surface_flux_internal_type), intent(inout) :: surface_flux_internal type(marbl_diagnostics_type), intent(inout) :: surface_flux_diags real(r8), intent(inout) :: surface_fluxes(:, :) type(co2calc_coeffs_type), intent(inout) :: co2calc_coeffs type(co2calc_state_type), intent(inout) :: co2calc_state type(marbl_log_type), intent(inout) :: marbl_status_log - real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) - real(r8) :: xkw(num_elements) ! piston velocity - real(r8) :: pv_co2(num_elements) ! piston velocity real(r8) :: alk_surf(num_elements) ! local alkalinity real(r8) :: phlo(num_elements) ! lower bound for ph in solver real(r8) :: phhi(num_elements) ! upper bound for ph in solver @@ -85,7 +84,6 @@ subroutine marbl_abio_dic_surface_flux_compute(& real(r8) :: dco2star(num_elements) real(r8) :: pco2surf(num_elements) real(r8) :: dpco2(num_elements) - real(r8) :: schmidt_co2(num_elements) real(r8) :: co3(num_elements) ! Return immediately if not running with abiotic dic tracer module @@ -101,7 +99,12 @@ subroutine marbl_abio_dic_surface_flux_compute(& ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & u10_sqr => surface_flux_forcings(surface_flux_forcing_ind%u10_sqr_id)%field_0d, & d14c => surface_flux_forcings(surface_flux_forcing_ind%d14c_id)%field_0d, & - ! Saved state + ! Values computed for abio and bio + piston_velocity => surface_flux_internal%piston_velocity(:), & + xkw_ice => surface_flux_internal%xkw_ice(:), & + schmidt_co2 => surface_flux_internal%schmidt_co2(:), & + pv_co2 => surface_flux_internal%pv_co2(:), & + ! Saved state ph_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & ! Tracer indices dic_ind => marbl_tracer_indices%abio_dic_ind, & @@ -140,11 +143,6 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Compute CO2 flux !----------------------------------------------------------------------- - xkw(:) = xkw_coeff*u10_sqr(:) - xkw_ice(:) = (c1 - ifrac(:)) * xkw(:) - schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) - pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) - where (ph_surf(:) /= c0) phlo(:) = ph_surf(:) - del_ph phhi(:) = ph_surf(:) + del_ph @@ -195,7 +193,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& call marbl_abio_dic_diagnostics_surface_flux_compute( & ifrac, & - xkw, & + piston_velocity, & ap_used, & xco2, & d14c, & diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index c7a74aa4..dcc3c16d 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -181,6 +181,7 @@ module marbl_interface_private_types ! that makes it easy to pass to the diagnostics type, public :: marbl_surface_flux_internal_type real (r8), allocatable, dimension(:) :: piston_velocity + real (r8), allocatable, dimension(:) :: xkw_ice real (r8), allocatable, dimension(:) :: flux_co2 real (r8), allocatable, dimension(:) :: flux_alt_co2 ! tracer flux alternative CO2 (conc flux units) real (r8), allocatable, dimension(:) :: co2star @@ -1344,42 +1345,25 @@ subroutine marbl_surface_flux_internal_constructor(this, num_elements) class(marbl_surface_flux_internal_type), intent(out) :: this integer (int_kind), intent(in) :: num_elements - allocate(this%piston_velocity (num_elements)) - this%piston_velocity = c0 - allocate(this%flux_co2 (num_elements)) - this%flux_co2 = c0 - allocate(this%flux_alt_co2 (num_elements)) - this%flux_alt_co2 = c0 - allocate(this%co2star (num_elements)) - this%co2star = c0 - allocate(this%dco2star (num_elements)) - this%dco2star = c0 - allocate(this%pco2surf (num_elements)) - this%pco2surf = c0 - allocate(this%dpco2 (num_elements)) - this%dpco2 = c0 - allocate(this%co3 (num_elements)) - this%co3 = c0 - allocate(this%co2star_alt (num_elements)) - this%co2star_alt = c0 - allocate(this%dco2star_alt (num_elements)) - this%dco2star_alt = c0 - allocate(this%pco2surf_alt (num_elements)) - this%pco2surf_alt = c0 - allocate(this%dpco2_alt (num_elements)) - this%dpco2_alt = c0 - allocate(this%schmidt_co2 (num_elements)) - this%schmidt_co2 = c0 - allocate(this%schmidt_o2 (num_elements)) - this%schmidt_o2 = c0 - allocate(this%pv_o2 (num_elements)) - this%pv_o2 = c0 - allocate(this%pv_co2 (num_elements)) - this%pv_co2 = c0 - allocate(this%o2sat (num_elements)) - this%o2sat = c0 - allocate(this%nhx_surface_emis(num_elements)) - this%nhx_surface_emis = c0 + allocate(this%piston_velocity(num_elements), source=c0) + allocate(this%xkw_ice(num_elements), source=c0) + allocate(this%flux_co2(num_elements), source=c0) + allocate(this%flux_alt_co2(num_elements), source=c0) + allocate(this%co2star(num_elements), source=c0) + allocate(this%dco2star(num_elements), source=c0) + allocate(this%pco2surf(num_elements), source=c0) + allocate(this%dpco2(num_elements), source=c0) + allocate(this%co3(num_elements), source=c0) + allocate(this%co2star_alt(num_elements), source=c0) + allocate(this%dco2star_alt(num_elements), source=c0) + allocate(this%pco2surf_alt(num_elements), source=c0) + allocate(this%dpco2_alt(num_elements), source=c0) + allocate(this%schmidt_co2(num_elements), source=c0) + allocate(this%schmidt_o2(num_elements), source=c0) + allocate(this%pv_o2(num_elements), source=c0) + allocate(this%pv_co2(num_elements), source=c0) + allocate(this%o2sat(num_elements), source=c0) + allocate(this%nhx_surface_emis(num_elements), source=c0) end subroutine marbl_surface_flux_internal_constructor @@ -1390,23 +1374,24 @@ subroutine marbl_surface_flux_internal_destructor(this) class(marbl_surface_flux_internal_type), intent(inout) :: this if (allocated(this%piston_velocity)) then - deallocate(this%piston_velocity ) - deallocate(this%flux_co2 ) - deallocate(this%flux_alt_co2 ) - deallocate(this%co2star ) - deallocate(this%dco2star ) - deallocate(this%pco2surf ) - deallocate(this%dpco2 ) - deallocate(this%co3 ) - deallocate(this%co2star_alt ) - deallocate(this%dco2star_alt ) - deallocate(this%pco2surf_alt ) - deallocate(this%dpco2_alt ) - deallocate(this%schmidt_co2 ) - deallocate(this%schmidt_o2 ) - deallocate(this%pv_o2 ) - deallocate(this%pv_co2 ) - deallocate(this%o2sat ) + deallocate(this%piston_velocity) + deallocate(this%xkw_ice) + deallocate(this%flux_co2) + deallocate(this%flux_alt_co2) + deallocate(this%co2star) + deallocate(this%dco2star) + deallocate(this%pco2surf) + deallocate(this%dpco2) + deallocate(this%co3) + deallocate(this%co2star_alt) + deallocate(this%dco2star_alt) + deallocate(this%pco2surf_alt) + deallocate(this%dpco2_alt) + deallocate(this%schmidt_co2) + deallocate(this%schmidt_o2) + deallocate(this%pv_o2) + deallocate(this%pv_co2) + deallocate(this%o2sat) deallocate(this%nhx_surface_emis) end if diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 8f38fd37..5f731d7c 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -86,6 +86,7 @@ subroutine marbl_surface_flux_compute( & use marbl_oxygen, only : o2sat_surf use marbl_nhx_surface_emis_mod, only : marbl_nhx_surface_emis_compute use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : lcompute_nhx_surface_emis use marbl_settings_mod, only : xkw_coeff use marbl_surface_flux_share_mod, only : marbl_surface_flux_share_export_variables @@ -121,7 +122,6 @@ subroutine marbl_surface_flux_compute( & integer (int_kind) :: auto_ind ! autotroph functional group index real (r8) :: phlo(num_elements) ! lower bound for ph in solver real (r8) :: phhi(num_elements) ! upper bound for ph in solver - real (r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (L/T) real (r8) :: o2sat_1atm(num_elements) ! o2 saturation @ 1 atm (conc units) real (r8) :: totalChl_loc(num_elements) ! local value of totalChl real (r8) :: flux_o2_loc(num_elements) ! local value of o2 flux @@ -143,6 +143,7 @@ subroutine marbl_surface_flux_compute( & nhy_flux => surface_flux_forcings(surface_flux_forcing_ind%nhy_flux_id)%field_0d, & piston_velocity => surface_flux_internal%piston_velocity(:), & + xkw_ice => surface_flux_internal%xkw_ice(:), & flux_co2 => surface_flux_internal%flux_co2(:), & co2star => surface_flux_internal%co2star(:), & dco2star => surface_flux_internal%dco2star(:), & @@ -182,6 +183,19 @@ subroutine marbl_surface_flux_compute( & surface_fluxes(:, :) = c0 + !----------------------------------------------------------------------- + ! fields used for both abiotic and biotic surface flux computation + !----------------------------------------------------------------------- + + if (abio_dic_on .or. (base_bio_on .and. (lflux_gas_o2 .or. lflux_gas_co2))) then + piston_velocity = xkw_coeff*u10_sqr(:) + xkw_ice(:) = (c1 - ifrac(:)) * piston_velocity + end if + if (abio_dic_on .or. (base_bio_on .and. lflux_gas_co2)) then + schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) + pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) + end if + !----------------------------------------------------------------------- ! Compute carbon isotopes surface fluxes !----------------------------------------------------------------------- @@ -195,6 +209,7 @@ subroutine marbl_surface_flux_compute( & surface_flux_forcings = surface_flux_forcings, & unit_system = unit_system, & saved_state = saved_state, & + surface_flux_internal = surface_flux_internal, & surface_flux_diags = surface_flux_diags, & surface_fluxes = surface_fluxes, & co2calc_coeffs = co2calc_coeffs, & @@ -229,13 +244,6 @@ subroutine marbl_surface_flux_compute( & if (lflux_gas_o2 .or. lflux_gas_co2) then - !----------------------------------------------------------------------- - ! Compute XKW_ICE. XKW is zero over land, so XKW_ICE is too. - !----------------------------------------------------------------------- - - piston_velocity = xkw_coeff*u10_sqr(:) - xkw_ice(:) = (c1 - ifrac(:)) * piston_velocity - !----------------------------------------------------------------------- ! compute O2 flux !----------------------------------------------------------------------- @@ -264,10 +272,6 @@ subroutine marbl_surface_flux_compute( & if (lflux_gas_co2) then - schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) - - pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) - !----------------------------------------------------------------------- ! Set flux_co2 !----------------------------------------------------------------------- From 362ea6ec20609318d3ff9d334a6c237e0ba0f3d2 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 16:36:04 -0600 Subject: [PATCH 26/64] More MARBL_tools clean-up Added a "defined_if" key to the YAML schema for settings files, and now MARBL_generate_settings_file.py will only include variables that can be used by the selected tracer modules (I also re-organized the YAML to put all the [module]_on variables in a separate section that gets processed before general_parms). --- MARBL_tools/MARBL_generate_settings_file.py | 15 +- MARBL_tools/MARBL_settings_file_class.py | 17 +- MARBL_tools/MARBL_share.py | 27 +- defaults/bar | 228 ++++++++++++ defaults/bar2 | 228 ++++++++++++ defaults/baz | 228 ++++++++++++ defaults/baz2 | 173 +++++++++ defaults/foo | 163 +++++++++ defaults/json/settings_cesm2.0.json | 364 +++++++++++++------ defaults/json/settings_cesm2.1+cocco.json | 366 ++++++++++++++------ defaults/json/settings_cesm2.1.json | 364 +++++++++++++------ defaults/json/settings_latest+4p2z.json | 301 +++++++++------- defaults/json/settings_latest+cocco.json | 301 ++++++++++------ defaults/json/settings_latest.json | 299 +++++++++------- defaults/settings_cesm2.0.yaml | 319 ++++++++++++----- defaults/settings_cesm2.1+cocco.yaml | 320 ++++++++++++----- defaults/settings_cesm2.1.yaml | 318 ++++++++++++----- defaults/settings_latest+4p2z.yaml | 272 +++++++++------ defaults/settings_latest+cocco.yaml | 260 +++++++++----- defaults/settings_latest.yaml | 255 +++++++++----- 20 files changed, 3602 insertions(+), 1216 deletions(-) create mode 100644 defaults/bar create mode 100644 defaults/bar2 create mode 100644 defaults/baz create mode 100644 defaults/baz2 create mode 100644 defaults/foo diff --git a/MARBL_tools/MARBL_generate_settings_file.py b/MARBL_tools/MARBL_generate_settings_file.py index 6be2b25f..7c691e27 100755 --- a/MARBL_tools/MARBL_generate_settings_file.py +++ b/MARBL_tools/MARBL_generate_settings_file.py @@ -45,12 +45,19 @@ def generate_settings_file(MARBL_settings, settings_file_out): fout = open(settings_file_out,"w") # Sort variables by subcategory + written_any = False for subcat_name in MARBL_settings.get_subcategory_names(): - fout.write("! %s\n" % subcat_name.split('. ')[1]) + header = "! %s\n" % subcat_name.split('. ')[1] + var_values = [] for varname in MARBL_settings.get_settings_dict_variable_names(subcat_name): - fout.write("%s = %s\n" % (varname, MARBL_settings.settings_dict[varname]['value'])) - if subcat_name != MARBL_settings.get_subcategory_names()[-1]: - fout.write("\n") + var_values.append("%s = %s\n" % (varname, MARBL_settings.settings_dict[varname]['value'])) + if len(var_values) > 0: + if written_any: + fout.write("\n") + written_any = True + fout.write(header) + for line in var_values: + fout.write(line) fout.close() ####################################### diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index c5e93c56..316338f1 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -239,7 +239,7 @@ def _process_variable_value(self, category_name, variable_name, unit_system): append_to_keys = 'PFT_defaults == "{}"'.format(valid_PFT_default) in self._config_keyword if append_to_keys: settings_key = '_{}_PFT_keys'.format(valid_PFT_default) - PFT_keys = self._settings['general_parms2']['PFT_defaults'][settings_key][variable_name] + PFT_keys = self._settings['general_parms']['PFT_defaults'][settings_key][variable_name] break # Is the derived type an array? If so, treat each entry separately @@ -289,6 +289,11 @@ def _update_settings_dict(self, this_var, var_name, unit_system, base_name=''): (just varname for scalars, but multiple keys for arrays) """ + # Return immediately if variable should not be settings file + if 'defined_if' in this_var: + if this_var['defined_if'] not in self._config_keyword: + return + # Keys copied out of the settings file into settings_dict[varname]['attrs'] settings_dict_attrs = ['longname', 'units'] @@ -501,7 +506,7 @@ def _sort_with_specific_suffix_first(list_in, suffix=None, sort_key=lambda s: s. ################################################################################ -def _get_value(val_in, settings_dict, tracers_dict, dict_prefix=''): +def _get_value(val_in, settings_dict, tracers_dict, dict_prefix='', return_zero_for_unfound=False): """ Translate val_in (which may be a variable name) to an integer value """ @@ -527,6 +532,8 @@ def _get_value(val_in, settings_dict, tracers_dict, dict_prefix=''): try: val_out = settings_dict[val_in]['value'] except: + if return_zero_for_unfound: + return 0 logger.error('Unknown variable name in _get_value: %s' % val_in) MARBL_tools.abort(1) return val_out @@ -558,13 +565,13 @@ def _get_array_info(array_size_in, settings_dict, tracers_dict, dict_prefix=''): logger.error("_get_array_info() only supports 1D and 2D arrays") MARBL_tools.abort(1) - for i in range(0, _get_value(array_size_in[0], settings_dict, tracers_dict, dict_prefix)): - for j in range(0, _get_value(array_size_in[1], settings_dict, tracers_dict, dict_prefix)): + for i in range(0, _get_value(array_size_in[0], settings_dict, tracers_dict, dict_prefix, return_zero_for_unfound=True)): + for j in range(0, _get_value(array_size_in[1], settings_dict, tracers_dict, dict_prefix, return_zero_for_unfound=True)): str_index.append("(%d,%d)" % (i+1,j+1)) return str_index # How many elements? May be an integer or an entry in self.settings_dict - for i in range(0, _get_value(array_size_in, settings_dict, tracers_dict, dict_prefix)): + for i in range(0, _get_value(array_size_in, settings_dict, tracers_dict, dict_prefix, return_zero_for_unfound=True)): str_index.append("(%d)" % (i+1)) return str_index diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 7000ef35..0728a1cf 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -47,23 +47,34 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic template = re.search('\(\(.*\)\)', key_name).group() template_fill_dict = dict() + + # Find counts + try: + autotroph_cnt = MARBL_settings.settings_dict['autotroph_cnt']['value'] + except: + autotroph_cnt = 0 + try: + zooplankton_cnt = MARBL_settings.settings_dict['zooplankton_cnt']['value'] + except: + zooplankton_cnt = 0 + if template == '((tracer_short_name))': fill_source = 'tracers' # diag name will replace template with key_fill_vals loop_for_replacement = MARBL_settings.tracers_dict.keys() elif template == '((autotroph_sname))': fill_source = 'autotrophs' - loop_for_replacement = range(1,MARBL_settings.settings_dict['autotroph_cnt']['value']+1) + loop_for_replacement = range(1,autotroph_cnt+1) elif template == '((zooplankton_sname))': fill_source = 'zooplankton' - loop_for_replacement = range(1,MARBL_settings.settings_dict['zooplankton_cnt']['value']+1) + loop_for_replacement = range(1,zooplankton_cnt+1) elif '_((zooplankton_sname))' in template: first_half = re.search('\(\(.*\)\)_', template).group()[:-1] if first_half == '((autotroph_sname))': - loop_for_replacement = range(1,(MARBL_settings.settings_dict['autotroph_cnt']['value'] * MARBL_settings.settings_dict['zooplankton_cnt']['value'])+1) + loop_for_replacement = range(1,(autotroph_cnt * zooplankton_cnt)+1) fill_source = 'phyto_graze_zoo' elif first_half == '((zooplankton_sname))': - loop_for_replacement = range(1, (MARBL_settings.settings_dict['zooplankton_cnt']['value'] * MARBL_settings.settings_dict['zooplankton_cnt']['value'])+1) + loop_for_replacement = range(1, (zooplankton_cnt * zooplankton_cnt)+1) fill_source = 'zoo_graze_zoo' elif template == '((particulate_flux_ref_depth_str))': fill_source = 'strings' @@ -112,17 +123,17 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic key_fill_val = MARBL_settings.settings_dict[zoo_prefix + "sname"]['value'].strip('"') template_fill_dict['((zooplankton_lname))'] = MARBL_settings.settings_dict[zoo_prefix + "lname"]['value'].strip('"') elif fill_source == 'phyto_graze_zoo': - auto_ind = (item-1) % MARBL_settings.settings_dict['autotroph_cnt']['value'] + 1 + auto_ind = (item-1) % autotroph_cnt + 1 auto_prefix = "autotroph_settings(%d)%%" % auto_ind - zoo_ind = (item-1) // MARBL_settings.settings_dict['autotroph_cnt']['value'] + 1 + zoo_ind = (item-1) // autotroph_cnt + 1 zoo_prefix = "zooplankton_settings(%d)%%" % zoo_ind key_fill_val = MARBL_settings.settings_dict[auto_prefix + "sname"]['value'].strip('"') + '_' + MARBL_settings.settings_dict[zoo_prefix + "sname"]['value'].strip('"') template_fill_dict['((autotroph_lname))'] = MARBL_settings.settings_dict[auto_prefix + "lname"]['value'].strip('"') template_fill_dict['((zooplankton_lname))'] = MARBL_settings.settings_dict[zoo_prefix + "lname"]['value'].strip('"') elif fill_source == 'zoo_graze_zoo': - zoo_ind1 = (item-1) % MARBL_settings.settings_dict['zooplankton_cnt']['value'] + 1 + zoo_ind1 = (item-1) % zooplankton_cnt + 1 zoo_prefix1 = "zooplankton_settings(%d)%%" % zoo_ind1 - zoo_ind2 = (item-1) // MARBL_settings.settings_dict['zooplankton_cnt']['value'] + 1 + zoo_ind2 = (item-1) // zooplankton_cnt + 1 zoo_prefix2 = "zooplankton_settings(%d)%%" % zoo_ind2 key_fill_val = MARBL_settings.settings_dict[zoo_prefix1 + "sname"]['value'].strip('"') + '_' + MARBL_settings.settings_dict[zoo_prefix2 + "sname"]['value'].strip('"') template_fill_dict['((zooplankton_lname))1'] = MARBL_settings.settings_dict[zoo_prefix1 + "lname"]['value'].strip('"') diff --git a/defaults/bar b/defaults/bar new file mode 100644 index 00000000..9ed3afab --- /dev/null +++ b/defaults/bar @@ -0,0 +1,228 @@ ++++ b/defaults/settings_cesm2.0.yaml ++ - tracer_modules ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ # Non-living (abiotic only) ++ ABIO_DIC : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon ++ units : mmol/m^3 ++ ABIO_DI14C : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon-14 ++ units : mmol/m^3 ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++# Category 0: Tracer Modules # ++tracer_modules : ++ base_bio_on : ++ longname : Control whether the base ecosystem tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .true. ++ abio_dic_on : ++ longname : Control whether abiotic carbon tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .false. ++ subcategory : 1. tracer modules ++ ++################################################################################ ++# Category 1: General Parameters # ++################################################################################ ++ ++general_parms : ++ PFT_defaults : ++ defined_if : base_bio_on ++ longname : Define how PFTs are initialized ++ subcategory : 2. config PFTs ++ units : unitless ++ datatype : string ++ default_value : CESM2+cocco ++ valid_values : ++ - CESM2+cocco ++ - user-specified ++ _CESM2+cocco_PFT_keys : ++ autotroph_settings : ++ - sp ++ - diat ++ - diaz ++ - cocco ++ zooplankton_settings : ++ - zoo ++ grazing_relationship_settings : ++ - sp_zoo ++ - diat_zoo ++ - diaz_zoo ++ - cocco_zoo ++ _append_to_config_keywords : true ++ subcategory : 3. config flags ++ defined_if : ciso_on ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 4. config strings ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs diff --git a/defaults/bar2 b/defaults/bar2 new file mode 100644 index 00000000..9544c788 --- /dev/null +++ b/defaults/bar2 @@ -0,0 +1,228 @@ ++++ b/defaults/settings_cesm2.1+cocco.yaml ++ - tracer_modules ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ # Non-living (abiotic only) ++ ABIO_DIC : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon ++ units : mmol/m^3 ++ ABIO_DI14C : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon-14 ++ units : mmol/m^3 ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++# Category 0: Tracer Modules # ++tracer_modules : ++ base_bio_on : ++ longname : Control whether the base ecosystem tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .true. ++ abio_dic_on : ++ longname : Control whether abiotic carbon tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .false. ++ subcategory : 1. tracer modules ++ ++################################################################################ ++# Category 1: General Parameters # ++################################################################################ ++ ++general_parms : ++ PFT_defaults : ++ defined_if : base_bio_on ++ longname : Define how PFTs are initialized ++ subcategory : 2. config PFTs ++ units : unitless ++ datatype : string ++ default_value : CESM2+cocco ++ valid_values : ++ - CESM2+cocco ++ - user-specified ++ _CESM2+cocco_PFT_keys : ++ autotroph_settings : ++ - sp ++ - diat ++ - diaz ++ - cocco ++ zooplankton_settings : ++ - zoo ++ grazing_relationship_settings : ++ - sp_zoo ++ - diat_zoo ++ - diaz_zoo ++ - cocco_zoo ++ _append_to_config_keywords : true ++ subcategory : 3. config flags ++ defined_if : ciso_on ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 4. config strings ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs diff --git a/defaults/baz b/defaults/baz new file mode 100644 index 00000000..b917eb40 --- /dev/null +++ b/defaults/baz @@ -0,0 +1,228 @@ ++++ b/defaults/settings_cesm2.1.yaml ++ - tracer_modules ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ # Non-living (abiotic only) ++ ABIO_DIC : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon ++ units : mmol/m^3 ++ ABIO_DI14C : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon-14 ++ units : mmol/m^3 ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ base_bio_on : .true. ++ dependencies : ++ base_bio_on : .true. ++# Category 0: Tracer Modules # ++tracer_modules : ++ base_bio_on : ++ longname : Control whether the base ecosystem tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .true. ++ abio_dic_on : ++ longname : Control whether abiotic carbon tracer module is active ++ subcategory : 1. tracer modules ++ units : unitless ++ datatype : logical ++ default_value : .false. ++ subcategory : 1. tracer modules ++ ++################################################################################ ++# Category 1: General Parameters # ++################################################################################ ++ ++general_parms : ++ PFT_defaults : ++ defined_if : base_bio_on ++ longname : Define how PFTs are initialized ++ subcategory : 2. config PFTs ++ units : unitless ++ datatype : string ++ default_value : CESM2+cocco ++ valid_values : ++ - CESM2+cocco ++ - user-specified ++ _CESM2+cocco_PFT_keys : ++ autotroph_settings : ++ - sp ++ - diat ++ - diaz ++ - cocco ++ zooplankton_settings : ++ - zoo ++ grazing_relationship_settings : ++ - sp_zoo ++ - diat_zoo ++ - diaz_zoo ++ - cocco_zoo ++ _append_to_config_keywords : true ++ subcategory : 3. config flags ++ defined_if : ciso_on ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 4. config strings ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs diff --git a/defaults/baz2 b/defaults/baz2 new file mode 100644 index 00000000..2d71a6f8 --- /dev/null +++ b/defaults/baz2 @@ -0,0 +1,173 @@ ++++ b/defaults/settings_latest+4p2z.yaml ++ - tracer_modules ++ ABIO_DIC : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon ++ units : mmol/m^3 ++ ABIO_DI14C : ++ dependencies : ++ abio_dic_on : .true. ++ long_name : Abiotic Dissolved Inorganic Carbon-14 ++ units : mmol/m^3 ++ # Non-living (abiotic only) ++# Category 0: Tracer Modules # ++tracer_modules : ++ subcategory : 1. tracer modules ++ subcategory : 1. tracer modules ++ subcategory : 1. tracer modules ++ ++################################################################################ ++# Category 1: General Parameters # ++################################################################################ ++ ++general_parms : ++ PFT_defaults : ++ defined_if : base_bio_on ++ longname : Define how PFTs are initialized ++ subcategory : 2. config PFTs ++ units : unitless ++ datatype : string ++ default_value : CESM2+cocco ++ valid_values : ++ - CESM2+cocco ++ - user-specified ++ _CESM2+cocco_PFT_keys : ++ autotroph_settings : ++ - sp ++ - diat ++ - diaz ++ - cocco ++ zooplankton_settings : ++ - zoo ++ grazing_relationship_settings : ++ - sp_zoo ++ - diat_zoo ++ - diaz_zoo ++ - cocco_zoo ++ _append_to_config_keywords : true ++ subcategory : 3. config flags ++ defined_if : ciso_on ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 4. config strings ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs diff --git a/defaults/foo b/defaults/foo new file mode 100644 index 00000000..14592072 --- /dev/null +++ b/defaults/foo @@ -0,0 +1,163 @@ ++++ b/defaults/settings_latest.yaml ++ - tracer_modules ++# Category 0: Tracer Modules # ++tracer_modules : ++ subcategory : 1. tracer modules ++ subcategory : 1. tracer modules ++ subcategory : 1. tracer modules ++ _append_to_config_keywords : true ++ ++################################################################################ ++# Category 1: General Parameters # ++################################################################################ ++ ++general_parms : ++ PFT_defaults : ++ defined_if : base_bio_on ++ longname : Define how PFTs are initialized ++ subcategory : 2. config PFTs ++ units : unitless ++ datatype : string ++ default_value : ++ default : CESM2 ++ valid_values : ++ - CESM2 ++ - None ++ - user-specified ++ _CESM2_PFT_keys : ++ autotroph_settings : ++ - sp ++ - diat ++ - diaz ++ zooplankton_settings : ++ - zoo ++ grazing_relationship_settings : ++ - sp_zoo ++ - diat_zoo ++ - diaz_zoo ++ _append_to_config_keywords : true ++ subcategory : 3. config flags ++ defined_if : ciso_on ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 3. config flags ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (nitrification) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (scavenging) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (dissolution) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 6. Scale lengths ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters (bury coeffs) ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 5. general parameters ++ defined_if : base_bio_on ++ subcategory : 4. config strings ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs ++ defined_if : base_bio_on ++ subcategory : 2. config PFTs diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index 35e87fed..3ccc866c 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -7,9 +7,10 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -18,8 +19,9 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -28,8 +30,9 @@ "PFT_defaults == \"CESM2\"": 1, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -643,6 +646,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -665,6 +669,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -686,21 +693,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -708,20 +723,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -740,10 +779,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -762,54 +807,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -832,78 +916,119 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 0.4, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -913,233 +1038,255 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.685, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcheck_forcing": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.4, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 18.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "770e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1148,29 +1295,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1179,8 +1330,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1189,8 +1341,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1199,43 +1352,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1255,8 +1414,9 @@ 5.5 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1268,8 +1428,9 @@ "500.0e2", "1000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1278,53 +1439,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1332,8 +1469,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1370,5 +1508,31 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index b658ff98..f9a99339 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -7,9 +7,10 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -18,8 +19,9 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -28,8 +30,9 @@ "PFT_defaults == \"CESM2+cocco\"": 1, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -683,6 +686,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -705,6 +709,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -726,21 +733,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -748,20 +763,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -780,10 +819,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -802,54 +847,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -872,78 +956,119 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 2.0, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 0.89, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -953,107 +1078,112 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.7, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 6.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.822, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcheck_forcing": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { @@ -1062,127 +1192,144 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 2.6, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.02, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.2, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 22.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.0, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1191,29 +1338,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1222,8 +1373,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 2.54 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1232,8 +1384,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 0.36 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1242,43 +1395,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.53 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1298,8 +1457,9 @@ 4.8 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1311,8 +1471,9 @@ "500.0e2", "1000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1321,55 +1482,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo", - "cocco_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2+cocco", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2+cocco", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1377,8 +1512,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1415,5 +1551,31 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index 34d61029..959f7173 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -7,9 +7,10 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -18,8 +19,9 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -28,8 +30,9 @@ "PFT_defaults == \"CESM2\"": 1, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -643,6 +646,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -665,6 +669,9 @@ "units": "mmol/m^3" }, "((autotroph_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Carbon", "units": "mmol/m^3" }, @@ -686,21 +693,29 @@ }, "((autotroph_sname))CaCO3": { "dependencies": { - "((autotroph_calcifier))": true + "((autotroph_calcifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) CaCO3", "units": "mmol/m^3" }, "((autotroph_sname))Chl": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Chlorophyll", "units": "mmol/m^3" }, "((autotroph_sname))Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((autotroph_lname)) Iron", "units": "mmol/m^3" }, "((autotroph_sname))P": { "dependencies": { + "base_bio_on": ".true.", "lvariable_PtoC": ".true." }, "long_name": "((autotroph_lname)) Phosphorus", @@ -708,20 +723,44 @@ }, "((autotroph_sname))Si": { "dependencies": { - "((autotroph_silicifier))": true + "((autotroph_silicifier))": true, + "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Silicon", "units": "mmol/m^3" }, "((zooplankton_sname))C": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "((zooplankton_lname)) Carbon", "units": "mmol/m^3" }, + "ABIO_DI14C": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon-14", + "units": "mmol/m^3" + }, + "ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "long_name": "Abiotic Dissolved Inorganic Carbon", + "units": "mmol/m^3" + }, "ALK": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity", "units": "meq/m^3" }, "ALK_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Alkalinity, Alternative CO2", "units": "meq/m^3" }, @@ -740,10 +779,16 @@ "units": "mmol/m^3" }, "DIC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon", "units": "mmol/m^3" }, "DIC_ALT_CO2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Carbon, Alternative CO2", "units": "mmol/m^3" }, @@ -762,54 +807,93 @@ "units": "mmol/m^3" }, "DOC": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Carbon", "units": "mmol/m^3" }, "DOCr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOC", "units": "mmol/m^3" }, "DON": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Nitrogen", "units": "mmol/m^3" }, "DONr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DON", "units": "mmol/m^3" }, "DOP": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Organic Phosphorus", "units": "mmol/m^3" }, "DOPr": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Refractory DOP", "units": "mmol/m^3" }, "Fe": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Iron", "units": "mmol/m^3" }, "Lig": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Iron Binding Ligand", "units": "mmol/m^3" }, "NH4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Ammonia", "units": "mmol/m^3" }, "NO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Nitrate", "units": "mmol/m^3" }, "O2": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Oxygen", "units": "mmol/m^3" }, "PO4": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Phosphate", "units": "mmol/m^3" }, "SiO3": { + "dependencies": { + "base_bio_on": ".true." + }, "long_name": "Dissolved Inorganic Silicate", "units": "mmol/m^3" }, @@ -832,78 +916,119 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 0.4, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 0.89, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -913,107 +1038,112 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 6.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.822, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcheck_forcing": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { @@ -1022,127 +1152,144 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 2.6, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.02, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.2, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 22.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.0, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1151,29 +1298,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.01, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1182,8 +1333,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 2.54 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1192,8 +1344,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 0.36 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1202,43 +1355,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.53 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1258,8 +1417,9 @@ 4.8 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1271,8 +1431,9 @@ "500.0e2", "1000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1281,53 +1442,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1335,8 +1472,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1373,5 +1511,31 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index 120112d1..e0c1604e 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -7,9 +7,10 @@ "PFT_defaults == \"4p2z\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -18,8 +19,9 @@ "PFT_defaults == \"4p2z\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -28,8 +30,9 @@ "PFT_defaults == \"4p2z\"": 2, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -731,6 +734,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -1000,92 +1004,119 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_dic_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether abiotic carbon tracer module is active", - "subcategory": "2. config flags", - "units": "unitless" - }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", - "units": "unitless" - }, - "base_bio_on": { - "datatype": "logical", - "default_value": ".true.", - "longname": "Control whether the base ecosystem tracer module is active", - "subcategory": "2. config flags", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -1095,107 +1126,112 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.685, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcheck_forcing": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { @@ -1204,127 +1240,144 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1333,29 +1386,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1364,8 +1421,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1374,8 +1432,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1384,43 +1443,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1440,8 +1505,9 @@ 5.3 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1453,8 +1519,9 @@ "500.0e2", "1000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1463,60 +1530,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 2.0, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_4p2z_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_microzoo", - "diat_mesozoo", - "diaz_microzoo", - "cocco_mesozoo", - "cocco_microzoo", - "diaz_mesozoo", - "null", - "microzoo_mesozoo" - ], - "zooplankton_settings": [ - "microzoo", - "mesozoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "4p2z", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "4p2z", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1524,8 +1560,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1562,5 +1599,31 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 7c3d9123..96c5bf89 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -7,9 +7,10 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -18,8 +19,9 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -28,8 +30,9 @@ "PFT_defaults == \"CESM2+cocco\"": 1, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -683,6 +686,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -952,92 +956,119 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2+cocco_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz", + "cocco" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo", + "cocco_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": "CESM2+cocco", + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2+cocco", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 2.0, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_dic_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether abiotic carbon tracer module is active", - "subcategory": "2. config flags", - "units": "unitless" - }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", - "units": "unitless" - }, - "base_bio_on": { - "datatype": "logical", - "default_value": ".true.", - "longname": "Control whether the base ecosystem tracer module is active", - "subcategory": "2. config flags", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -1047,100 +1078,112 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.7, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.685, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", + "units": "unitless" + }, + "lcheck_forcing": { + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { @@ -1149,127 +1192,144 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "700e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1278,29 +1338,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1309,8 +1373,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1319,8 +1384,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1329,43 +1395,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1385,8 +1457,9 @@ 5.3 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1398,8 +1471,9 @@ "500.0e2", "2000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1408,55 +1482,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz", - "cocco" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo", - "cocco_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": "CESM2+cocco", - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2+cocco", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1464,8 +1512,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1502,5 +1551,31 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index ccca83ef..a9943e69 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -8,9 +8,10 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "max_grazer_prey_cnt": { @@ -20,8 +21,9 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of grazer prey classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" }, "zooplankton_cnt": { @@ -31,8 +33,9 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Number of zooplankton classes", - "subcategory": "1. config PFTs", + "subcategory": "2. config PFTs", "units": "unitless" } }, @@ -646,6 +649,7 @@ } }, "_order": [ + "tracer_modules", "general_parms", "general_parms2", "PFT_counts", @@ -915,93 +919,120 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mol m-2 yr-1" }, + "PFT_defaults": { + "_CESM2_PFT_keys": { + "autotroph_settings": [ + "sp", + "diat", + "diaz" + ], + "grazing_relationship_settings": [ + "sp_zoo", + "diat_zoo", + "diaz_zoo" + ], + "zooplankton_settings": [ + "zoo" + ] + }, + "_append_to_config_keywords": true, + "datatype": "string", + "default_value": { + "default": "CESM2" + }, + "defined_if": "base_bio_on", + "longname": "Define how PFTs are initialized", + "subcategory": "2. config PFTs", + "units": "unitless", + "valid_values": [ + "CESM2", + "None", + "user-specified" + ] + }, "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for POM", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, + "defined_if": "base_bio_on", "longname": "Scale factor for burial of PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "QCaCO3_max": { "datatype": "real", "default_value": 0.4, + "defined_if": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" }, - "abio_dic_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether abiotic carbon tracer module is active", - "subcategory": "2. config flags", - "units": "unitless" - }, "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "maximum bury fraction for bSi", - "subcategory": "4. general parameters (bury coeffs)", - "units": "unitless" - }, - "base_bio_on": { - "_append_to_config_keywords": true, - "datatype": "logical", - "default_value": ".true.", - "longname": "Control whether the base ecosystem tracer module is active", - "subcategory": "2. config flags", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, + "defined_if": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, + "defined_if": "base_bio_on", "longname": "Running mean time scale for bury coefficients", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "years" }, "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", + "defined_if": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "cm" }, "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", + "defined_if": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric", "valid_values": [ "fixed_depth", @@ -1011,107 +1042,112 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", + "defined_if": "ciso_on", "longname": "Option for which biological fractionation calculation to use", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "non-numeric" }, "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", + "defined_if": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", - "subcategory": "2. config flags", - "units": "unitless" - }, - "ciso_on": { - "datatype": "logical", - "default_value": ".false.", - "longname": "Control whether CISO tracer module is active", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, + "defined_if": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, + "defined_if": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_0": { "datatype": "real", "default_value": 0.137, + "defined_if": "base_bio_on", "longname": "initial Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_max": { "datatype": "real", "default_value": 0.685, + "defined_if": "base_bio_on", "longname": "max Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "gQsi_min": { "datatype": "real", "default_value": 0.0457, + "defined_if": "base_bio_on", "longname": "min Si/C ratio for growth", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcheck_forcing": { "datatype": "logical", "default_value": ".false.", "longname": "Control whether consistency checks are performed on forcing input (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if NHx emissions are computed", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lecovars_full_depth_tavg": { "datatype": "logical", "default_value": ".false.", "longname": "If .false., MARBL will recommend truncating the column for some diagnostics", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lo2_consumption_scalef": { @@ -1120,127 +1156,144 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, + "defined_if": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", + "defined_if": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lsource_sink": { "datatype": "logical", "default_value": ".true.", "longname": "Control which portions of code are executed (useful for debugging)", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", + "defined_if": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", - "subcategory": "2. config flags", + "subcategory": "3. config flags", "units": "unitless" }, "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "mmol/m^3" }, "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, + "defined_if": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", + "defined_if": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound iron", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", + "defined_if": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "1/cm" }, "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for Fe", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, + "defined_if": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, + "defined_if": "base_bio_on", "longname": "Scavenging base rate for bound ligand", - "subcategory": "4. general parameters (scavenging)", + "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" }, "parm_POC_diss": { "datatype": "real", "default_value": "100e2", + "defined_if": "base_bio_on", "longname": "Base POC dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", + "defined_if": "base_bio_on", "longname": "Base SiO2 dissolution length scale", - "subcategory": "4. general parameters (dissolution)", + "subcategory": "5. general parameters (dissolution)", "units": "cm" }, "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, + "defined_if": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_f_prod_sp_CaCO3": { @@ -1249,29 +1302,33 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, + "defined_if": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to CaCO3 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to SiO2 ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, + "defined_if": "base_bio_on", "longname": "hPOC to dust ratio", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": 1 }, "parm_init_POC_bury_coeff": { @@ -1280,8 +1337,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_POP_bury_coeff": { @@ -1290,8 +1348,9 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of POP", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_init_bSi_bury_coeff": { @@ -1300,43 +1359,49 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, + "defined_if": "base_bio_on", "longname": "Initial scale factor for burial of bSi", - "subcategory": "4. general parameters (bury coeffs)", + "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" }, "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, + "defined_if": "base_bio_on", "longname": "Nitrification inverse time constant", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "1/day" }, "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, + "defined_if": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, + "defined_if": "base_bio_on", "longname": "PAR limit for nitrification", - "subcategory": "4. general parameters (nitrification)", + "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" }, "parm_o2_min": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, + "defined_if": "base_bio_on", "longname": "Width of min O2 range", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "nmol/cm^3" }, "parm_scalelen_vals": { @@ -1356,8 +1421,9 @@ 5.3 ] }, + "defined_if": "base_bio_on", "longname": "Prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "unitless" }, "parm_scalelen_z": { @@ -1369,8 +1435,9 @@ "500.0e2", "1000.0e2" ], + "defined_if": "base_bio_on", "longname": "Depths of prescribed scalelen values", - "subcategory": "5. Scale lengths", + "subcategory": "6. Scale lengths", "units": "cm" }, "parm_sed_denitrif_coeff": { @@ -1379,57 +1446,29 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, + "defined_if": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" }, "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, + "defined_if": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "m" }, "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, + "defined_if": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", - "subcategory": "4. general parameters", + "subcategory": "5. general parameters", "units": "unitless" } }, "general_parms2": { - "PFT_defaults": { - "_CESM2_PFT_keys": { - "autotroph_settings": [ - "sp", - "diat", - "diaz" - ], - "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo" - ], - "zooplankton_settings": [ - "zoo" - ] - }, - "_append_to_config_keywords": true, - "datatype": "string", - "default_value": { - "default": "CESM2", - "not base_bio_on": "None" - }, - "longname": "Define how PFTs are initialized", - "subcategory": "1. config PFTs", - "units": "unitless", - "valid_values": [ - "CESM2", - "None", - "user-specified" - ] - }, "init_bury_coeff_opt": { "datatype": "string", "default_value": { @@ -1437,8 +1476,9 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, + "defined_if": "base_bio_on", "longname": "Source of initial burial coefficient", - "subcategory": "3. config strings", + "subcategory": "4. config strings", "units": "unitless" } }, @@ -1476,5 +1516,30 @@ "subcategory": "20. tracer restoring", "units": "non-numeric" } + }, + "tracer_modules": { + "abio_dic_on": { + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether abiotic carbon tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "base_bio_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".true.", + "longname": "Control whether the base ecosystem tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + }, + "ciso_on": { + "_append_to_config_keywords": true, + "datatype": "logical", + "default_value": ".false.", + "longname": "Control whether CISO tracer module is active", + "subcategory": "1. tracer modules", + "units": "unitless" + } } } \ No newline at end of file diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 56bf9122..08fb4732 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -51,56 +52,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +171,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +229,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -189,312 +246,402 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : + base_bio_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .true. + _append_to_config_keywords : true + abio_dic_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcheck_forcing : longname : Control whether consistency checks are performed on forcing input (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 18.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.4 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 770e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -504,8 +651,9 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -521,8 +669,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -530,96 +679,85 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.33 - ################################################################################ # Category 1.5: General Parameters (cont) # ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2 - valid_values : - - CESM2 - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -639,8 +777,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -649,16 +788,18 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : default : 1 PFT_defaults == "CESM2" : 1 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index 91d1959c..e92a7528 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -51,56 +52,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +171,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +229,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -189,314 +246,404 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : + base_bio_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .true. + _append_to_config_keywords : true + abio_dic_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcheck_forcing : longname : Control whether consistency checks are performed on forcing input (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : # default value is resolution dependent! default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.822 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 6.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 2.54 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.36 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.53 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 22.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.2 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.02 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 2.6 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -506,8 +653,9 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -523,8 +671,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -532,62 +681,72 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.89 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 2.0 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.7 @@ -597,32 +756,10 @@ general_parms : ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2+cocco - valid_values : - - CESM2+cocco - - user-specified - _CESM2+cocco_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - - cocco_zoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -642,8 +779,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -652,16 +790,18 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2+cocco' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : default : 1 PFT_defaults == "CESM2+cocco" : 1 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index ea1caf8d..c7dc17e7 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -51,56 +52,101 @@ _order : _tracer_list : # Non-living tracers PO4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 SiO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Silicate units : mmol/m^3 NH4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Ammonia units : mmol/m^3 Fe : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Iron units : mmol/m^3 Lig : + dependencies : + base_bio_on : .true. long_name : Iron Binding Ligand units : mmol/m^3 O2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Oxygen units : mmol/m^3 DIC : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon units : mmol/m^3 DIC_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Carbon, Alternative CO2 units : mmol/m^3 ALK : + dependencies : + base_bio_on : .true. long_name : Alkalinity units : meq/m^3 ALK_ALT_CO2 : + dependencies : + base_bio_on : .true. long_name : Alkalinity, Alternative CO2 units : meq/m^3 DOC : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Carbon units : mmol/m^3 DON : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Nitrogen units : mmol/m^3 DOP : + dependencies : + base_bio_on : .true. long_name : Dissolved Organic Phosphorus units : mmol/m^3 DOPr : + dependencies : + base_bio_on : .true. long_name : Refractory DOP units : mmol/m^3 DONr : + dependencies : + base_bio_on : .true. long_name : Refractory DON units : mmol/m^3 DOCr : + dependencies : + base_bio_on : .true. long_name : Refractory DOC units : mmol/m^3 + # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 # Non-living (ciso only) DI13C : dependencies : @@ -125,26 +171,35 @@ _tracer_list : # Per-autotroph tracers ((autotroph_sname))Chl : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll units : mmol/m^3 ((autotroph_sname))C : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Carbon units : mmol/m^3 ((autotroph_sname))Fe : + dependencies : + base_bio_on : .true. long_name : ((autotroph_lname)) Iron units : mmol/m^3 ((autotroph_sname))Si : dependencies : + base_bio_on : .true. ((autotroph_silicifier)) : True long_name : ((autotroph_lname)) Silicon units : mmol/m^3 ((autotroph_sname))CaCO3 : dependencies : + base_bio_on : .true. ((autotroph_calcifier)) : True long_name : ((autotroph_lname)) CaCO3 units : mmol/m^3 ((autotroph_sname))P : dependencies : + base_bio_on : .true. lvariable_PtoC : .true. long_name : ((autotroph_lname)) Phosphorus units : mmol/m^3 @@ -174,6 +229,8 @@ _tracer_list : # Per-zooplankton tracers ((zooplankton_sname))C : + dependencies : + base_bio_on : .true. long_name : ((zooplankton_lname)) Carbon units : mmol/m^3 # Total zooplankton tracers (ciso only) @@ -189,314 +246,404 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : + base_bio_on : + longname : Control whether the base ecosystem tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .true. + _append_to_config_keywords : true + abio_dic_on : + longname : Control whether abiotic carbon tracer module is active + subcategory : 1. tracer modules + units : unitless + datatype : logical + default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcheck_forcing : longname : Control whether consistency checks are performed on forcing input (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : # default value is resolution dependent! default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.822 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 6.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 2.54 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.36 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.53 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 22.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.2 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.02 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 2.6 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -506,8 +653,9 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -523,8 +671,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -532,62 +681,72 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.89 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.33 @@ -597,30 +756,10 @@ general_parms : ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2 - valid_values : - - CESM2 - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -640,8 +779,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -650,16 +790,18 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : default : 1 PFT_defaults == "CESM2" : 1 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 7f28def0..b78bbc93 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -136,6 +137,17 @@ _tracer_list : long_name : Refractory DOC units : mmol/m^3 # Non-living (abiotic only) + ABIO_DIC : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon + units : mmol/m^3 + ABIO_DI14C : + dependencies : + abio_dic_on : .true. + long_name : Abiotic Dissolved Inorganic Carbon-14 + units : mmol/m^3 + # Non-living (abiotic only) ABIO_DIC : dependencies : abio_dic_on : .true. @@ -245,326 +257,404 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : base_bio_on : longname : Control whether the base ecosystem tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .true. + _append_to_config_keywords : true abio_dic_on : longname : Control whether abiotic carbon tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcheck_forcing : longname : Control whether consistency checks are performed on forcing input (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : # default value is resolution dependent! default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -574,8 +664,9 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -591,8 +682,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -600,62 +692,72 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 2.0 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 1.0 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.5 @@ -665,37 +767,10 @@ general_parms : ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : 4p2z - valid_values : - - 4p2z - - user-specified - _4p2z_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - microzoo - - mesozoo - grazing_relationship_settings : - - sp_microzoo - - diat_mesozoo - - diaz_microzoo - - cocco_mesozoo - - cocco_microzoo - - diaz_mesozoo - - "null" - - microzoo_mesozoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -715,8 +790,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -725,16 +801,18 @@ PFT_counts : cannot change : PFT_defaults == '4p2z' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : default : 1 PFT_defaults == "4p2z" : 2 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 5f9629b6..680c655b 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -245,320 +246,404 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : base_bio_on : longname : Control whether the base ecosystem tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .true. + _append_to_config_keywords : true abio_dic_on : longname : Control whether abiotic carbon tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : CESM2+cocco + valid_values : + - CESM2+cocco + - user-specified + _CESM2+cocco_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + - cocco + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + - cocco_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. + lcheck_forcing : + longname : Control whether consistency checks are performed on forcing input (useful for debugging) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : # default value is resolution dependent! default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 700e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -568,8 +653,9 @@ general_parms : - 500.0e2 - 2000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -585,8 +671,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -594,62 +681,72 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 2.0 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.7 @@ -659,32 +756,10 @@ general_parms : ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : CESM2+cocco - valid_values : - - CESM2+cocco - - user-specified - _CESM2+cocco_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - - cocco - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - - cocco_zoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -704,8 +779,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -714,16 +790,18 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2+cocco' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : default : 1 PFT_defaults == "CESM2+cocco" : 1 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 36064083..ef8413ba 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -41,6 +41,7 @@ # Order in which the categories are parsed _order : + - tracer_modules - general_parms - general_parms2 - PFT_counts @@ -245,327 +246,403 @@ _tracer_list : units : mmol/m^3 ################################################################################ -# Category 1: General Parameters # +# Category 0: Tracer Modules # ################################################################################ -general_parms : +tracer_modules : base_bio_on : longname : Control whether the base ecosystem tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .true. _append_to_config_keywords : true abio_dic_on : longname : Control whether abiotic carbon tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. ciso_on : longname : Control whether CISO tracer module is active - subcategory : 2. config flags + subcategory : 1. tracer modules units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true + +################################################################################ +# Category 1: General Parameters # +################################################################################ + +general_parms : + PFT_defaults : + defined_if : base_bio_on + longname : Define how PFTs are initialized + subcategory : 2. config PFTs + units : unitless + datatype : string + default_value : + default : CESM2 + valid_values : + - CESM2 + - None + - user-specified + _CESM2_PFT_keys : + autotroph_settings : + - sp + - diat + - diaz + zooplankton_settings : + - zoo + grazing_relationship_settings : + - sp_zoo + - diat_zoo + - diaz_zoo + _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ciso_lsource_sink : + defined_if : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcheck_forcing : longname : Control whether consistency checks are performed on forcing input (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lecovars_full_depth_tavg : longname : If .false., MARBL will recommend truncating the column for some diagnostics - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lflux_gas_o2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : + defined_if : base_bio_on longname : Control which portions of code are executed (useful for debugging) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : + defined_if : base_bio_on longname : Control if NHx emissions are computed - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : + defined_if : base_bio_on longname : Control if PtoC ratios in autotrophs vary - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : + defined_if : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : + defined_if : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : # default value is resolution dependent! default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : + defined_if : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) - subcategory : 2. config flags + subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: + defined_if : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : + defined_if : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold - subcategory : 4. general parameters + subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : + defined_if : base_bio_on longname : initial Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : + defined_if : base_bio_on longname : max Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : + defined_if : base_bio_on longname : min Si/C ratio for growth - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : + defined_if : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : + defined_if : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : + defined_if : base_bio_on longname : Fraction of Fe flux that is bioavailable - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : + defined_if : base_bio_on longname : reference depth for particulate flux diagnostics - subcategory : 4. general parameters + subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : + defined_if : base_bio_on longname : Minimum O2 needed for production & consumption - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : + defined_if : base_bio_on longname : Width of min O2 range - subcategory : 4. general parameters + subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : + defined_if : base_bio_on longname : Nitrification inverse time constant - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : + defined_if : base_bio_on longname : PAR limit for nitrification - subcategory : 4. general parameters (nitrification) + subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : + defined_if : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POC, PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of POP - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : + defined_if : base_bio_on longname : Initial scale factor for burial of bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : # default value is resolution dependent! default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for Fe - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound ligand - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : + defined_if : base_bio_on longname : Scavenging base rate for bound iron - subcategory : 4. general parameters (scavenging) + subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : + defined_if : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : + defined_if : base_bio_on longname : Desorption rate for scavenged Fe from particles - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : + defined_if : base_bio_on longname : Fraction of sp production as CaCO3 production - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : # default value is resolution dependent! default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : + defined_if : base_bio_on longname : Base POC dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : + defined_if : base_bio_on longname : Base SiO2 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : + defined_if : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : + defined_if : base_bio_on longname : hPOC to SiO2 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : + defined_if : base_bio_on longname : Base CaCO3 dissolution length scale - subcategory : 4. general parameters (dissolution) + subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : + defined_if : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : + defined_if : base_bio_on longname : hPOC to CaCO3 ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : + defined_if : base_bio_on longname : hPOC to dust ratio - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : + defined_if : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : + defined_if : base_bio_on longname : o2_scalefactor is constant for O2 less than this - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : + defined_if : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : + defined_if : base_bio_on longname : Global scaling factor for sed_denitrif - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : + defined_if : base_bio_on longname : Running mean time scale for bury coefficients - subcategory : 4. general parameters + subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : + defined_if : base_bio_on longname : Depths of prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : cm datatype : real _array_shape : 4 @@ -575,8 +652,9 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : + defined_if : base_bio_on longname : Prescribed scalelen values - subcategory : 5. Scale lengths + subcategory : 6. Scale lengths units : unitless datatype : real _array_shape : 4 @@ -592,8 +670,9 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : + defined_if : base_bio_on longname : Option of threshold of CaCO3 burial - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : omega_calc @@ -601,62 +680,72 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : + defined_if : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' - subcategory : 4. general parameters + subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : + defined_if : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' - subcategory : 4. general parameters + subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : + defined_if : base_bio_on longname : Scale factor for burial of PON - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for POM - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : + defined_if : base_bio_on longname : maximum bury fraction for bSi - subcategory : 4. general parameters (bury coeffs) + subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : + defined_if : ciso_on longname : Option for which biological fractionation calculation to use - subcategory : 4. general parameters + subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for autotrophs - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : + defined_if : base_bio_on longname : Value of power loss exponent for zooplankton - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : + defined_if : base_bio_on longname : Max CaCO3/C ratio for calcifiers - subcategory : 4. general parameters + subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : + defined_if : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts - subcategory : 4. general parameters + subcategory : 5. general parameters units : unitless datatype : real default_value : 0.33 @@ -666,33 +755,10 @@ general_parms : ################################################################################ general_parms2 : - PFT_defaults : - longname : Define how PFTs are initialized - subcategory : 1. config PFTs - units : unitless - datatype : string - default_value : - default : CESM2 - not base_bio_on : None - valid_values : - - CESM2 - - None - - user-specified - _CESM2_PFT_keys : - autotroph_settings : - - sp - - diat - - diaz - zooplankton_settings : - - zoo - grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - _append_to_config_keywords : true init_bury_coeff_opt : + defined_if : base_bio_on longname : Source of initial burial coefficient - subcategory : 3. config strings + subcategory : 4. config strings units : unitless datatype : string default_value : @@ -712,8 +778,9 @@ general_parms2 : PFT_counts : autotroph_cnt : + defined_if : base_bio_on longname : Number of autotroph classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -723,8 +790,9 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : + defined_if : base_bio_on longname : Number of zooplankton classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : @@ -732,8 +800,9 @@ PFT_counts : PFT_defaults == "CESM2" : 1 PFT_defaults == "None" : 0 max_grazer_prey_cnt : + defined_if : base_bio_on longname : Number of grazer prey classes - subcategory : 1. config PFTs + subcategory : 2. config PFTs units : unitless datatype : integer default_value : From 753e96f8f255fe6d8b475b9cf30f59d1552b7e34 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 22 Sep 2023 16:53:56 -0600 Subject: [PATCH 27/64] Add test with just abio_dic tracers run_test_suite.sh now calls call_compute_subroutines test with abio_dic_on = .true. base_bio_on = .false. And compares against a baseline generated on cheyenne (with gfortran) --- MARBL_tools/run_test_suite.sh | 30 ++++++++++++++++++ ...l_compute_subroutines.history_with_abio.nc | Bin 0 -> 215528 bytes 2 files changed, 30 insertions(+) create mode 100644 tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc diff --git a/MARBL_tools/run_test_suite.sh b/MARBL_tools/run_test_suite.sh index e654117a..9a25381a 100755 --- a/MARBL_tools/run_test_suite.sh +++ b/MARBL_tools/run_test_suite.sh @@ -197,6 +197,36 @@ if [ "${STATUS}" == "PASS" ]; then print_status "netCDF Comparison (1 inst (mks, 4p2z) vs baseline (cgs, 4p2z))" >> ${RESULTS_CACHE} fi + # Initialize MARBL (with abio tracers), compute surface fluxes and interior tendencies + cd ${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines + (set -x ; ./call_compute_subroutines.py -s ../../input_files/settings/marbl_with_abio_only.settings) + STATUS=$(check_return $?) + print_status "call_compute_subroutines.py -s ../../input_files/settings/marbl_with_abio_only.settings" >> ${RESULTS_CACHE} + + if [ "${STATUS}" == "PASS" ]; then + cd ${MARBL_ROOT}/MARBL_tools + BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines + HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines + (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) + STATUS=$(check_return $?) + print_status "netCDF Comparison (1 inst (cgs, with abio) vs baseline (cgs, with abio))" >> ${RESULTS_CACHE} + fi + + # Initialize MARBL (with abio tracers), compute surface fluxes and interior tendencies in mks instead of cgs + cd ${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines + (set -x ; ./call_compute_subroutines.py -s ../../input_files/settings/marbl_with_abio_only.settings -u mks) + STATUS=$(check_return $?) + print_status "call_compute_subroutines.py -s ../../input_files/settings/marbl_with_abio_only.settings -u mks" >> ${RESULTS_CACHE} + + if [ "${STATUS}" == "PASS" ]; then + cd ${MARBL_ROOT}/MARBL_tools + BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines + HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines + (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) + STATUS=$(check_return $?) + print_status "netCDF Comparison (1 inst (mks, with abio) vs baseline (cgs, with abio))" >> ${RESULTS_CACHE} + fi + # Initialize MARBL (with ciso tracers), compute surface fluxes and interior tendencies cd ${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines (set -x ; ./call_compute_subroutines.py -s ../../input_files/settings/marbl_with_ciso.settings) diff --git a/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc b/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc new file mode 100644 index 0000000000000000000000000000000000000000..07a1fbf56e3fac6795546a1a9badc27133a29610 GIT binary patch literal 215528 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 literal 0 HcmV?d00001 From be9c627acc95863e115b2277bbd80b976d339d3f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 26 Sep 2023 10:06:51 -0600 Subject: [PATCH 28/64] Clean up default ABIO diagnostics --- defaults/diagnostics_latest.yaml | 40 +++------------------ defaults/json/diagnostics_latest.json | 50 +++------------------------ 2 files changed, 9 insertions(+), 81 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 648f5f43..1ef8d821 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -229,30 +229,6 @@ NHx_SURFACE_EMIS : # abio module # ############### -ABIO_IFRAC : - dependencies : - abio_dic_on : .true. - longname : Ice Fraction for Abiotic DIC tracer fluxes - units : fraction - vertical_grid : none - frequency : never - operator : average -ABIO_XKW : - dependencies : - abio_dic_on : .true. - longname : XKW for Abiotic DIC tracer fluxes - units : cm/s - vertical_grid : none - frequency : never - operator : average -ABIO_ATM_PRESS : - dependencies : - abio_dic_on : .true. - longname : Atmospheric Pressure for Abiotic DIC tracer fluxes - units : atmospheres - vertical_grid : none - frequency : never - operator : average ABIO_pCO2 : dependencies : abio_dic_on : .true. @@ -261,7 +237,7 @@ ABIO_pCO2 : vertical_grid : none frequency : medium operator : average -ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO version +ABIO_D14C_atm : dependencies : abio_dic_on : .true. longname : Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes @@ -269,15 +245,7 @@ ABIO_D14Catm : # todo add underscore after D14C to be consistent with CISO versi vertical_grid : none frequency : medium operator : average -ABIO_CO2_SCHMIDT : # todo rename ABIO_SCHMIDT_CO2 to match base biotic version - dependencies : - abio_dic_on : .true. - longname : CO2 Schmidt Number for Abiotic DIC tracer fluxes - units : 1 - vertical_grid : none - frequency : never - operator : average -ABIO_CO2_PV : # todo rename ABIO_PV_CO2 to match base biotic version +ABIO_PV_CO2 : dependencies : abio_dic_on : .true. longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes @@ -317,7 +285,7 @@ ABIO_DpCO2 : vertical_grid : none frequency : medium operator : average -ABIO_PH_SURF : # todo: for base biotic tracers, there is no _SURF +ABIO_PH : dependencies : abio_dic_on : .true. longname : Surface pH for Abiotic DIC tracer fluxes @@ -1458,7 +1426,7 @@ Nfix : # abio module # ############### -ABIO_D14Cocn : # todo add underscore after D14C to be consistent with CISO version +ABIO_D14C_ocn : dependencies : abio_dic_on : .true. longname : Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index d3465949..36ba6368 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -368,16 +368,6 @@ "units": "meq/m^3", "vertical_grid": "none" }, - "ABIO_ATM_PRESS": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "never", - "longname": "Atmospheric Pressure for Abiotic DIC tracer fluxes", - "operator": "average", - "units": "atmospheres", - "vertical_grid": "none" - }, "ABIO_CO2STAR": { "dependencies": { "abio_dic_on": ".true." @@ -388,27 +378,7 @@ "units": "mmol/m^3", "vertical_grid": "none" }, - "ABIO_CO2_PV": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "never", - "longname": "CO2 Piston Velocity for Abiotic DIC tracer fluxes", - "operator": "average", - "units": "cm/s", - "vertical_grid": "none" - }, - "ABIO_CO2_SCHMIDT": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "never", - "longname": "CO2 Schmidt Number for Abiotic DIC tracer fluxes", - "operator": "average", - "units": 1, - "vertical_grid": "none" - }, - "ABIO_D14Catm": { + "ABIO_D14C_atm": { "dependencies": { "abio_dic_on": ".true." }, @@ -418,7 +388,7 @@ "units": "permil", "vertical_grid": "none" }, - "ABIO_D14Cocn": { + "ABIO_D14C_ocn": { "dependencies": { "abio_dic_on": ".true." }, @@ -448,17 +418,7 @@ "units": "ppmv", "vertical_grid": "none" }, - "ABIO_IFRAC": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "never", - "longname": "Ice Fraction for Abiotic DIC tracer fluxes", - "operator": "average", - "units": "fraction", - "vertical_grid": "none" - }, - "ABIO_PH_SURF": { + "ABIO_PH": { "dependencies": { "abio_dic_on": ".true." }, @@ -468,12 +428,12 @@ "units": 1, "vertical_grid": "none" }, - "ABIO_XKW": { + "ABIO_PV_CO2": { "dependencies": { "abio_dic_on": ".true." }, "frequency": "never", - "longname": "XKW for Abiotic DIC tracer fluxes", + "longname": "CO2 Piston Velocity for Abiotic DIC tracer fluxes", "operator": "average", "units": "cm/s", "vertical_grid": "none" From 457ce542b09119e75c52338142061161a1e53e08 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 26 Sep 2023 18:32:58 -0600 Subject: [PATCH 29/64] Add last three abio diagnostics Add derivatives of surface flux with respect to tracer to surface flux diagnostics for abio tracers --- defaults/diagnostics_latest.yaml | 24 ++++++++ defaults/json/diagnostics_latest.json | 30 +++++++++ src/marbl_abio_dic_diagnostics_mod.F90 | 43 ++++++++++++- src/marbl_abio_dic_surface_flux_mod.F90 | 81 ++++++++++++++++++++++++- src/marbl_interface_private_types.F90 | 3 + 5 files changed, 175 insertions(+), 6 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 1ef8d821..701df1e6 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -317,6 +317,30 @@ FG_ABIO_DIC14 : vertical_grid : none frequency : medium operator : average +d_SF_ABIO_DIC_d_ABIO_DIC : + dependencies : + abio_dic_on : .true. + longname : Derivative of STF_ABIO_DIC wrt ABIO_DIC + units : cm/s + vertical_grid : none + frequency : never + operator : average +d_SF_ABIO_DI14C_d_ABIO_DIC : + dependencies : + abio_dic_on : .true. + longname : Derivative of STF_ABIO_DI14C wrt ABIO_DIC + units : cm/s + vertical_grid : none + frequency : never + operator : average +d_SF_ABIO_DI14C_d_ABIO_DI14C : + dependencies : + abio_dic_on : .true. + longname : Derivative of STF_ABIO_DI14C wrt ABIO_DI14C + units : cm/s + vertical_grid : none + frequency : never + operator : average ############### # ciso module # diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 36ba6368..8fc65830 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -2386,6 +2386,36 @@ "units": "mmol/m^3", "vertical_grid": "layer_avg" }, + "d_SF_ABIO_DI14C_d_ABIO_DI14C": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "never", + "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DI14C", + "operator": "average", + "units": "cm/s", + "vertical_grid": "none" + }, + "d_SF_ABIO_DI14C_d_ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "never", + "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DIC", + "operator": "average", + "units": "cm/s", + "vertical_grid": "none" + }, + "d_SF_ABIO_DIC_d_ABIO_DIC": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "never", + "longname": "Derivative of STF_ABIO_DIC wrt ABIO_DIC", + "operator": "average", + "units": "cm/s", + "vertical_grid": "none" + }, "dustToSed": { "dependencies": { "base_bio_on": ".true." diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 8c376943..c5746a42 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -247,9 +247,41 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - ! d_SF_ABIO_DIC_d_ABIO_DIC - ! d_SF_ABIO_DIC14_d_ABIO_DIC - ! d_SF_ABIO_DIC14_d_ABIO_DIC14 + lname = 'Derivative of STF_ABIO_DIC wrt ABIO_DIC' + sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DIC_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DIC' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DI14C' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DI14C, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if end associate @@ -296,6 +328,7 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & alk_surf, & fg_dic, & fg_di14c, & + derivative_terms, & marbl_surface_flux_diags) ! !DESCRIPTION: @@ -316,6 +349,7 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & real (r8), dimension(:), intent(in) :: alk_surf real (r8), dimension(:), intent(in) :: fg_dic real (r8), dimension(:), intent(in) :: fg_di14c + real (r8), dimension(:,:), intent(in) :: derivative_terms type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags associate( & @@ -338,6 +372,9 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) + diags(ind%d_SF_ABIO_DIC_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,1) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,2) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DI14C)%field_2d(:) = derivative_terms(:,3) end associate diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 55e59f46..1621944c 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -4,6 +4,7 @@ module marbl_abio_dic_surface_flux_mod use marbl_kinds_mod, only : r8 use marbl_constants_mod, only : c0 + use marbl_constants_mod, only : p5 use marbl_constants_mod, only : c1 use marbl_constants_mod, only : rho_sw @@ -72,19 +73,32 @@ subroutine marbl_abio_dic_surface_flux_compute(& type(marbl_log_type), intent(inout) :: marbl_status_log real(r8) :: alk_surf(num_elements) ! local alkalinity - real(r8) :: phlo(num_elements) ! lower bound for ph in solver - real(r8) :: phhi(num_elements) ! upper bound for ph in solver real(r8) :: SiO2(num_elements) ! Abiotic silicate real(r8) :: PO4(num_elements) ! Abiotic phosphate real(r8) :: R14C_ocn(num_elements) ! Rocn = DIC14/DIC real(r8) :: R14C_atm(num_elements) ! Ratm = 1+ D14C/1000 real(r8) :: fg_dic(num_elements) ! Carbon gas flux real(r8) :: fg_di14c(num_elements) ! Isotopic carbon gas flux + real(r8) :: phlo(num_elements) ! lower bound for ph in solver + real(r8) :: phhi(num_elements) ! upper bound for ph in solver real(r8) :: co2star(num_elements) real(r8) :: dco2star(num_elements) real(r8) :: pco2surf(num_elements) real(r8) :: dpco2(num_elements) real(r8) :: co3(num_elements) + ! Terms for computing derivative diagnostics + real(r8) :: ph_surf_tmp(num_elements) + real(r8) :: phlo_tmp(num_elements) + real(r8) :: phhi_tmp(num_elements) + real(r8) :: co2star_tmp1(num_elements) + real(r8) :: co2star_tmp2(num_elements) + real(r8) :: dco2star_tmp(num_elements) + real(r8) :: pco2surf_tmp(num_elements) + real(r8) :: dpco2_tmp(num_elements) + real(r8) :: co3_tmp(num_elements) + real(r8) :: derivative_terms(num_elements, 3) ! d[SF_ABIO_DIC]/d[ABIO_DIC] + ! d[SF_ABIO_DI14C]/d[ABIO_DIC] + ! d[SF_ABIO_DI14C]/d[ABIO_DI14C] ! Return immediately if not running with abiotic dic tracer module if (.not. abio_dic_on) return @@ -150,6 +164,8 @@ subroutine marbl_abio_dic_surface_flux_compute(& phlo(:) = phlo_surf_init phhi(:) = phhi_surf_init end where + phlo_tmp(:) = phlo(:) + phhi_tmp(:) = phhi(:) ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g ! and ocn_ref_salinity comes from shr_const (SHR_CONST_OCN_REF_SAL = 34.7) @@ -189,8 +205,66 @@ subroutine marbl_abio_dic_surface_flux_compute(& surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + fg_dic(:) surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + fg_di14c(:) - ! update abiotic DIC diagnostics + ! Compute derivative diagnostics + derivative_terms(:,:) = c0 + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) + c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_tmp, & + phhi = phhi_tmp, & + ph = ph_surf_tmp, & + co3 = co3_tmp(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_tmp1, & + dco2star = dco2star_tmp, & + pco2surf = pco2surf_tmp, & + dpco2 = dpco2_tmp, & + marbl_status_log = marbl_status_log) + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) - c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_tmp, & + phhi = phhi_tmp, & + ph = ph_surf_tmp, & + co3 = co3_tmp(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_tmp2, & + dco2star = dco2star_tmp, & + pco2surf = pco2surf_tmp, & + dpco2 = dpco2_tmp, & + marbl_status_log = marbl_status_log) + derivative_terms(:,1) = -p5 * (co2star_tmp1(:) - co2star_tmp2(:)) * pv_co2(:) + where (tracers_at_surface(:,dic_ind) > 0) + derivative_terms(:,2) = -p5 * (co2star_tmp1(:) / (tracers_at_surface(:,dic_ind) + c1) & + - co2star_tmp2(:) / (tracers_at_surface(:,dic_ind) - c1)) & + * tracers_at_surface(:,di14c_ind) * pv_co2(:) + derivative_terms(:,3) = -co2star(:) / tracers_at_surface(:,dic_ind) + else where + derivative_terms(:,2) = c0 + derivative_terms(:,3) = c0 + end where + ! update abiotic DIC diagnostics call marbl_abio_dic_diagnostics_surface_flux_compute( & ifrac, & piston_velocity, & @@ -207,6 +281,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& alk_surf, & fg_dic, & fg_di14c, & + derivative_terms, & surface_flux_diags) end associate diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index dcc3c16d..7b06c9ca 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -494,6 +494,9 @@ module marbl_interface_private_types integer(int_kind) :: ABIO_ALK_SURF integer(int_kind) :: ABIO_FG_DIC integer(int_kind) :: ABIO_FG_DI14C + integer(int_kind) :: d_SF_ABIO_DIC_d_ABIO_DIC + integer(int_kind) :: d_SF_ABIO_DI14C_d_ABIO_DIC + integer(int_kind) :: d_SF_ABIO_DI14C_d_ABIO_DI14C integer(int_kind) :: CISO_DI13C_GAS_FLUX ! di13c flux integer(int_kind) :: CISO_DI14C_GAS_FLUX ! di14c flux From 15c8c545204fac7b367a1dc59a08613d8189c3e7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 26 Sep 2023 22:32:24 -0600 Subject: [PATCH 30/64] Update diag names in fortran code An earlier commit changed the names of several diagnostics in the YAML file, this propagates those changes through to the code itself --- src/marbl_abio_dic_diagnostics_mod.F90 | 26 +++++++++++++------------- src/marbl_interface_private_types.F90 | 8 ++++---- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index c5746a42..0e765bd0 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -115,12 +115,12 @@ subroutine marbl_abio_dic_diagnostics_init( & end if lname = 'Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes' - sname = 'ABIO_D14Catm' + sname = 'ABIO_D14C_atm' units = 'permil' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_D14Catm, marbl_status_log) + ind%ABIO_D14C_atm, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -139,12 +139,12 @@ subroutine marbl_abio_dic_diagnostics_init( & end if lname = 'CO2 Piston Velocity for Abiotic DIC tracer fluxes' - sname = 'ABIO_CO2_PV' + sname = 'ABIO_PV_CO2' units = vel_units vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_CO2_PV, marbl_status_log) + ind%ABIO_PV_CO2, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -199,12 +199,12 @@ subroutine marbl_abio_dic_diagnostics_init( & end if lname = 'Surface pH for Abiotic DIC tracer fluxes' - sname = 'ABIO_PH_SURF' + sname = 'ABIO_PH' units = '1' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_PH_SURF, marbl_status_log) + ind%ABIO_PH, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -295,12 +295,12 @@ subroutine marbl_abio_dic_diagnostics_init( & ) lname = 'Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes' - sname = 'ABIO_D14Cocn' + sname = 'ABIO_D14C_ocn' units = 'permil' vgrid = 'layer_avg' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_D14Cocn, marbl_status_log) + ind%ABIO_D14C_ocn, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -361,14 +361,14 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & diags(ind%ABIO_XKW)%field_2d(:) = piston_velocity(:) diags(ind%ABIO_ATM_PRESS)%field_2d(:) = ap_used(:) diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) - diags(ind%ABIO_D14Catm)%field_2d(:) = d14c(:) + diags(ind%ABIO_D14C_atm)%field_2d(:) = d14c(:) diags(ind%ABIO_CO2_SCHMIDT)%field_2d(:) = schmidt_co2(:) - diags(ind%ABIO_CO2_PV)%field_2d(:) = pv_co2(:) + diags(ind%ABIO_PV_CO2)%field_2d(:) = pv_co2(:) diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) diags(ind%ABIO_DpCO2)%field_2d(:) = dpco2(:) - diags(ind%ABIO_PH_SURF)%field_2d(:) = ph_surf(:) + diags(ind%ABIO_PH)%field_2d(:) = ph_surf(:) diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) @@ -400,9 +400,9 @@ subroutine marbl_abio_dic_diagnostics_interior_tendency_compute(dic, di14c, inte ) where (dic(:) == c0) - diags(ind%ABIO_D14Cocn)%field_3d(:,1) = c0 + diags(ind%ABIO_D14C_ocn)%field_3d(:,1) = c0 elsewhere - diags(ind%ABIO_D14Cocn)%field_3d(:,1) = (di14c(:)/dic(:) - c1) * 1000._r8 + diags(ind%ABIO_D14C_ocn)%field_3d(:,1) = (di14c(:)/dic(:) - c1) * 1000._r8 end where end associate diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 7b06c9ca..e47ccd9e 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -483,14 +483,14 @@ module marbl_interface_private_types integer(int_kind) :: ABIO_XKW integer(int_kind) :: ABIO_ATM_PRESS integer(int_kind) :: ABIO_pCO2 - integer(int_kind) :: ABIO_D14Catm + integer(int_kind) :: ABIO_D14C_atm integer(int_kind) :: ABIO_CO2_SCHMIDT - integer(int_kind) :: ABIO_CO2_PV + integer(int_kind) :: ABIO_PV_CO2 integer(int_kind) :: ABIO_CO2STAR integer(int_kind) :: ABIO_DCO2STAR integer(int_kind) :: ABIO_pCO2SURF integer(int_kind) :: ABIO_DpCO2 - integer(int_kind) :: ABIO_PH_SURF + integer(int_kind) :: ABIO_PH integer(int_kind) :: ABIO_ALK_SURF integer(int_kind) :: ABIO_FG_DIC integer(int_kind) :: ABIO_FG_DI14C @@ -738,7 +738,7 @@ module marbl_interface_private_types integer(int_kind), allocatable :: x_graze_zoo(:) ! abio ids - integer(int_kind) :: ABIO_D14Cocn + integer(int_kind) :: ABIO_D14C_ocn ! ciso ids for nonstandard 3d fields integer (int_kind) :: CISO_PO13C_FLUX_IN ! po13c flux into cell From 85bac8ab9bdf427dbfe97b0c2a619943b308ee5b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Tue, 26 Sep 2023 22:51:08 -0600 Subject: [PATCH 31/64] Add pv_co2 term to derivative diag Missed a term when adding in the d_STF_DI14C_d_DI14C diagnostic ` --- src/marbl_abio_dic_surface_flux_mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 1621944c..3d3d7586 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -258,7 +258,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& derivative_terms(:,2) = -p5 * (co2star_tmp1(:) / (tracers_at_surface(:,dic_ind) + c1) & - co2star_tmp2(:) / (tracers_at_surface(:,dic_ind) - c1)) & * tracers_at_surface(:,di14c_ind) * pv_co2(:) - derivative_terms(:,3) = -co2star(:) / tracers_at_surface(:,dic_ind) + derivative_terms(:,3) = -pv_co2(:) * co2star(:) / tracers_at_surface(:,dic_ind) else where derivative_terms(:,2) = c0 derivative_terms(:,3) = c0 From bd3a822840180aaf99ae0262ec3ec3aa88c384a4 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Wed, 27 Sep 2023 07:31:06 -0600 Subject: [PATCH 32/64] Update baseline to account for variable renaming Also, accounts for three new diagnostics in abio module --- ...l_compute_subroutines.history_with_abio.nc | Bin 215528 -> 216196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc b/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc index 07a1fbf56e3fac6795546a1a9badc27133a29610..c8d40d257088505097fd74ab03153217032d458c 100644 GIT binary patch delta 1787 zcma)+ZEREL8HSTPrcJQTM+qUMPVq9+eAFcgm<5)!Nn@vVhDSn^GN5UlfJyUV!bY8M z=cCAj30Wxkwk$YG&$`q?ooh^IsG%u~Tk0RQwK}WHG_*z?l{_s!EE1$_Lsh2j4V~8h zskHOsz4W}gpX)u(IY(!nYS#tzgfZ)KT3Q;09BFA>XD>YWY6X6wITviliDhP|2jH0F z2kA0;6>P;cdiB&~jH0)hlNo2x>!e;G;O7m+DfGr^T6G4!OH8afnc1fi+Eu2X^GoHE z?9Ns3U1)gup=$J*xcE>2eRfVh973O$mP`-&Ztza#DEg9Y%{qmC73Z_2&~Ko7wLlBY zlrs8VOelTm53)lQ$n2jL`qhnQ_NdCaM{Py_GJ|R#26Qy7kuYH4oi%4L;Gli2s3w`Y zP9R4Ax{DY{(Xu{(!ED}NFJZ8X-bbb}Xk+7s=?#N!p;bRqTi;+cl^cxKHpel3r7WQ_ z`!oixGM*h;KR72M$_J6g{Z?bccK#u~h*viDV@N@LP5?uC-p&bOsF}aoBq}Ejxw3l5 zFS;K7rpx@GL%F#dLvapl4r6GE`n)L&YnaFjY#cU;Xs*rL^sM!p8>u&1ZTxj-F8`9A zyS31C^h9T0o1?SusP=ffwyF8sl(zqbL;IkG<9VA{ic;;cUAXeT>sp!0_CGPV6_gZz zuTf;bb(-ppJhvuiMO!fJ6rYDFK*_7*+y|B6@g4UZTxe1pzM&tf=9mBs_7if?Fq za2mKPUxu@VxAOyVy6Ac=0%wp_TLfmgwB;t8%e<})U_?jT4ot{V$}l$U;J?fDyte%noUv28Lk8pgK;U&fTMeVQ=;j?m z7?)G@?u_6)3oSp2;AW7D3LoMsPF95QM>{RM!uT@o+3mr+o?d}_ZWjGm!q+Lr1QZsw zR{Ee0@_wa+O)7e;rl7TR*HbW| zSDD)^B6FN;mT*tOffpp@*EaDcRE-TrYX@I@p@Pl(4TEQ;7{cBdlL7~H^tQ-obJ6gU4_!&dUy|W4(f;x@ zM*J+YhH+ZKIcr2Y@!;^L&W7z)arh1g0!_Mt4BUb~Fl4jPV~MC~lEA3KZM zWtw|JFzT+{?`d2;7A<~1r||Dr2cyP{{@aB+b7qeJ_WjB~@63-D{AqXB=Czekt=sdw zU)>(nT`+(2;cwoH);w+gYUA&(&vboyXpi~LWc0D(>Wy!+GMaa=`tUF7bu<5%`PZeb zZ;wV1uFD#38k*T=^!!e$e|=^#c(14A(X}&oxld^xIVpx(xvrUOG7{<68f!9c{dc`m Sb8cVy$?;R;>5*~FfBYY4jYG9d3CCgTsY>|z%Gxxbv}x%WId zx%c*bo)%}Cw?udQT4@dH=C9qZfpeOfIzKLrb4sV;QjB&?ph3@-iJfRLb0Dz~4OPrt zB+$jlMVHYq!qUZ8(GX>Haksuen|0g?+MQWnF4M z_odm;IL+H>GMW-tx>P}viLs?u(Im0JuAn)KpJhy- zxroxTiHv54uua`nytmv|nqN?I+;xG*%mA9bjAjPXo5w{r*iCJ@iK#2j!97CviV)mU=4KDUJtm;FHmAR{ZXmN6CwTza2R;^LdGR65dVoRLE#xPn9Jobu!g_&#bqSemnwSKgE z*t1R)gWR4ILhCfOobS+rXVC zW%;IDF3CTSjuE=@WpqTDx>;bJ!G_qpL1UjuW6!?-lo#IepN%M zkkTF*Hw}#M8G_%*UaN{xaqoLW_*TT*tKgoO?eB&0P-DTqFn*Ibvroa}AU$O=W(+j$ z7qD=Azk(S%E8Z9IP+LHdz2$z)Ow%HTF`Gb5x{Fy8$3FNGvl4p_2<4{rpiqO%st8~< z!brsgW;OO43Slmbmdd-BE8^2i1#=GeA68QSi7dQXsl3GI;LXF^=&Cvbor%#ZACf&h z^aqp7t6A4~0pMis=Xk&iL@yM6*N1-yTLCeHl;U3$dPm?fR2- zG!|^+jkDc}_}9vua}Tg&gqlFQo|ETgWII?<>qEAe@md+{G7p3GoKNTnbp}P|+PW Date: Wed, 27 Sep 2023 15:45:01 -0600 Subject: [PATCH 33/64] Even more diagnostic clean-up Diagnostics that were computed in both abiotic and base biotic modules are now only stored once; I removed - ABIO_IFRAC (use ECOSYS_IFRAC) - ABIO_XKW (use ECOSYS_XKW) - ABIO_ATM_PRESS (use ECOSYS_ATM_PRESS) - ABIO_CO2_SCHMIDT (use SCHMIDT_CO2) - ABIO_PV_CO2 (use PV_CO2) and renamed - FG_ABIO_DIC -> ABIO_FG_DIC - FG_ABIO_DIC14 -> ABIO_DI14C I also introduced marbl_diagnostics_surface_flux_share() that gets called from marbl_surface_flux_compute() before checking to see if base_bio_on is true to make sure these values are returned to the GCM in all conditions. Moving the above diagnostics out of the abio module let me really pare down the associate statement (and I also found some variables that were listed in the associate statement but never used) --- defaults/diagnostics_latest.yaml | 12 +-- defaults/json/diagnostics_latest.json | 44 ++++------ src/marbl_abio_dic_diagnostics_mod.F90 | 79 +----------------- src/marbl_abio_dic_surface_flux_mod.F90 | 10 --- src/marbl_diagnostics_mod.F90 | 79 ++++++++++++++---- src/marbl_interface_private_types.F90 | 5 -- src/marbl_surface_flux_mod.F90 | 12 +++ ...l_compute_subroutines.history_with_abio.nc | Bin 216196 -> 215128 bytes 8 files changed, 96 insertions(+), 145 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 701df1e6..9f953a78 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -245,14 +245,6 @@ ABIO_D14C_atm : vertical_grid : none frequency : medium operator : average -ABIO_PV_CO2 : - dependencies : - abio_dic_on : .true. - longname : CO2 Piston Velocity for Abiotic DIC tracer fluxes - units : cm/s - vertical_grid : none - frequency : never - operator : average ABIO_CO2STAR : dependencies : abio_dic_on : .true. @@ -301,7 +293,7 @@ ABIO_ALK_SURF : vertical_grid : none frequency : medium operator : average -FG_ABIO_DIC : +ABIO_FG_DIC : dependencies : abio_dic_on : .true. longname : Surface gas flux of abiotic DIC @@ -309,7 +301,7 @@ FG_ABIO_DIC : vertical_grid : none frequency : medium operator : average -FG_ABIO_DIC14 : +ABIO_FG_DI14C : dependencies : abio_dic_on : .true. longname : Surface gas flux of abiotic DI14C diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 8fc65830..afe3afd8 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -418,24 +418,34 @@ "units": "ppmv", "vertical_grid": "none" }, - "ABIO_PH": { + "ABIO_FG_DI14C": { "dependencies": { "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface pH for Abiotic DIC tracer fluxes", + "longname": "Surface gas flux of abiotic DI14C", "operator": "average", - "units": 1, + "units": "mmol/m^3 cm/s", "vertical_grid": "none" }, - "ABIO_PV_CO2": { + "ABIO_FG_DIC": { "dependencies": { "abio_dic_on": ".true." }, - "frequency": "never", - "longname": "CO2 Piston Velocity for Abiotic DIC tracer fluxes", + "frequency": "medium", + "longname": "Surface gas flux of abiotic DIC", "operator": "average", - "units": "cm/s", + "units": "mmol/m^3 cm/s", + "vertical_grid": "none" + }, + "ABIO_PH": { + "dependencies": { + "abio_dic_on": ".true." + }, + "frequency": "medium", + "longname": "Surface pH for Abiotic DIC tracer fluxes", + "operator": "average", + "units": 1, "vertical_grid": "none" }, "ABIO_pCO2": { @@ -1570,26 +1580,6 @@ "units": "nmol/cm^2/s", "vertical_grid": "layer_avg" }, - "FG_ABIO_DIC": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "medium", - "longname": "Surface gas flux of abiotic DIC", - "operator": "average", - "units": "mmol/m^3 cm/s", - "vertical_grid": "none" - }, - "FG_ABIO_DIC14": { - "dependencies": { - "abio_dic_on": ".true." - }, - "frequency": "medium", - "longname": "Surface gas flux of abiotic DI14C", - "operator": "average", - "units": "mmol/m^3 cm/s", - "vertical_grid": "none" - }, "FG_ALT_CO2": { "dependencies": { "base_bio_on": ".true." diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 0e765bd0..818a2e82 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -66,42 +66,6 @@ subroutine marbl_abio_dic_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'Ice Fraction for Abiotic DIC tracer fluxes' - sname = 'ABIO_IFRAC' - units = 'fraction' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_IFRAC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'XKW for Abiotic DIC tracer fluxes' - sname = 'ABIO_XKW' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_XKW, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Atmospheric Pressure for Abiotic DIC tracer fluxes' - sname = 'ABIO_ATM_PRESS' - units = 'atmospheres' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_ATM_PRESS, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - lname = 'CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes' sname = 'ABIO_pCO2' units = 'ppm' @@ -126,30 +90,6 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'CO2 Schmidt Number for Abiotic DIC tracer fluxes' - sname = 'ABIO_CO2_SCHMIDT' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_CO2_SCHMIDT, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'CO2 Piston Velocity for Abiotic DIC tracer fluxes' - sname = 'ABIO_PV_CO2' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_PV_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - lname = 'CO2 Star for Abiotic DIC tracer fluxes' sname = 'ABIO_CO2STAR' units = unit_system%conc_units @@ -224,7 +164,7 @@ subroutine marbl_abio_dic_diagnostics_init( & end if lname = 'Surface gas flux of abiotic DIC' - sname = 'FG_ABIO_DIC' + sname = 'ABIO_FG_DIC' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. @@ -236,7 +176,7 @@ subroutine marbl_abio_dic_diagnostics_init( & end if lname = 'Surface gas flux of abiotic DI14C' - sname = 'FG_ABIO_DIC14' + sname = 'ABIO_FG_DI14C' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. @@ -313,13 +253,8 @@ end subroutine marbl_abio_dic_diagnostics_init !*********************************************************************** subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & - ifrac, & - piston_velocity, & - ap_used, & xco2, & d14c, & - schmidt_co2, & - pv_co2, & co2star, & dco2star, & pco2surf, & @@ -334,13 +269,8 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ! !DESCRIPTION: ! Compute surface fluxes for ecosys tracer module. - real (r8), dimension(:), intent(in) :: ifrac - real (r8), dimension(:), intent(in) :: piston_velocity - real (r8), dimension(:), intent(in) :: ap_used real (r8), dimension(:), intent(in) :: xco2 real (r8), dimension(:), intent(in) :: d14c - real (r8), dimension(:), intent(in) :: schmidt_co2 - real (r8), dimension(:), intent(in) :: pv_co2 real (r8), dimension(:), intent(in) :: co2star real (r8), dimension(:), intent(in) :: dco2star real (r8), dimension(:), intent(in) :: pco2surf @@ -357,13 +287,8 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ind => marbl_surface_flux_diag_ind & ) - diags(ind%ABIO_IFRAC)%field_2d(:) = ifrac(:) - diags(ind%ABIO_XKW)%field_2d(:) = piston_velocity(:) - diags(ind%ABIO_ATM_PRESS)%field_2d(:) = ap_used(:) diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) diags(ind%ABIO_D14C_atm)%field_2d(:) = d14c(:) - diags(ind%ABIO_CO2_SCHMIDT)%field_2d(:) = schmidt_co2(:) - diags(ind%ABIO_PV_CO2)%field_2d(:) = pv_co2(:) diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 3d3d7586..5ef3734c 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -105,18 +105,13 @@ subroutine marbl_abio_dic_surface_flux_compute(& associate(& ! Forcing fields from GCM - ifrac => surface_flux_forcings(surface_flux_forcing_ind%ifrac_id)%field_0d, & sst => surface_flux_forcings(surface_flux_forcing_ind%sst_id)%field_0d, & sss => surface_flux_forcings(surface_flux_forcing_ind%sss_id)%field_0d, & ! TODO: need to add abio_xco2_id to surface flux forcing inds xco2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_id)%field_0d, & ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & - u10_sqr => surface_flux_forcings(surface_flux_forcing_ind%u10_sqr_id)%field_0d, & d14c => surface_flux_forcings(surface_flux_forcing_ind%d14c_id)%field_0d, & ! Values computed for abio and bio - piston_velocity => surface_flux_internal%piston_velocity(:), & - xkw_ice => surface_flux_internal%xkw_ice(:), & - schmidt_co2 => surface_flux_internal%schmidt_co2(:), & pv_co2 => surface_flux_internal%pv_co2(:), & ! Saved state ph_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & @@ -266,13 +261,8 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! update abiotic DIC diagnostics call marbl_abio_dic_diagnostics_surface_flux_compute( & - ifrac, & - piston_velocity, & - ap_used, & xco2, & d14c, & - schmidt_co2, & - pv_co2, & co2star, & dco2star, & pco2surf, & diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 95415400..69691368 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -51,6 +51,7 @@ module marbl_diagnostics_mod public :: marbl_diagnostics_init public :: marbl_diagnostics_interior_tendency_compute public :: marbl_diagnostics_surface_flux_compute + public :: marbl_diagnostics_surface_flux_share private :: store_diagnostics_carbonate private :: store_diagnostics_nitrification @@ -3275,7 +3276,7 @@ subroutine marbl_diagnostics_surface_flux_compute( & surface_flux_diags) ! !DESCRIPTION: - ! Compute surface fluxes for ecosys tracer module. + ! Compute surface flux diagnostics for base biotic tracer module. use marbl_interface_private_types , only : marbl_surface_flux_forcing_indexing_type use marbl_interface_private_types , only : marbl_surface_flux_saved_state_indexing_type @@ -3297,14 +3298,11 @@ subroutine marbl_diagnostics_surface_flux_compute( & diags => surface_flux_diags%diags(:), & xco2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_id)%field_0d, & xco2_alt_co2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_alt_co2_id)%field_0d, & - ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & - ifrac => surface_flux_forcings(surface_flux_forcing_ind%ifrac_id)%field_0d, & dust_flux_in => surface_flux_forcings(surface_flux_forcing_ind%dust_flux_id)%field_0d, & iron_flux_in => surface_flux_forcings(surface_flux_forcing_ind%iron_flux_id)%field_0d, & nox_flux => surface_flux_forcings(surface_flux_forcing_ind%nox_flux_id)%field_0d, & nhy_flux => surface_flux_forcings(surface_flux_forcing_ind%nhy_flux_id)%field_0d, & - piston_velocity => surface_flux_internal%piston_velocity, & flux_co2 => surface_flux_internal%flux_co2, & flux_alt_co2 => surface_flux_internal%flux_alt_co2, & co2star => surface_flux_internal%co2star, & @@ -3315,9 +3313,7 @@ subroutine marbl_diagnostics_surface_flux_compute( & dco2star_alt => surface_flux_internal%dco2star_alt, & pco2surf_alt => surface_flux_internal%pco2surf_alt, & dpco2_alt => surface_flux_internal%dpco2_alt, & - pv_co2 => surface_flux_internal%pv_co2, & pv_o2 => surface_flux_internal%pv_o2, & - schmidt_co2 => surface_flux_internal%schmidt_co2, & schmidt_o2 => surface_flux_internal%schmidt_o2, & o2sat => surface_flux_internal%o2sat, & nhx_surface_emis => surface_flux_internal%nhx_surface_emis, & @@ -3347,14 +3343,6 @@ subroutine marbl_diagnostics_surface_flux_compute( & ! calculate gas flux quantities if necessary !----------------------------------------------------------------------- - if (lflux_gas_o2 .or. lflux_gas_co2) then - - diags(ind_diag%ECOSYS_IFRAC)%field_2d(:) = ifrac(:) - diags(ind_diag%ECOSYS_XKW)%field_2d(:) = piston_velocity(:) - diags(ind_diag%ECOSYS_ATM_PRESS)%field_2d(:) = ap_used(:) - - endif ! lflux_gas_o2 .or. lflux_gas_co2 - if (lflux_gas_o2) then diags(ind_diag%PV_O2)%field_2d(:) = pv_o2(:) @@ -3379,8 +3367,6 @@ subroutine marbl_diagnostics_surface_flux_compute( & diags(ind_diag%pCO2SURF_ALT_CO2)%field_2d(:) = pco2surf_alt(:) diags(ind_diag%DpCO2_ALT_CO2)%field_2d(:) = dpco2_alt(:) - diags(ind_diag%PV_CO2)%field_2d(:) = pv_co2(:) - diags(ind_diag%SCHMIDT_CO2)%field_2d(:) = schmidt_co2(:) diags(ind_diag%DIC_GAS_FLUX)%field_2d(:) = flux_co2(:) diags(ind_diag%PH)%field_2d(:) = ph_prev(:) diags(ind_diag%ATM_CO2)%field_2d(:) = xco2(:) @@ -3415,6 +3401,67 @@ end subroutine marbl_diagnostics_surface_flux_compute !*********************************************************************** + subroutine marbl_diagnostics_surface_flux_share( & + surface_flux_forcing_ind, & + surface_flux_forcings, & + surface_flux_internal, & + surface_flux_diags) + + ! !DESCRIPTION: + ! Compute surface flux diagnostics that are shared by + ! abiotic and base biotic tracer modules. + + use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type + use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type + + use marbl_settings_mod, only : abio_dic_on + use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : lflux_gas_o2 + use marbl_settings_mod, only : lflux_gas_co2 + + type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind + type(marbl_forcing_fields_type) , intent(in) :: surface_flux_forcings(:) + type(marbl_surface_flux_internal_type) , intent(in) :: surface_flux_internal + type(marbl_diagnostics_type) , intent(inout) :: surface_flux_diags + + associate( & + ind_diag => marbl_surface_flux_diag_ind, & + diags => surface_flux_diags%diags(:), & + ap_used => surface_flux_forcings(surface_flux_forcing_ind%atm_pressure_id)%field_0d, & + ifrac => surface_flux_forcings(surface_flux_forcing_ind%ifrac_id)%field_0d, & + piston_velocity => surface_flux_internal%piston_velocity, & + pv_co2 => surface_flux_internal%pv_co2, & + schmidt_co2 => surface_flux_internal%schmidt_co2 & + ) + + !----------------------------------------------------------------------- + ! calculate gas flux quantities if necessary + !----------------------------------------------------------------------- + + if (abio_dic_on .or. (base_bio_on .and. (lflux_gas_o2 .or. lflux_gas_co2))) then + + diags(ind_diag%ECOSYS_IFRAC)%field_2d(:) = ifrac(:) + diags(ind_diag%ECOSYS_XKW)%field_2d(:) = piston_velocity(:) + diags(ind_diag%ECOSYS_ATM_PRESS)%field_2d(:) = ap_used(:) + + endif + + !----------------------------------------------------------------------- + ! compute CO2 flux, computing disequilibrium one row at a time + !----------------------------------------------------------------------- + + if (abio_dic_on .or. (base_bio_on .and. lflux_gas_co2)) then + + diags(ind_diag%PV_CO2)%field_2d(:) = pv_co2(:) + diags(ind_diag%SCHMIDT_CO2)%field_2d(:) = schmidt_co2(:) + + endif ! lflux_gas_co2 + + end associate + + end subroutine marbl_diagnostics_surface_flux_share + !*********************************************************************** + subroutine store_diagnostics_carbonate(marbl_domain, carbonate, & marbl_interior_diags, marbl_status_log) diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index e47ccd9e..6b22de9e 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -479,13 +479,8 @@ module marbl_interface_private_types integer(int_kind) :: NHy_FLUX integer(int_kind) :: NHx_SURFACE_EMIS - integer(int_kind) :: ABIO_IFRAC - integer(int_kind) :: ABIO_XKW - integer(int_kind) :: ABIO_ATM_PRESS integer(int_kind) :: ABIO_pCO2 integer(int_kind) :: ABIO_D14C_atm - integer(int_kind) :: ABIO_CO2_SCHMIDT - integer(int_kind) :: ABIO_PV_CO2 integer(int_kind) :: ABIO_CO2STAR integer(int_kind) :: ABIO_DCO2STAR integer(int_kind) :: ABIO_pCO2SURF diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 5f731d7c..6e681718 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -36,6 +36,7 @@ module marbl_surface_flux_mod use marbl_interface_public_types, only : marbl_forcing_fields_type use marbl_diagnostics_mod , only : marbl_diagnostics_surface_flux_compute + use marbl_diagnostics_mod , only : marbl_diagnostics_surface_flux_share use marbl_logging , only : marbl_log_type @@ -196,6 +197,17 @@ subroutine marbl_surface_flux_compute( & pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) end if + !----------------------------------------------------------------------- + ! Compute surface flux-related diagnostics for fields used by + ! both abiotic and biotic tracers + !----------------------------------------------------------------------- + + call marbl_diagnostics_surface_flux_share( & + surface_flux_forcing_ind = ind, & + surface_flux_forcings = surface_flux_forcings, & + surface_flux_internal = surface_flux_internal, & + surface_flux_diags = surface_flux_diags) + !----------------------------------------------------------------------- ! Compute carbon isotopes surface fluxes !----------------------------------------------------------------------- diff --git a/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc b/tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc index c8d40d257088505097fd74ab03153217032d458c..1cd4f517b3b85077fff4bc5a993ee6935b034c37 100644 GIT binary patch delta 1383 zcmYMzYfRHu7zXh60kH@uQ{t*t?HnqOi=a5_bXYFaB0B1#iPix|7F<)ch7=0Lg6d}emQlzibtdmY!*9}dp*6-tnh$L%4leYgt(f~% zZnT*hQ(Z-yla}-wXdC5h`Y_rebS)AjS)3uGUCT&@gmwe1nLbr}v)F!-(ZDO2C9KV= zN4tk(St1Uzda)Pnvy3giiH>YGF7cv6M^(1K!jbGd=;)(y*(5r~nVB< zBMn8vaM&0x5`#l@ZT7)2LtU{q-SOt&sxxgDSyxoRg(a8Jqh@=FgdROJw+O5p+2Tjf z08Lvb(Gy~JsXM(VCKjbs)otb4(gHp!y?`5f>bJ@Ge26i@Z3Uh0U&XM+T^7LCVNR3< zaZk%eT@VkQ%-t^GhZv`}`|(uI#t#DcWr*4xZoE`*Lhz@BhMiu#4)dizp{4Uf3F%I% z%e`0{<3#x|G+xNf0pw;!%BL%StNS{nCA_|nPQJ;NA{(PfYk5bs|Tzyoo- z8ZW+AuxD=&Pb@604dPjt@meolXxX<8Je)Z21ao2bej=(_8V)`|Jez8hA8{RLOp}OP*n22|cpr6#rx73L{9!NR zQF@MeGhXY&Q)C+Js_L!$>PQ*e%|}y||9BWNyP-<*+)+Q4nwfLVk5wT)I_AZCH7&>8 zD6;YI<9?JyIdZ~}3LQ-+{n+ba>M1`CCOL6R#z`|x^%5FFjMvL(R?}sfgxyBN=>V=p zIe$8s;rg%p!HacU>P7dhOq@A|FFZ7!l^`cMdsfD%nSJLZd>f+nycZADoH{>@M>bj- zy!c6M(jeoRj)NE6hrbahb zC^*|FVV#A}%QEuA)LxO0Kg-Y+8QTmrH(f*dD4#d=qddaKW?nk y$<*#m{MEkk{?p2o-<6E9gD(4lyM^6{l-MDDr(*+rIoHP=pN%<`_s1NFM*amH&@sCJ delta 1555 zcmYk6ZEVw37{%AqA|31ICUs0KSfIiNWiM<9>V&a%$fU5kRjE2H%p!9uGNE1f(rr~6 zAlNLUXKCQ?{711tU1}j?6j>UX%RWrf;9_P%;$k$`#19Rt$r6oOqIdh`r(d3Xo^z7t zxw-fLV7C8q_FzrswTz4mbh|P#IMcf2;+b7|S9dY;7EUixs~CZ6juQ$QZWWJW9Bw0Z z%09TQ999m%?WIvA5N2F;7VZR1D=xsjz?l{At2=Zec7>^(KWA-c)}tEUgpSu9+KUbo z(+`cH!^z>5QFIK^tPY|h&R^7h=t%Nt=2>_&{3G)UJQWPA5@=#+mJE-dGg%>cB5cu& zs6DeHewF0_-_exuV748eMMkni=rqujBcapGUve&>(?#dQq8g?;S73_a+^cz=sU_>a z>biP+-TsDsH5s&TETUPFN4K_^A1caoy0oH0z1(3tc!V>GQX#G9dQ@qQZr_Z+x@mOG^YPPc*KQDd%4JDrNnY2Sux2e=Eic#1a#ky&J51N30tssKNAtQDma_IgZ(oix)zvI#{hQym zx@YOCvj3-)Rq)rWt^9n=DfF0FP!L6rlhXw;^bFDWm_VGn*AAd3$?3I0cr|Q#JOpnA z7ao`4ZQ_t_1YSR@*2UnB@b4we^7{Hoco*qh&@7nt5M8ie4838@@sBFwGl9 zH5J?>iWDa{-9?|40fRs#ZBGg~XxJVmT{wz$C8*5QJrhE9 zgk#T0Sfiok*(=aHx$tZVMF|EfucF+@isyo;3~>563AHIY_QaC`htW9i%bj58yGk!U}m9t1oJM= znq!zBX5i2y=BH>md=K*}>gy+w)-qXt59vydS)xcg=y-7)=>YW&qezc&wn4Pa@lvCN zKUJ)-iY+-fW4)||a*EEEg2*-mUydT*&+7tDh;QVGgd!6cj|8zJ%t2cel`2-f5=E_p zX@SF2{N&XrYzA6hlX1+?^lKrsCV9R|hRejl*T>NtX7cq>oKx}A8!-$zXt7JUJjIk< zY{@|XQ5g|G4aY*bnPmK!ggYkMny+9w%*AF2KM3EOGJbM!w Date: Wed, 27 Sep 2023 15:54:40 -0600 Subject: [PATCH 34/64] Inadvertantly committed results of diffs I generated a bunch of files when making sure I had updated all the settings files correctly, and must have done a git add defaults/ without realizing these files were still there --- defaults/bar | 228 -------------------------------------------------- defaults/bar2 | 228 -------------------------------------------------- defaults/baz | 228 -------------------------------------------------- defaults/baz2 | 173 -------------------------------------- defaults/foo | 163 ------------------------------------ 5 files changed, 1020 deletions(-) delete mode 100644 defaults/bar delete mode 100644 defaults/bar2 delete mode 100644 defaults/baz delete mode 100644 defaults/baz2 delete mode 100644 defaults/foo diff --git a/defaults/bar b/defaults/bar deleted file mode 100644 index 9ed3afab..00000000 --- a/defaults/bar +++ /dev/null @@ -1,228 +0,0 @@ -+++ b/defaults/settings_cesm2.0.yaml -+ - tracer_modules -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ # Non-living (abiotic only) -+ ABIO_DIC : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon -+ units : mmol/m^3 -+ ABIO_DI14C : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon-14 -+ units : mmol/m^3 -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+# Category 0: Tracer Modules # -+tracer_modules : -+ base_bio_on : -+ longname : Control whether the base ecosystem tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .true. -+ abio_dic_on : -+ longname : Control whether abiotic carbon tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .false. -+ subcategory : 1. tracer modules -+ -+################################################################################ -+# Category 1: General Parameters # -+################################################################################ -+ -+general_parms : -+ PFT_defaults : -+ defined_if : base_bio_on -+ longname : Define how PFTs are initialized -+ subcategory : 2. config PFTs -+ units : unitless -+ datatype : string -+ default_value : CESM2+cocco -+ valid_values : -+ - CESM2+cocco -+ - user-specified -+ _CESM2+cocco_PFT_keys : -+ autotroph_settings : -+ - sp -+ - diat -+ - diaz -+ - cocco -+ zooplankton_settings : -+ - zoo -+ grazing_relationship_settings : -+ - sp_zoo -+ - diat_zoo -+ - diaz_zoo -+ - cocco_zoo -+ _append_to_config_keywords : true -+ subcategory : 3. config flags -+ defined_if : ciso_on -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 4. config strings -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs diff --git a/defaults/bar2 b/defaults/bar2 deleted file mode 100644 index 9544c788..00000000 --- a/defaults/bar2 +++ /dev/null @@ -1,228 +0,0 @@ -+++ b/defaults/settings_cesm2.1+cocco.yaml -+ - tracer_modules -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ # Non-living (abiotic only) -+ ABIO_DIC : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon -+ units : mmol/m^3 -+ ABIO_DI14C : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon-14 -+ units : mmol/m^3 -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+# Category 0: Tracer Modules # -+tracer_modules : -+ base_bio_on : -+ longname : Control whether the base ecosystem tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .true. -+ abio_dic_on : -+ longname : Control whether abiotic carbon tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .false. -+ subcategory : 1. tracer modules -+ -+################################################################################ -+# Category 1: General Parameters # -+################################################################################ -+ -+general_parms : -+ PFT_defaults : -+ defined_if : base_bio_on -+ longname : Define how PFTs are initialized -+ subcategory : 2. config PFTs -+ units : unitless -+ datatype : string -+ default_value : CESM2+cocco -+ valid_values : -+ - CESM2+cocco -+ - user-specified -+ _CESM2+cocco_PFT_keys : -+ autotroph_settings : -+ - sp -+ - diat -+ - diaz -+ - cocco -+ zooplankton_settings : -+ - zoo -+ grazing_relationship_settings : -+ - sp_zoo -+ - diat_zoo -+ - diaz_zoo -+ - cocco_zoo -+ _append_to_config_keywords : true -+ subcategory : 3. config flags -+ defined_if : ciso_on -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 4. config strings -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs diff --git a/defaults/baz b/defaults/baz deleted file mode 100644 index b917eb40..00000000 --- a/defaults/baz +++ /dev/null @@ -1,228 +0,0 @@ -+++ b/defaults/settings_cesm2.1.yaml -+ - tracer_modules -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ # Non-living (abiotic only) -+ ABIO_DIC : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon -+ units : mmol/m^3 -+ ABIO_DI14C : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon-14 -+ units : mmol/m^3 -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ base_bio_on : .true. -+ dependencies : -+ base_bio_on : .true. -+# Category 0: Tracer Modules # -+tracer_modules : -+ base_bio_on : -+ longname : Control whether the base ecosystem tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .true. -+ abio_dic_on : -+ longname : Control whether abiotic carbon tracer module is active -+ subcategory : 1. tracer modules -+ units : unitless -+ datatype : logical -+ default_value : .false. -+ subcategory : 1. tracer modules -+ -+################################################################################ -+# Category 1: General Parameters # -+################################################################################ -+ -+general_parms : -+ PFT_defaults : -+ defined_if : base_bio_on -+ longname : Define how PFTs are initialized -+ subcategory : 2. config PFTs -+ units : unitless -+ datatype : string -+ default_value : CESM2+cocco -+ valid_values : -+ - CESM2+cocco -+ - user-specified -+ _CESM2+cocco_PFT_keys : -+ autotroph_settings : -+ - sp -+ - diat -+ - diaz -+ - cocco -+ zooplankton_settings : -+ - zoo -+ grazing_relationship_settings : -+ - sp_zoo -+ - diat_zoo -+ - diaz_zoo -+ - cocco_zoo -+ _append_to_config_keywords : true -+ subcategory : 3. config flags -+ defined_if : ciso_on -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 4. config strings -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs diff --git a/defaults/baz2 b/defaults/baz2 deleted file mode 100644 index 2d71a6f8..00000000 --- a/defaults/baz2 +++ /dev/null @@ -1,173 +0,0 @@ -+++ b/defaults/settings_latest+4p2z.yaml -+ - tracer_modules -+ ABIO_DIC : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon -+ units : mmol/m^3 -+ ABIO_DI14C : -+ dependencies : -+ abio_dic_on : .true. -+ long_name : Abiotic Dissolved Inorganic Carbon-14 -+ units : mmol/m^3 -+ # Non-living (abiotic only) -+# Category 0: Tracer Modules # -+tracer_modules : -+ subcategory : 1. tracer modules -+ subcategory : 1. tracer modules -+ subcategory : 1. tracer modules -+ -+################################################################################ -+# Category 1: General Parameters # -+################################################################################ -+ -+general_parms : -+ PFT_defaults : -+ defined_if : base_bio_on -+ longname : Define how PFTs are initialized -+ subcategory : 2. config PFTs -+ units : unitless -+ datatype : string -+ default_value : CESM2+cocco -+ valid_values : -+ - CESM2+cocco -+ - user-specified -+ _CESM2+cocco_PFT_keys : -+ autotroph_settings : -+ - sp -+ - diat -+ - diaz -+ - cocco -+ zooplankton_settings : -+ - zoo -+ grazing_relationship_settings : -+ - sp_zoo -+ - diat_zoo -+ - diaz_zoo -+ - cocco_zoo -+ _append_to_config_keywords : true -+ subcategory : 3. config flags -+ defined_if : ciso_on -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 4. config strings -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs diff --git a/defaults/foo b/defaults/foo deleted file mode 100644 index 14592072..00000000 --- a/defaults/foo +++ /dev/null @@ -1,163 +0,0 @@ -+++ b/defaults/settings_latest.yaml -+ - tracer_modules -+# Category 0: Tracer Modules # -+tracer_modules : -+ subcategory : 1. tracer modules -+ subcategory : 1. tracer modules -+ subcategory : 1. tracer modules -+ _append_to_config_keywords : true -+ -+################################################################################ -+# Category 1: General Parameters # -+################################################################################ -+ -+general_parms : -+ PFT_defaults : -+ defined_if : base_bio_on -+ longname : Define how PFTs are initialized -+ subcategory : 2. config PFTs -+ units : unitless -+ datatype : string -+ default_value : -+ default : CESM2 -+ valid_values : -+ - CESM2 -+ - None -+ - user-specified -+ _CESM2_PFT_keys : -+ autotroph_settings : -+ - sp -+ - diat -+ - diaz -+ zooplankton_settings : -+ - zoo -+ grazing_relationship_settings : -+ - sp_zoo -+ - diat_zoo -+ - diaz_zoo -+ _append_to_config_keywords : true -+ subcategory : 3. config flags -+ defined_if : ciso_on -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 3. config flags -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (nitrification) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (scavenging) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (dissolution) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 6. Scale lengths -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters (bury coeffs) -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 5. general parameters -+ defined_if : base_bio_on -+ subcategory : 4. config strings -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs -+ defined_if : base_bio_on -+ subcategory : 2. config PFTs From 607f4effdcfc3db512234a657439d32ae0a3c558 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 29 Sep 2023 10:27:11 -0600 Subject: [PATCH 35/64] Limit settings vars exposed through put_setting() The tracer module control variables (base_biotic_on, abio_dic_on, ciso_on) are always available to the GCM via put_setting(), but if base_biotic_on = .false. then changing many of the other settings will have no affect on the run. Rather than giving the false impression that users could set (say) PFT_defaults, calling put_settings() for variables that will not be used results in an error. Note that the defined_if key in the settings YAML files matches the logic around whether or not this%add_var() is called -- so generating a settings file with MARBL_generate_settings_file.py will always result in a file that is consistent with the new logic in the Fortran code. The most noticeable difference from this PR will be seen in the gen_settings_file test, which will produce a significantly smaller file settings file using the marbl_with_abio_only.settings input. The POP and MOM6 GCMs will already be using shortened settings files because of the defined_if key in the YAML. --- src/marbl_init_mod.F90 | 25 + src/marbl_settings_mod.F90 | 1036 +++++++++++++++++++----------------- 2 files changed, 568 insertions(+), 493 deletions(-) diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index af08154f..4fcaea4e 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -57,10 +57,13 @@ end subroutine marbl_init_log_and_timers subroutine marbl_init_parameters_pre_tracers(marbl_settings, unit_system, marbl_status_log) use marbl_settings_mod, only : marbl_settings_type + use marbl_settings_mod, only : marbl_settings_set_defaults_tracer_modules + use marbl_settings_mod, only : marbl_settings_define_tracer_modules use marbl_settings_mod, only : marbl_settings_set_defaults_general_parms use marbl_settings_mod, only : marbl_settings_define_general_parms use marbl_settings_mod, only : marbl_settings_set_defaults_PFT_counts use marbl_settings_mod, only : marbl_settings_define_PFT_counts + use marbl_settings_mod, only : marbl_settings_allocate_PFT_types use marbl_settings_mod, only : marbl_settings_set_defaults_PFT_derived_types use marbl_settings_mod, only : marbl_settings_define_PFT_derived_types @@ -71,6 +74,22 @@ subroutine marbl_init_parameters_pre_tracers(marbl_settings, unit_system, marbl_ ! local variables character(len=*), parameter :: subname = 'marbl_init_mod:marbl_init_parameters_pre_tracers' + !--------------------------------------------------------------------------- + ! set default values for logicals controlling active tracer modules + !--------------------------------------------------------------------------- + + call marbl_settings_set_defaults_tracer_modules() + + !--------------------------------------------------------------------------- + ! Add tracer module settings to list of allowable put / get vars + !--------------------------------------------------------------------------- + + call marbl_settings_define_tracer_modules(marbl_settings, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace("marbl_settings_define_tracer_modules()", subname) + return + end if + !--------------------------------------------------------------------------- ! set default values for basic settings !--------------------------------------------------------------------------- @@ -103,6 +122,12 @@ subroutine marbl_init_parameters_pre_tracers(marbl_settings, unit_system, marbl_ return end if + call marbl_settings_allocate_PFT_types(marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace("marbl_settings_allocate_PFT_types()", subname) + return + end if + !--------------------------------------------------------------------------- ! Add components of PFT derived types to list of allowable put / get vars !--------------------------------------------------------------------------- diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index ef9e5937..08693ab5 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -399,14 +399,21 @@ module marbl_settings_mod !***************************************************************************** +subroutine marbl_settings_set_defaults_tracer_modules() + + base_bio_on = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + abio_dic_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + ciso_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + +end subroutine marbl_settings_set_defaults_tracer_modules + +!***************************************************************************** + subroutine marbl_settings_set_defaults_general_parms(unit_system) type(unit_system_type), intent(in) :: unit_system PFT_defaults = 'CESM2' ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - base_bio_on = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - abio_dic_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - ciso_on = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above ciso_lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lcheck_forcing = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above @@ -600,7 +607,7 @@ end subroutine marbl_settings_set_defaults_tracer_dependent !***************************************************************************** - subroutine marbl_settings_define_general_parms(this, marbl_status_log) + subroutine marbl_settings_define_tracer_modules(this, marbl_status_log) class(marbl_settings_type), intent(inout) :: this type(marbl_log_type), intent(inout) :: marbl_status_log @@ -609,9 +616,7 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) character(len=char_len) :: log_message character(len=char_len) :: sname, lname, units, datatype, category - real(r8), pointer :: rptr => NULL() logical(log_kind), pointer :: lptr => NULL() - character(len=char_len), pointer :: sptr => NULL() logical :: labort_marbl_loc if (associated(this%vars)) then @@ -622,21 +627,8 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) allocate(this%categories(0)) labort_marbl_loc = .false. - ! ---------------------- - category = 'config PFTs' - ! ---------------------- - - sname = 'PFT_defaults' - lname = 'Define how PFTs are initialized' - units = 'unitless' - datatype = 'string' - sptr => PFT_defaults - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, sptr=sptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - ! ----------------------- - category = 'config flags' + category = 'tracer modules' ! ----------------------- sname = 'base_bio_on' @@ -666,6 +658,44 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + end subroutine marbl_settings_define_tracer_modules + + !***************************************************************************** + + subroutine marbl_settings_define_general_parms(this, marbl_status_log) + + class(marbl_settings_type), intent(inout) :: this + type(marbl_log_type), intent(inout) :: marbl_status_log + + character(len=*), parameter :: subname = 'marbl_settings_mod:marbl_settings_define_general_parms' + + character(len=char_len) :: sname, lname, units, datatype, category + real(r8), pointer :: rptr => NULL() + logical(log_kind), pointer :: lptr => NULL() + character(len=char_len), pointer :: sptr => NULL() + logical :: labort_marbl_loc + + labort_marbl_loc = .false. + + if (base_bio_on) then + ! ---------------------- + category = 'config PFTs' + ! ---------------------- + + sname = 'PFT_defaults' + lname = 'Define how PFTs are initialized' + units = 'unitless' + datatype = 'string' + sptr => PFT_defaults + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, sptr=sptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + end if + + ! ----------------------- + category = 'config flags' + ! ----------------------- + sname = 'lsource_sink' lname = 'Control which portions of code are executed (useful for debugging)' units = 'unitless' @@ -684,14 +714,16 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'ciso_lsource_sink' - lname = 'Control which portions of carbon isotope code are executed (useful for debugging)' - units = 'unitless' - datatype = 'logical' - lptr => ciso_lsource_sink - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + if (ciso_on) then + sname = 'ciso_lsource_sink' + lname = 'Control which portions of carbon isotope code are executed (useful for debugging)' + units = 'unitless' + datatype = 'logical' + lptr => ciso_lsource_sink + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + end if sname = 'lcheck_forcing' lname = 'Control whether consistency checks are performed on forcing input (useful for debugging)' @@ -702,529 +734,535 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lflux_gas_o2' - lname = 'Run O2 gas flux portion of the code' - units = 'unitless' - datatype = 'logical' - lptr => lflux_gas_o2 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + if (base_bio_on) then + sname = 'lflux_gas_o2' + lname = 'Run O2 gas flux portion of the code' + units = 'unitless' + datatype = 'logical' + lptr => lflux_gas_o2 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lflux_gas_co2' - lname = 'Run CO2 gas flux portion of the code' - units = 'unitless' - datatype = 'logical' - lptr => lflux_gas_co2 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lflux_gas_co2' + lname = 'Run CO2 gas flux portion of the code' + units = 'unitless' + datatype = 'logical' + lptr => lflux_gas_co2 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lcompute_nhx_surface_emis' - lname = 'control if NHx emissions are computed' - units = 'unitless' - datatype = 'logical' - lptr => lcompute_nhx_surface_emis - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lcompute_nhx_surface_emis' + lname = 'control if NHx emissions are computed' + units = 'unitless' + datatype = 'logical' + lptr => lcompute_nhx_surface_emis + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lvariable_PtoC' - lname = 'control if PtoC ratios in autotrophs vary' - units = 'unitless' - datatype = 'logical' - lptr => lvariable_PtoC - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lvariable_PtoC' + lname = 'control if PtoC ratios in autotrophs vary' + units = 'unitless' + datatype = 'logical' + lptr => lvariable_PtoC + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'ladjust_bury_coeff' - lname = 'Adjust the bury coefficient to maintain equilibrium' - units = 'unitless' - datatype = 'logical' - lptr => ladjust_bury_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'ladjust_bury_coeff' + lname = 'Adjust the bury coefficient to maintain equilibrium' + units = 'unitless' + datatype = 'logical' + lptr => ladjust_bury_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lo2_consumption_scalef' - lname = 'Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)' - units = 'unitless' - datatype = 'logical' - lptr => lo2_consumption_scalef - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lo2_consumption_scalef' + lname = 'Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)' + units = 'unitless' + datatype = 'logical' + lptr => lo2_consumption_scalef + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lp_remin_scalef' - lname = 'Apply p_remin_scalef to particulate remin (and request it as a forcing)' - units = 'unitless' - datatype = 'logical' - lptr => lp_remin_scalef - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lp_remin_scalef' + lname = 'Apply p_remin_scalef to particulate remin (and request it as a forcing)' + units = 'unitless' + datatype = 'logical' + lptr => lp_remin_scalef + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - ! -------------------------- - category = 'config strings' - ! -------------------------- + ! -------------------------- + category = 'config strings' + ! -------------------------- - sname = 'init_bury_coeff_opt' - lname = 'How to set initial bury coefficients' - units = 'unitless' - datatype = 'string' - sptr => init_bury_coeff_opt - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, sptr=sptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'init_bury_coeff_opt' + lname = 'How to set initial bury coefficients' + units = 'unitless' + datatype = 'string' + sptr => init_bury_coeff_opt + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, sptr=sptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - ! ----------------------------- - category = 'general parmeters' - ! ----------------------------- + ! ----------------------------- + category = 'general parmeters' + ! ----------------------------- - sname = 'particulate_flux_ref_depth' - lname = 'reference depth for particulate flux diagnostics' - units = 'm' - datatype = 'real' - rptr => particulate_flux_ref_depth - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'particulate_flux_ref_depth' + lname = 'reference depth for particulate flux diagnostics' + units = 'm' + datatype = 'real' + rptr => particulate_flux_ref_depth + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'bftt_dz_sum_thres' - lname = 'MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold' - units = 'unitless' - datatype = 'real' - rptr => bftt_dz_sum_thres - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'bftt_dz_sum_thres' + lname = 'MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold' + units = 'unitless' + datatype = 'real' + rptr => bftt_dz_sum_thres + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'Jint_Ctot_thres_molpm2pyr' - lname = 'MARBL will abort if abs(Jint_Ctot) exceeds this threshold' - units = 'mol m-2 yr-1' - datatype = 'real' - rptr => Jint_Ctot_thres_molpm2pyr - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'Jint_Ctot_thres_molpm2pyr' + lname = 'MARBL will abort if abs(Jint_Ctot) exceeds this threshold' + units = 'mol m-2 yr-1' + datatype = 'real' + rptr => Jint_Ctot_thres_molpm2pyr + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'gQsi_0' - lname = 'initial Si/C ratio for growth' - units = '1' - datatype = 'real' - rptr => gQsi_0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'gQsi_0' + lname = 'initial Si/C ratio for growth' + units = '1' + datatype = 'real' + rptr => gQsi_0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'gQsi_max' - lname = 'max Si/C ratio for growth' - units = '1' - datatype = 'real' - rptr => gQsi_max - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'gQsi_max' + lname = 'max Si/C ratio for growth' + units = '1' + datatype = 'real' + rptr => gQsi_max + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'gQsi_min' - lname = 'min Si/C ratio for growth' - units = '1' - datatype = 'real' - rptr => gQsi_min - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'gQsi_min' + lname = 'min Si/C ratio for growth' + units = '1' + datatype = 'real' + rptr => gQsi_min + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'gQ_Fe_kFe_thres' - lname = 'Fe:kFe ratio threshold in uptake ratio computations' - units = '1' - datatype = 'real' - rptr => gQ_Fe_kFe_thres - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'gQ_Fe_kFe_thres' + lname = 'Fe:kFe ratio threshold in uptake ratio computations' + units = '1' + datatype = 'real' + rptr => gQ_Fe_kFe_thres + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'gQ_Si_kSi_thres' - lname = 'Si:kSi ratio threshold in uptake ratio computations' - units = '1' - datatype = 'real' - rptr => gQ_Si_kSi_thres - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'gQ_Si_kSi_thres' + lname = 'Si:kSi ratio threshold in uptake ratio computations' + units = '1' + datatype = 'real' + rptr => gQ_Si_kSi_thres + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_Fe_bioavail' - lname = 'Fraction of Fe flux that is bioavailable' - units = 'unitless' - datatype = 'real' - rptr => parm_Fe_bioavail - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_Fe_bioavail' + lname = 'Fraction of Fe flux that is bioavailable' + units = 'unitless' + datatype = 'real' + rptr => parm_Fe_bioavail + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_o2_min' - lname = 'Minimum O2 needed for production and consumption' - units = 'nmol/cm^3' - datatype = 'real' - rptr => parm_o2_min - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_o2_min' + lname = 'Minimum O2 needed for production and consumption' + units = 'nmol/cm^3' + datatype = 'real' + rptr => parm_o2_min + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_o2_min_delta' - lname = 'Width of minimum O2 range' - units = 'nmol/cm^3' - datatype = 'real' - rptr => parm_o2_min_delta - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_o2_min_delta' + lname = 'Width of minimum O2 range' + units = 'nmol/cm^3' + datatype = 'real' + rptr => parm_o2_min_delta + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_kappa_nitrif_per_day' - lname = 'Nitrification inverse time constant' - units = '1/day' - datatype = 'real' - rptr => parm_kappa_nitrif_per_day - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_kappa_nitrif_per_day' + lname = 'Nitrification inverse time constant' + units = '1/day' + datatype = 'real' + rptr => parm_kappa_nitrif_per_day + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_nitrif_par_lim' - lname = 'PAR limit for nitrification' - units = 'W/m^2' - datatype = 'real' - rptr => parm_nitrif_par_lim - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_nitrif_par_lim' + lname = 'PAR limit for nitrification' + units = 'W/m^2' + datatype = 'real' + rptr => parm_nitrif_par_lim + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_labile_ratio' - lname = 'Fraction of loss to DOC that is routed directly to DIC' - units = 'unitless' - datatype = 'real' - rptr => parm_labile_ratio - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_labile_ratio' + lname = 'Fraction of loss to DOC that is routed directly to DIC' + units = 'unitless' + datatype = 'real' + rptr => parm_labile_ratio + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_init_POC_bury_coeff' - lname = 'initial scale factor for burial of POC, PON' - units = 'unitless' - datatype = 'real' - rptr => parm_init_POC_bury_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_init_POC_bury_coeff' + lname = 'initial scale factor for burial of POC, PON' + units = 'unitless' + datatype = 'real' + rptr => parm_init_POC_bury_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_init_POP_bury_coeff' - lname = 'initial scale factor for burial of POP' - units = 'unitless' - datatype = 'real' - rptr => parm_init_POP_bury_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_init_POP_bury_coeff' + lname = 'initial scale factor for burial of POP' + units = 'unitless' + datatype = 'real' + rptr => parm_init_POP_bury_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_init_bSi_bury_coeff' - lname = 'initial scale factor for burial of bSi' - units = 'unitless' - datatype = 'real' - rptr => parm_init_bSi_bury_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_init_bSi_bury_coeff' + lname = 'initial scale factor for burial of bSi' + units = 'unitless' + datatype = 'real' + rptr => parm_init_bSi_bury_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_Fe_scavenge_rate0' - lname = 'scavenging base rate for Fe' - units = 'cm^2/ng s/yr' - datatype = 'real' - rptr => parm_Fe_scavenge_rate0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_Fe_scavenge_rate0' + lname = 'scavenging base rate for Fe' + units = 'cm^2/ng s/yr' + datatype = 'real' + rptr => parm_Fe_scavenge_rate0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_Lig_scavenge_rate0' - lname = 'scavenging base rate for bound ligand' - units = 'cm^2/ng s/yr' - datatype = 'real' - rptr => parm_Lig_scavenge_rate0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_Lig_scavenge_rate0' + lname = 'scavenging base rate for bound ligand' + units = 'cm^2/ng s/yr' + datatype = 'real' + rptr => parm_Lig_scavenge_rate0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_FeLig_scavenge_rate0' - lname = 'scavenging base rate for bound iron' - units = 'cm^2/ng s/yr' - datatype = 'real' - rptr => parm_FeLig_scavenge_rate0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_FeLig_scavenge_rate0' + lname = 'scavenging base rate for bound iron' + units = 'cm^2/ng s/yr' + datatype = 'real' + rptr => parm_FeLig_scavenge_rate0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_Lig_degrade_rate0' - lname = 'Fe-binding ligand bacterial degradation rate coefficient' - units = '1' - datatype = 'real' - rptr => parm_Lig_degrade_rate0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_Lig_degrade_rate0' + lname = 'Fe-binding ligand bacterial degradation rate coefficient' + units = '1' + datatype = 'real' + rptr => parm_Lig_degrade_rate0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_Fe_desorption_rate0' - lname = 'desorption rate for scavenged Fe from particles' - units = '1/cm' - datatype = 'real' - rptr => parm_Fe_desorption_rate0 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_Fe_desorption_rate0' + lname = 'desorption rate for scavenged Fe from particles' + units = '1/cm' + datatype = 'real' + rptr => parm_Fe_desorption_rate0 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_f_prod_sp_CaCO3' - lname = 'Fraction of sp production as CaCO3 production' - units = 'unitless' - datatype = 'real' - rptr => parm_f_prod_sp_CaCO3 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_f_prod_sp_CaCO3' + lname = 'Fraction of sp production as CaCO3 production' + units = 'unitless' + datatype = 'real' + rptr => parm_f_prod_sp_CaCO3 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_POC_diss' - lname = 'base POC dissolution length scale' - units = 'cm' - datatype = 'real' - rptr => parm_POC_diss - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_POC_diss' + lname = 'base POC dissolution length scale' + units = 'cm' + datatype = 'real' + rptr => parm_POC_diss + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_SiO2_diss' - lname = 'base SiO2 dissolution length scale' - units = 'cm' - datatype = 'real' - rptr => parm_SiO2_diss - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_SiO2_diss' + lname = 'base SiO2 dissolution length scale' + units = 'cm' + datatype = 'real' + rptr => parm_SiO2_diss + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_SiO2_gamma' - lname = 'SiO2 gamma (fraction of production -> hard subclass)' - units = '1' - datatype = 'real' - rptr => parm_SiO2_gamma - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_SiO2_gamma' + lname = 'SiO2 gamma (fraction of production -> hard subclass)' + units = '1' + datatype = 'real' + rptr => parm_SiO2_gamma + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_hPOC_SiO2_ratio' - lname = 'hPOC to SiO2 ratio' - units = '1' - datatype = 'real' - rptr => parm_hPOC_SiO2_ratio - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_hPOC_SiO2_ratio' + lname = 'hPOC to SiO2 ratio' + units = '1' + datatype = 'real' + rptr => parm_hPOC_SiO2_ratio + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_CaCO3_diss' - lname = 'base CaCO3 dissolution length scale' - units = 'cm' - datatype = 'real' - rptr => parm_CaCO3_diss - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_CaCO3_diss' + lname = 'base CaCO3 dissolution length scale' + units = 'cm' + datatype = 'real' + rptr => parm_CaCO3_diss + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_CaCO3_gamma' - lname = 'CaCO3 gamma (fraction of production -> hard subclass)' - units = '1' - datatype = 'real' - rptr => parm_CaCO3_gamma - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_CaCO3_gamma' + lname = 'CaCO3 gamma (fraction of production -> hard subclass)' + units = '1' + datatype = 'real' + rptr => parm_CaCO3_gamma + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_hPOC_CaCO3_ratio' - lname = 'hPOC to CaCO3 ratio' - units = '1' - datatype = 'real' - rptr => parm_hPOC_CaCO3_ratio - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_hPOC_CaCO3_ratio' + lname = 'hPOC to CaCO3 ratio' + units = '1' + datatype = 'real' + rptr => parm_hPOC_CaCO3_ratio + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_hPOC_dust_ratio' - lname = 'hPOC to dust ratio' - units = '1' - datatype = 'real' - rptr => parm_hPOC_dust_ratio - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_hPOC_dust_ratio' + lname = 'hPOC to dust ratio' + units = '1' + datatype = 'real' + rptr => parm_hPOC_dust_ratio + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'o2_sf_o2_range_hi' - lname = 'o2_scalefactor is applied to diss length scales for O2 less than this' - units = 'mmol/m^3' - datatype = 'real' - rptr => o2_sf_o2_range_hi - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'o2_sf_o2_range_hi' + lname = 'o2_scalefactor is applied to diss length scales for O2 less than this' + units = 'mmol/m^3' + datatype = 'real' + rptr => o2_sf_o2_range_hi + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'o2_sf_o2_range_lo' - lname = 'o2_scalefactor is constant for O2 less than this' - units = 'mmol/m^3' - datatype = 'real' - rptr => o2_sf_o2_range_lo - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'o2_sf_o2_range_lo' + lname = 'o2_scalefactor is constant for O2 less than this' + units = 'mmol/m^3' + datatype = 'real' + rptr => o2_sf_o2_range_lo + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'o2_sf_val_lo_o2' - lname = 'o2_scalefactor constant for O2 less than o2_sf_o2_range_lo' - units = '1' - datatype = 'real' - rptr => o2_sf_val_lo_o2 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'o2_sf_val_lo_o2' + lname = 'o2_scalefactor constant for O2 less than o2_sf_o2_range_lo' + units = '1' + datatype = 'real' + rptr => o2_sf_val_lo_o2 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_sed_denitrif_coeff' - lname = 'global scaling factor for sed_denitrif' - units = '1' - datatype = 'real' - rptr => parm_sed_denitrif_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_sed_denitrif_coeff' + lname = 'global scaling factor for sed_denitrif' + units = '1' + datatype = 'real' + rptr => parm_sed_denitrif_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'bury_coeff_rmean_timescale_years' - lname = 'Timescale for bury coefficient running means' - units = 'yr' - datatype = 'real' - rptr => bury_coeff_rmean_timescale_years - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'bury_coeff_rmean_timescale_years' + lname = 'Timescale for bury coefficient running means' + units = 'yr' + datatype = 'real' + rptr => bury_coeff_rmean_timescale_years + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - ! ------------------------- - category = 'Scale lengths' - ! ------------------------- + ! ------------------------- + category = 'Scale lengths' + ! ------------------------- - sname = 'parm_scalelen_z' - lname = 'Depths of prescribed scale length values' - units = 'cm' - call this%add_var_1d_r8(sname, lname, units, category, & - parm_scalelen_z, marbl_status_log) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_scalelen_z' + lname = 'Depths of prescribed scale length values' + units = 'cm' + call this%add_var_1d_r8(sname, lname, units, category, & + parm_scalelen_z, marbl_status_log) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'parm_scalelen_vals' - lname = 'Prescribed scale length values' - units = 'cm' - call this%add_var_1d_r8(sname, lname, units, category, & - parm_scalelen_vals, marbl_status_log) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'parm_scalelen_vals' + lname = 'Prescribed scale length values' + units = 'cm' + call this%add_var_1d_r8(sname, lname, units, category, & + parm_scalelen_vals, marbl_status_log) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - ! ----------------------------- - category = 'general parameters' - ! ----------------------------- + ! ----------------------------- + category = 'general parameters' + ! ----------------------------- - sname = 'caco3_bury_thres_opt' - lname = 'Option for CaCO3 burial threshold' - units = 'unitless' - datatype = 'string' - sptr => caco3_bury_thres_opt - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, sptr=sptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'caco3_bury_thres_opt' + lname = 'Option for CaCO3 burial threshold' + units = 'unitless' + datatype = 'string' + sptr => caco3_bury_thres_opt + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, sptr=sptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'caco3_bury_thres_depth' - lname = 'Threshold depth for CaCO3 burial (if using fixed_depth option)' - units = 'cm' - datatype = 'real' - rptr => caco3_bury_thres_depth - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'caco3_bury_thres_depth' + lname = 'Threshold depth for CaCO3 burial (if using fixed_depth option)' + units = 'cm' + datatype = 'real' + rptr => caco3_bury_thres_depth + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'caco3_bury_thres_omega_calc' - lname = 'omega calcite threshold for CaCO3 burial (if using omega_calc option)' - units = '1' - datatype = 'real' - rptr => caco3_bury_thres_omega_calc - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'caco3_bury_thres_omega_calc' + lname = 'omega calcite threshold for CaCO3 burial (if using omega_calc option)' + units = '1' + datatype = 'real' + rptr => caco3_bury_thres_omega_calc + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'PON_bury_coeff' - lname = 'scale factor for burial of PON' - units = 'unitless' - datatype = 'real' - rptr => PON_bury_coeff - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'PON_bury_coeff' + lname = 'scale factor for burial of PON' + units = 'unitless' + datatype = 'real' + rptr => PON_bury_coeff + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'POM_bury_frac_max' - lname = 'maximum bury fraction for POM' - units = 'unitless' - datatype = 'real' - rptr => POM_bury_frac_max - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'POM_bury_frac_max' + lname = 'maximum bury fraction for POM' + units = 'unitless' + datatype = 'real' + rptr => POM_bury_frac_max + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'bSi_bury_frac_max' - lname = 'maximum bury fraction for bSi' - units = 'unitless' - datatype = 'real' - rptr => bSi_bury_frac_max - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'bSi_bury_frac_max' + lname = 'maximum bury fraction for bSi' + units = 'unitless' + datatype = 'real' + rptr => bSi_bury_frac_max + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'ciso_fract_factors' - lname = 'Option for which biological fractionation calculation to use' - units = 'unitless' - datatype = 'string' - sptr => ciso_fract_factors - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, sptr=sptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'auto_mort2_exp' + lname = 'Value of power loss exponent for autotrophs' + units = 'unitless' + datatype = 'real' + rptr => auto_mort2_exp + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'auto_mort2_exp' - lname = 'Value of power loss exponent for autotrophs' - units = 'unitless' - datatype = 'real' - rptr => auto_mort2_exp - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'zoo_mort2_exp' + lname = 'Value of power loss exponent for zooplankton' + units = 'unitless' + datatype = 'real' + rptr => zoo_mort2_exp + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'zoo_mort2_exp' - lname = 'Value of power loss exponent for zooplankton' - units = 'unitless' - datatype = 'real' - rptr => zoo_mort2_exp - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) + sname = 'QCaCO3_max' + lname = 'Max CaCO3/C ratio for implicit calcifiers' + units = 'mmol CaCO3/mmol C' + datatype = 'real' + rptr => QCaCO3_max + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'QCaCO3_max' - lname = 'Max CaCO3/C ratio for implicit calcifiers' - units = 'mmol CaCO3/mmol C' - datatype = 'real' - rptr => QCaCO3_max - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) + sname = 'f_graze_CaCO3_remin' + lname = 'Fraction of spCaCO3 grazing which is remineralized in zooplankton guts' + units = 'unitless' + datatype = 'real' + rptr => f_graze_CaCO3_remin + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, rptr=rptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'f_graze_CaCO3_remin' - lname = 'Fraction of spCaCO3 grazing which is remineralized in zooplankton guts' - units = 'unitless' - datatype = 'real' - rptr => f_graze_CaCO3_remin - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, rptr=rptr) + end if - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + if (ciso_on) then + sname = 'ciso_fract_factors' + lname = 'Option for which biological fractionation calculation to use' + units = 'unitless' + datatype = 'string' + sptr => ciso_fract_factors + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, sptr=sptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + end if marbl_status_log%labort_marbl = labort_marbl_loc if (marbl_status_log%labort_marbl) return @@ -1239,13 +1277,13 @@ subroutine marbl_settings_define_PFT_counts(this, marbl_status_log) type(marbl_log_type), intent(inout) :: marbl_status_log character(len=*), parameter :: subname = 'marbl_settings_mod:marbl_settings_define_PFT_counts' - character(len=char_len) :: log_message character(len=char_len) :: sname, lname, units, datatype, category integer(int_kind), pointer :: iptr => NULL() - integer :: m,n logical :: labort_marbl_loc + if (.not. base_bio_on) return + labort_marbl_loc = .false. ! ---------------------- @@ -1289,6 +1327,16 @@ subroutine marbl_settings_define_PFT_counts(this, marbl_status_log) marbl_status_log%labort_marbl = labort_marbl_loc if (marbl_status_log%labort_marbl) return + end subroutine marbl_settings_define_PFT_counts + + subroutine marbl_settings_allocate_PFT_types(marbl_status_log) + + type(marbl_log_type), intent(inout) :: marbl_status_log + + character(len=*), parameter :: subname = 'marbl_settings_mod:marbl_settings_allocate_PFT_types' + character(len=char_len) :: log_message + integer :: m, n + ! FIXME #69: this is not ideal for threaded runs if (.not. allocated(autotroph_settings)) & allocate(autotroph_settings(autotroph_cnt)) @@ -1308,7 +1356,7 @@ subroutine marbl_settings_define_PFT_counts(this, marbl_status_log) end do end if - end subroutine marbl_settings_define_PFT_counts + end subroutine marbl_settings_allocate_PFT_types !***************************************************************************** @@ -1329,6 +1377,8 @@ subroutine marbl_settings_define_PFT_derived_types(this, marbl_status_log) integer :: m, n, cnt character(len=char_len) :: prefix + if (.not. base_bio_on) return + labort_marbl_loc = .false. do n=1,autotroph_cnt write(prefix, "(A,I0,A)") 'autotroph_settings(', n, ')%' From 6f552e92e479ac3ff665853304be4bae51221fe0 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 29 Sep 2023 12:30:12 -0600 Subject: [PATCH 36/64] Revert accidental changes to 4p2z yaml file Inadvertantly copied / pasted some cocco fields into the 4p2z settings yaml file. Once that was fixed, I used MARBL_generate_settings_file.py to create an updated version of marbl_with_4p2z_cgs.settings (and the mks equivalent), which really just added the tracer module flags and removed a couple of ciso flags --- defaults/json/settings_latest+4p2z.json | 21 ++++++++++++------- defaults/settings_latest+4p2z.yaml | 21 ++++++++++++------- .../settings/marbl_with_4p2z_cgs.settings | 8 ++++--- .../settings/marbl_with_4p2z_mks.settings | 8 ++++--- 4 files changed, 36 insertions(+), 22 deletions(-) diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index e0c1604e..a626791a 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -1010,7 +1010,7 @@ "units": "mol m-2 yr-1" }, "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { + "_4p2z_PFT_keys": { "autotroph_settings": [ "sp", "diat", @@ -1018,24 +1018,29 @@ "cocco" ], "grazing_relationship_settings": [ - "sp_zoo", - "diat_zoo", - "diaz_zoo", - "cocco_zoo" + "sp_microzoo", + "diat_mesozoo", + "diaz_microzoo", + "cocco_mesozoo", + "cocco_microzoo", + "diaz_mesozoo", + "null", + "microzoo_mesozoo" ], "zooplankton_settings": [ - "zoo" + "microzoo", + "mesozoo" ] }, "_append_to_config_keywords": true, "datatype": "string", - "default_value": "CESM2+cocco", + "default_value": "4p2z", "defined_if": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", "valid_values": [ - "CESM2+cocco", + "4p2z", "user-specified" ] }, diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index b78bbc93..46701a37 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -294,23 +294,28 @@ general_parms : subcategory : 2. config PFTs units : unitless datatype : string - default_value : CESM2+cocco + default_value : 4p2z valid_values : - - CESM2+cocco + - 4p2z - user-specified - _CESM2+cocco_PFT_keys : + _4p2z_PFT_keys : autotroph_settings : - sp - diat - diaz - cocco zooplankton_settings : - - zoo + - microzoo + - mesozoo grazing_relationship_settings : - - sp_zoo - - diat_zoo - - diaz_zoo - - cocco_zoo + - sp_microzoo + - diat_mesozoo + - diaz_microzoo + - cocco_mesozoo + - cocco_microzoo + - diaz_mesozoo + - "null" + - microzoo_mesozoo _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) diff --git a/tests/input_files/settings/marbl_with_4p2z_cgs.settings b/tests/input_files/settings/marbl_with_4p2z_cgs.settings index 96d3f7da..9c3c19b5 100644 --- a/tests/input_files/settings/marbl_with_4p2z_cgs.settings +++ b/tests/input_files/settings/marbl_with_4p2z_cgs.settings @@ -1,3 +1,8 @@ +! tracer modules +abio_dic_on = .false. +base_bio_on = .true. +ciso_on = .false. + ! config PFTs PFT_defaults = "4p2z" autotroph_cnt = 4 @@ -5,8 +10,6 @@ max_grazer_prey_cnt = 4 zooplankton_cnt = 2 ! config flags -ciso_lsource_sink = .true. -ciso_on = .false. ladjust_bury_coeff = .false. lcheck_forcing = .false. lcompute_nhx_surface_emis = .true. @@ -30,7 +33,6 @@ bury_coeff_rmean_timescale_years = 10.0 caco3_bury_thres_depth = 3.0000000000000000e+05 caco3_bury_thres_omega_calc = 1.0 caco3_bury_thres_opt = "omega_calc" -ciso_fract_factors = "Laws" f_graze_CaCO3_remin = 0.5 gQ_Fe_kFe_thres = 10.0 gQ_Si_kSi_thres = 5.0 diff --git a/tests/input_files/settings/marbl_with_4p2z_mks.settings b/tests/input_files/settings/marbl_with_4p2z_mks.settings index 56bcf35c..38a627eb 100644 --- a/tests/input_files/settings/marbl_with_4p2z_mks.settings +++ b/tests/input_files/settings/marbl_with_4p2z_mks.settings @@ -1,3 +1,8 @@ +! tracer modules +abio_dic_on = .false. +base_bio_on = .true. +ciso_on = .false. + ! config PFTs PFT_defaults = "4p2z" autotroph_cnt = 4 @@ -5,8 +10,6 @@ max_grazer_prey_cnt = 4 zooplankton_cnt = 2 ! config flags -ciso_lsource_sink = .true. -ciso_on = .false. ladjust_bury_coeff = .false. lcheck_forcing = .false. lcompute_nhx_surface_emis = .true. @@ -30,7 +33,6 @@ bury_coeff_rmean_timescale_years = 10.0 caco3_bury_thres_depth = 3.0000000000000000e+03 caco3_bury_thres_omega_calc = 1.0 caco3_bury_thres_opt = "omega_calc" -ciso_fract_factors = "Laws" f_graze_CaCO3_remin = 0.5 gQ_Fe_kFe_thres = 10.0 gQ_Si_kSi_thres = 5.0 From a8bb2a7b56a3657a0b8fc7e4a68251212f5853d1 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 29 Sep 2023 13:31:32 -0600 Subject: [PATCH 37/64] More settings YAML clean-up --- defaults/json/settings_cesm2.0.json | 15 +++++++-------- defaults/json/settings_cesm2.1+cocco.json | 3 ++- defaults/json/settings_cesm2.1.json | 15 +++++++-------- defaults/json/settings_latest+4p2z.json | 3 ++- defaults/json/settings_latest+cocco.json | 3 ++- defaults/settings_cesm2.0.yaml | 9 ++++----- defaults/settings_cesm2.1+cocco.yaml | 1 + defaults/settings_cesm2.1.yaml | 9 ++++----- defaults/settings_latest+4p2z.yaml | 1 + defaults/settings_latest+cocco.yaml | 1 + defaults/settings_latest.yaml | 1 + 11 files changed, 32 insertions(+), 29 deletions(-) diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index 3ccc866c..cae3f017 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -922,18 +922,16 @@ "units": "mol m-2 yr-1" }, "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { + "_CESM2_PFT_keys": { "autotroph_settings": [ "sp", "diat", - "diaz", - "cocco" + "diaz" ], "grazing_relationship_settings": [ "sp_zoo", "diat_zoo", - "diaz_zoo", - "cocco_zoo" + "diaz_zoo" ], "zooplankton_settings": [ "zoo" @@ -941,13 +939,13 @@ }, "_append_to_config_keywords": true, "datatype": "string", - "default_value": "CESM2+cocco", + "default_value": "CESM2", "defined_if": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", "valid_values": [ - "CESM2+cocco", + "CESM2", "user-specified" ] }, @@ -1502,7 +1500,8 @@ "ALK", "ALK_ALT_CO2" ], - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index f9a99339..4d292d7c 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -1545,7 +1545,8 @@ "ALK", "ALK_ALT_CO2" ], - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index 959f7173..e6e677dc 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -922,18 +922,16 @@ "units": "mol m-2 yr-1" }, "PFT_defaults": { - "_CESM2+cocco_PFT_keys": { + "_CESM2_PFT_keys": { "autotroph_settings": [ "sp", "diat", - "diaz", - "cocco" + "diaz" ], "grazing_relationship_settings": [ "sp_zoo", "diat_zoo", - "diaz_zoo", - "cocco_zoo" + "diaz_zoo" ], "zooplankton_settings": [ "zoo" @@ -941,13 +939,13 @@ }, "_append_to_config_keywords": true, "datatype": "string", - "default_value": "CESM2+cocco", + "default_value": "CESM2", "defined_if": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", "valid_values": [ - "CESM2+cocco", + "CESM2", "user-specified" ] }, @@ -1505,7 +1503,8 @@ "ALK", "ALK_ALT_CO2" ], - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index a626791a..b8cd4312 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -1598,7 +1598,8 @@ "ALK", "ALK_ALT_CO2" ], - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 96c5bf89..208773e1 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -1545,7 +1545,8 @@ "ALK", "ALK_ALT_CO2" ], - "default": "" + "default": "", + "not base_bio_on": "" }, "longname": "Tracer names for tracers that are restored", "subcategory": "20. tracer restoring", diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 08fb4732..08a5dd97 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -283,23 +283,21 @@ general_parms : subcategory : 2. config PFTs units : unitless datatype : string - default_value : CESM2+cocco + default_value : CESM2 valid_values : - - CESM2+cocco + - CESM2 - user-specified - _CESM2+cocco_PFT_keys : + _CESM2_PFT_keys : autotroph_settings : - sp - diat - diaz - - cocco zooplankton_settings : - zoo grazing_relationship_settings : - sp_zoo - diat_zoo - diaz_zoo - - cocco_zoo _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) @@ -1337,3 +1335,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + not base_bio_on : '' diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index e92a7528..37657bd0 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -1377,3 +1377,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + not base_bio_on : '' diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index c7dc17e7..c71b2bef 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -283,23 +283,21 @@ general_parms : subcategory : 2. config PFTs units : unitless datatype : string - default_value : CESM2+cocco + default_value : CESM2 valid_values : - - CESM2+cocco + - CESM2 - user-specified - _CESM2+cocco_PFT_keys : + _CESM2_PFT_keys : autotroph_settings : - sp - diat - diaz - - cocco zooplankton_settings : - zoo grazing_relationship_settings : - sp_zoo - diat_zoo - diaz_zoo - - cocco_zoo _append_to_config_keywords : true lsource_sink : longname : Control which portions of code are executed (useful for debugging) @@ -1339,3 +1337,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + not base_bio_on : '' diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 46701a37..c83de1a9 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -1440,3 +1440,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + not base_bio_on : '' diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 680c655b..0ac17a2b 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -1377,3 +1377,4 @@ tracer_dependent : - 'ALK_ALT_CO2' GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE + not base_bio_on : '' diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index ef8413ba..e1d5a8d0 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -1342,3 +1342,4 @@ tracer_dependent : GRID == "CESM_x3" : *CESM_TRACER_RESTORE GRID == "CESM_x1" : *CESM_TRACER_RESTORE not base_bio_on : '' + \ No newline at end of file From e4d90995d792cf83d4683b8384ab951c025b6600 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 29 Sep 2023 14:54:07 -0600 Subject: [PATCH 38/64] Minor code clean-up When setting up agenda for code review, I noticed a few small things that I addressed here: 1. No need for the "PFT_defaults = ... but being treated as None" message when running without the base biotic tracers, because users can no longer change it when base_bio_on = .false. (it is not registered with put_setting()) 2. Put misplaced comment in marbl.F90 in right spot --- src/marbl_settings_mod.F90 | 44 ++++++++++++++++---------------------- tests/driver_src/marbl.F90 | 7 +++++- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index 08693ab5..7db8e855 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -505,34 +505,28 @@ subroutine marbl_settings_set_defaults_PFT_counts(marbl_status_log) PFT_defaults = 'user-specified' end if - if ((.not. base_bio_on) .and. (trim(PFT_defaults) .ne. 'None')) then - write(log_message, '(4A)') 'PFT_defaults = "', trim(PFT_defaults), & - '" in input file, but being treated as "None"', & - ' since base_bio_on = .false.' - call marbl_status_log%log_noerror(log_message, subname) + if (.not. base_bio_on) then PFT_defaults = 'None' + autotroph_cnt = 0 + zooplankton_cnt = 0 + max_grazer_prey_cnt = 0 + else + select case (trim(PFT_defaults)) + case ('CESM2') + autotroph_cnt = 3 + zooplankton_cnt = 1 + max_grazer_prey_cnt = 3 + case ('user-specified') + ! User must change these with put_setting() + autotroph_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + zooplankton_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + max_grazer_prey_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + case DEFAULT + write(log_message, "(3A)") "'", trim(PFT_defaults), "' is not a valid value for PFT_defaults" + call marbl_status_log%log_error(log_message, subname) + end select end if - select case (trim(PFT_defaults)) - case ('CESM2') - autotroph_cnt = 3 - zooplankton_cnt = 1 - max_grazer_prey_cnt = 3 - case ('user-specified') - ! User must change these with put_setting() - autotroph_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - zooplankton_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - max_grazer_prey_cnt = -1 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - case ('None') - ! User must change these with put_setting() - autotroph_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - zooplankton_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - max_grazer_prey_cnt = 0 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - case DEFAULT - write(log_message, "(3A)") "'", trim(PFT_defaults), "' is not a valid value for PFT_defaults" - call marbl_status_log%log_error(log_message, subname) - end select - end subroutine marbl_settings_set_defaults_PFT_counts !***************************************************************************** diff --git a/tests/driver_src/marbl.F90 b/tests/driver_src/marbl.F90 index 836bf0bf..5689119c 100644 --- a/tests/driver_src/marbl.F90 +++ b/tests/driver_src/marbl.F90 @@ -373,6 +373,7 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log tracers requested for initialization call driver_status_log%log_header('Requested tracers', subname) + ! Provide message if no tracers are requested if (size(marbl_instances(1)%tracer_metadata) == 0) & call driver_status_log%log_noerror('No tracers requested!', subname) do n=1, size(marbl_instances(1)%tracer_metadata) @@ -392,6 +393,7 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log requested surface forcing fields call driver_status_log%log_header('Requested surface forcing fields', subname) + ! Provide message if no surface flux forcings are requested if (size(marbl_instances(1)%surface_flux_forcings) == 0) & call driver_status_log%log_noerror('No forcing fields requested!', subname) do n=1,size(marbl_instances(1)%surface_flux_forcings) @@ -400,8 +402,10 @@ Program marbl ' (units: ', trim(marbl_instances(1)%surface_flux_forcings(n)%metadata%field_units),')' call driver_status_log%log_noerror(log_message, subname) end do + ! Log requested interior forcing fields call driver_status_log%log_header('Requested interior forcing fields', subname) + ! Provide message if no itnerior tendency forcings are requested if (size(marbl_instances(1)%interior_tendency_forcings) == 0) & call driver_status_log%log_noerror('No forcing fields requested!', subname) do n=1,size(marbl_instances(1)%interior_tendency_forcings) @@ -410,7 +414,7 @@ Program marbl ' (units: ', trim(marbl_instances(1)%interior_tendency_forcings(n)%metadata%field_units),')' call driver_status_log%log_noerror(log_message, subname) end do - ! Provide message if no forcings are requested + call marbl_instances(1)%shutdown() end if @@ -432,6 +436,7 @@ Program marbl call driver_status_log%log_noerror(log_message, subname) end if end do + ! Provide message if no tracers are restored if (cnt.eq.0) then call driver_status_log%log_noerror('No tracers to restore!', subname) end if From 241e612b92a7d1b18f5974690b5d93e5c7279f32 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 10:10:41 -0600 Subject: [PATCH 39/64] Add new netcdf_metadata_check.py script This script compares the units and longname attribute of every variable in a netCDF history file to what is defined in a diagnostics YAML file. In other words, it checks for consistency between the Fortran code (which writes the metadata to netCDF) and the YAML file (which is more human-readable if users want to look up what diagnostics are available, and which eventually will be used to auto-generate documentation on the available diagnostics). Running this test found errors in both the Fortran and the YAML, which have been fixed. It also uncovered a bug in how the longname of the grazing variables for zooplankton grazing on zooplankton were parsed. I fixed a bug where we were defining diagnostics for the base biotic tracers even when running with base_biotic_on=.false., so the current baseline for the abio_only test has more variables than the test now generates. I think this will cause one of the CI tests to fail (and there might be an issue with parsing the 4p2z settings file causing additional failures); I'll clean those failures up in the next commit. --- MARBL_tools/MARBL_share.py | 13 +- MARBL_tools/netcdf_metadata_check.py | 158 + MARBL_tools/run_test_suite.sh | 26 +- defaults/diagnostics_latest.yaml | 69 +- defaults/json/diagnostics_latest.json | 39 +- defaults/json/settings_cesm2.0.json | 4 +- defaults/json/settings_cesm2.1+cocco.json | 4 +- defaults/json/settings_cesm2.1.json | 4 +- defaults/json/settings_latest+4p2z.json | 4 +- defaults/json/settings_latest+cocco.json | 4 +- defaults/json/settings_latest.json | 6 +- defaults/settings_cesm2.0.yaml | 4 +- defaults/settings_cesm2.1+cocco.yaml | 4 +- defaults/settings_cesm2.1.yaml | 4 +- defaults/settings_latest+4p2z.yaml | 4 +- defaults/settings_latest+cocco.yaml | 4 +- defaults/settings_latest.yaml | 6 +- src/marbl_diagnostics_mod.F90 | 4747 +++++++++++---------- 18 files changed, 2634 insertions(+), 2470 deletions(-) create mode 100755 MARBL_tools/netcdf_metadata_check.py diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 0728a1cf..6ddcfe78 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -78,7 +78,11 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic fill_source = 'zoo_graze_zoo' elif template == '((particulate_flux_ref_depth_str))': fill_source = 'strings' - particulate_flux_ref_depth = MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + try: + particulate_flux_ref_depth = MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + except: + # If base_biotic_on is False, we don't need particulate_flux_ref_depth + particulate_flux_ref_depth = 0 if unit_system == 'cgs': particulate_flux_ref_depth = particulate_flux_ref_depth / 100. particulate_flux_ref_depth_str = '%dm' % particulate_flux_ref_depth @@ -136,8 +140,8 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic zoo_ind2 = (item-1) // zooplankton_cnt + 1 zoo_prefix2 = "zooplankton_settings(%d)%%" % zoo_ind2 key_fill_val = MARBL_settings.settings_dict[zoo_prefix1 + "sname"]['value'].strip('"') + '_' + MARBL_settings.settings_dict[zoo_prefix2 + "sname"]['value'].strip('"') - template_fill_dict['((zooplankton_lname))1'] = MARBL_settings.settings_dict[zoo_prefix1 + "lname"]['value'].strip('"') - template_fill_dict['((zooplankton_lname))2'] = MARBL_settings.settings_dict[zoo_prefix2 + "lname"]['value'].strip('"') + template_fill_dict['((zooplankton_lname1))'] = MARBL_settings.settings_dict[zoo_prefix1 + "lname"]['value'].strip('"') + template_fill_dict['((zooplankton_lname2))'] = MARBL_settings.settings_dict[zoo_prefix2 + "lname"]['value'].strip('"') elif fill_source == 'strings': key_fill_val = item template_fill_dict[template] = item @@ -158,9 +162,6 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic else: template2 = re.findall('\(\(.*?\)\)', unprocessed_dict[key]) try: - if (len(template2)==2) and (template2[0] == template2[1]): - template2[0] = template2[0]+'1' - template2[1] = template2[1]+'2' replacement_text = [template_fill_dict[i] for i in template2] except: logger.error("Can not replace '%s'" % template2) diff --git a/MARBL_tools/netcdf_metadata_check.py b/MARBL_tools/netcdf_metadata_check.py new file mode 100755 index 00000000..000b836c --- /dev/null +++ b/MARBL_tools/netcdf_metadata_check.py @@ -0,0 +1,158 @@ +#!/usr/bin/env python + +""" +Compare the units and longname for each variable in a MARBL history fileto what is defined in the +diagnostics YAML file. + +usage: netcdf_metadata_check.py [-h] [-n NETCDF_FILE] [-j DEFAULT_DIAGNOSTICS_FILE] + [-f DEFAULT_SETTINGS_FILE] [-s SETTINGS_FILE_IN] [-u {cgs,mks}] + +Compare metadata in netCDF file to a JSON file + +optional arguments: + -h, --help show this help message and exit + -n NETCDF_FILE, --netcdf-file NETCDF_FILE + netCDF file to read metadata from (default: /Users/mlevy/NO_BACKUP/codes/MAR + BL/tests/regression_tests/call_compute_subroutines/history_1inst.nc) + -j DEFAULT_DIAGNOSTICS_FILE, --default_diagnostics_file DEFAULT_DIAGNOSTICS_FILE + Location of JSON-formatted MARBL diagnostics configuration file (default: + /Users/mlevy/NO_BACKUP/codes/MARBL/defaults/json/diagnostics_latest.json) + -f DEFAULT_SETTINGS_FILE, --default_settings_file DEFAULT_SETTINGS_FILE + Location of JSON-formatted MARBL settings configuration file (default: + /Users/mlevy/NO_BACKUP/codes/MARBL/defaults/json/settings_latest.json) + -s SETTINGS_FILE_IN, --settings_file_in SETTINGS_FILE_IN + A file that overrides values in settings JSON file (default: /Users/mlevy/NO + _BACKUP/codes/MARBL/tests/input_files/settings/marbl_with_o2_consumption_sca + lef.settings) + -u {cgs,mks}, --unit_system {cgs,mks} + Unit system for parameter values (default: cgs) +""" + +################## + +def _parse_args(): + """ Parse command line arguments + """ + + import argparse + + parser = argparse.ArgumentParser(description="Compare metadata in netCDF file to a JSON file", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + + # File to compare to baseline + # (default is $MARBLROOT/tests/regression_tests/call_compute_subroutines/history_1inst.nc) + default = os.path.join(marbl_root, + "tests", + "regression_tests", + "call_compute_subroutines", + "history_1inst.nc" + ) + parser.add_argument("-n", "--netcdf-file", action="store", dest="netcdf_file", + default=default, help="netCDF file to read metadata from") + + # Command line argument to point to JSON diagnostics file + # (default is $MARBLROOT/defaults/json/diagnostics_latest.json) + default=os.path.join(marbl_root, "defaults", "json", "diagnostics_latest.json") + parser.add_argument("-j", "--default_diagnostics_file", action="store", + dest="default_diagnostics_file", default=default, + help="Location of JSON-formatted MARBL diagnostics configuration file") + + # Command line argument to point to JSON settings file + # (default is $MARBLROOT/defaults/json/settings_latest.json) + default=os.path.join(marbl_root, "defaults", "json", "settings_latest.json") + parser.add_argument("-f", "--default_settings_file", action="store", + dest="default_settings_file", default=default, + help="Location of JSON-formatted MARBL settings configuration file") + + # Command line argument to specify a settings file which would override the JSON + # (default matches that used my call_compute_subroutines test) + default = os.path.join(marbl_root, + "tests", + "input_files", + "settings", + "marbl_with_o2_consumption_scalef.settings" + ) + parser.add_argument("-s", "--settings_file_in", action="store", dest="settings_file_in", + default=default, help="A file that overrides values in settings JSON file") + + # Command line argument to where to write the settings file being generated + parser.add_argument("-u", "--unit_system", action="store", dest="unit_system", default="cgs", + choices=["cgs", "mks"], help="Unit system for parameter values") + + return parser.parse_args() + +################## + +if __name__ == "__main__": + import xarray as xr + import sys + import os + + # We need marbl_root in python path so we can import MARBL_tools from generate_settings_file() + marbl_root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) + sys.path.append(marbl_root) + from MARBL_tools import MARBL_settings_class, MARBL_diagnostics_class, abort + + args = _parse_args() + if args.settings_file_in == "None": + args.settings_file_in = None + + # Read netcdf file + ds = xr.open_dataset(args.netcdf_file) + # Generate diagnostics object + DefaultSettings = MARBL_settings_class(args.default_settings_file, + "settings_file", + None, + args.settings_file_in, + args.unit_system + ) + MARBL_diagnostics = MARBL_diagnostics_class(args.default_diagnostics_file, + DefaultSettings, + args.unit_system + ) + json_in = MARBL_diagnostics.diagnostics_dict + + # construct list of diagnostics generated by the driver + driver_vars = ["zt", "zw"] + for tracer in DefaultSettings.tracers_dict: + driver_vars.append(tracer) + driver_vars.append(f"STF_{tracer}") + driver_vars.append(f"J_{tracer}") + + diff_found = False + for var in ds.variables: + # skip diagnostics generated by the driver + if var in driver_vars or var.startswith("output_for_GCM"): + continue + if var not in json_in: + print(f"Can not find {var} in {args.default_diagnostics_file}!") + diff_found = True + continue + netcdf_dict = {} + netcdf_dict["units"] = str(ds[var].attrs["units"]) + netcdf_dict["longname"] = ds[var].attrs["long_name"] + json_dict = {key: str(json_in[var][key]) for key in ["units", "longname"]} + different_lname = (netcdf_dict["longname"] != json_dict["longname"]) + different_units = (netcdf_dict["units"] != json_dict["units"]) + # Account for equivalent units + if json_dict["units"].replace("mmol/m^3", "nmol/cm^3") == netcdf_dict["units"]: + different_units = False + if json_dict["units"].replace("meq/m^3", "neq/cm^3") == netcdf_dict["units"]: + different_units = False + if json_dict["units"] == "mmol/m^3 cm/s" and netcdf_dict["units"] == "nmol/cm^2/s": + different_units = False + if different_units or different_lname: + diff_found = True + print(f"Differences in {var}:") + if different_units: + print(f"* JSON units: {json_dict['units']}") + print(f"* netcdf units: {netcdf_dict['units']}") + if different_lname: + print(f"* JSON long name: {json_dict['longname']}") + print(f"* netcdf long name: {netcdf_dict['longname']}") + +if diff_found: + print("Differences found between JSON and netCDF metadata!") + abort(1) +else: + print("No differences found between JSON and netCDF metadata") diff --git a/MARBL_tools/run_test_suite.sh b/MARBL_tools/run_test_suite.sh index 9a25381a..439bb306 100755 --- a/MARBL_tools/run_test_suite.sh +++ b/MARBL_tools/run_test_suite.sh @@ -52,7 +52,7 @@ print_status "CodeConsistency.py" >> ${RESULTS_CACHE} command -v pylint 2>&1 > /dev/null if [ $? -eq 0 ]; then cd ${MARBL_ROOT}/MARBL_tools - (set -x ; pylint --rcfile=pylintrc code_consistency.py netcdf_comparison.py) + (set -x ; pylint --rcfile=pylintrc code_consistency.py netcdf_comparison.py netcdf_metadata_check.py) STATUS=$(check_return $?) print_status "pylint" >> ${RESULTS_CACHE} fi @@ -160,11 +160,17 @@ if [ "${STATUS}" == "PASS" ]; then if [ "${STATUS}" == "PASS" ]; then cd ${MARBL_ROOT}/MARBL_tools + # Compare netCDF output to baseline BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (cgs) vs baseline (cgs))" >> ${RESULTS_CACHE} + + # Compare netCDF metadata to JSON file + (set -x ; ./netcdf_metadata_check.py) + STATUS=$(check_return $?) + print_status "netCDF metadata check" >> ${RESULTS_CACHE} fi # Initialize MARBL (with 4p2z), compute surface fluxes and interior tendencies @@ -174,12 +180,18 @@ if [ "${STATUS}" == "PASS" ]; then print_status "call_compute_subroutines.py -s ../../input_files/settings/marbl_with_4p2z_cgs.settings" >> ${RESULTS_CACHE} if [ "${STATUS}" == "PASS" ]; then + # Compare netCDF output to baseline cd ${MARBL_ROOT}/MARBL_tools BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_4p2z.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (cgs, 4p2z) vs baseline (cgs, 4p2z))" >> ${RESULTS_CACHE} + + # Compare netCDF metadata to JSON file + (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_4p2z_cgs.settings) + STATUS=$(check_return $?) + print_status "netCDF metadata check (4p2z)" fi # Initialize MARBL (with 4p2z), compute surface fluxes and interior tendencies in mks instead of cgs @@ -204,12 +216,18 @@ if [ "${STATUS}" == "PASS" ]; then print_status "call_compute_subroutines.py -s ../../input_files/settings/marbl_with_abio_only.settings" >> ${RESULTS_CACHE} if [ "${STATUS}" == "PASS" ]; then + # Compare netCDF output to baseline cd ${MARBL_ROOT}/MARBL_tools BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (cgs, with abio) vs baseline (cgs, with abio))" >> ${RESULTS_CACHE} + + # Compare netCDF metadata to JSON file + (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_abio_only.settings) + STATUS=$(check_return $?) + print_status "netCDF metadata check (abio only)" fi # Initialize MARBL (with abio tracers), compute surface fluxes and interior tendencies in mks instead of cgs @@ -234,12 +252,18 @@ if [ "${STATUS}" == "PASS" ]; then print_status "call_compute_subroutines.py -s ../../input_files/settings/marbl_with_ciso.settings" >> ${RESULTS_CACHE} if [ "${STATUS}" == "PASS" ]; then + # Compare netCDF output to baseline cd ${MARBL_ROOT}/MARBL_tools BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_ciso.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (cgs, with ciso) vs baseline (cgs, with ciso))" >> ${RESULTS_CACHE} + + # Compare netCDF metadata to JSON file + (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_ciso.settings) + STATUS=$(check_return $?) + print_status "netCDF metadata check (ciso)" fi # Initialize MARBL (with ciso tracers), compute surface fluxes and interior tendencies in mks instead of cgs diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 9f953a78..3b98a922 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -17,13 +17,11 @@ # Surface forcing diagnostics # ################################################################################ -############### -# Base module # -############### +#################### +# Always Available # +#################### ECOSYS_IFRAC : - dependencies : - base_bio_on : .true. longname : Ice Fraction for base biotic tracer fluxes # Want more consistent capitalization units : fraction vertical_grid : none @@ -34,8 +32,6 @@ ECOSYS_IFRAC : - average - average ECOSYS_XKW : - dependencies : - base_bio_on : .true. longname : XKW for base biotic tracer fluxes # Want more consistent capitalization units : cm/s vertical_grid : none @@ -46,13 +42,28 @@ ECOSYS_XKW : - average - average ECOSYS_ATM_PRESS : - dependencies : - base_bio_on : .true. longname : Atmospheric Pressure for base biotic tracer fluxes # Want more consistent capitalization units : atmospheres vertical_grid : none frequency : medium operator : average +PV_CO2 : + longname : CO2 Piston Velocity for base biotic tracer fluxes + units : cm/s + vertical_grid : none + frequency : never + operator : average +SCHMIDT_CO2 : + longname : CO2 Schmidt Number for base biotic tracers fluxes + units : 1 + vertical_grid : none + frequency : medium + operator : average + +############### +# Base module # +############### + PV_O2 : dependencies : base_bio_on : .true. @@ -87,7 +98,7 @@ CO2STAR : &CO2STAR operator : average CO2STAR_ALT_CO2 : << : *CO2STAR - longname : CO2 Star, Alternate CO2 + longname : CO2 Star, Alternative CO2 DCO2STAR : &DCO2STAR dependencies : base_bio_on : .true. @@ -129,22 +140,6 @@ DpCO2_ALT_CO2 : longname : D pCO2, Alternative CO2 frequency : medium operator : average -PV_CO2 : - dependencies : - base_bio_on : .true. - longname : CO2 Piston Velocity for base biotic tracer fluxes - units : cm/s - vertical_grid : none - frequency : never - operator : average -SCHMIDT_CO2 : - dependencies : - base_bio_on : .true. - longname : CO2 Schmidt Number for base biotic tracers fluxes - units : 1 - vertical_grid : none - frequency : medium - operator : average FG_CO2 : &FG_CO2 # rename ind%DIC_GAS_FLUX -> ind%FG_CO2 dependencies : base_bio_on : .true. @@ -176,14 +171,14 @@ PH_ALT_CO2 : ATM_CO2 : &ATM_CO2 dependencies : base_bio_on : .true. - longname : Atomspheric CO2 + longname : Atmospheric CO2 units : ppmv vertical_grid : none frequency : medium operator : average ATM_ALT_CO2 : << : *ATM_CO2 - longname : Atomspheric CO2 + longname : Atmospheric Alternative CO2 IRON_FLUX : dependencies : base_bio_on : .true. @@ -502,7 +497,7 @@ O2_ZMIN : O2_ZMIN_DEPTH : dependencies : base_bio_on : .true. - longname : Vertical Minimum of O2 + longname : Depth of Vertical Minimum of O2 units : cm vertical_grid : none frequency : medium @@ -1035,8 +1030,8 @@ Lig_loss : Lig_scavenge : dependencies : base_bio_on : .true. - longname : Fe not bound to Ligand - units : mmol/m^3 + longname : Loss of Fe-binding Ligand from Scavenging + units : mmol/m^3/s vertical_grid : layer_avg frequency : medium operator : average @@ -1972,7 +1967,7 @@ graze_((autotroph_sname))_((zooplankton_sname))_zint_100m : # thought is that we don't need these diagnostics with # fixed P:C so I'd like to update the fortran as well lvariable_PtoC : .true. - longname : ((autotroph_lname)) + longname : ((autotroph_lname)) P:C ratio units : 1 vertical_grid : layer_avg truncate : true @@ -2084,7 +2079,7 @@ graze_((autotroph_sname))_((zooplankton_sname)) : frequency : never operator : average ((autotroph_sname))_agg : - longname : ((autotroph_lname)) Aggregate + longname : ((autotroph_lname)) Aggregation units : mmol/m^3/s vertical_grid : layer_avg truncate : true @@ -2237,7 +2232,7 @@ CISO_mui_to_co2star_((autotroph_sname)) : dependencies : ciso_on : .true. longname : ((autotroph_lname)) instanteous growth rate over [CO2*] - units : m^3/mmol/s + units : (mmol/m^3)^-1 s^-1 vertical_grid : layer_avg frequency : medium operator : average @@ -2338,13 +2333,13 @@ graze_((zooplankton_sname))_doc_zint_100m : frequency : never operator : average graze_((zooplankton_sname))_((zooplankton_sname))_zint : - longname : ((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral + longname : ((zooplankton_lname1)) Grazing to ((zooplankton_lname2)) Vertical Integral units : mmol/m^3 cm/s vertical_grid : none frequency : never operator : average graze_((zooplankton_sname))_((zooplankton_sname))_zint_100m : - longname : ((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral, 0-100m + longname : ((zooplankton_lname1)) Grazing to ((zooplankton_lname2)) Vertical Integral, 0-100m units : mmol/m^3 cm/s vertical_grid : none frequency : never @@ -2418,7 +2413,7 @@ graze_((zooplankton_sname))_zootot : frequency : never operator : average graze_((zooplankton_sname))_((zooplankton_sname)) : - longname : ((zooplankton_lname)) grazing loss to ((zooplankton_lname)) + longname : ((zooplankton_lname1)) grazing loss to ((zooplankton_lname2)) units : mmol/m^3/s vertical_grid : layer_avg truncate : true diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index afe3afd8..1512702b 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -114,7 +114,7 @@ "lvariable_PtoC": ".true." }, "frequency": "medium", - "longname": "((autotroph_lname))", + "longname": "((autotroph_lname)) P:C ratio", "operator": "average", "truncate": true, "units": 1, @@ -142,7 +142,7 @@ }, "((autotroph_sname))_agg": { "frequency": "medium", - "longname": "((autotroph_lname)) Aggregate", + "longname": "((autotroph_lname)) Aggregation", "operator": "average", "truncate": true, "units": "mmol/m^3/s", @@ -483,7 +483,7 @@ "base_bio_on": ".true." }, "frequency": "medium", - "longname": "Atomspheric CO2", + "longname": "Atmospheric Alternative CO2", "operator": "average", "units": "ppmv", "vertical_grid": "none" @@ -493,7 +493,7 @@ "base_bio_on": ".true." }, "frequency": "medium", - "longname": "Atomspheric CO2", + "longname": "Atmospheric CO2", "operator": "average", "units": "ppmv", "vertical_grid": "none" @@ -1003,7 +1003,7 @@ "frequency": "medium", "longname": "((autotroph_lname)) instanteous growth rate over [CO2*]", "operator": "average", - "units": "m^3/mmol/s", + "units": "(mmol/m^3)^-1 s^-1", "vertical_grid": "layer_avg" }, "CISO_photo13C_((autotroph_sname))": { @@ -1123,7 +1123,7 @@ "base_bio_on": ".true." }, "frequency": "medium", - "longname": "CO2 Star, Alternate CO2", + "longname": "CO2 Star, Alternative CO2", "operator": "average", "units": "mmol/m^3", "vertical_grid": "none" @@ -1529,9 +1529,6 @@ "vertical_grid": "none" }, "ECOSYS_ATM_PRESS": { - "dependencies": { - "base_bio_on": ".true." - }, "frequency": "medium", "longname": "Atmospheric Pressure for base biotic tracer fluxes", "operator": "average", @@ -1539,9 +1536,6 @@ "vertical_grid": "none" }, "ECOSYS_IFRAC": { - "dependencies": { - "base_bio_on": ".true." - }, "frequency": [ "medium", "high" @@ -1555,9 +1549,6 @@ "vertical_grid": "none" }, "ECOSYS_XKW": { - "dependencies": { - "base_bio_on": ".true." - }, "frequency": [ "medium", "high" @@ -1781,9 +1772,9 @@ "base_bio_on": ".true." }, "frequency": "medium", - "longname": "Fe not bound to Ligand", + "longname": "Loss of Fe-binding Ligand from Scavenging", "operator": "average", - "units": "mmol/m^3", + "units": "mmol/m^3/s", "vertical_grid": "layer_avg" }, "NHx_SURFACE_EMIS": { @@ -1892,7 +1883,7 @@ "base_bio_on": ".true." }, "frequency": "medium", - "longname": "Vertical Minimum of O2", + "longname": "Depth of Vertical Minimum of O2", "operator": "average", "units": "cm", "vertical_grid": "none" @@ -2146,9 +2137,6 @@ "vertical_grid": "layer_avg" }, "PV_CO2": { - "dependencies": { - "base_bio_on": ".true." - }, "frequency": "never", "longname": "CO2 Piston Velocity for base biotic tracer fluxes", "operator": "average", @@ -2217,9 +2205,6 @@ "vertical_grid": "layer_avg" }, "SCHMIDT_CO2": { - "dependencies": { - "base_bio_on": ".true." - }, "frequency": "medium", "longname": "CO2 Schmidt Number for base biotic tracers fluxes", "operator": "average", @@ -2542,7 +2527,7 @@ }, "graze_((zooplankton_sname))_((zooplankton_sname))": { "frequency": "never", - "longname": "((zooplankton_lname)) grazing loss to ((zooplankton_lname))", + "longname": "((zooplankton_lname1)) grazing loss to ((zooplankton_lname2))", "operator": "average", "truncate": true, "units": "mmol/m^3/s", @@ -2550,14 +2535,14 @@ }, "graze_((zooplankton_sname))_((zooplankton_sname))_zint": { "frequency": "never", - "longname": "((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral", + "longname": "((zooplankton_lname1)) Grazing to ((zooplankton_lname2)) Vertical Integral", "operator": "average", "units": "mmol/m^3 cm/s", "vertical_grid": "none" }, "graze_((zooplankton_sname))_((zooplankton_sname))_zint_100m": { "frequency": "never", - "longname": "((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral, 0-100m", + "longname": "((zooplankton_lname1)) Grazing to ((zooplankton_lname2)) Vertical Integral, 0-100m", "operator": "average", "units": "mmol/m^3 cm/s", "vertical_grid": "none" diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index cae3f017..cf0ebfa1 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -796,14 +796,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 4d292d7c..31572698 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -836,14 +836,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index e6e677dc..9c442e2e 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -796,14 +796,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index b8cd4312..a0a51b11 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -884,14 +884,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 208773e1..403754ee 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -836,14 +836,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index a9943e69..96386770 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -707,7 +707,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { @@ -799,14 +799,14 @@ "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-13 (semi-labile+refractory)", "units": "mmol/m^3" }, "DO14Ctot": { "dependencies": { "ciso_on": ".true." }, - "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractoy)", + "long_name": "Dissolved Organic Carbon-14 (semi-labile+refractory)", "units": "mmol/m^3" }, "DOC": { diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 08a5dd97..ffa16e02 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -156,7 +156,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -166,7 +166,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index 37657bd0..c4543a8d 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -156,7 +156,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -166,7 +166,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index c71b2bef..bff6e333 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -156,7 +156,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -166,7 +166,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index c83de1a9..8c6e4960 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -167,7 +167,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -177,7 +177,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 0ac17a2b..cb3e0a5a 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -156,7 +156,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -166,7 +166,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index e1d5a8d0..9401c5dc 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -156,7 +156,7 @@ _tracer_list : DO13Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-13 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-13 (semi-labile+refractory) units : mmol/m^3 DI14C : dependencies : @@ -166,7 +166,7 @@ _tracer_list : DO14Ctot : dependencies : ciso_on : .true. - long_name : Dissolved Organic Carbon-14 (semi-labile+refractoy) + long_name : Dissolved Organic Carbon-14 (semi-labile+refractory) units : mmol/m^3 # Per-autotroph tracers @@ -174,7 +174,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 69691368..cb440d72 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -7,6 +7,7 @@ module marbl_diagnostics_mod use marbl_kinds_mod, only : int_kind use marbl_kinds_mod, only : char_len + use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : unit_system_type use marbl_settings_mod, only : autotroph_cnt use marbl_settings_mod, only : zooplankton_cnt @@ -165,90 +166,6 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'PV_O2' - sname = 'PV_O2' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PV_O2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'O2 Schmidt Number' - sname = 'SCHMIDT_O2' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SCHMIDT_O2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'O2 Saturation' - sname = 'O2SAT' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2SAT, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'CO2 Star' - sname = 'CO2STAR' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CO2STAR, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'D CO2 Star' - sname = 'DCO2STAR' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DCO2STAR, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'surface pCO2' - sname = 'pCO2SURF' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%pCO2SURF, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'D pCO2 for base biotic tracer fluxes' - sname = 'DpCO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DpCO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - lname = 'CO2 Piston Velocity for base biotic tracer fluxes' sname = 'PV_CO2' units = vel_units @@ -273,187 +190,273 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'DIC Surface Gas Flux' - sname = 'FG_CO2' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DIC_GAS_FLUX, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (base_bio_on) then + lname = 'PV_O2' + sname = 'PV_O2' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PV_O2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface pH' - sname = 'PH' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PH, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'O2 Schmidt Number' + sname = 'SCHMIDT_O2' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SCHMIDT_O2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Atmospheric CO2' - sname = 'ATM_CO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ATM_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'O2 Saturation' + sname = 'O2SAT' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2SAT, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CO2 Star, Alternative CO2' - sname = 'CO2STAR_ALT_CO2' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CO2STAR_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CO2 Star' + sname = 'CO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'D CO2 Star, Alternative CO2' - sname = 'DCO2STAR_ALT_CO2' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DCO2STAR_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D CO2 Star' + sname = 'DCO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DCO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'surface pCO2, Alternative CO2' - sname = 'pCO2SURF_ALT_CO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%pCO2SURF_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'surface pCO2' + sname = 'pCO2SURF' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%pCO2SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'D pCO2, Alternative CO2' - sname = 'DpCO2_ALT_CO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DpCO2_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D pCO2 for base biotic tracer fluxes' + sname = 'DpCO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DpCO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DIC Surface Gas Flux, Alternative CO2' - sname = 'FG_ALT_CO2' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DIC_GAS_FLUX_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DIC Surface Gas Flux' + sname = 'FG_CO2' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DIC_GAS_FLUX, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface pH, Alternative CO2' - sname = 'PH_ALT_CO2' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PH_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Surface pH' + sname = 'PH' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PH, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Atmospheric Alternative CO2' - sname = 'ATM_ALT_CO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ATM_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Atmospheric CO2' + sname = 'ATM_CO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ATM_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Atmospheric Iron Flux' - sname = 'IRON_FLUX' - units = 'mmol/m^2/s' ! output in mks regardless of unit system! - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%IRON_FLUX, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CO2 Star, Alternative CO2' + sname = 'CO2STAR_ALT_CO2' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CO2STAR_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Dust Flux' - sname = 'DUST_FLUX' - write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DUST_FLUX, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D CO2 Star, Alternative CO2' + sname = 'DCO2STAR_ALT_CO2' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DCO2STAR_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Flux of NOx from Atmosphere' - sname = 'NOx_FLUX' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%NOx_FLUX, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'surface pCO2, Alternative CO2' + sname = 'pCO2SURF_ALT_CO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%pCO2SURF_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Flux of NHy from Atmosphere' - sname = 'NHy_FLUX' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%NHy_FLUX, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D pCO2, Alternative CO2' + sname = 'DpCO2_ALT_CO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DpCO2_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Emission of NHx to Atmosphere' - sname = 'NHx_SURFACE_EMIS' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%NHx_SURFACE_EMIS, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DIC Surface Gas Flux, Alternative CO2' + sname = 'FG_ALT_CO2' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DIC_GAS_FLUX_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - end associate + lname = 'Surface pH, Alternative CO2' + sname = 'PH_ALT_CO2' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PH_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Atmospheric Alternative CO2' + sname = 'ATM_ALT_CO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ATM_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Atmospheric Iron Flux' + sname = 'IRON_FLUX' + units = 'mmol/m^2/s' ! output in mks regardless of unit system! + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%IRON_FLUX, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Dust Flux' + sname = 'DUST_FLUX' + write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DUST_FLUX, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Flux of NOx from Atmosphere' + sname = 'NOx_FLUX' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%NOx_FLUX, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Flux of NHy from Atmosphere' + sname = 'NHy_FLUX' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%NHy_FLUX, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Emission of NHx to Atmosphere' + sname = 'NHx_SURFACE_EMIS' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%NHx_SURFACE_EMIS, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end if + + end associate !----------------------------------------------------------------- ! Interior diagnostics @@ -464,2568 +467,2566 @@ subroutine marbl_diagnostics_init( & diags => marbl_interior_tendency_diags & ) - ! General 2D diags - lname = 'Calcite Saturation Depth' - sname = 'zsatcalc' - units = unit_system%L - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zsatcalc, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Aragonite Saturation Depth' - sname = 'zsatarag' - units = unit_system%L - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zsatarag, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + ! Allocate memory for PFT diagnostics + if (.not.ind%lconstructed()) then + allocate(ind%N_lim_surf(autotroph_cnt)) + allocate(ind%N_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%P_lim_surf(autotroph_cnt)) + allocate(ind%P_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%Fe_lim_surf(autotroph_cnt)) + allocate(ind%Fe_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%SiO3_lim_surf(autotroph_cnt)) + allocate(ind%SiO3_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%C_lim_surf(autotroph_cnt)) + allocate(ind%C_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%light_lim_surf(autotroph_cnt)) + allocate(ind%light_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%photoC_zint(autotroph_cnt)) + allocate(ind%photoC_zint_100m(autotroph_cnt)) + allocate(ind%photoC_NO3_zint(autotroph_cnt)) + allocate(ind%CaCO3_form_zint(autotroph_cnt)) + allocate(ind%CaCO3_form_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_zint(autotroph_cnt)) + allocate(ind%auto_graze_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_poc_zint(autotroph_cnt)) + allocate(ind%auto_graze_poc_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_doc_zint(autotroph_cnt)) + allocate(ind%auto_graze_doc_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_zoo_zint(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_graze_zoo_zint_100m(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_loss_zint(autotroph_cnt)) + allocate(ind%auto_loss_zint_100m(autotroph_cnt)) + allocate(ind%auto_loss_poc_zint(autotroph_cnt)) + allocate(ind%auto_loss_poc_zint_100m(autotroph_cnt)) + allocate(ind%auto_loss_doc_zint(autotroph_cnt)) + allocate(ind%auto_loss_doc_zint_100m(autotroph_cnt)) + allocate(ind%auto_agg_zint(autotroph_cnt)) + allocate(ind%auto_agg_zint_100m(autotroph_cnt)) + allocate(ind%zoo_loss_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_zint_150m(zooplankton_cnt)) + allocate(ind%zoo_loss_basal_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_basal_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_poc_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_poc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_doc_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_doc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_poc_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_poc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_doc_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_doc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_zoo_zint(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%zoo_graze_zoo_zint_100m(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%x_graze_zoo_zint(zooplankton_cnt)) + allocate(ind%x_graze_zoo_zint_100m(zooplankton_cnt)) + allocate(ind%Qp(autotroph_cnt)) + allocate(ind%photoC(autotroph_cnt)) + allocate(ind%photoC_NO3(autotroph_cnt)) + allocate(ind%photoFe(autotroph_cnt)) + allocate(ind%photoNO3(autotroph_cnt)) + allocate(ind%photoNH4(autotroph_cnt)) + allocate(ind%DOP_uptake(autotroph_cnt)) + allocate(ind%PO4_uptake(autotroph_cnt)) + allocate(ind%auto_graze(autotroph_cnt)) + allocate(ind%auto_graze_poc(autotroph_cnt)) + allocate(ind%auto_graze_doc(autotroph_cnt)) + allocate(ind%auto_graze_zootot(autotroph_cnt)) + allocate(ind%auto_graze_zoo(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_loss(autotroph_cnt)) + allocate(ind%auto_loss_poc(autotroph_cnt)) + allocate(ind%auto_loss_doc(autotroph_cnt)) + allocate(ind%auto_agg(autotroph_cnt)) + allocate(ind%bSi_form(autotroph_cnt)) + allocate(ind%CaCO3_form(autotroph_cnt)) + allocate(ind%Nfix(autotroph_cnt)) + allocate(ind%zoo_loss(zooplankton_cnt)) + allocate(ind%zoo_loss_basal(zooplankton_cnt)) + allocate(ind%zoo_loss_poc(zooplankton_cnt)) + allocate(ind%zoo_loss_doc(zooplankton_cnt)) + allocate(ind%zoo_graze(zooplankton_cnt)) + allocate(ind%zoo_graze_poc(zooplankton_cnt)) + allocate(ind%zoo_graze_doc(zooplankton_cnt)) + allocate(ind%zoo_graze_zootot(zooplankton_cnt)) + allocate(ind%zoo_graze_zoo(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%x_graze_zoo(zooplankton_cnt)) end if - lname = 'Vertical Minimum of O2' - sname = 'O2_ZMIN' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2_ZMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (base_bio_on) then + ! General 2D diags + lname = 'Calcite Saturation Depth' + sname = 'zsatcalc' + units = unit_system%L + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zsatcalc, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Depth of Vertical Minimum of O2' - sname = 'O2_ZMIN_DEPTH' - units = unit_system%L - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2_ZMIN_DEPTH, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Aragonite Saturation Depth' + sname = 'zsatarag' + units = unit_system%L + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zsatarag, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation Vertical Integral' - sname = 'photoC_TOT_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_TOT_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Minimum of O2' + sname = 'O2_ZMIN' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2_ZMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation Vertical Integral, 0-100m' - sname = 'photoC_TOT_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_TOT_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Depth of Vertical Minimum of O2' + sname = 'O2_ZMIN_DEPTH' + units = unit_system%L + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2_ZMIN_DEPTH, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation from NO3 Vertical Integral' - sname = 'photoC_NO3_TOT_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_NO3_TOT_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation Vertical Integral' + sname = 'photoC_TOT_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_TOT_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation from NO3 Vertical Integral, 0-100m' - sname = 'photoC_NO3_TOT_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_NO3_TOT_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation Vertical Integral, 0-100m' + sname = 'photoC_TOT_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_TOT_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of DOC Production' - sname = 'DOC_prod_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_prod_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation from NO3 Vertical Integral' + sname = 'photoC_NO3_TOT_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_NO3_TOT_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of DOC Production, 0-100m' - sname = 'DOC_prod_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_prod_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation from NO3 Vertical Integral, 0-100m' + sname = 'photoC_NO3_TOT_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_NO3_TOT_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of DOC Remineralization' - sname = 'DOC_remin_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_remin_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of DOC Remineralization, 0-100m' - sname = 'DOC_remin_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_remin_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of DOCr Remineralization' - sname = 'DOCr_remin_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOCr_remin_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of DOCr Remineralization, 0-100m' - sname = 'DOCr_remin_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOCr_remin_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ctot' - sname = 'Jint_Ctot' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Jint_Ctot, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ntot' - sname = 'Jint_Ntot' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Jint_Ntot, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ptot' - sname = 'Jint_Ptot' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Jint_Ptot, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Sitot' - sname = 'Jint_Sitot' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Jint_Sitot, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Fetot' - sname = 'Jint_Fetot' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Jint_Fetot, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - ! Particulate 2D diags - lname = 'CaCO3 Flux Hitting Sea Floor' - sname = 'calcToFloor' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%calcToFloor, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'CaCO3 Flux to Sediments' - sname = 'calcToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%calcToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'CaCO3 Flux to Sediments, Alternative CO2' - sname = 'calcToSed_ALT_CO2' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%calcToSed_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'POC Flux Hitting Sea Floor' - sname = 'pocToFloor' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%pocToFloor, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'POC Flux to Sediments' - sname = 'pocToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%pocToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'nitrogen burial Flux to Sediments' - sname = 'ponToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ponToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'nitrogen loss in Sediments' - sname = 'SedDenitrif' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SedDenitrif, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'non-oxic,non-dentr remin in Sediments' - sname = 'OtherRemin' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%OtherRemin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'phosphorus Flux to Sediments' - sname = 'popToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%popToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'biogenic Si Flux to Sediments' - sname = 'bsiToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%bsiToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'dust Flux to Sediments' - sname = 'dustToSed' - write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%dustToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'pFe Flux to Sediments' - sname = 'pfeToSed' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%pfeToSed, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - ! Autotroph 2D diags - if (.not.ind%lconstructed()) then - allocate(ind%N_lim_surf(autotroph_cnt)) - allocate(ind%N_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%P_lim_surf(autotroph_cnt)) - allocate(ind%P_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%Fe_lim_surf(autotroph_cnt)) - allocate(ind%Fe_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%SiO3_lim_surf(autotroph_cnt)) - allocate(ind%SiO3_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%C_lim_surf(autotroph_cnt)) - allocate(ind%C_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%light_lim_surf(autotroph_cnt)) - allocate(ind%light_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%photoC_zint(autotroph_cnt)) - allocate(ind%photoC_zint_100m(autotroph_cnt)) - allocate(ind%photoC_NO3_zint(autotroph_cnt)) - allocate(ind%CaCO3_form_zint(autotroph_cnt)) - allocate(ind%CaCO3_form_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_zint(autotroph_cnt)) - allocate(ind%auto_graze_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_poc_zint(autotroph_cnt)) - allocate(ind%auto_graze_poc_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_doc_zint(autotroph_cnt)) - allocate(ind%auto_graze_doc_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_zoo_zint(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_graze_zoo_zint_100m(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_loss_zint(autotroph_cnt)) - allocate(ind%auto_loss_zint_100m(autotroph_cnt)) - allocate(ind%auto_loss_poc_zint(autotroph_cnt)) - allocate(ind%auto_loss_poc_zint_100m(autotroph_cnt)) - allocate(ind%auto_loss_doc_zint(autotroph_cnt)) - allocate(ind%auto_loss_doc_zint_100m(autotroph_cnt)) - allocate(ind%auto_agg_zint(autotroph_cnt)) - allocate(ind%auto_agg_zint_100m(autotroph_cnt)) - end if - do n=1,autotroph_cnt - lname = trim(autotroph_settings(n)%lname) // ' N Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_N_lim_surf' - units = '1' + lname = 'Vertical Integral of DOC Production' + sname = 'DOC_prod_zint' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%N_lim_surf(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_prod_zint, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' N Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_N_lim_Cweight_avg_100m' - units = '1' + lname = 'Vertical Integral of DOC Production, 0-100m' + sname = 'DOC_prod_zint_100m' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%N_lim_Cweight_avg_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_prod_zint_100m, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' P Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_P_lim_surf' - units = '1' + lname = 'Vertical Integral of DOC Remineralization' + sname = 'DOC_remin_zint' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_lim_surf(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_remin_zint, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' P Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_P_lim_Cweight_avg_100m' - units = '1' + lname = 'Vertical Integral of DOC Remineralization, 0-100m' + sname = 'DOC_remin_zint_100m' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_lim_Cweight_avg_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_remin_zint_100m, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Fe Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_Fe_lim_surf' - units = '1' + lname = 'Vertical Integral of DOCr Remineralization' + sname = 'DOCr_remin_zint' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Fe_lim_surf(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOCr_remin_zint, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Fe Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_Fe_lim_Cweight_avg_100m' - units = '1' + lname = 'Vertical Integral of DOCr Remineralization, 0-100m' + sname = 'DOCr_remin_zint_100m' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Fe_lim_Cweight_avg_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOCr_remin_zint_100m, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - if (autotroph_settings(n)%silicifier) then - lname = trim(autotroph_settings(n)%lname) // ' SiO3 Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_SiO3_lim_surf' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO3_lim_surf(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' SiO3 Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_SiO3_lim_Cweight_avg_100m' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO3_lim_Cweight_avg_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - else - ind%SiO3_lim_surf(n) = -1 - ind%SiO3_lim_Cweight_avg_100m(n) = -1 + lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ctot' + sname = 'Jint_Ctot' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Jint_Ctot, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - if (autotroph_settings(n)%is_carbon_limited) then - lname = trim(autotroph_settings(n)%lname) // ' C Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_C_lim_surf' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%C_lim_surf(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' C Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_C_lim_Cweight_avg_100m' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%C_lim_Cweight_avg_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ntot' + sname = 'Jint_Ntot' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Jint_Ntot, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - lname = trim(autotroph_settings(n)%lname) // ' Light Limitation, Surface' - sname = trim(autotroph_settings(n)%sname) // '_light_lim_surf' - units = '1' + lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Ptot' + sname = 'Jint_Ptot' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%light_lim_surf(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Jint_Ptot, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Light Limitation, carbon biomass weighted average over 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_light_lim_Cweight_avg_100m' - units = '1' + lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Sitot' + sname = 'Jint_Sitot' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%light_lim_Cweight_avg_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Jint_Sitot, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' C Fixation Vertical Integral' - sname = 'photoC_' // trim(autotroph_settings(n)%sname) // '_zint' + lname = 'Vertical Integral of Conservative Subterms of Source Sink Term for Fetot' + sname = 'Jint_Fetot' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Jint_Fetot, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' C Fixation Vertical Integral, 0-100m' - sname = 'photoC_' // trim(autotroph_settings(n)%sname) // '_zint_100m' + ! Particulate 2D diags + lname = 'CaCO3 Flux Hitting Sea Floor' + sname = 'calcToFloor' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%calcToFloor, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' C Fixation from NO3 Vertical Integral' - sname = 'photoC_NO3_' // trim(autotroph_settings(n)%sname) // '_zint' + lname = 'CaCO3 Flux to Sediments' + sname = 'calcToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_NO3_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%calcToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then - lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation Vertical Integral' - sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_form_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - else - ind%CaCO3_form_zint(n) = -1 - end if - - if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then - lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation Vertical Integral, 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_form_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - else - ind%CaCO3_form_zint_100m(n) = -1 - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing Vertical Integral' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing Vertical Integral, 0-100m' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC Vertical Integral' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_poc_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC Vertical Integral, 0-100m' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_poc_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC Vertical Integral' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_doc_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC Vertical Integral, 0-100m' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_doc_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - do m=1, zooplankton_cnt - lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // & - trim(zooplankton_settings(m)%lname) // ' Vertical Integral' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // & - trim(zooplankton_settings(m)%sname) // '_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zoo_zint(n,m), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // & - trim(zooplankton_settings(m)%lname) // ' Vertical Integral, 0-100m' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // & - trim(zooplankton_settings(m)%sname) // '_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zoo_zint_100m(n,m), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - end do - - lname = trim(autotroph_settings(n)%lname) // ' Loss Vertical Integral' - sname = trim(autotroph_settings(n)%sname) // '_loss_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Loss Vertical Integral, 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_loss_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Loss to POC Vertical Integral' - sname = trim(autotroph_settings(n)%sname) // '_loss_poc_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_poc_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Loss to POC Vertical Integral, 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_loss_poc_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_poc_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC Vertical Integral' - sname = trim(autotroph_settings(n)%sname) // '_loss_doc_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_doc_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC Vertical Integral, 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_loss_doc_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_doc_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Aggregation Vertical Integral' - sname = trim(autotroph_settings(n)%sname) // '_agg_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_agg_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(autotroph_settings(n)%lname) // ' Aggregation Vertical Integral, 0-100m' - sname = trim(autotroph_settings(n)%sname) // '_agg_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_agg_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - end do - - lname = 'Total CaCO3 Formation Vertical Integral' - sname = 'CaCO3_form_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%tot_CaCO3_form_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Total CaCO3 Formation Vertical Integral, 0-100m' - sname = 'CaCO3_form_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%tot_CaCO3_form_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - ! Zooplankton 2D diags - if (.not.ind%lconstructed()) then - allocate(ind%zoo_loss_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_zint_150m(zooplankton_cnt)) - allocate(ind%zoo_loss_basal_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_basal_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_poc_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_poc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_doc_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_doc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_poc_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_poc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_doc_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_doc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_zoo_zint(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%zoo_graze_zoo_zint_100m(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%x_graze_zoo_zint(zooplankton_cnt)) - allocate(ind%x_graze_zoo_zint_100m(zooplankton_cnt)) - end if - do n = 1,zooplankton_cnt - lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral' - sname = trim(zooplankton_settings(n)%sname) // '_loss_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral, 0-100m' - sname = trim(zooplankton_settings(n)%sname) // '_loss_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral, 0-150m' - sname = trim(zooplankton_settings(n)%sname) // '_loss_zint_150m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_zint_150m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration Vertical Integral' - sname = trim(zooplankton_settings(n)%sname) // '_loss_basal_zint' + lname = 'CaCO3 Flux to Sediments, Alternative CO2' + sname = 'calcToSed_ALT_CO2' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_basal_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%calcToSed_ALT_CO2, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration Vertical Integral, 0-100m' - sname = trim(zooplankton_settings(n)%sname) // '_loss_basal_zint_100m' + lname = 'POC Flux Hitting Sea Floor' + sname = 'pocToFloor' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_basal_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%pocToFloor, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC Vertical Integral' - sname = trim(zooplankton_settings(n)%sname) // '_loss_poc_zint' + lname = 'POC Flux to Sediments' + sname = 'pocToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_poc_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%pocToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC Vertical Integral, 0-100m' - sname = trim(zooplankton_settings(n)%sname) // '_loss_poc_zint_100m' + lname = 'nitrogen burial Flux to Sediments' + sname = 'ponToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_poc_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ponToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC Vertical Integral' - sname = trim(zooplankton_settings(n)%sname) // '_loss_doc_zint' + lname = 'nitrogen loss in Sediments' + sname = 'SedDenitrif' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_doc_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SedDenitrif, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC Vertical Integral, 0-100m' - sname = trim(zooplankton_settings(n)%sname) // '_loss_doc_zint_100m' + lname = 'non-oxic,non-dentr remin in Sediments' + sname = 'OtherRemin' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_doc_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%OtherRemin, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing Vertical Integral' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zint' + lname = 'phosphorus Flux to Sediments' + sname = 'popToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%popToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing Vertical Integral, 0-100m' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zint_100m' + lname = 'biogenic Si Flux to Sediments' + sname = 'bsiToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%bsiToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to POC Vertical Integral' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc_zint' - units = unit_system%conc_flux_units + lname = 'dust Flux to Sediments' + sname = 'dustToSed' + write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_poc_zint(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%dustToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to POC Vertical Integral, 0-100m' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc_zint_100m' + lname = 'pFe Flux to Sediments' + sname = 'pfeToSed' units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_poc_zint_100m(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%pfeToSed, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to DOC Vertical Integral' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_doc_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + ! Autotroph 2D diags + do n=1,autotroph_cnt + lname = trim(autotroph_settings(n)%lname) // ' N Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_N_lim_surf' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%N_lim_surf(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to DOC Vertical Integral, 0-100m' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_doc_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' N Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_N_lim_Cweight_avg_100m' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%N_lim_Cweight_avg_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - do m=1, zooplankton_cnt - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to ' // & - trim(zooplankton_settings(m)%lname) // ' Vertical Integral' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // & - trim(zooplankton_settings(m)%sname) // '_zint' - units = unit_system%conc_flux_units + lname = trim(autotroph_settings(n)%lname) // ' P Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_P_lim_surf' + units = '1' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zoo_zint(n,m), marbl_status_log) + ind%P_lim_surf(n), marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing to ' // & - trim(zooplankton_settings(m)%lname) // ' Vertical Integral, 0-100m' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // & - trim(zooplankton_settings(m)%sname) // '_zint_100m' - units = unit_system%conc_flux_units + lname = trim(autotroph_settings(n)%lname) // ' P Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_P_lim_Cweight_avg_100m' + units = '1' vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zoo_zint_100m(n,m), marbl_status_log) + ind%P_lim_Cweight_avg_100m(n), marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - end do - lname = trim(zooplankton_settings(n)%lname) // ' Grazing Gain Vertical Integral' - sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) // '_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%x_graze_zoo_zint(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Fe Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_Fe_lim_surf' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Fe_lim_surf(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(zooplankton_settings(n)%lname) // ' Grazing Gain Vertical Integral, 0-100m' - sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) // '_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%x_graze_zoo_zint_100m(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - end do + lname = trim(autotroph_settings(n)%lname) // ' Fe Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_Fe_lim_Cweight_avg_100m' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Fe_lim_Cweight_avg_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - ! General 3D diags - lname = 'in situ temperature' - sname = 'insitu_temp' - units = 'degC' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%insitu_temp, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%silicifier) then + lname = trim(autotroph_settings(n)%lname) // ' SiO3 Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_SiO3_lim_surf' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO3_lim_surf(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Carbonate Ion Concentration' - sname = 'CO3' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CO3, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' SiO3 Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_SiO3_lim_Cweight_avg_100m' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO3_lim_Cweight_avg_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%SiO3_lim_surf(n) = -1 + ind%SiO3_lim_Cweight_avg_100m(n) = -1 + end if - lname = 'Bicarbonate Ion Concentration' - sname = 'HCO3' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%HCO3, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%is_carbon_limited) then + lname = trim(autotroph_settings(n)%lname) // ' C Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_C_lim_surf' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%C_lim_surf(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Carbonic Acid Concentration' - sname = 'H2CO3' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%H2CO3, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' C Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_C_lim_Cweight_avg_100m' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%C_lim_Cweight_avg_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end if - lname = 'pH' - sname = 'pH_3D' - units = '1' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ph_3D, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Light Limitation, Surface' + sname = trim(autotroph_settings(n)%sname) // '_light_lim_surf' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%light_lim_surf(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Carbonate Ion Concentration, Alternative CO2' - sname = 'CO3_ALT_CO2' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CO3_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Light Limitation, carbon biomass weighted average over 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_light_lim_Cweight_avg_100m' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%light_lim_Cweight_avg_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Bicarbonate Ion Concentration, Alternative CO2' - sname = 'HCO3_ALT_CO2' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%HCO3_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' C Fixation Vertical Integral' + sname = 'photoC_' // trim(autotroph_settings(n)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Carbonic Acid Concentration, Alternative CO2' - sname = 'H2CO3_ALT_CO2' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%H2CO3_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' C Fixation Vertical Integral, 0-100m' + sname = 'photoC_' // trim(autotroph_settings(n)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'pH, Alternative CO2' - sname = 'pH_3D_ALT_CO2' - units = '1' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ph_3D_ALT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' C Fixation from NO3 Vertical Integral' + sname = 'photoC_NO3_' // trim(autotroph_settings(n)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_NO3_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CO3 concentration at calcite saturation' - sname = 'co3_sat_calc' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%co3_sat_calc, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then + lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation Vertical Integral' + sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_form_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%CaCO3_form_zint(n) = -1 + end if - lname = 'CO3 concentration at aragonite saturation' - sname = 'co3_sat_arag' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%co3_sat_arag, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then + lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation Vertical Integral, 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_form_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%CaCO3_form_zint_100m(n) = -1 + end if - lname = 'Nitrification' - sname = 'NITRIF' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%NITRIF, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Grazing Vertical Integral' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Denitrification' - sname = 'DENITRIF' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DENITRIF, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Grazing Vertical Integral, 0-100m' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'O2 Production' - sname = 'O2_PRODUCTION' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2_PRODUCTION, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC Vertical Integral' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_poc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - if (lo2_consumption_scalef) then - lname = 'O2 Consumption Scale Factor' - sname = 'O2_CONSUMPTION_SCALEF' - units = '1' - vgrid = 'layer_avg' + lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC Vertical Integral, 0-100m' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_poc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC Vertical Integral' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_doc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC Vertical Integral, 0-100m' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_doc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + do m=1, zooplankton_cnt + lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // & + trim(zooplankton_settings(m)%lname) // ' Vertical Integral' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // & + trim(zooplankton_settings(m)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zoo_zint(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // & + trim(zooplankton_settings(m)%lname) // ' Vertical Integral, 0-100m' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // & + trim(zooplankton_settings(m)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zoo_zint_100m(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do + + lname = trim(autotroph_settings(n)%lname) // ' Loss Vertical Integral' + sname = trim(autotroph_settings(n)%sname) // '_loss_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Loss Vertical Integral, 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_loss_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Loss to POC Vertical Integral' + sname = trim(autotroph_settings(n)%sname) // '_loss_poc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_poc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Loss to POC Vertical Integral, 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_loss_poc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_poc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC Vertical Integral' + sname = trim(autotroph_settings(n)%sname) // '_loss_doc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_doc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC Vertical Integral, 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_loss_doc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_doc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Aggregation Vertical Integral' + sname = trim(autotroph_settings(n)%sname) // '_agg_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_agg_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Aggregation Vertical Integral, 0-100m' + sname = trim(autotroph_settings(n)%sname) // '_agg_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_agg_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do + + lname = 'Total CaCO3 Formation Vertical Integral' + sname = 'CaCO3_form_zint' + units = unit_system%conc_flux_units + vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2_CONSUMPTION_SCALEF, marbl_status_log) + ind%tot_CaCO3_form_zint, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - end if - lname = 'O2 Consumption' - sname = 'O2_CONSUMPTION' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%O2_CONSUMPTION, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total CaCO3 Formation Vertical Integral, 0-100m' + sname = 'CaCO3_form_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%tot_CaCO3_form_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Apparent O2 Utilization' - sname = 'AOU' - units = unit_system%conc_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%AOU, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + ! Zooplankton 2D diags + do n = 1,zooplankton_cnt + lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral' + sname = trim(zooplankton_settings(n)%sname) // '_loss_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'PAR Average over Model Cell' - sname = 'PAR_avg' - units = 'W/m^2' - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PAR_avg, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral, 0-100m' + sname = trim(zooplankton_settings(n)%sname) // '_loss_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total Autotroph Grazing' - sname = 'graze_auto_TOT' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_TOT, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral, 0-150m' + sname = trim(zooplankton_settings(n)%sname) // '_loss_zint_150m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_zint_150m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation' - sname = 'photoC_TOT' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_TOT, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration Vertical Integral' + sname = trim(zooplankton_settings(n)%sname) // '_loss_basal_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_basal_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total C Fixation from NO3' - sname = 'photoC_NO3_TOT' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_NO3_TOT, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration Vertical Integral, 0-100m' + sname = trim(zooplankton_settings(n)%sname) // '_loss_basal_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_basal_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DOC Production' - sname = 'DOC_prod' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_prod, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC Vertical Integral' + sname = trim(zooplankton_settings(n)%sname) // '_loss_poc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_poc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DOC Remineralization' - sname = 'DOC_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOC_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC Vertical Integral, 0-100m' + sname = trim(zooplankton_settings(n)%sname) // '_loss_poc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_poc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DOCr Remineralization' - sname = 'DOCr_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOCr_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC Vertical Integral' + sname = trim(zooplankton_settings(n)%sname) // '_loss_doc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_doc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DON Production' - sname = 'DON_prod' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DON_prod, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC Vertical Integral, 0-100m' + sname = trim(zooplankton_settings(n)%sname) // '_loss_doc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_doc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing Vertical Integral' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing Vertical Integral, 0-100m' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to POC Vertical Integral' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_poc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to POC Vertical Integral, 0-100m' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_poc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to DOC Vertical Integral' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_doc_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to DOC Vertical Integral, 0-100m' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_doc_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DON Remineralization' - sname = 'DON_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DON_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + do m=1, zooplankton_cnt + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to ' // & + trim(zooplankton_settings(m)%lname) // ' Vertical Integral' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // & + trim(zooplankton_settings(m)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zoo_zint(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DONr Remineralization' - sname = 'DONr_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DONr_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Grazing to ' // & + trim(zooplankton_settings(m)%lname) // ' Vertical Integral, 0-100m' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // & + trim(zooplankton_settings(m)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zoo_zint_100m(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do - lname = 'DOP Production' - sname = 'DOP_prod' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOP_prod, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Grazing Gain Vertical Integral' + sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) // '_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%x_graze_zoo_zint(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DOP Remineralization' - sname = 'DOP_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOP_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Grazing Gain Vertical Integral, 0-100m' + sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) // '_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%x_graze_zoo_zint_100m(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do - lname = 'DOPr Remineralization' - sname = 'DOPr_remin' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOPr_remin, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + ! General 3D diags + lname = 'in situ temperature' + sname = 'insitu_temp' + units = 'degC' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%insitu_temp, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'DOP loss, due to P budget balancing' - sname = 'DOP_loss_P_bal' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOP_loss_P_bal, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Carbonate Ion Concentration' + sname = 'CO3' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CO3, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Iron Scavenging' - sname = 'Fe_scavenge' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Fe_scavenge, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Bicarbonate Ion Concentration' + sname = 'HCO3' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%HCO3, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Iron Scavenging Rate' - sname = 'Fe_scavenge_rate' - units = '1/y' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Fe_scavenge_rate, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Carbonic Acid Concentration' + sname = 'H2CO3' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%H2CO3, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Production of Fe-binding Ligand' - sname = 'Lig_prod' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Lig_prod, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'pH' + sname = 'pH_3D' + units = '1' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ph_3D, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Loss of Fe-binding Ligand' - sname = 'Lig_loss' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Lig_loss, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Carbonate Ion Concentration, Alternative CO2' + sname = 'CO3_ALT_CO2' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CO3_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Loss of Fe-binding Ligand from Scavenging' - sname = 'Lig_scavenge' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Lig_scavenge, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Bicarbonate Ion Concentration, Alternative CO2' + sname = 'HCO3_ALT_CO2' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%HCO3_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Fe not bound to Ligand' - sname = 'Fefree' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Fefree, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Carbonic Acid Concentration, Alternative CO2' + sname = 'H2CO3_ALT_CO2' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%H2CO3_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Loss of Fe-binding Ligand from UV radiation' - sname = 'Lig_photochem' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Lig_photochem, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'pH, Alternative CO2' + sname = 'pH_3D_ALT_CO2' + units = '1' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ph_3D_ALT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Loss of Fe-binding Ligand from Bacterial Degradation' - sname = 'Lig_deg' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Lig_deg, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CO3 concentration at calcite saturation' + sname = 'co3_sat_calc' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%co3_sat_calc, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Iron Sediment Flux' - sname = 'FESEDFLUX' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%fesedflux, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CO3 concentration at aragonite saturation' + sname = 'co3_sat_arag' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%co3_sat_arag, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - ! Particulate 2D diags + lname = 'Nitrification' + sname = 'NITRIF' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%NITRIF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - write(particulate_flux_ref_depth_str, "(I0,A)") int(particulate_flux_ref_depth*unit_system%len2m), 'm' + lname = 'Denitrification' + sname = 'DENITRIF' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DENITRIF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC Flux at ' // trim(particulate_flux_ref_depth_str) - sname = 'POC_FLUX_' // trim(particulate_flux_ref_depth_str) - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'O2 Production' + sname = 'O2_PRODUCTION' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2_PRODUCTION, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POP Flux at ' // trim(particulate_flux_ref_depth_str) - sname = 'POP_FLUX_' // trim(particulate_flux_ref_depth_str) - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POP_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (lo2_consumption_scalef) then + lname = 'O2 Consumption Scale Factor' + sname = 'O2_CONSUMPTION_SCALEF' + units = '1' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2_CONSUMPTION_SCALEF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end if - lname = 'CaCO3 Flux at ' // trim(particulate_flux_ref_depth_str) - sname = 'CaCO3_FLUX_' // trim(particulate_flux_ref_depth_str) - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'O2 Consumption' + sname = 'O2_CONSUMPTION' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%O2_CONSUMPTION, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Apparent O2 Utilization' + sname = 'AOU' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%AOU, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'SiO2 Flux at ' // trim(particulate_flux_ref_depth_str) - sname = 'SiO2_FLUX_' // trim(particulate_flux_ref_depth_str) - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO2_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'PAR Average over Model Cell' + sname = 'PAR_avg' + units = 'W/m^2' + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PAR_avg, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'P_iron Flux at ' // trim(particulate_flux_ref_depth_str) - sname = 'P_iron_FLUX_' // trim(particulate_flux_ref_depth_str) - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_iron_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total Autotroph Grazing' + sname = 'graze_auto_TOT' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_TOT, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Production' - sname = 'POC_PROD_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_PROD_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation' + sname = 'photoC_TOT' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_TOT, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Production, 0-100m' - sname = 'POC_PROD_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_PROD_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Total C Fixation from NO3' + sname = 'photoC_NO3_TOT' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_NO3_TOT, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Remineralization routed to DOCr' - sname = 'POC_REMIN_DOCr_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DOCr_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOC Production' + sname = 'DOC_prod' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_prod, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Remineralization routed to DOCr, 0-100m' - sname = 'POC_REMIN_DOCr_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DOCr_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOC Remineralization' + sname = 'DOC_remin' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOC_remin, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Remineralization routed to DIC' - sname = 'POC_REMIN_DIC_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DIC_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOCr Remineralization' + sname = 'DOCr_remin' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOCr_remin, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of POC Remineralization routed to DIC, 0-100m' - sname = 'POC_REMIN_DIC_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DIC_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DON Production' + sname = 'DON_prod' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DON_prod, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of CaCO3 Production' - sname = 'CaCO3_PROD_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_PROD_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DON Remineralization' + sname = 'DON_remin' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DON_remin, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of CaCO3 Production, 0-100m' - sname = 'CaCO3_PROD_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_PROD_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DONr Remineralization' + sname = 'DONr_remin' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DONr_remin, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of CaCO3 Remineralization' - sname = 'CaCO3_REMIN_zint' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_REMIN_zint, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOP Production' + sname = 'DOP_prod' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOP_prod, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Vertical Integral of CaCO3 Remineralization, 0-100m' - sname = 'CaCO3_REMIN_zint_100m' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_REMIN_zint_100m, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOP Remineralization' + sname = 'DOP_remin' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOP_remin, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - ! Particulate 3D diags - if (lp_remin_scalef) then - lname = 'Particulate Remin Scale Factor' - sname = 'P_REMIN_SCALEF' - units = '1' + lname = 'DOPr Remineralization' + sname = 'DOPr_remin' + units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_REMIN_SCALEF, marbl_status_log) + ind%DOPr_remin, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - end if - lname = 'POC Flux into Cell' - sname = 'POC_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'DOP loss, due to P budget balancing' + sname = 'DOP_loss_P_bal' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOP_loss_P_bal, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC sFlux into Cell' - sname = 'POC_sFLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_sFLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Iron Scavenging' + sname = 'Fe_scavenge' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Fe_scavenge, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC hFlux into Cell' - sname = 'POC_hFLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_hFLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Iron Scavenging Rate' + sname = 'Fe_scavenge_rate' + units = '1/y' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Fe_scavenge_rate, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC Production' - sname = 'POC_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Production of Fe-binding Ligand' + sname = 'Lig_prod' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Lig_prod, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC Remineralization routed to DOCr' - sname = 'POC_REMIN_DOCr' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DOCr, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Loss of Fe-binding Ligand' + sname = 'Lig_loss' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Lig_loss, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POC Remineralization routed to DIC' - sname = 'POC_REMIN_DIC' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POC_REMIN_DIC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Loss of Fe-binding Ligand from Scavenging' + sname = 'Lig_scavenge' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Lig_scavenge, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POP Flux into Cell' - sname = 'POP_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POP_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Fe not bound to Ligand' + sname = 'Fefree' + units = unit_system%conc_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Fefree, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POP Production' - sname = 'POP_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POP_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Loss of Fe-binding Ligand from UV radiation' + sname = 'Lig_photochem' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Lig_photochem, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POP Remineralization routed to DOPr' - sname = 'POP_REMIN_DOPr' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POP_REMIN_DOPr, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Loss of Fe-binding Ligand from Bacterial Degradation' + sname = 'Lig_deg' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Lig_deg, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'POP Remineralization routed to PO4' - sname = 'POP_REMIN_PO4' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%POP_REMIN_PO4, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Iron Sediment Flux' + sname = 'FESEDFLUX' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%fesedflux, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'PON Remineralization routed to DONr' - sname = 'PON_REMIN_DONr' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PON_REMIN_DONr, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + ! Particulate 2D diags - lname = 'PON Remineralization routed to NH4' - sname = 'PON_REMIN_NH4' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PON_REMIN_NH4, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + write(particulate_flux_ref_depth_str, "(I0,A)") int(particulate_flux_ref_depth*unit_system%len2m), 'm' - lname = 'CaCO3 Flux into Cell' - sname = 'CaCO3_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'POC Flux at ' // trim(particulate_flux_ref_depth_str) + sname = 'POC_FLUX_' // trim(particulate_flux_ref_depth_str) + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CaCO3 Production' - sname = 'CaCO3_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'POP Flux at ' // trim(particulate_flux_ref_depth_str) + sname = 'POP_FLUX_' // trim(particulate_flux_ref_depth_str) + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POP_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CaCO3 Remineralization' - sname = 'CaCO3_REMIN' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_REMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CaCO3 Flux at ' // trim(particulate_flux_ref_depth_str) + sname = 'CaCO3_FLUX_' // trim(particulate_flux_ref_depth_str) + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CaCO3 Flux into Cell, Alternative CO2' - sname = 'CaCO3_ALT_CO2_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_ALT_CO2_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'SiO2 Flux at ' // trim(particulate_flux_ref_depth_str) + sname = 'SiO2_FLUX_' // trim(particulate_flux_ref_depth_str) + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO2_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CaCO3 Production, Alternative CO2' - sname = 'CaCO3_ALT_CO2_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_ALT_CO2_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'P_iron Flux at ' // trim(particulate_flux_ref_depth_str) + sname = 'P_iron_FLUX_' // trim(particulate_flux_ref_depth_str) + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%P_iron_FLUX_at_ref_depth, marbl_status_log, ref_depth=particulate_flux_ref_depth) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CaCO3 Remineralization, Alternative CO2' - sname = 'CaCO3_ALT_CO2_REMIN' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_ALT_CO2_REMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Production' + sname = 'POC_PROD_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_PROD_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'SiO2 Flux into Cell' - sname = 'SiO2_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO2_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Production, 0-100m' + sname = 'POC_PROD_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_PROD_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'SiO2 Production' - sname = 'SiO2_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO2_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Remineralization routed to DOCr' + sname = 'POC_REMIN_DOCr_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DOCr_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'SiO2 Remineralization' - sname = 'SiO2_REMIN' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SiO2_REMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Remineralization routed to DOCr, 0-100m' + sname = 'POC_REMIN_DOCr_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DOCr_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Dust Flux into Cell' - sname = 'dust_FLUX_IN' - write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%dust_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Remineralization routed to DIC' + sname = 'POC_REMIN_DIC_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DIC_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Dust Remineralization' - sname = 'dust_REMIN' - write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^3/s' - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%dust_REMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of POC Remineralization routed to DIC, 0-100m' + sname = 'POC_REMIN_DIC_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DIC_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'P_iron Flux into Cell' - sname = 'P_iron_FLUX_IN' - units = unit_system%conc_flux_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_iron_FLUX_IN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of CaCO3 Production' + sname = 'CaCO3_PROD_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_PROD_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'P_iron Production' - sname = 'P_iron_PROD' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_iron_PROD, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of CaCO3 Production, 0-100m' + sname = 'CaCO3_PROD_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_PROD_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Vertical Integral of CaCO3 Remineralization' + sname = 'CaCO3_REMIN_zint' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_REMIN_zint, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'P_iron Remineralization' - sname = 'P_iron_REMIN' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%P_iron_REMIN, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Vertical Integral of CaCO3 Remineralization, 0-100m' + sname = 'CaCO3_REMIN_zint_100m' + units = unit_system%conc_flux_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_REMIN_zint_100m, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - ! Autotroph 3D diags - if (.not.ind%lconstructed()) then - allocate(ind%Qp(autotroph_cnt)) - allocate(ind%photoC(autotroph_cnt)) - allocate(ind%photoC_NO3(autotroph_cnt)) - allocate(ind%photoFe(autotroph_cnt)) - allocate(ind%photoNO3(autotroph_cnt)) - allocate(ind%photoNH4(autotroph_cnt)) - allocate(ind%DOP_uptake(autotroph_cnt)) - allocate(ind%PO4_uptake(autotroph_cnt)) - allocate(ind%auto_graze(autotroph_cnt)) - allocate(ind%auto_graze_poc(autotroph_cnt)) - allocate(ind%auto_graze_doc(autotroph_cnt)) - allocate(ind%auto_graze_zootot(autotroph_cnt)) - allocate(ind%auto_graze_zoo(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_loss(autotroph_cnt)) - allocate(ind%auto_loss_poc(autotroph_cnt)) - allocate(ind%auto_loss_doc(autotroph_cnt)) - allocate(ind%auto_agg(autotroph_cnt)) - allocate(ind%bSi_form(autotroph_cnt)) - allocate(ind%CaCO3_form(autotroph_cnt)) - allocate(ind%Nfix(autotroph_cnt)) - end if - do n=1,autotroph_cnt - if (lvariable_PtoC) then - lname = trim(autotroph_settings(n)%lname) // ' P:C ratio' - sname = trim(autotroph_settings(n)%sname) // '_Qp' + ! Particulate 3D diags + if (lp_remin_scalef) then + lname = 'Particulate Remin Scale Factor' + sname = 'P_REMIN_SCALEF' units = '1' vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Qp(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%P_REMIN_SCALEF, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - else - ind%Qp(n) = -1 end if - lname = trim(autotroph_settings(n)%lname) // ' C Fixation' - sname = 'photoC_' // trim(autotroph_settings(n)%sname) + lname = 'POC Flux into Cell' + sname = 'POC_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_FLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'POC sFlux into Cell' + sname = 'POC_sFLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_sFLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'POC hFlux into Cell' + sname = 'POC_hFLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_hFLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'POC Production' + sname = 'POC_PROD' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_PROD, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' C Fixation from NO3' - sname = 'photoC_NO3_' // trim(autotroph_settings(n)%sname) + lname = 'POC Remineralization routed to DOCr' + sname = 'POC_REMIN_DOCr' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoC_NO3(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DOCr, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Fe Uptake' - sname = 'photoFe_' // trim(autotroph_settings(n)%sname) + lname = 'POC Remineralization routed to DIC' + sname = 'POC_REMIN_DIC' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoFe(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POC_REMIN_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'POP Flux into Cell' + sname = 'POP_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POP_FLUX_IN, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' NO3 Uptake' - sname = 'photoNO3_' // trim(autotroph_settings(n)%sname) + lname = 'POP Production' + sname = 'POP_PROD' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoNO3(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POP_PROD, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' NH4 Uptake' - sname = 'photoNH4_' // trim(autotroph_settings(n)%sname) + lname = 'POP Remineralization routed to DOPr' + sname = 'POP_REMIN_DOPr' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%photoNH4(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POP_REMIN_DOPr, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' DOP Uptake' - sname = 'DOP_' // trim(autotroph_settings(n)%sname) // '_uptake' + lname = 'POP Remineralization routed to PO4' + sname = 'POP_REMIN_PO4' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DOP_uptake(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%POP_REMIN_PO4, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' PO4 Uptake' - sname = 'PO4_' // trim(autotroph_settings(n)%sname) // '_uptake' + lname = 'PON Remineralization routed to DONr' + sname = 'PON_REMIN_DONr' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PO4_uptake(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PON_REMIN_DONr, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Grazing' - sname = 'graze_' // trim(autotroph_settings(n)%sname) + lname = 'PON Remineralization routed to NH4' + sname = 'PON_REMIN_NH4' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PON_REMIN_NH4, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'CaCO3 Flux into Cell' + sname = 'CaCO3_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_FLUX_IN, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc' + lname = 'CaCO3 Production' + sname = 'CaCO3_PROD' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_poc(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_PROD, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc' + lname = 'CaCO3 Remineralization' + sname = 'CaCO3_REMIN' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_doc(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_REMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'CaCO3 Flux into Cell, Alternative CO2' + sname = 'CaCO3_ALT_CO2_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_ALT_CO2_FLUX_IN, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(autotroph_settings(n)%lname) // ' Grazing to ZOO TOT' - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zootot' + lname = 'CaCO3 Production, Alternative CO2' + sname = 'CaCO3_ALT_CO2_PROD' units = unit_system%conc_tend_units vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zootot(n), marbl_status_log) + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_ALT_CO2_PROD, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - do m=1, zooplankton_cnt - lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // trim(zooplankton_settings(m)%lname) - sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // trim(zooplankton_settings(m)%sname) - units = unit_system%conc_tend_units + lname = 'CaCO3 Remineralization, Alternative CO2' + sname = 'CaCO3_ALT_CO2_REMIN' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_ALT_CO2_REMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'SiO2 Flux into Cell' + sname = 'SiO2_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO2_FLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'SiO2 Production' + sname = 'SiO2_PROD' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO2_PROD, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'SiO2 Remineralization' + sname = 'SiO2_REMIN' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SiO2_REMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Dust Flux into Cell' + sname = 'dust_FLUX_IN' + write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%dust_FLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Dust Remineralization' + sname = 'dust_REMIN' + write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^3/s' + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%dust_REMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'P_iron Flux into Cell' + sname = 'P_iron_FLUX_IN' + units = unit_system%conc_flux_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%P_iron_FLUX_IN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'P_iron Production' + sname = 'P_iron_PROD' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%P_iron_PROD, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'P_iron Remineralization' + sname = 'P_iron_REMIN' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%P_iron_REMIN, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + ! Autotroph 3D diags + do n=1,autotroph_cnt + if (lvariable_PtoC) then + lname = trim(autotroph_settings(n)%lname) // ' P:C ratio' + sname = trim(autotroph_settings(n)%sname) // '_Qp' + units = '1' vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_graze_zoo(n,m), marbl_status_log) + ind%Qp(n), marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - end do + else + ind%Qp(n) = -1 + end if + + lname = trim(autotroph_settings(n)%lname) // ' C Fixation' + sname = 'photoC_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' C Fixation from NO3' + sname = 'photoC_NO3_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoC_NO3(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' Fe Uptake' + sname = 'photoFe_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoFe(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' NO3 Uptake' + sname = 'photoNO3_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoNO3(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(autotroph_settings(n)%lname) // ' NH4 Uptake' + sname = 'photoNH4_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%photoNH4(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(autotroph_settings(n)%lname) // ' Loss' - sname = trim(autotroph_settings(n)%sname) // '_loss' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' DOP Uptake' + sname = 'DOP_' // trim(autotroph_settings(n)%sname) // '_uptake' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%DOP_uptake(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(autotroph_settings(n)%lname) // ' Loss to POC' - sname = trim(autotroph_settings(n)%sname) // '_loss_poc' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_poc(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' PO4 Uptake' + sname = 'PO4_' // trim(autotroph_settings(n)%sname) // '_uptake' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PO4_uptake(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC' - sname = trim(autotroph_settings(n)%sname) // '_loss_doc' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_loss_doc(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Grazing' + sname = 'graze_' // trim(autotroph_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(autotroph_settings(n)%lname) // ' Aggregation' - sname = trim(autotroph_settings(n)%sname) // '_agg' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%auto_agg(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Grazing to POC' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_poc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_poc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - if (autotroph_settings(n)%silicifier) then - lname = trim(autotroph_settings(n)%lname) // ' Si Uptake' - sname = trim(autotroph_settings(n)%sname) // '_bSi_form' + lname = trim(autotroph_settings(n)%lname) // ' Grazing to DOC' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_doc' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%bSi_form(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_doc(n), marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - else - ind%bSi_form(n) = -1 - end if - if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then - lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation' - sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form' + lname = trim(autotroph_settings(n)%lname) // ' Grazing to ZOO TOT' + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_zootot' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%CaCO3_form(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zootot(n), marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - else - ind%CaCO3_form(n) = -1 - end if - if (autotroph_settings(n)%Nfixer) then - lname = trim(autotroph_settings(n)%lname) // ' N Fixation' - sname = trim(autotroph_settings(n)%sname) // '_Nfix' + do m=1, zooplankton_cnt + lname = trim(autotroph_settings(n)%lname) // ' Grazing to ' // trim(zooplankton_settings(m)%lname) + sname = 'graze_' // trim(autotroph_settings(n)%sname) // '_' // trim(zooplankton_settings(m)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_graze_zoo(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do + + lname = trim(autotroph_settings(n)%lname) // ' Loss' + sname = trim(autotroph_settings(n)%sname) // '_loss' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%Nfix(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss(n), marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - else - ind%Nfix(n) = -1 - end if - end do ! end do-loop for autotroph_cnt + lname = trim(autotroph_settings(n)%lname) // ' Loss to POC' + sname = trim(autotroph_settings(n)%sname) // '_loss_poc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_poc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total Si Uptake' - sname = 'bSi_form' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%tot_bSi_form, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Loss to DOC' + sname = trim(autotroph_settings(n)%sname) // '_loss_doc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_loss_doc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total CaCO3 Formation' - sname = 'CaCO3_form' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%tot_CaCO3_form, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(autotroph_settings(n)%lname) // ' Aggregation' + sname = trim(autotroph_settings(n)%sname) // '_agg' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%auto_agg(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Total N Fixation' - sname = 'Nfix' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%tot_Nfix, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%silicifier) then + lname = trim(autotroph_settings(n)%lname) // ' Si Uptake' + sname = trim(autotroph_settings(n)%sname) // '_bSi_form' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%bSi_form(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%bSi_form(n) = -1 + end if - ! Zooplankton 3D diags - if (.not.ind%lconstructed()) then - allocate(ind%zoo_loss(zooplankton_cnt)) - allocate(ind%zoo_loss_basal(zooplankton_cnt)) - allocate(ind%zoo_loss_poc(zooplankton_cnt)) - allocate(ind%zoo_loss_doc(zooplankton_cnt)) - allocate(ind%zoo_graze(zooplankton_cnt)) - allocate(ind%zoo_graze_poc(zooplankton_cnt)) - allocate(ind%zoo_graze_doc(zooplankton_cnt)) - allocate(ind%zoo_graze_zootot(zooplankton_cnt)) - allocate(ind%zoo_graze_zoo(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%x_graze_zoo(zooplankton_cnt)) - end if - do n = 1,zooplankton_cnt - lname = trim(zooplankton_settings(n)%lname) // ' Loss' - sname = trim(zooplankton_settings(n)%sname) // '_loss' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%imp_calcifier .or. autotroph_settings(n)%exp_calcifier) then + lname = trim(autotroph_settings(n)%lname) // ' CaCO3 Formation' + sname = trim(autotroph_settings(n)%sname) // '_CaCO3_form' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%CaCO3_form(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%CaCO3_form(n) = -1 + end if - lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration' - sname = trim(zooplankton_settings(n)%sname) // '_loss_basal' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .true. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_basal(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (autotroph_settings(n)%Nfixer) then + lname = trim(autotroph_settings(n)%lname) // ' N Fixation' + sname = trim(autotroph_settings(n)%sname) // '_Nfix' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%Nfix(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + else + ind%Nfix(n) = -1 + end if - lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC' - sname = trim(zooplankton_settings(n)%sname) // '_loss_poc' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_poc(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + end do ! end do-loop for autotroph_cnt - lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC' - sname = trim(zooplankton_settings(n)%sname) // '_loss_doc' + lname = 'Total Si Uptake' + sname = 'bSi_form' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_loss_doc(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%tot_bSi_form, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' grazing loss' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) + lname = 'Total CaCO3 Formation' + sname = 'CaCO3_form' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%tot_CaCO3_form, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to POC' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc' + lname = 'Total N Fixation' + sname = 'Nfix' units = unit_system%conc_tend_units vgrid = 'layer_avg' truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_poc(n), marbl_status_log) + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%tot_Nfix, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return end if - lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to DOC' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_doc(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + ! Zooplankton 3D diags + do n = 1,zooplankton_cnt + lname = trim(zooplankton_settings(n)%lname) // ' Loss' + sname = trim(zooplankton_settings(n)%sname) // '_loss' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to ZOO TOT' - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zootot' - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zootot(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Basal Respiration' + sname = trim(zooplankton_settings(n)%sname) // '_loss_basal' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .true. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_basal(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - do m=1, zooplankton_cnt - lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to ' // trim(zooplankton_settings(m)%lname) - sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // trim(zooplankton_settings(m)%sname) - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%zoo_graze_zoo(n,m), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - end do + lname = trim(zooplankton_settings(n)%lname) // ' Loss to POC' + sname = trim(zooplankton_settings(n)%sname) // '_loss_poc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_poc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = trim(zooplankton_settings(n)%lname) // ' grazing gain' - sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) - units = unit_system%conc_tend_units - vgrid = 'layer_avg' - truncate = .not. lecovars_full_depth_tavg - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%x_graze_zoo(n), marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = trim(zooplankton_settings(n)%lname) // ' Loss to DOC' + sname = trim(zooplankton_settings(n)%sname) // '_loss_doc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_loss_doc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' grazing loss' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to POC' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_poc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_poc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to DOC' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_doc' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_doc(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to ZOO TOT' + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_zootot' + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zootot(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + do m=1, zooplankton_cnt + lname = trim(zooplankton_settings(n)%lname) // ' grazing loss to ' // trim(zooplankton_settings(m)%lname) + sname = 'graze_' // trim(zooplankton_settings(n)%sname) // '_' // trim(zooplankton_settings(m)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%zoo_graze_zoo(n,m), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end do + + lname = trim(zooplankton_settings(n)%lname) // ' grazing gain' + sname = 'x_graze_' // trim(zooplankton_settings(n)%sname) + units = unit_system%conc_tend_units + vgrid = 'layer_avg' + truncate = .not. lecovars_full_depth_tavg + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%x_graze_zoo(n), marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - end do + end do + end if !----------------------------------------------------------------- ! Abiotic DIC diagnostics @@ -3415,7 +3416,6 @@ subroutine marbl_diagnostics_surface_flux_share( & use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type use marbl_settings_mod, only : abio_dic_on - use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : lflux_gas_o2 use marbl_settings_mod, only : lflux_gas_co2 @@ -3460,6 +3460,7 @@ subroutine marbl_diagnostics_surface_flux_share( & end associate end subroutine marbl_diagnostics_surface_flux_share + !*********************************************************************** subroutine store_diagnostics_carbonate(marbl_domain, carbonate, & From fe8cca58ba1263a1e3625444555f3996c59436a7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 10:32:27 -0600 Subject: [PATCH 40/64] Update baselines to account for unit changes There was a change to the units of Fefree in the last commit, so the netcdf comparison script could not compare the field to the values in the baseline. The new baselines for the default test, ciso test, and 4p2z now have proper units. Also, the baseline for the abio test only contains the abio fields (the last commit changed what fields are written when base_biotic_on = .false.) and has been renamed to explicitly note that it is abio_only rather than both the abio and base biotic modules. --- MARBL_tools/run_test_suite.sh | 4 ++-- .../call_compute_subroutines.history.nc | Bin 634248 -> 634376 bytes .../call_compute_subroutines.history_4p2z.nc | Bin 773284 -> 773412 bytes ...l_compute_subroutines.history_with_abio.nc | Bin 215128 -> 0 bytes ...pute_subroutines.history_with_abio_only.nc | Bin 0 -> 26448 bytes ...l_compute_subroutines.history_with_ciso.nc | Bin 871988 -> 872116 bytes 6 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 tests/input_files/baselines/call_compute_subroutines.history_with_abio.nc create mode 100644 tests/input_files/baselines/call_compute_subroutines.history_with_abio_only.nc diff --git a/MARBL_tools/run_test_suite.sh b/MARBL_tools/run_test_suite.sh index 439bb306..db9ad472 100755 --- a/MARBL_tools/run_test_suite.sh +++ b/MARBL_tools/run_test_suite.sh @@ -220,7 +220,7 @@ if [ "${STATUS}" == "PASS" ]; then cd ${MARBL_ROOT}/MARBL_tools BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines - (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) + (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio_only.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (cgs, with abio) vs baseline (cgs, with abio))" >> ${RESULTS_CACHE} @@ -240,7 +240,7 @@ if [ "${STATUS}" == "PASS" ]; then cd ${MARBL_ROOT}/MARBL_tools BASE_ROOT=${MARBL_ROOT}/tests/input_files/baselines HIST_ROOT=${MARBL_ROOT}/tests/regression_tests/call_compute_subroutines - (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) + (set -x ; ./netcdf_comparison.py -b ${BASE_ROOT}/call_compute_subroutines.history_with_abio_only.nc -n ${HIST_ROOT}/history_1inst.nc --strict loose) STATUS=$(check_return $?) print_status "netCDF Comparison (1 inst (mks, with abio) vs baseline (cgs, with abio))" >> ${RESULTS_CACHE} fi diff --git a/tests/input_files/baselines/call_compute_subroutines.history.nc b/tests/input_files/baselines/call_compute_subroutines.history.nc index 7b9d080357704c23368977240c6f56ba24d5a2a1..bbf018e1383b30b0c95d5fb68bfb80000c7c0afb 100644 GIT binary patch delta 13310 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 WZnXAlrX1e5i78Gcm%K`o=6?eazJzB0 delta 13125 zcmeHucT`l%w~4ZIpd?X}WRR$!c6B!?UHhxr70$++ao;lI zo~5LQ66GHXqfF2+%3XhyPsj?BY3qVR)<;CGF$s-YXR;zBDrR#GilW4n5^AH|HHQbx zSn%&#;#e~&YZL?~QkG~pFc|V*2}bA%@SwyfR(TsRiA4j-xxhq*GE@k(BmE(1z@!h! zhGbFt$ex`HOhu@U?aCQ4#Uy&Nzl##8jTw#-*<*ldI5J|nYUz+l6LCb$dg9jn6|15` zkYqp)IRZyuDnacmcc48PIjQI(JyRZXB_&m{H(I0ajNfZfTr^i>0hyUY8kq7%Q-+pM z(WrZ9CNM8Tt2B#&c^l&J2=t;#-hPUQe6{i@4|HD(Q9&qLTM9;JAdXHc7+r^|bq<2j zU1;twnoOelaGFfm+2Lo%++^t1P_f8OuMt?t&>Ou5V9}0b`Yphs4+R+Lv}qDiO7rlme@26l5v| zRvl=-bT6h3RWMSmJAq9GnqspT*wmq38&c{*&9*f}YPj7! zB6W&=Es@%9-$bO=IkW&<8Hyfr64bslP7)>twgH+*h@s})3N)Rl^oXy>=V%x_XduAHF0uyOf+hZ&_}uBCm^v$ zB(U#5%^nTFegH*}KSPAOO{gWppH65Z3n`me3>=COpMMcJkcEWB>JGic#E3s4g4YL% ziBba;$hSwIU_4pcXh9j#%M)HBdb@>t!I%t`D(VDd>QI0uDRrUmo;Qfzj!88{Z~WvY zqSs>zP4xCnsRE8NR5Y~#IJP6-X$1NTyjqFeHm{>Z?t1T5BG=95Byf_TKA&^INsi>x ztAJBC3Yu}0$Q|Ze%XK1t=`ns0aeBz#&kgC#3@7pvXC490B#`}10_SS<#_u3-?m$KU zjlg*TiN(xH_ld6&!ELk3h~S{vSAk0ra+D0&eS#BPfjrEeCW25vG` zx1PNl4In%bDQ{{7Yr9eNCT3>V z$4Wt}45@FfC7kBXM+ql7t^ml|kn$EpI7M5E!O=wI7GDLLyV3pl62ghyDh1bMh_|hT za1L!_HljE|3SPIN-h};xBS|a(KNHdDq+-DCMr}!DgcFop01RcQKbhf3QvUHRwE&E3 zLuXS<2q$QJDey@wNIL>%ccZ#AOeo&zQm{gXy3;E-M4S@GHzExAUvffC8R2Ba(K{MI zQXA^p5rQ<+-9eTKTA$enb|xbGtVXb>8$HcpTuscDf;t(}&mqu`>T-%fT_5tzEny;q z{1lB7>bp^V!5I<-B6N*J0dFT01#LS|f`&vCU)TT| zs*#iQG-&8R{nBF4Fn}bOIRNd8iou^Gj*1W&VacvqvOMa=N5ErpDixQI^ZyibkHN z98ui?b=0-r4^+vKb#)mr(q7G62kQ@%g411S*gOYWHs}_ z!vQo3nvY4r$|5xPcqv#<{65Zbb~cuRbTSUjxOtPt zgtJP%7gTg1-iZpv%@YSfV-X5Ec@VS?AoV6hII^Zv&?!fvW`@(<%y42A#o!$or-ivG zD_cqdRfMLr9t5fbsIQe-yX>~TV5A&5ovPsI6VaNC=!DZ#kn!mNhJJc47~h4A&M?y} zKT`#K$&hEOz&s-DPi7hAe;xthauj}!EJ?w6W;QC%?**w{$h)1PJZ&!pxCo_QAe(Cd z>0e}&$uH)Dqhu8?G0}4W60-mqmrKDlGJ{u`1!%ug3VO&4UOfn251?V!Y6z$8+7a+m zj-or5D|+hFZqghk2zbms zV)|CxiUB@yq<@=KKE9*W0s(M0p_PyIKE3 zb!-u8zuO3s22kQ(O~gI^y^~<491YxK+&gstC@~uJph2~+i;S#A&cVqA_a~wS57!g- zEl zv&cEr{xXl8Bmu87)fTo9y2|uGKYv#g{M8W|z4ikOd(o=bS>z5Ic%2DWRio551UeA! zZ5}xgWN(wz5+wg3dAkwP7_|7E7dJsp>R5i>Za7en950%$IOyG5b@c0!|$ z{V{>K)&6nIKaVKDyjickv`3ph`GZp(sQpuxDsycUOH+I%qw??Lk=@@sz4nCRgOk9iXKb@y5zCR013u#S!Dgyzh?p)IV$>|25h>K$&V~X=8sIk zmm!aznOuH5<1w?%nc4gDa|yXv=lzaUva>{u24)RP`ttp@-rHXDJl*uFT$58 zY8zNNfPDd}4#1ZIsos!?y;-DsTQ_cJQ7M!N`zn*xaC}*rN(TAuSgb;2QP%jr3aJ(2 zB}1q*P+5nc4k3McIGjytJ#a6Z^regNDh`#V*2cs$S;3fSF%t{ej!XGcCODQ$m=_bJ zs${Sm-8fN|Fga2+VkR7?s*$$m?O0u%*m>TECF)c<8BAY;RDZ3*G7ZA{+J#MqlHMM; zawzGgUWBbRsW>(DHfA*DnK${L(e7#fGnzGzP>mCD9gk3rtFe<7vB<%4t$(z6Xj2=3 ziv-tclh%oS*hz;N7UN?&)D|ihI}IcD{krh6VMMtH77ZtjLHO)&VllW4`|1))Citc< zm7wbVud(BPkDaAQ`GfV<_`V(?a&WjlAv)nV`cx)Jm*7|fVph_JzZ;NI^l_{qX^q9- z4M}Z97fu{O76nb@J^nov`%^?NPT11{KdelRb5fO-+)zkVdtRmH8&a)wQ7;w9 zB{Mnjfk8eU@QpzMEmsD{M$~<}%Y?yTdVmkU7%$uiWyk!}mOrb673N>7mwr73E54Vh z+LkrLiq(hfeFM+Kz2ozx?^U#6xxMAt6PJ!dnS1h)gp=m5^u5iv8B?FZJ%0){KA$#& zyB{oXeOsXmcbnN#M_qfRg)C!k9Nab6R_B^&AC6uM^nB(++_L+8!l@RB*Q}dxaceuo zW+js89br|7L9Bhk*q|lsHtr)uQw;G%iA8sf zI>c?VmF~h75bvE@;iG*Q;y4G>h3U@NIuKYTJcCmAPMyotWmx!)FZ#>l5-e;=-gY5P z0~T&lE7Pc13Jb>!R{cy@hC834-AnC$!kxRU{&t)$hCBT{%0ripfIC&%ek?mQ4WiQ{ zrUojng(%IZ^`O~jh~^2@7r*!lk?mZ&wioXq8sf3%^Zrg)(A(i^dzl3bI)Wch#a9CX zcYHi7D6PC$xz`*PY)#Ew$-W2+=5}ZGJnn@BR(8iGxQ>DOe`oF}e9!>%PaZvTxA||F zAE6txV!Ar!1rg z{j2Zn`QPwX&s(?~w=vBHP-$tbPjc}rs1kCNmu~P3sug(`Oj)}R_mO658|DN9E3Fi$ z$JSfoZ)X8@cR!z?@pcf4f`PF?H`Fv_ zpgeKna$pr40cDY=7nhn}fwG(jUbrqD%0xCpjdgdyvWf3)v5^e!`MCDe+}d++ciRD* zsck=CNu~FD$$>R`D};wR}WxO=2y)-(oYa)H2Y~6)H)1RY90FSNoE(o8kspc0lIwG6j~08A~S z1O5P-fZHS*`#vXb7cH z`A4^CO!$WfF6`GLhjy29>r!T7k1*h<^|#0}tSKuldxvQB0;R!m>_i+JMk2sOqk+JdH;gT5{qEQP^(mb(`Xk_-LD}DxzA|p9Bb<*1|(TMx0>`((ek>Q|Q z@AJ{NB17K$Evqy;L~|YwWg^V^Q~&w=?LUM$iIkB^NslmRh;iA2h$>-rz-Gy4Cyp?yYP;XBVQIK7 zk}SRp?uZ2LKDolATan9W=~xL9UuT-Jo>dDIRaN7+9Xc=E7MZmorFyh5{>kdIin+6e zThhfrj71LP2i_WC@k$bRhj92x5I9RD?02KG-S__x z4vuyVOZhuS_$z*$bNsvuB4C+#D90dFq&#cIiKuzXq9M@X?96+sMBJIfBhKo1iqw62 zVsx~VMH*RaPw_^Vh%}N6nj56Uu>L9_ga`G__S_P~OPKuPB54MdTbQQ5q z8j4c~u8CMeGu~U5b}S>!nRZs=+%f6WwrFZA{GntNFI zZMLk(P1{U3$XmDW;&}_A^fMf)l}KiW-gsl8N;bP*7T0a_@`=PD}=RT4iuzY}GWgJFRg12jA)9%U^JH zGO)5~f@9N*N5{qdfMbV0FY%oF8oE{YOlE7PLbpkAv&K#s3SFPFS;jLx@BlGtx(B)> z`MtRvVFO*JrMJbsi-Iod9QU|CBcb#4DM`0K9K;?e#Ld$kWM}y*kb<5xszo+Z>y3T=3ynTub@&RYMGIo2cpCRpD?a)&M-)#n5&y@9T5$+_7=2k7!^_sGnW>ColH z?5__?jzO36!XzoKN(EY6QYpSVbY5FIZc8O=a2a#96IGSidONV1r4AiF&Hk+V*&aHy zclY`#`9KHMc}ux^06NTWjt|`Y6*_R!e}(Ql5A9EKmW|akhxUuxqn^!chIV&#+n>GC zfp$8ZT68Vdp-o@^--?H?uxvZoUw5&b48m=IqrUDdp7y2Ze+-*de0;nxNSfn@#cAXj z^NC-jWnXRib`t-?Qoeq1zkg1|8+sZLd%Am@tSl(#TfY$#009I(ksmo!>Bg zQD^7nLVkTkLTFG{2X0RTjy7EWp`*?z9uH0UHAhEW@nR414<3Jge)g0M{((csX1{)C z!6zRv@4hZLiA~bU95iAP0j(&$jN0-xYwl`(nbxl$`En_aP6r9j>!G>k%>8>$pM#cP zPnxqfy?}P6I}A1*8-Pyk7nfUa+yPx`DrcN)xC+O%i8o!VR>me7M2QI;|95Xx)ZG`* z#R$A zM7_}NU|d_VUn{ij8o4*4{vEVs#dpn@jD$9}*ZYU0&V$x7MI$#B9D`O7(#m0%9H8ZT zPMqyNZ)mY=cZK~A1V>9Ui%a}Hq4_q}GRLc@p_w#ds$aA+G%Y)~DsATmXmU6*ssg@+ z#>Le?!wZt&DAhv;M1}?)(CFY9AB~=saKxC44P#zpu>FA?CID~pj*PQ@S+FC(EHLmv_7rQ#4+V%UobjwHVbeU|~7NNRQ%)UvjzCyK^ zo=L;v`-N(q!-5uFG#08gbDrzTG=yqZ#Zxm>9C0-1PCdpMmx;GsxZ^SqY84APO(rR8 z<4+1XE9!g#hs9x&D`efUaLAIO`f-oP;*KLAmTtQO^4Qb}T6_zTFCRNx_mE7&Da?69 z)RT|vM<9&y#ga!veJgH%MAUo1mDULddiE*9G_~Y#H;v%m>SMbBW>eQOub1$9adYPADYfN57lQQNFW$95Du=P+D<4^QZmOCj`4`n%OVOVW{;krRMAD$iV z6m?y<@wYzSZ~&R%o_r##z(GBKNFfM_q$HHVkI=at#&|iZmrPt z;Bn>5^faMqa?lHRwyn@~$*`lrUB85;?jB3x5@PoVO?5&ozrTJgH0kq8P2mWHCRYxv zG_nX2n$%4FaJIcqXp(+8^Yx-7LX+iAk{WPaXfnahysvhx&_px3Wbq3hq4AlZwzEdV zg~q|QL!n| z%p5Kg4tL)){+#`Mq0W6BU6Ivxq4vgi&(G}Y7i#f_+#U8R@^{=P+ObI7d(b>rR=P6v znl5r@J))@VbnJKrm(l?fNu+4C35Kn`ME#Oiyw0I>ekjrg@?`Do&``o{cmak{+*B$>^u(_#x;%3)%g18A$ ze-2301zWu9H}y?R5X3Lq*K+rGvS8~*kG@~)#DZ-v{c0AXBI9WcCqHLDtMFgOHM8g6so$jFCbD+>lkiY$Po%N;%0!hNG z#^u|V2=Wz%u6%z=P`s)Cg`z@4%d%ORN?-}Hyb45epOu2_#v=xzS&Ia@!g*tzuLKG5 z-X+`ke=-+HUSAivjq4EDL_ht+0 z9YKO^pY9(uPo5!2_;jRiTvNOtaa&`p63`JOaV+bTGT#W2GUj{T?93J<4c6Q;c(P8A z92g$*F66o(`Ed73QMaiexo3HSrTuh4it?(+cb20BDcTF)l{XXQ2{H`8LP3f~!kE2y zXaVa0cTn(`Z1K*GN9%rnS>eq)Sppv}tp3YD<}x%I?kk1*^K?{Tg=xzS!wDL&JfJ6N z>l+;?^YuS9eRd-(8&Xwh{qh*xbIF@0YRvslnyXZumOAF2TxI33?@X?8nL~Q>?+=>* zDa*^$5*BSq@8^zCg7{=`r`ClMh_kFihHIEY+&=!{hLLY^o0O%;%^^w1FV0CTN8oNL z%PL_hNkTqxsJ?1Rl8_=THp`JDA-5<0`SLtTLTa3m+sqgtlO*IRyYZeUnIvR1m7T{VAs-7oCooA!^HO?{NkY2oXOu8W$jUhe zPnjg7yXqAQlZ5Q?S$;u#Yj^w)B_gxpUyfuFk;j%u=v^#5=LsbBcx};f-w7o3 zxaiTdpIb@l@!sh93L}zwbO}2@I*>^{=1Uga{kzm-Fg7S=`7PWI_ZnaLqg;3r%C2YH zDaFZQ*_Y{OZj8}{rK?^J^DbWt_prA&e!6Z3OKwGO-d!^T7B_Fd9gd`ll?0gd$@&7F0n1sKU zuymm8*}9Hl7DF3pO0@`YRUZo^<$bm2v>)7v~R@fAfaY6VgepM3FzL3M z^W6PPuXitlyGDkYeo5xTT^84b4cBHt zsh@svYP0|re%}|QyVMHqDlN&qKW8`GnH?^(*k20^BcfxjeG=d{VqQxZW;<<9vs2p% ztFtX;ZOVK6`_m|3AL|Q`>ZQevzg9bEj*l&y;$>1Ei!&13bo4QF$#xuyJ#l8#sf139teF=g_5L>~qTZ#IKD zw9^s>V`<5X-`KZ?!3bI$%kWqMh?@v4JXOK%v>KIg^`%W;pgchG+`nk}& z+f2EWj((&f^q`)n*Xa$R>-5;^W2sTtVF-C?E2>Q}#6r>KpFcPWU9bkj6Hqrs8l0-jR$G+l%^& zJJQ(h)Emr6XFF1V(;fuW$Ez#WkCN^0yXmUPGxYS>+2gIq_jXA;08NluS=cM`>pgsyK66pzXKeXo=8=bGh;7A{DI`7(&-3;>;SR*sOQ==k>Q!F+EQE@j zh@6qV3W*~7;ZyeHns!BY&?ff}>_>{MSB-&Nvqg%mh#-Nj$~;A8^W4vYdyEu2KB-RB ze7;nXQ6es^o61q7j~7oeo%L0*{hVaapAXa(sbk6iI#FRc%1li}x=S{yK4kIp1sB8IB2NUi_<=$D)4>v1yO>4=IhcT}wW|!Vfh7qmb zvu|676{~L6uWsHppeUN=?eXDTfa1~I?qxU6XDd41ObrxOod4&EAT1;_bqYHbvh}#r z6+zcjbiy7+VlgS2?o}j=*=3e`dbT1da%9BB*aeE@){osP2dfk*S3chFntl*x6tb-n zDivveiUux?I<80)@BLdd^r2$=(h?Q^g?L43c-80riQy^|m2tx4v6B_sYF)Eu!w$vP)jrEb3vVdm6v0paPOw(Qx_d90 z)VfBo;RPo@*iK&&b4Tgo>CO*|b?OD%yzm$)o10LeSQBWs{QSiGij|+$xiLFsipanM zL4~TlBBE!0!oz?LMdX2>2YG+}RIJ*Wdrd9-j3UbDkIkL0-zlQ&d#5d#>8)7nW@Pxq zI#vVw z^J6Owm#RKRaCc}!*_V*%zmL{#DVbJd%)@Letw+!)mzFH;JOmv)mhbB8GQ-}O?WMJn zf7@!TUC6jfzI^ZT-aph5u?(|~4dnc1Y3pZOrF!stP0npw-QLE3|NXJ7rDxnd{x|93 zQoBqg{@38Uwj*}0UkocngCM;t=c=^9)?L}Pqz$&bii%veO#yY z_`=P*uH0ELr2~t0vGojA!xbkrM~$A*4TBdIj(wIE0~akz%|AK*DtXtCtuz$|JsbQ+ zHV+J$+44Q;7!6lUO$;*`6vNPlsaFqr%V1bz!WnB7ISgOaGyUdG84RybJPMn0A4Vv3 z`%O{ez^%fXV~JOP!ZeHTU2FUYV7k}mSu2{zt@m`q_sLmRFr}!}W5pILnDx_ngOpU`Lk=P+r*o#aU_SK-Fx`RTy90agaS zD47@v{yB%RteCAw?V{zy?DV0gN(x=&g;VWbD=AEd_KJ^|%M|7@{n(DyR8GOG!t=i&ww)RgREK#oekLFY+r3(Ew4ngO;dq+SKU84{SEc z2>;(&BD1rFb{fffp-qjW^_>_DXq?QzGu%6mvw$L>uJbuolp!5HpA)7{65So)q;?Lr zj^G$m@z|Sz(R6qO$6uR@!SXGn@i^wiliGILDV`IhO?A_@!8aN~5AwD!N}yN)0Melu9D(*d!H_B%;zm zO+~pSL?I+0atR^#@a&`S?|I(*f3N?KH_P5oR>Ly`!P_qqbLw$ zAZ=hae!PvZzrjBd-oEnSuoVUYVG#yC-jV(WKEYw~U|$0{dEg&m5FlF><&QoHbx}N+ zN=3?18890<($&`GzZjq&U;)TN*3_)2Q!VA8VUgiM{t?8TLxg{1?b#{TNUcV zviKj#MfOFFMCUnkDY-WKMy;phVid*MM#=qQRyiRr)%Db>Sk$hX4DwJA?+|D}0{$V;gHH0Z zsnz<(L2Wm++6ui?D^y)A>({Rz-@zKaQ=5XW3A{+nMCuq+qB`|`paXgJPo>rfP*?v< zYKTC0!R4R%v&tx(j+gVb6X(jS#W z_*9NMM)(Ac-ly6@xT^X@2BWxX-(t)V^4q6e zpyIg5X=*(cCqf1$cd0lh^v&cF6&H(YOq&S#jA=&*dGU0HknfpZq8hJH;tnEl55(#q z@eJ`!^AIZD3dzh%sCXGNm{ChI(J`Z#WFli`1*xpVtW0VHsqCzJ!3I-eI>0a3Tkh$A z`a4fSpTwU04IX52C_9O293^NUOe8fopmRtnYUrCJ7273;NGeP%Zc`hDNY(NnwNZ+S zEXhcY;%6Ttv_*3&2W9X_v=&=y)(E47k{ zgHe&q;GH)4R3aA@*xaTPMJRUu1uD@AS=ip75@V5u^ax>pMp{bP%N7(9_WE|`s7?B) z#qI>P$qJ>|laUNrIUFN|yB!!pxL{!pA#A$}i<>~vPUjw?!4`n|!0)D{6M2zfwlF-3{X^QkQ!NF=*Q2y;V=`9;Le zpwH<^=i$hHu@LCVIp)OHV4m)J!3?b%dKR;_E&H9|+2Tutb7B-c|rgy>{S zIkiKIf;L~EcF2(^wU*H7PQ6L!)NEntB&OX^-l@%I6kGHMx+rWbqr6j0#v}hTRzh)` zRguHCbJR{hBuH-}MBCFJ6QVWSs|nHg9rYCABI(W&3W;{2DhfHF8dk)j_>5ZBJl1un zeI@#N9`7()&up_ZYe4_xRcr~ zN8&^Kh(gPuZ0e{fippb;+QEn8NWu0TE}HW>jYnsytgxeQ-kZ zb1W%QMJC17Mpr6!Q|fZ$Rf);M`Bu4)ESwC*KC*C(t1_wn+Nhzbkm^qweRVn2-wzqr z)RN`VQ*)Czs5@UvmPg8k8`Jc*|lq^t!fw|*zJP=-ve z6%z*?*G^D=B9zfkOl+*K7ZaPF>)BMi6lL7N#71;8n?eHAaPu6MB||BV?D-?URjyY2 zH>hK<{Zvm9)C3vd_9PCr-^Rp&QByW`O^U8Gu@1bNGpRNK>TNzqb;?lg9Tv6tZZ`Ep zgj(++ViSHZhuCPe6jC};RN2C|5s&-X)Hq^8#8er|dceM>SUfyP%@v`JhnU#JwjLrj z29FL>-cnTe=oqmHZ!4$d0%Y{Kgjy#C;rINQzpX z?jttxXZcjM0O@z^rmo0PSw{}BaeAIjJrtpy=d4Y}3l^Jc=Wgn&6g6}nV&l9#NbvS`BbF{2|u&N zYW~c&mb5SB{1z!$06fx=W03J16BPH=gV?uzJxIL~p!jbGsU8^;erNMu^F5nV5h1T1 zY!1KuU}I+eJVA|?B5CgtV$;)`PfZt~tY7(*gfzpRff-S0O5ySxgej~FWRjHj({{=pae)XELA3^XQlX? zGC;&MO$B6A4FW7u1>2}QGF+)jv>LD%50p?ZMOd3p!lmIFR&-&R8nNX{@nFHLjdz42%1N%S!ACse?4qb@1>3pnx(F;VT3F`jBe?QhltUNsR2JxK5LxD#EgX zAYaW#K#bJ?o{RXD4w#M|wLl=XoS@Mnff{hQHnCYR!oop-yo=%1L73eS1jPP5yfy5sP4Ugaz#LDQ2GsC2J>aK& zRYa5rV2?>e(cXZ}(nCQgiBmL`MDN00`rrihT#7Y@feM1SVHmhgeG}l^;UpPAhNUA2 zng*<40Lm$C!qxy(sHPEz8dmlWeUWNMf>`3mViYLh8B1AUR`zzdcr=)g=Z*$G#Am^1 zLU4`%dk8@lC6!@)Lr_h8wi<$Ro+pb=BQksrt~LTQQ0#aCZXW{z2|nwwBpqG5jX(*1 zE$ddBeIdk}lYth#X$1BVzd_>&^lbt>cs%isWw>EHASVuvoj`_#B5W-Bo6nb`zdW-h z5(bx~*lE(=>Z(pASniX2P9}MMD#MA!e=%82AzGhBxOWN}rs2w|Af0fNnt)VFRU5aM zkY%JP$3doG3%{9QQkw5+M~bj=4w#HZ(||qb#j(?fuFwOkP6t~+CC*?)2R1MxmS$G? zq!~z1W_z#Fe6;Yo9-izChT;|GV6I97ndI16<2Dm85qFvcduqN2o6i8r1V+sakf2&d z6sUjv`{BnXK!n%K1TNH4ZQM8$Y*Y)7_hFF+2eMcu;VrX(wQ3gYk)8TuN?fXn|H5+> zgY{Ij2W}CAwW@66rR=Bv>oOSv2LiPPf>f0>tG^zR_f^c{y z<8((bhQmvf;Vzo+Yrs(waFEIoVSNj-;c}dCr3Kk&W!TFS#84&LxYZJ@=9RFoFC0s$ zZ6AZ=*}w{9;fC2{r}kp6IV3?Bg}8eT$#^1;w<5$lu0s`E|2?yB`s5Y^<+l~-u#qst8n}-++9LThXAI@+f80)aXLNXmD#6=5< zuP`YVEh0>caM>cTk=iK0=8j}~qbWY)2ogvLu@gw<_x!DdXJoj;-`XPk7ImEFL}+DM zlR}JG48~Hs^s)6~5+^$rH!dcqTCsyOaa6#?jn2gJDL?GwLgLinRu}TL3wyYd**Yn1 zcO_wpu-_6ws2R5}A+z^Pv7Z~!&A?r5M7I*l+==7Y`nboPc>ENLXvLEhVN_?bY*)rm>3wJLgG>1rWtS5OoM84aLcx=WgUc{Bi6l-`BTagFe?oFmE z@n9dKEYZh#K15k!g^heks`7A|FBvZ4Vsk&Th8Br%nICbThRyx|ZpkbD#K>P8I|Y#R zuaM)80AkdP!vl#@FYXB>Pd9kr_#mQOi8X>rpboqznCNDZ03m$=Lda|b7B45dN668( zoam-uR~eZt!|gJndrljNhY}REa@-S2o@U|1737GiV@$)q3@+Xz2lk9C5)1~oYZZuM zq^p1?cc3k)7x^bPkN+!Y{m8{((Lh(#qHp*NZ;J*7Lu&qxD!#<`%_evE$=Y~)IU3Nw zfl-bD{s6Qwvb7+L0?TphIxrUOV7Ti+G7lWVX~|@`9hW7OYV5|M6f%lpoKgT*1xIn$ zb}}?!w08hqK!&27e}_&x$+-%iFqH_H8G%VmPX&lGBvSqa*zu`nj!fMfFkFes^v50D z#OqSV;{&+Fp;9g~!q4o3QcK3_2VjPR@l5X^%3htU5$R|OPtl;w%y+KR2~eiTogN$2 z`Slh(Dq-}Yh7~(#J_i6qRC!Cv%f8&Rep0UNB1+Jxxbgi`n+?++%eQxaE}pdMd0zb*JbyCMx9?6BY;A7l)*-&*k9 znup}+Rax-4gZc4)S}b^ZlaJ^x|6;+LX~tc-Mb$#}qK`xWAIVt1mOxFmP!jSE>~&vf z!D04?244Se0iKTBS!C43IMq^rfM%iOP4T`DXM`G(*9L6~lNLY3eiy09pay&J`6HRr z7pdWZoUqN82;!rR=rZ+~OHLR;1BGW)!N^rVKF`z1hqB@v(IJmE=vUP9wX^gDT)Jds z)uRVrp;PIe#g3O8-~y*Z947B0oI5x{x*8l|S{o<{;MK$E-rntH^<7wagRBg1II-@% zusN27Msv*^R;T4c;o`9aZ$De`5#q} z$7zjJ9C*YCZc(0G;D}{+2*CF+B5oF%{mcd~cZ;^1pDBR84L3HGymp2j3szmW_DzFM zq3dthY}SGHMQ6S=iulk*H?7jzM8JsevH(ZGs1v$2Q@v=Mc#i<=fm8dXJ~moB3QkH+ z?KE090*(*&OSc<%6AN1i!12&kUF-3&3|=2Vc?%2hgt)3;aH`JUHm2)7TkKa*fb2(I z&sBl~+cmxN&l{mYb(!(NNn4@X<;wV7E^1IMrE}Ghia}6q0lnNsRSMOHe8RRqyCMIx z_vqC8Uy$F@e&iZG5Ax41UNF$_4dfS(Z}d~v#^T4M*i#@s>8aUz|0w;Xmv`|f`3dh_qe6mgK4oB-n)Xem^!+F0* z5T6^p~Q3E zN89~HLdmik{?;YkS0u|!UA_l=F_SDk9J02~te<45mWgIhW0J&UUDe9jR^KJ=9f7Nx z>()!$=MFM?yT?J|w!gVl_(~{Q^88}uoC&d#B}0=6?Cx7gT;Z>x7sHAqF7xZY+rBTA zIGe2oQ?4zOIDNc3a>4BCOo^jx(8!xxrILl2;v$<6ABml9Wztto6N&XA?@q}s70H}c z)YKCrtt1kgO7+5xjglF0vr`5I)=8#KY1n)&w}NTV;5-JJLdhtjh07yE&Ju%L?H#GV z&*I8~oXOxZmL+hE7;P;MIW=A~iQ1e_Zro>yn~zn3K*dF}q0;P*~yk~nIsuNee@WYPH9pU-_rlq?*jE8Fw1Kw^J)r<-EY z#@7;QSNbyx5s=ud{$=;V!&G9`d@TRu@aYmd>F2}~((#gM`2`a^W=@n$yl&kdFsMN? z`e#VjjBf=Jy_w%v9JuB#(RjZ%!OAH^qLgJWzWK8rw~kkFWis?Q^Z4KsZWVIUNkR-h z9vnSlOt!>;U)(y=NQ`3*NkWqP64GqQCS(+2HI^gk5At#1G!C}Rg8PlXg}pxT74Ax4 zykj;UhUuKJ$cI}KVG?JM{TM%U7^m(R_v`3txav>z9m)E77?yYb@;mA~+*^8VSX|g+ z-0IF*h>uU_yx{r5L+j4w9y~r5XPI%5hirn*3xAxhyIuzuO&xq$W$p)PxAx_zAZ;EN zn{&qU+Tg~0v5qzYx_xUl&77d)%@9ASofm(yWirE^$!X(K&(&}TO<=mx^Av4o-EA6a z%eeUPfl0&Y88a+0iy!*YQ#y6$58@7{$5}49yr;H}9@$|u{qT|udPwCey~bt7Xsgb} z*Y=+rhCQ;m3$eNdf%$;8FO!vc?RUk!76fJjO^uyB%p%+v{@U|vw6^w1`0bjqY@x;h zoMlO12GNtOLK>sLH}=8ovSeY-hG`w=IwS?XjNcq~b$zEl_?=l$8?cD}pdVsW*>4ct zeS6@`DRz(O?o9=QvXoLBF({_$7aO zC;j4$YN!1og*N?MvPJifw2*#g`6BkZUN_yoQ$G8`ibVRszPhIO{Ll0q8@t~rV=L)f z!~BXjtes0=>v*q|ouW-&p8T3Ayst^up6Ok+`(Pt|e%#S9ql|C-U0qmi!|9BBLqF_L zEH3%xK|fd)Ip6aB0lK9nX3wu@@92Au!`k<~4W{o@)eCw$-_Xs&kKQyJYfj%@vv9)j z%XxI;jpng3-b4Dvk|pG1JxX7jdLqd@sg1re?RJi)wFP}KB<6uvI7y7ZAVUC^OPmjslG zo^|Ep-uYyim$J)z9JAP#vjPBZrcTPC`^Wv%fFlRxh34qqhX(yWX?k@ng2S~&ins4c zg+qTY`DgG10UUDm-ie96r=f1nyrCzrgu+4b{>l0W=0L4fF+a*C4{APpKGWRu5!8rM zKlXK73>=Vm+pO^J9@t+Tvhj2YX-TJFb~a8M1J$fLs^cG(lGak$uV3#8s0NjHxwr3_ z3I#FOiF`Dw1HQ1fucAs5$ts5NeJZdJ+yD4_H94~fixT=%55#>`Gx14 zFF`8Fy>774Z}IQ<6Ma-yy%2wonYZ9!>jiO7lTxeeZ69%W{v?AZmdnMj^-PX=={yp5 z7(G5zR&zz%_VUT<3E%r47vHOzB)NO^t@ySaryQn7h_5dQy&fAJEx!B=e%dv9uegp% zpYXAG7_MAOcGPL{x6o~w`=gfj?I^)Ac1JA|yDW^5D380$BzlsKAGcHsc23Y(`Nb;{ zKEKqgT^?%zJN%YD{gHJVKK(iDmakBp+~8$S5J2XX7& z`gJ$Lmf5xDHAdF(?qc`1cN#9iJMxO)!~u_BbG(PE?#XAcX-&q$cOw?T+v}F4%yV;u zw+GMKz@4!b-i}he>puN51)J>S^C}b)*gQO`cI~03@ZP)Gs+O?;-tX1fmcHH_HjOE# zJ|%93*Y-I~6UFR?wR?2teOmMcR^&~z&{+KgmS(im???WGMdM%nk>^&zyX`OUzl}@j zJ2AKVb6&&^hEJAcZ$G%7fo)Ctt^*oI!-u0kt4xgcg!gJEHjdre4)3HMd@(vf2{z4h z`lx$x2E5fTxtFRJ!g#J_N z0n5>=`QCIbJXLb9aI20rJm#FU(uRKk=6#k{?ixSvIm{hmbAEoS4DMC#RZ59Af~d{m zm;IIVaQoDdhxQhsaLcGd3&%rTtRF~9cNo@eH`#8JyRffxvOu8 zC)DX!xpIZL4QfpsaWi+t0UR4nP=>>KJ3}a!;z@ld8^T$X!^HVZl;WpHIx7ZGc9Pu(7w*HAd0{|M~`%U`nKcMO)QQkFr8r2qnHT;*B*zBQz}hI z-QdG(Ba?RgzWN%sMsvpSJ5}g@Mb~fYYE0MUIxdUn zNHpCf!_CK-JUX;ZGORN+#dwMZ!`;AHqs047|Ndv(j~Az2CeJ(_7STe(w|;9F0hGn#Id!iMQgZGSXjwP2Pbe@CC3aD;I2xJ3z)%JDTo+3OrrKN zq5n_GRf*csbw}C_y(Mby*Ca24coH?$YdbvSZ{f-+l8Ebl$;qhZ=m@A~+Dy?k^41A{ zFlpCWnajv-vT`vay~Xj=u^dc$1^@X&PrOZg8_J`f^!r77zyI+5()O>kPeZz5k8d6A zTWy}xYpGBBH7Et!PV%PxzgAqeU8Y6{&hyoqxnU3P>f{811&q^6BI43%AFk%bIZdZ% zU%f-COWaPGdk_r{^QaO<@DC0stcES+xNBS)34d~ zyp|DmamWw5|E&)W4Ef+de%SpY-x{_&o!osLMz)Vqxe%7fRDNO?SQ-|6CJSXcCf^!@ znYW)gtGRJop^Mx%JzMQAbP3lmR6Fz?y7+RoPmDE(E_1q87E1)s`Hv?$bVm%GPc_P4 z45@|A?x8*dQevR9&atJPT??VJM%%*)F=f!%QuuSh)928|Z|Z^v`>UX9=AD%rR$YQi zo~Op?7bQdYFb~^N0iWP9pfc*w%m>hWM8K1GZmL4)r~f>BET;?xUhFcDORn{>0mte=m-cTqrzxgof(hj)t zH5csBZh=R&HUu{v3;nkt{UiQRbDm-X40L@84O(Jg;A-p3j?)~8UdorS5keSP^FTFq zgE0(zdhf`cWDX2cTY3Lg(0Q0UFF4@)H8~^wMa~0WG32B?uji?mG9AA;kDb76rp}Q| zzKrc;giBeO&Ljq~vYP1#>yuW|-0FeAiQ%TP@&!|u&8=Pvs+h!H_W3rZLrICq(~Q*s zR#q{2gO!M072`L79WQ3;OxdwFlQ>W5y&;_u?kelu>>=dI|@{ojsn#{&$t}e zIc1ESlbHs5-tg*|_M!&Z5fXXLHPRA3114vE-%f{5HiqAPJ<$TT^OvW#jouF*nda?F z$&Q8(wiJ%9+}{aX?B4U%-tmNYy_2hUL_dOe;yY(bDtlmaT8dHA(jTxXp=Q+4hG2Mm zbLtX~N(j6y3|v_KA`jk9G|m6$CLaQu+>2JN32}za<4ZEk9KORAkUD&;(HHn&pmET? z7XUWR-1d*eIs;y-_{3j7wHVfx6!3;ENQV{8tsDPLaE7H9cj+AWc?OHpA};EBd&9eL zEoiM^L!9*zIAA%C*BN&bcId^VYm}zICrvM0cQ}rLkL|B=%Zsew!}%FWxMv$|iPYP8 ztJV|V+2dN=8j}cb*IhBu*tq~UDwWxC8Y5wS^NSy+sZw}J$us`?j!E$R-7m6ZNjk8y zDm5#4Y6UE>+q2dF(+GI#S<>6J^?C5v83U!!QP<#M7xia&e4IbbUF+I5u*MYbz1FgH z`!!9N!6;Xm_L~fMSb1%*p^w6?XAJj#vwe!WYP_*L16Xs??c2blRGgO18_6tIqc=7;06IN4$zELo#&zjjF~(GUbZ@Efta+wBBpy1&xG_rO#0wHrrMZiMVjFe z(hLFSn(!Wj#Yad(1Wbo1Z-f9CVy-0*TaKo+Z=Rd+@Ph`eIlwh(tlJoxH(A*G5<1XS zP@ekFs%`N5hds4I`-|}7(n^D#cdOv5Pt)ulUW=o(zKhjXhi&OgwP-f4lSe+`W{2+y ztA$v94ljAgNm%i4CNr<73YHg)3f;nuf+dN~8;f;*;L16K=vKwcr~{S9OpW@8s#~!{ zpTK=Hc0IVY$d*Z*%M0uuCsN3Ky7E5hD=C(@jajm7bBSVksAg$^h*m7uyzT#H!D>aw z?FL@?^Dl~!>=Ls=H7`X-gj?#DoH>dR$-y~aBApe%A1eBXyXq-|GYnLJxaKN?ZfUMs z`g(&RXuufj%109vfi|zqn?A=X0%QRm4xJNi=!RC37OgNZ1310kG`p(_8qi?N+?}#i3&kWbfa~nFUE$gD zep%(AB*pq=KP)QSTovbE2T{6{Zz)P^qRu$vMPRX`+Cn^NG4DlOn!@ii&q~EPL*WCiXOSSF86BRzU^5RoVUn+bS4cGj+g0JvVE+2iq z$6Vq4aXbAynaVryGwAyVWi$7FLJWpK(8-u=_1YeWG{;voh_M{d}8> z$=N=V`RvRiAKksMwkyw`msWZIsN2fj^%6$rN-9jQW}5?eyJvrIhm-DgStKpbg@%ik zolcu*0QI>y{@FXBAJnL>j&@mnQv4yw`$D>1ykcNY@t!*K8pVijw(ECnF@kyp5na7? z@qG#X707$RI|)tSIYo^rY{y+eymZaM3LekS?eh6vg{tiHhmQ$doEFR*s~Q4TU5_7g zMR*GaBbnA<9(l<>S-J0N{EqS|=Fy)3Hw&t;K3md9QeWySK?%Ob_Umql2- zp7$Pb7*QN=jXF4v({gypHZ$qjJt>>UoUo+-LCIeSU;0B^=X=hwX%Nw~m(F-o<{U!L zY?&?6is`0Jg6@{ScRNpu)Zdt$IrEqnZrrz{@`@on{IFMjudIXd$mNj_+Uw~>!zNUp zo_`rvZX+0DX%+QllV(mXq&X+lw)9T4ror6W+c&D~u}3=DwdM4btHUpZ&s)Th;|T*$ z!3gqrDeAZ=n;bCz{~{!%q_M|ElH`dvtAw|LANGgV`(9ONoT`I+FY+b>T}E_?&Bmgt zMft-&bCt+lWf?C?Pgw~*c(xAAn*I^CyuBDuvaT53J<#yN-FpodohD{?`d0Y5)9m3D z12cz8-}W0;ja#phx~;(t^*k5SiN$AlBh>$Q<68)@RKzu6((dsXB_L<49`QN{f;>jl z&AVx!>7}q5Xzu4+B?m ztQLPPn8xI3@m{&X@JqtC?OyekTRqG95;& z+GX4@ov1-ZX2$;mfIB0b!JljdhBH~-e8wCkGESNNu$91wsZ&!UK%e2F;c8)|-|3HF Xhk)TuW#w3=%ZimerrAZUQT~4bq=Tq& delta 12431 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 literal 0 HcmV?d00001 diff --git a/tests/input_files/baselines/call_compute_subroutines.history_with_ciso.nc b/tests/input_files/baselines/call_compute_subroutines.history_with_ciso.nc index 901b52f168131e27bfdac9adf30e8a0bb604ce06..56bdc363ea436b9ed11e95c9131bc75db06d0028 100644 GIT binary patch delta 10372 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 From 8dac756295074ddc06bdff2bb15518539217edb7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 12:46:16 -0600 Subject: [PATCH 41/64] Fixed two issues with user-specified settings 1. MARBL_settings_file_class.py should assume that the input_file contains variable values in the proper units (rather than expecting user to know units in YAML file); this is consistent with how the Fortran code reads input files 2. MARBL_share.py can't assume particulate_flux_ref_depth will be a float; if it is specified in an input file it is stored internally as a str There were also two issues with running the test suite: 1. results from the netcdf metadata check were not being reported 2. the 4p2z metadata check needs to use the 4p2z settings file to generate the internal MARBL_settings object --- MARBL_tools/MARBL_settings_file_class.py | 16 +++++++++++----- MARBL_tools/MARBL_share.py | 4 ++-- MARBL_tools/run_test_suite.sh | 8 ++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 316338f1..647b6831 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -354,6 +354,7 @@ def _get_var_value(varname, var_dict, provided_keys, input_dict, units, unit_sys # (Fortran vars are case-insensitive) if varname.lower() in input_dict.keys(): # Ignore ' and " from strings + from_input_dict = True def_value = input_dict[varname.lower()].strip('"').strip("'") # Remove from input file dictionary; if dictionary is not empty after processing # all input file lines, then it included a bad variable in it @@ -361,11 +362,13 @@ def _get_var_value(varname, var_dict, provided_keys, input_dict, units, unit_sys # Note that if variable foo is an array, then foo = bar in the input file # should be treated as foo(1) = bar elif varname[-3:] == "(1)" and varname.lower()[:-3] in input_dict.keys(): + from_input_dict = True def_value = input_dict[varname.lower()[:-3]].strip('"').strip("'") # Remove from input file dictionary; if dictionary is not empty after processing # all input file lines, then it included a bad variable in it del input_dict[varname.lower()[:-3]] else: + from_input_dict = False # is default value a dictionary? If so, it depends on self._config_keyword # Otherwise we're interested in default value if isinstance(var_dict["default_value"], dict): @@ -390,7 +393,7 @@ def _get_var_value(varname, var_dict, provided_keys, input_dict, units, unit_sys def_value = var_dict["default_value"] # call translate value from JSON file to format F90 expects - value = _translate_JSON_value(def_value, var_dict["datatype"], units, unit_system) + value = _translate_JSON_value(def_value, var_dict["datatype"], units, unit_system, from_input_dict=from_input_dict) # Append to config keywords if JSON wants it if "_append_to_config_keywords" in var_dict.keys(): @@ -407,7 +410,7 @@ def _get_var_value(varname, var_dict, provided_keys, input_dict, units, unit_sys ################################################################################ -def _translate_JSON_value(value, datatype, units, unit_system): +def _translate_JSON_value(value, datatype, units, unit_system, from_input_dict=False): """ The value provided in the JSON file needs to be adjusted depending on the datatype of the variable. Strings need to be wrapped in "", and numbers written in scientific notation need to be formatted consistently. @@ -426,9 +429,9 @@ def _translate_JSON_value(value, datatype, units, unit_system): # if variable is a real but value is unicode evaluate it if datatype == "real": if isinstance(value, str): - return "%24.16e" % (eval(value)*_get_scale_factor(units, unit_system)) + return "%24.16e" % (eval(value)*_get_scale_factor(units, unit_system, from_input_dict)) else: - return value*_get_scale_factor(units, unit_system) + return value*_get_scale_factor(units, unit_system, from_input_dict) # if variable is an integer but value is unicode convert it if datatype == "integer" and isinstance(value, str): return int(value) @@ -451,7 +454,10 @@ def _unit_conv_dict(): new_dict['cgs']['m^2/mg s/yr'] = {'new_units': 'cm^2/ng s/yr', 'scale_factor': 0.01} return new_dict -def _get_scale_factor(units, unit_system): +def _get_scale_factor(units, unit_system, from_input_dict=False): + if from_input_dict: + # Do not apply scale factor to user-specified values + return 1. try: return _unit_conv_dict()[unit_system][units]['scale_factor'] except: diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 6ddcfe78..4d0f58f9 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -83,8 +83,8 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic except: # If base_biotic_on is False, we don't need particulate_flux_ref_depth particulate_flux_ref_depth = 0 - if unit_system == 'cgs': - particulate_flux_ref_depth = particulate_flux_ref_depth / 100. + if MARBL_settings.settings_dict['particulate_flux_ref_depth']['attrs']['units'] == 'cm': + particulate_flux_ref_depth = float(particulate_flux_ref_depth) / 100. particulate_flux_ref_depth_str = '%dm' % particulate_flux_ref_depth loop_for_replacement = [ particulate_flux_ref_depth_str ] else: diff --git a/MARBL_tools/run_test_suite.sh b/MARBL_tools/run_test_suite.sh index db9ad472..9711701d 100755 --- a/MARBL_tools/run_test_suite.sh +++ b/MARBL_tools/run_test_suite.sh @@ -189,9 +189,9 @@ if [ "${STATUS}" == "PASS" ]; then print_status "netCDF Comparison (1 inst (cgs, 4p2z) vs baseline (cgs, 4p2z))" >> ${RESULTS_CACHE} # Compare netCDF metadata to JSON file - (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_4p2z_cgs.settings) + (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_4p2z_cgs.settings -f ../defaults/json/settings_latest+4p2z.json) STATUS=$(check_return $?) - print_status "netCDF metadata check (4p2z)" + print_status "netCDF metadata check (4p2z)" >> ${RESULTS_CACHE} fi # Initialize MARBL (with 4p2z), compute surface fluxes and interior tendencies in mks instead of cgs @@ -227,7 +227,7 @@ if [ "${STATUS}" == "PASS" ]; then # Compare netCDF metadata to JSON file (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_abio_only.settings) STATUS=$(check_return $?) - print_status "netCDF metadata check (abio only)" + print_status "netCDF metadata check (abio only)" >> ${RESULTS_CACHE} fi # Initialize MARBL (with abio tracers), compute surface fluxes and interior tendencies in mks instead of cgs @@ -263,7 +263,7 @@ if [ "${STATUS}" == "PASS" ]; then # Compare netCDF metadata to JSON file (set -x ; ./netcdf_metadata_check.py -s ../tests/input_files/settings/marbl_with_ciso.settings) STATUS=$(check_return $?) - print_status "netCDF metadata check (ciso)" + print_status "netCDF metadata check (ciso)" >> ${RESULTS_CACHE} fi # Initialize MARBL (with ciso tracers), compute surface fluxes and interior tendencies in mks instead of cgs From 56cf1796ffb185970d44fdc52b7cdb001bce68a8 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 12:58:37 -0600 Subject: [PATCH 42/64] Update Chl units and fix bug in MARBL_share.py There is a try / except block to avoid cases when particulate_flux_ref_depth is not in MARBL_settings.settings_dict (currently just when base_biotic_on is false) but I had an if statement checking the value of MARBL_settings.settings_dict['particulate_flux_ref_depth']['attrs']['units'] outside that block. --- MARBL_tools/MARBL_share.py | 4 ++-- defaults/json/settings_cesm2.0.json | 2 +- defaults/json/settings_cesm2.1+cocco.json | 2 +- defaults/json/settings_cesm2.1.json | 2 +- defaults/json/settings_latest+4p2z.json | 2 +- defaults/json/settings_latest+cocco.json | 2 +- defaults/settings_cesm2.0.yaml | 2 +- defaults/settings_cesm2.1+cocco.yaml | 2 +- defaults/settings_cesm2.1.yaml | 2 +- defaults/settings_latest+4p2z.yaml | 2 +- defaults/settings_latest+cocco.yaml | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 4d0f58f9..12917e96 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -80,11 +80,11 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic fill_source = 'strings' try: particulate_flux_ref_depth = MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + if MARBL_settings.settings_dict['particulate_flux_ref_depth']['attrs']['units'] == 'cm': + particulate_flux_ref_depth = float(particulate_flux_ref_depth) / 100. except: # If base_biotic_on is False, we don't need particulate_flux_ref_depth particulate_flux_ref_depth = 0 - if MARBL_settings.settings_dict['particulate_flux_ref_depth']['attrs']['units'] == 'cm': - particulate_flux_ref_depth = float(particulate_flux_ref_depth) / 100. particulate_flux_ref_depth_str = '%dm' % particulate_flux_ref_depth loop_for_replacement = [ particulate_flux_ref_depth_str ] else: diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index cf0ebfa1..7aebd50b 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -704,7 +704,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 31572698..6319ef08 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -744,7 +744,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index 9c442e2e..a8798930 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -704,7 +704,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index a0a51b11..3eb6fe40 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -792,7 +792,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 403754ee..0f8e1762 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -744,7 +744,7 @@ "base_bio_on": ".true." }, "long_name": "((autotroph_lname)) Chlorophyll", - "units": "mmol/m^3" + "units": "mg/m^3" }, "((autotroph_sname))Fe": { "dependencies": { diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index ffa16e02..82459b1b 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -174,7 +174,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index c4543a8d..397847ab 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -174,7 +174,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index bff6e333..680696bf 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -174,7 +174,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 8c6e4960..fa112151 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -185,7 +185,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index cb3e0a5a..119f2798 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -174,7 +174,7 @@ _tracer_list : dependencies : base_bio_on : .true. long_name : ((autotroph_lname)) Chlorophyll - units : mmol/m^3 + units : mg/m^3 ((autotroph_sname))C : dependencies : base_bio_on : .true. From 12fd87f98ba72901443d0562f93483ff9566722b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 13:30:13 -0600 Subject: [PATCH 43/64] One more bugfix around particulate_flux_ref_depth Need to convert particulate_flux_ref_depth to float regardless of unit system, otherwise setting it via input_file results in a string value. --- MARBL_tools/MARBL_share.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 12917e96..c44d2780 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -79,9 +79,9 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic elif template == '((particulate_flux_ref_depth_str))': fill_source = 'strings' try: - particulate_flux_ref_depth = MARBL_settings.settings_dict['particulate_flux_ref_depth']['value'] + particulate_flux_ref_depth = float(MARBL_settings.settings_dict['particulate_flux_ref_depth']['value']) if MARBL_settings.settings_dict['particulate_flux_ref_depth']['attrs']['units'] == 'cm': - particulate_flux_ref_depth = float(particulate_flux_ref_depth) / 100. + particulate_flux_ref_depth = particulate_flux_ref_depth / 100. except: # If base_biotic_on is False, we don't need particulate_flux_ref_depth particulate_flux_ref_depth = 0 From 9378d11af9d7dbe60c612dac5522dbb5eafdf2d0 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 15:42:35 -0600 Subject: [PATCH 44/64] Diagnostic unit conversion in diags class Rather than do some kludgy unit clean-up in netcdf_metadata_check.py, the units specified in the diagnostics YAML file are updated to the correct unit system in MARBL_diagnostics_class (it's still pretty kludgy). I also converted print statements to logging statements in netcdf_metadata_check.py, and used some stack overflow magic to manage to the log formatting in a new class in MARBL_share.py (it would be nice to propogate this to other .py scripts in MARBL_tools) --- MARBL_tools/MARBL_diagnostics_file_class.py | 15 ++++++++ MARBL_tools/MARBL_share.py | 11 ++++++ MARBL_tools/__init__.py | 1 + MARBL_tools/netcdf_metadata_check.py | 42 ++++++++++++--------- 4 files changed, 51 insertions(+), 18 deletions(-) diff --git a/MARBL_tools/MARBL_diagnostics_file_class.py b/MARBL_tools/MARBL_diagnostics_file_class.py index 1db85b91..a1ad460e 100644 --- a/MARBL_tools/MARBL_diagnostics_file_class.py +++ b/MARBL_tools/MARBL_diagnostics_file_class.py @@ -58,5 +58,20 @@ def __init__(self, default_diagnostics_file, MARBL_settings, unit_system): self.diagnostics_dict[diag_name]['frequency'] = [self.diagnostics_dict[diag_name]['frequency']] self.diagnostics_dict[diag_name]['operator'] = [self.diagnostics_dict[diag_name]['operator']] + # iv. update units + fix_units = {} + if unit_system == 'cgs': + fix_units["mmol/m^3 cm"] = "nmol/cm^2" + fix_units["mmol/m^3"] = "nmol/cm^3" + fix_units["meq/m^3"] = "neq/cm^3" + else: + fix_units["mmol/m^3 cm"] = "mmol/m^2" + fix_units["nmol/cm^2"] = "mmol/m^2" + fix_units["g/cm"] = "kg/m" + fix_units["cm"] = "m" + + for key, value in fix_units.items(): + self.diagnostics_dict[diag_name]["units"] = str(self.diagnostics_dict[diag_name]["units"]).replace(key, value) + for diag_name in diags_to_delete: del self.diagnostics_dict[diag_name] diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index c44d2780..25f4f705 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -2,6 +2,8 @@ and MARBL_diagnostics_file_class.py """ +import logging + ################################################################################ # PUBLIC MODULE METHODS # ################################################################################ @@ -14,6 +16,15 @@ def abort(err_code=0): ################################################################################ +class LogFormatter(logging.Formatter): + def format(self, record): + if record.levelno == logging.ERROR: + self._style._fmt = '%(levelname)s: %(message)s' + else: + self._style._fmt = '%(message)s' + return super().format(record) +################################################################################ + def sort(list_in, sort_key=lambda s: s.lower()): """ Sort a list; default is alphabetical (case-insensitive), but that can be overridden with the sort_key argument diff --git a/MARBL_tools/__init__.py b/MARBL_tools/__init__.py index 67cb9547..a52c42c4 100644 --- a/MARBL_tools/__init__.py +++ b/MARBL_tools/__init__.py @@ -5,6 +5,7 @@ from .MARBL_utils import settings_dictionary_is_consistent from .MARBL_utils import diagnostics_dictionary_is_consistent from .MARBL_share import abort +from .MARBL_share import LogFormatter from .MARBL_share import sort from .MARBL_share import natural_sort_key from .MARBL_share import expand_template_value diff --git a/MARBL_tools/netcdf_metadata_check.py b/MARBL_tools/netcdf_metadata_check.py index 000b836c..379a8d57 100755 --- a/MARBL_tools/netcdf_metadata_check.py +++ b/MARBL_tools/netcdf_metadata_check.py @@ -84,15 +84,24 @@ def _parse_args(): ################## if __name__ == "__main__": - import xarray as xr - import sys + import logging import os + import sys + import xarray as xr # We need marbl_root in python path so we can import MARBL_tools from generate_settings_file() marbl_root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) sys.path.append(marbl_root) - from MARBL_tools import MARBL_settings_class, MARBL_diagnostics_class, abort + from MARBL_tools import MARBL_settings_class, MARBL_diagnostics_class, abort, LogFormatter + # Set up logging + logger = logging.getLogger("__name__") + handler = logging.StreamHandler() + handler.setFormatter(LogFormatter()) + logger.setLevel(logging.DEBUG) + logger.addHandler(handler) + + # Parse command line arguments args = _parse_args() if args.settings_file_in == "None": args.settings_file_in = None @@ -125,34 +134,31 @@ def _parse_args(): if var in driver_vars or var.startswith("output_for_GCM"): continue if var not in json_in: - print(f"Can not find {var} in {args.default_diagnostics_file}!") + logger.info(f"Can not find {var} in {args.default_diagnostics_file}!") diff_found = True continue + + # Determine if units and longname match netcdf_dict = {} netcdf_dict["units"] = str(ds[var].attrs["units"]) netcdf_dict["longname"] = ds[var].attrs["long_name"] json_dict = {key: str(json_in[var][key]) for key in ["units", "longname"]} different_lname = (netcdf_dict["longname"] != json_dict["longname"]) different_units = (netcdf_dict["units"] != json_dict["units"]) - # Account for equivalent units - if json_dict["units"].replace("mmol/m^3", "nmol/cm^3") == netcdf_dict["units"]: - different_units = False - if json_dict["units"].replace("meq/m^3", "neq/cm^3") == netcdf_dict["units"]: - different_units = False - if json_dict["units"] == "mmol/m^3 cm/s" and netcdf_dict["units"] == "nmol/cm^2/s": - different_units = False + + # Report any differences if different_units or different_lname: diff_found = True - print(f"Differences in {var}:") + logger.info(f"Differences in {var}:") if different_units: - print(f"* JSON units: {json_dict['units']}") - print(f"* netcdf units: {netcdf_dict['units']}") + logger.info(f"* JSON units: {json_dict['units']}") + logger.info(f"* netcdf units: {netcdf_dict['units']}") if different_lname: - print(f"* JSON long name: {json_dict['longname']}") - print(f"* netcdf long name: {netcdf_dict['longname']}") + logger.info(f"* JSON long name: {json_dict['longname']}") + logger.info(f"* netcdf long name: {netcdf_dict['longname']}") if diff_found: - print("Differences found between JSON and netCDF metadata!") + logger.error("Differences found between JSON and netCDF metadata!") abort(1) else: - print("No differences found between JSON and netCDF metadata") + logger.info("No differences found between JSON and netCDF metadata") From 9c09ec1d1262977350390f5b58067fa59434e1d1 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 15:55:09 -0600 Subject: [PATCH 45/64] Fix failing pylint check Apparently using f-strings with logging messages is frowned upon. --- MARBL_tools/netcdf_metadata_check.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MARBL_tools/netcdf_metadata_check.py b/MARBL_tools/netcdf_metadata_check.py index 379a8d57..13ca88f3 100755 --- a/MARBL_tools/netcdf_metadata_check.py +++ b/MARBL_tools/netcdf_metadata_check.py @@ -134,7 +134,7 @@ def _parse_args(): if var in driver_vars or var.startswith("output_for_GCM"): continue if var not in json_in: - logger.info(f"Can not find {var} in {args.default_diagnostics_file}!") + logger.info("Can not find %s in %s!", var, args.default_diagnostics_file) diff_found = True continue @@ -149,13 +149,13 @@ def _parse_args(): # Report any differences if different_units or different_lname: diff_found = True - logger.info(f"Differences in {var}:") + logger.info("Differences in %s:", var) if different_units: - logger.info(f"* JSON units: {json_dict['units']}") - logger.info(f"* netcdf units: {netcdf_dict['units']}") + logger.info("* JSON units: %s", json_dict["units"]) + logger.info("* netcdf units: %s", netcdf_dict["units"]) if different_lname: - logger.info(f"* JSON long name: {json_dict['longname']}") - logger.info(f"* netcdf long name: {netcdf_dict['longname']}") + logger.info("* JSON long name: %s", json_dict["longname"]) + logger.info("* netcdf long name: %s", netcdf_dict["longname"]) if diff_found: logger.error("Differences found between JSON and netCDF metadata!") From 38529489901838d9fe25ae35bb083bfbc65f64a2 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Thu, 12 Oct 2023 16:33:32 -0600 Subject: [PATCH 46/64] Add vertical grid comparison to metadata check If num_levels is a dimension of the netcdf variable, that should correspond to "layer_avg" in the JSON; we don't have a num_iface dimension that would correspond to "layer_iface", so everything else should have vertical_grid = "none" Also tried to clean up some comments. --- MARBL_tools/netcdf_metadata_check.py | 31 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/MARBL_tools/netcdf_metadata_check.py b/MARBL_tools/netcdf_metadata_check.py index 13ca88f3..8bbdd5ce 100755 --- a/MARBL_tools/netcdf_metadata_check.py +++ b/MARBL_tools/netcdf_metadata_check.py @@ -1,8 +1,8 @@ #!/usr/bin/env python """ -Compare the units and longname for each variable in a MARBL history fileto what is defined in the -diagnostics YAML file. +Compare the units, longname and vertical grid for each variable in a MARBL history file to what is +defined in the diagnostics YAML file. usage: netcdf_metadata_check.py [-h] [-n NETCDF_FILE] [-j DEFAULT_DIAGNOSTICS_FILE] [-f DEFAULT_SETTINGS_FILE] [-s SETTINGS_FILE_IN] [-u {cgs,mks}] @@ -106,9 +106,8 @@ def _parse_args(): if args.settings_file_in == "None": args.settings_file_in = None - # Read netcdf file + # Read netcdf file and generate diagnostics object ds = xr.open_dataset(args.netcdf_file) - # Generate diagnostics object DefaultSettings = MARBL_settings_class(args.default_settings_file, "settings_file", None, @@ -133,29 +132,39 @@ def _parse_args(): # skip diagnostics generated by the driver if var in driver_vars or var.startswith("output_for_GCM"): continue + + # Note difference if variable is in netcdf file but not JSON if var not in json_in: logger.info("Can not find %s in %s!", var, args.default_diagnostics_file) diff_found = True continue - # Determine if units and longname match + # Construct dictionaries to compare units, long_name, and vertical grid netcdf_dict = {} netcdf_dict["units"] = str(ds[var].attrs["units"]) netcdf_dict["longname"] = ds[var].attrs["long_name"] - json_dict = {key: str(json_in[var][key]) for key in ["units", "longname"]} - different_lname = (netcdf_dict["longname"] != json_dict["longname"]) - different_units = (netcdf_dict["units"] != json_dict["units"]) + if "num_levels" in ds[var].dims: + netcdf_dict["vertical_grid"] = "layer_avg" + else: + netcdf_dict["vertical_grid"] = "none" + json_dict = {key: str(json_in[var][key]) for key in ["units", "longname", "vertical_grid"]} + + # Construct dictionary comparing each of the elements of the above dicts + differences = {key: netcdf_dict[key] != value for (key, value) in json_dict.items()} # Report any differences - if different_units or different_lname: + if any(differences.values()): diff_found = True logger.info("Differences in %s:", var) - if different_units: + if differences["units"]: logger.info("* JSON units: %s", json_dict["units"]) logger.info("* netcdf units: %s", netcdf_dict["units"]) - if different_lname: + if differences["longname"]: logger.info("* JSON long name: %s", json_dict["longname"]) logger.info("* netcdf long name: %s", netcdf_dict["longname"]) + if differences["vertical_grid"]: + logger.info("* JSON vertical grid: %s", json_dict["vertical_grid"]) + logger.info("* netcdf dimensions: %s", ds[var].dims) if diff_found: logger.error("Differences found between JSON and netCDF metadata!") From d9ed6665fe82c70d114d22174b86930a58967c5f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 08:58:11 -0600 Subject: [PATCH 47/64] "defined_if" -> "dependencies" There's no reason to use a different keyword for dependencies in the settings file than we do for the tracers in the settings file or the diagnostics file --- MARBL_tools/MARBL_settings_file_class.py | 4 +- defaults/json/settings_cesm2.0.json | 124 +++++++++++----------- defaults/json/settings_cesm2.1+cocco.json | 124 +++++++++++----------- defaults/json/settings_cesm2.1.json | 124 +++++++++++----------- defaults/json/settings_latest+4p2z.json | 124 +++++++++++----------- defaults/json/settings_latest+cocco.json | 124 +++++++++++----------- defaults/json/settings_latest.json | 124 +++++++++++----------- defaults/settings_cesm2.0.yaml | 124 +++++++++++----------- defaults/settings_cesm2.1+cocco.yaml | 124 +++++++++++----------- defaults/settings_cesm2.1.yaml | 124 +++++++++++----------- defaults/settings_latest+4p2z.yaml | 124 +++++++++++----------- defaults/settings_latest+cocco.yaml | 124 +++++++++++----------- defaults/settings_latest.yaml | 124 +++++++++++----------- 13 files changed, 746 insertions(+), 746 deletions(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 647b6831..61cb37fd 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -290,8 +290,8 @@ def _update_settings_dict(self, this_var, var_name, unit_system, base_name=''): """ # Return immediately if variable should not be settings file - if 'defined_if' in this_var: - if this_var['defined_if'] not in self._config_keyword: + if 'dependencies' in this_var: + if this_var['dependencies'] not in self._config_keyword: return # Keys copied out of the settings file into settings_dict[varname]['attrs'] diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index 7aebd50b..30763755 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -7,7 +7,7 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -19,7 +19,7 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -30,7 +30,7 @@ "PFT_defaults == \"CESM2\"": 1, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -916,7 +916,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -940,7 +940,7 @@ "_append_to_config_keywords": true, "datatype": "string", "default_value": "CESM2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -952,7 +952,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -960,7 +960,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -968,7 +968,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 0.4, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -976,7 +976,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -984,7 +984,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -992,7 +992,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1000,7 +1000,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1008,7 +1008,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1016,7 +1016,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1024,7 +1024,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1036,7 +1036,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1044,7 +1044,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1052,7 +1052,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1060,7 +1060,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1068,7 +1068,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1076,7 +1076,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1084,7 +1084,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.685, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1092,7 +1092,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1101,7 +1101,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1116,7 +1116,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1131,7 +1131,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1139,7 +1139,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1147,7 +1147,7 @@ "lo2_consumption_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1155,7 +1155,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1170,7 +1170,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1178,7 +1178,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1186,7 +1186,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1194,7 +1194,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1202,7 +1202,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1210,7 +1210,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1218,7 +1218,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.4, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1226,7 +1226,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1234,7 +1234,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1242,7 +1242,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 18.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1250,7 +1250,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1258,7 +1258,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1266,7 +1266,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1274,7 +1274,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "770e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1282,7 +1282,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1293,7 +1293,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1301,7 +1301,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1309,7 +1309,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1317,7 +1317,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1328,7 +1328,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1339,7 +1339,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1350,7 +1350,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1358,7 +1358,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1366,7 +1366,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1374,7 +1374,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1382,7 +1382,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1390,7 +1390,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1412,7 +1412,7 @@ 5.5 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1426,7 +1426,7 @@ "500.0e2", "1000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1437,7 +1437,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1445,7 +1445,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1453,7 +1453,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1467,7 +1467,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 6319ef08..28f7f47e 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -7,7 +7,7 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -19,7 +19,7 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -30,7 +30,7 @@ "PFT_defaults == \"CESM2+cocco\"": 1, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -956,7 +956,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -982,7 +982,7 @@ "_append_to_config_keywords": true, "datatype": "string", "default_value": "CESM2+cocco", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -994,7 +994,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1002,7 +1002,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1010,7 +1010,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 2.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -1018,7 +1018,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -1026,7 +1026,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1034,7 +1034,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1042,7 +1042,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1050,7 +1050,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1058,7 +1058,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 0.89, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1066,7 +1066,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1078,7 +1078,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1086,7 +1086,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1094,7 +1094,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.7, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1102,7 +1102,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1110,7 +1110,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 6.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1118,7 +1118,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1126,7 +1126,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.822, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1134,7 +1134,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1143,7 +1143,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1158,7 +1158,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1173,7 +1173,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1181,7 +1181,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1192,7 +1192,7 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1200,7 +1200,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1215,7 +1215,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1223,7 +1223,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1231,7 +1231,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1239,7 +1239,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 2.6, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1247,7 +1247,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1255,7 +1255,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.02, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1263,7 +1263,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.2, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1271,7 +1271,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1279,7 +1279,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1287,7 +1287,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 22.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1295,7 +1295,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1303,7 +1303,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1311,7 +1311,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1319,7 +1319,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1327,7 +1327,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1338,7 +1338,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1346,7 +1346,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1354,7 +1354,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1362,7 +1362,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1373,7 +1373,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 2.54 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1384,7 +1384,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 0.36 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1395,7 +1395,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.53 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1403,7 +1403,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1411,7 +1411,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1419,7 +1419,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1427,7 +1427,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1435,7 +1435,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1457,7 +1457,7 @@ 4.8 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1471,7 +1471,7 @@ "500.0e2", "1000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1482,7 +1482,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1490,7 +1490,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1498,7 +1498,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1512,7 +1512,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index a8798930..d2c3de83 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -7,7 +7,7 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -19,7 +19,7 @@ "PFT_defaults == \"CESM2\"": 3, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -30,7 +30,7 @@ "PFT_defaults == \"CESM2\"": 1, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -916,7 +916,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -940,7 +940,7 @@ "_append_to_config_keywords": true, "datatype": "string", "default_value": "CESM2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -952,7 +952,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -960,7 +960,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -968,7 +968,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 0.4, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -976,7 +976,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -984,7 +984,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -992,7 +992,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1000,7 +1000,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1008,7 +1008,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1016,7 +1016,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 0.89, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1024,7 +1024,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1036,7 +1036,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1044,7 +1044,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1052,7 +1052,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1060,7 +1060,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1068,7 +1068,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 6.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1076,7 +1076,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1084,7 +1084,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.822, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1092,7 +1092,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1101,7 +1101,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1116,7 +1116,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1131,7 +1131,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1139,7 +1139,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1150,7 +1150,7 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1158,7 +1158,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1173,7 +1173,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1181,7 +1181,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1189,7 +1189,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1197,7 +1197,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 2.6, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1205,7 +1205,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1213,7 +1213,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.02, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1221,7 +1221,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.2, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1229,7 +1229,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1237,7 +1237,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1245,7 +1245,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 22.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1253,7 +1253,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1261,7 +1261,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1269,7 +1269,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1277,7 +1277,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1285,7 +1285,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1296,7 +1296,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1304,7 +1304,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1312,7 +1312,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1320,7 +1320,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.01, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1331,7 +1331,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 2.54 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1342,7 +1342,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 0.36 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1353,7 +1353,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.53 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1361,7 +1361,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1369,7 +1369,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1377,7 +1377,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1385,7 +1385,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1393,7 +1393,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1415,7 +1415,7 @@ 4.8 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1429,7 +1429,7 @@ "500.0e2", "1000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1440,7 +1440,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1448,7 +1448,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1456,7 +1456,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1470,7 +1470,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index 3eb6fe40..ffae6fdb 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -7,7 +7,7 @@ "PFT_defaults == \"4p2z\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -19,7 +19,7 @@ "PFT_defaults == \"4p2z\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -30,7 +30,7 @@ "PFT_defaults == \"4p2z\"": 2, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -1004,7 +1004,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -1035,7 +1035,7 @@ "_append_to_config_keywords": true, "datatype": "string", "default_value": "4p2z", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -1047,7 +1047,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1055,7 +1055,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1063,7 +1063,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -1071,7 +1071,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -1079,7 +1079,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1087,7 +1087,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1095,7 +1095,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1103,7 +1103,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1111,7 +1111,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1119,7 +1119,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1131,7 +1131,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1139,7 +1139,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1147,7 +1147,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1155,7 +1155,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1163,7 +1163,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1171,7 +1171,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1179,7 +1179,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.685, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1187,7 +1187,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1196,7 +1196,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1211,7 +1211,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1226,7 +1226,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1234,7 +1234,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1245,7 +1245,7 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1253,7 +1253,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1268,7 +1268,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1276,7 +1276,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1284,7 +1284,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1292,7 +1292,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1300,7 +1300,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1308,7 +1308,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1316,7 +1316,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1324,7 +1324,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1332,7 +1332,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1340,7 +1340,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1348,7 +1348,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1356,7 +1356,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1364,7 +1364,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1372,7 +1372,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1380,7 +1380,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1391,7 +1391,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1399,7 +1399,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1407,7 +1407,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1415,7 +1415,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1426,7 +1426,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1437,7 +1437,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1448,7 +1448,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1456,7 +1456,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1464,7 +1464,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1472,7 +1472,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1480,7 +1480,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1488,7 +1488,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1510,7 +1510,7 @@ 5.3 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1524,7 +1524,7 @@ "500.0e2", "1000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1535,7 +1535,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1543,7 +1543,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1551,7 +1551,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 2.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1565,7 +1565,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 0f8e1762..6ea8f0cd 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -7,7 +7,7 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -19,7 +19,7 @@ "PFT_defaults == \"CESM2+cocco\"": 4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -30,7 +30,7 @@ "PFT_defaults == \"CESM2+cocco\"": 1, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -956,7 +956,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -982,7 +982,7 @@ "_append_to_config_keywords": true, "datatype": "string", "default_value": "CESM2+cocco", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -994,7 +994,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1002,7 +1002,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1010,7 +1010,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 2.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -1018,7 +1018,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -1026,7 +1026,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1034,7 +1034,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1042,7 +1042,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1050,7 +1050,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1058,7 +1058,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1066,7 +1066,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1078,7 +1078,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1086,7 +1086,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1094,7 +1094,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.7, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1102,7 +1102,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1110,7 +1110,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1118,7 +1118,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1126,7 +1126,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.685, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1134,7 +1134,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1143,7 +1143,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1158,7 +1158,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1173,7 +1173,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1181,7 +1181,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1192,7 +1192,7 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1200,7 +1200,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1215,7 +1215,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1223,7 +1223,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1231,7 +1231,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1239,7 +1239,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1247,7 +1247,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1255,7 +1255,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1263,7 +1263,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1271,7 +1271,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1279,7 +1279,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1287,7 +1287,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1295,7 +1295,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1303,7 +1303,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1311,7 +1311,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1319,7 +1319,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "700e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1327,7 +1327,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1338,7 +1338,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1346,7 +1346,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1354,7 +1354,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1362,7 +1362,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1373,7 +1373,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1384,7 +1384,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1395,7 +1395,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1403,7 +1403,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1411,7 +1411,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1419,7 +1419,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1427,7 +1427,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1435,7 +1435,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1457,7 +1457,7 @@ 5.3 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1471,7 +1471,7 @@ "500.0e2", "2000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1482,7 +1482,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1490,7 +1490,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1498,7 +1498,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1512,7 +1512,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index 96386770..3c57b918 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -8,7 +8,7 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of autotroph classes", "must set": "PFT_defaults == 'user-specified'", "subcategory": "2. config PFTs", @@ -21,7 +21,7 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of grazer prey classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -33,7 +33,7 @@ "PFT_defaults == \"None\"": 0, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Number of zooplankton classes", "subcategory": "2. config PFTs", "units": "unitless" @@ -919,7 +919,7 @@ "Jint_Ctot_thres_molpm2pyr": { "datatype": "real", "default_value": 1e-09, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(Jint_Ctot) exceeds this threshold", "subcategory": "5. general parameters", "units": "mol m-2 yr-1" @@ -945,7 +945,7 @@ "default_value": { "default": "CESM2" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Define how PFTs are initialized", "subcategory": "2. config PFTs", "units": "unitless", @@ -958,7 +958,7 @@ "POM_bury_frac_max": { "datatype": "real", "default_value": 0.8, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for POM", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -966,7 +966,7 @@ "PON_bury_coeff": { "datatype": "real", "default_value": 0.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scale factor for burial of PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -974,7 +974,7 @@ "QCaCO3_max": { "datatype": "real", "default_value": 0.4, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Max CaCO3/C ratio for calcifiers", "subcategory": "5. general parameters", "units": "mmol CaCO3/mmol C" @@ -982,7 +982,7 @@ "auto_mort2_exp": { "datatype": "real", "default_value": 1.75, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for autotrophs", "subcategory": "5. general parameters", "units": "unitless" @@ -990,7 +990,7 @@ "bSi_bury_frac_max": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "maximum bury fraction for bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -998,7 +998,7 @@ "bftt_dz_sum_thres": { "datatype": "real", "default_value": 1e-14, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold", "subcategory": "5. general parameters", "units": "unitless" @@ -1006,7 +1006,7 @@ "bury_coeff_rmean_timescale_years": { "datatype": "real", "default_value": 10, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Running mean time scale for bury coefficients", "subcategory": "5. general parameters", "units": "years" @@ -1014,7 +1014,7 @@ "caco3_bury_thres_depth": { "datatype": "real", "default_value": "3000e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Threshold depth for CaCO3 burial when opt = 'fixed_depth'", "subcategory": "5. general parameters", "units": "cm" @@ -1022,7 +1022,7 @@ "caco3_bury_thres_omega_calc": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "omega calcite threshold for CaCO3 burial when opt = 'omega_calc'", "subcategory": "5. general parameters", "units": 1 @@ -1030,7 +1030,7 @@ "caco3_bury_thres_opt": { "datatype": "string", "default_value": "omega_calc", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Option of threshold of CaCO3 burial", "subcategory": "5. general parameters", "units": "non-numeric", @@ -1042,7 +1042,7 @@ "ciso_fract_factors": { "datatype": "string", "default_value": "Laws", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Option for which biological fractionation calculation to use", "subcategory": "5. general parameters", "units": "non-numeric" @@ -1050,7 +1050,7 @@ "ciso_lsource_sink": { "datatype": "logical", "default_value": ".true.", - "defined_if": "ciso_on", + "dependencies": "ciso_on", "longname": "Control which portions of the carbon isotope code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1058,7 +1058,7 @@ "f_graze_CaCO3_remin": { "datatype": "real", "default_value": 0.33, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of spCaCO3 grazing which is remineralized in zooplankton guts", "subcategory": "5. general parameters", "units": "unitless" @@ -1066,7 +1066,7 @@ "gQ_Fe_kFe_thres": { "datatype": "real", "default_value": 10.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe:kFe ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1074,7 +1074,7 @@ "gQ_Si_kSi_thres": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Si:kSi ratio threshold in uptake ratio computations", "subcategory": "5. general parameters", "units": 1 @@ -1082,7 +1082,7 @@ "gQsi_0": { "datatype": "real", "default_value": 0.137, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "initial Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1090,7 +1090,7 @@ "gQsi_max": { "datatype": "real", "default_value": 0.685, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "max Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1098,7 +1098,7 @@ "gQsi_min": { "datatype": "real", "default_value": 0.0457, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "min Si/C ratio for growth", "subcategory": "5. general parameters", "units": 1 @@ -1107,7 +1107,7 @@ "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if bury coefficients are adjusted (rather than constant)", "subcategory": "3. config flags", "units": "unitless" @@ -1122,7 +1122,7 @@ "lcompute_nhx_surface_emis": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if NHx emissions are computed", "subcategory": "3. config flags", "units": "unitless" @@ -1137,7 +1137,7 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1145,7 +1145,7 @@ "lflux_gas_o2": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" @@ -1156,7 +1156,7 @@ "GRID == \"CESM_x1\"": ".true.", "default": ".false." }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply o2_consumption_scalef to o2 consumption (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1164,7 +1164,7 @@ "lp_remin_scalef": { "datatype": "logical", "default_value": ".false.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Apply p_remin_scalef to particulate remin (and request it as a forcing)", "subcategory": "3. config flags", "units": "unitless" @@ -1179,7 +1179,7 @@ "lvariable_PtoC": { "datatype": "logical", "default_value": ".true.", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Control if PtoC ratios in autotrophs vary", "subcategory": "3. config flags", "units": "unitless" @@ -1187,7 +1187,7 @@ "o2_sf_o2_range_hi": { "datatype": "real", "default_value": 45.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is applied to diss length scales for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1195,7 +1195,7 @@ "o2_sf_o2_range_lo": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor is constant for O2 less than this", "subcategory": "5. general parameters", "units": "mmol/m^3" @@ -1203,7 +1203,7 @@ "o2_sf_val_lo_o2": { "datatype": "real", "default_value": 3.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "o2_scalefactor constant for O2 less than o2_sf_o2_range_lo", "subcategory": "5. general parameters", "units": 1 @@ -1211,7 +1211,7 @@ "parm_CaCO3_diss": { "datatype": "real", "default_value": "500e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base CaCO3 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1219,7 +1219,7 @@ "parm_CaCO3_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "CaCO3 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1227,7 +1227,7 @@ "parm_FeLig_scavenge_rate0": { "datatype": "real", "default_value": 1.3, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound iron", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1235,7 +1235,7 @@ "parm_Fe_bioavail": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of Fe flux that is bioavailable", "subcategory": "5. general parameters", "units": "unitless" @@ -1243,7 +1243,7 @@ "parm_Fe_desorption_rate0": { "datatype": "real", "default_value": "1e-6", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Desorption rate for scavenged Fe from particles", "subcategory": "5. general parameters", "units": "1/cm" @@ -1251,7 +1251,7 @@ "parm_Fe_scavenge_rate0": { "datatype": "real", "default_value": 24.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for Fe", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1259,7 +1259,7 @@ "parm_Lig_degrade_rate0": { "datatype": "real", "default_value": 9.4e-05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fe-binding ligand bacterial degradation base rate coefficient", "subcategory": "5. general parameters", "units": "unitless" @@ -1267,7 +1267,7 @@ "parm_Lig_scavenge_rate0": { "datatype": "real", "default_value": 0.015, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Scavenging base rate for bound ligand", "subcategory": "5. general parameters (scavenging)", "units": "cm^2/ng s/yr" @@ -1275,7 +1275,7 @@ "parm_POC_diss": { "datatype": "real", "default_value": "100e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base POC dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1283,7 +1283,7 @@ "parm_SiO2_diss": { "datatype": "real", "default_value": "650e2", - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Base SiO2 dissolution length scale", "subcategory": "5. general parameters (dissolution)", "units": "cm" @@ -1291,7 +1291,7 @@ "parm_SiO2_gamma": { "datatype": "real", "default_value": 0.1, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "SiO2 gamma (fraction of production -> hard subclass)", "subcategory": "5. general parameters", "units": 1 @@ -1302,7 +1302,7 @@ "GRID == \"CESM_x3\"": 0.075, "default": 0.07 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of sp production as CaCO3 production", "subcategory": "5. general parameters", "units": "unitless" @@ -1310,7 +1310,7 @@ "parm_hPOC_CaCO3_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to CaCO3 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1318,7 +1318,7 @@ "parm_hPOC_SiO2_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to SiO2 ratio", "subcategory": "5. general parameters", "units": 1 @@ -1326,7 +1326,7 @@ "parm_hPOC_dust_ratio": { "datatype": "real", "default_value": 0.05, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "hPOC to dust ratio", "subcategory": "5. general parameters", "units": 1 @@ -1337,7 +1337,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POC, PON", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1348,7 +1348,7 @@ "GRID == \"CESM_x3\"": 5.0, "default": 1.1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of POP", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1359,7 +1359,7 @@ "GRID == \"CESM_x3\"": 1.1, "default": 1.0 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Initial scale factor for burial of bSi", "subcategory": "5. general parameters (bury coeffs)", "units": "unitless" @@ -1367,7 +1367,7 @@ "parm_kappa_nitrif_per_day": { "datatype": "real", "default_value": 0.06, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Nitrification inverse time constant", "subcategory": "5. general parameters (nitrification)", "units": "1/day" @@ -1375,7 +1375,7 @@ "parm_labile_ratio": { "datatype": "real", "default_value": 0.94, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Fraction of loss to DOC that routed directly to DIC", "subcategory": "5. general parameters", "units": "unitless" @@ -1383,7 +1383,7 @@ "parm_nitrif_par_lim": { "datatype": "real", "default_value": 1.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "PAR limit for nitrification", "subcategory": "5. general parameters (nitrification)", "units": "W/m^2" @@ -1391,7 +1391,7 @@ "parm_o2_min": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Minimum O2 needed for production & consumption", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1399,7 +1399,7 @@ "parm_o2_min_delta": { "datatype": "real", "default_value": 5.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Width of min O2 range", "subcategory": "5. general parameters", "units": "nmol/cm^3" @@ -1421,7 +1421,7 @@ 5.3 ] }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "unitless" @@ -1435,7 +1435,7 @@ "500.0e2", "1000.0e2" ], - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Depths of prescribed scalelen values", "subcategory": "6. Scale lengths", "units": "cm" @@ -1446,7 +1446,7 @@ "GRID == \"CESM_x3\"": 1.4, "default": 1 }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Global scaling factor for sed_denitrif", "subcategory": "5. general parameters", "units": "unitless" @@ -1454,7 +1454,7 @@ "particulate_flux_ref_depth": { "datatype": "real", "default_value": 100.0, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "reference depth for particulate flux diagnostics", "subcategory": "5. general parameters", "units": "m" @@ -1462,7 +1462,7 @@ "zoo_mort2_exp": { "datatype": "real", "default_value": 1.5, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Value of power loss exponent for zooplankton", "subcategory": "5. general parameters", "units": "unitless" @@ -1476,7 +1476,7 @@ "default": "settings_file", "not ladjust_bury_coeff": "settings_file" }, - "defined_if": "base_bio_on", + "dependencies": "base_bio_on", "longname": "Source of initial burial coefficient", "subcategory": "4. config strings", "units": "unitless" diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 82459b1b..05fa8cc4 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -278,7 +278,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -306,7 +306,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -325,35 +325,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -361,119 +361,119 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -482,7 +482,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -491,7 +491,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -500,42 +500,42 @@ general_parms : default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 18.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.4 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -544,84 +544,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 770e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -630,14 +630,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -649,7 +649,7 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -667,7 +667,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -677,70 +677,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -753,7 +753,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -775,7 +775,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -786,7 +786,7 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -795,7 +795,7 @@ PFT_counts : default : 1 PFT_defaults == "CESM2" : 1 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index 397847ab..0cbf6f54 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -278,7 +278,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -308,7 +308,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -327,35 +327,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -363,7 +363,7 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless @@ -372,112 +372,112 @@ general_parms : default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.822 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 6.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -486,7 +486,7 @@ general_parms : default : 2.54 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -495,7 +495,7 @@ general_parms : default : 0.36 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -504,42 +504,42 @@ general_parms : default : 1.53 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 22.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.2 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -548,84 +548,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.02 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 2.6 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -634,14 +634,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -653,7 +653,7 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -671,7 +671,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -681,70 +681,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 0.89 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 2.0 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -757,7 +757,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -779,7 +779,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -790,7 +790,7 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2+cocco' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -799,7 +799,7 @@ PFT_counts : default : 1 PFT_defaults == "CESM2+cocco" : 1 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index 680696bf..d985531c 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -278,7 +278,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -306,7 +306,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -325,35 +325,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -361,7 +361,7 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless @@ -370,112 +370,112 @@ general_parms : default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.822 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 6.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -484,7 +484,7 @@ general_parms : default : 2.54 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -493,7 +493,7 @@ general_parms : default : 0.36 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -502,42 +502,42 @@ general_parms : default : 1.53 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 22.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.2 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -546,84 +546,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.02 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.01 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 2.6 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -632,14 +632,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -651,7 +651,7 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -669,7 +669,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -679,70 +679,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 0.89 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -755,7 +755,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -777,7 +777,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -788,7 +788,7 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -797,7 +797,7 @@ PFT_counts : default : 1 PFT_defaults == "CESM2" : 1 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index fa112151..fdc4d912 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -289,7 +289,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -324,7 +324,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -343,35 +343,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -379,7 +379,7 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless @@ -388,112 +388,112 @@ general_parms : default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -502,7 +502,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -511,7 +511,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -520,42 +520,42 @@ general_parms : default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -564,84 +564,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -650,14 +650,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -669,7 +669,7 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -687,7 +687,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -697,70 +697,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 2.0 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 1.0 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -773,7 +773,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -795,7 +795,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -806,7 +806,7 @@ PFT_counts : cannot change : PFT_defaults == '4p2z' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -815,7 +815,7 @@ PFT_counts : default : 1 PFT_defaults == "4p2z" : 2 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 119f2798..81a2f01b 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -278,7 +278,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -308,7 +308,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -327,35 +327,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -363,7 +363,7 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless @@ -372,112 +372,112 @@ general_parms : default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -486,7 +486,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -495,7 +495,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -504,42 +504,42 @@ general_parms : default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -548,84 +548,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 700e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -634,14 +634,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -653,7 +653,7 @@ general_parms : - 500.0e2 - 2000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -671,7 +671,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -681,70 +681,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 2.0 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -757,7 +757,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -779,7 +779,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -790,7 +790,7 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2+cocco' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -799,7 +799,7 @@ PFT_counts : default : 1 PFT_defaults == "CESM2+cocco" : 1 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 9401c5dc..162d6875 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -277,7 +277,7 @@ tracer_modules : general_parms : PFT_defaults : - defined_if : base_bio_on + dependencies : base_bio_on longname : Define how PFTs are initialized subcategory : 2. config PFTs units : unitless @@ -307,7 +307,7 @@ general_parms : datatype : logical default_value : .true. ciso_lsource_sink : - defined_if : ciso_on + dependencies : ciso_on longname : Control which portions of the carbon isotope code are executed (useful for debugging) subcategory : 3. config flags units : unitless @@ -326,35 +326,35 @@ general_parms : datatype : logical default_value : .false. lflux_gas_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lflux_gas_co2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lcompute_nhx_surface_emis : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if NHx emissions are computed subcategory : 3. config flags units : unitless datatype : logical default_value : .true. lvariable_PtoC : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if PtoC ratios in autotrophs vary subcategory : 3. config flags units : unitless datatype : logical default_value : .true. ladjust_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Control if bury coefficients are adjusted (rather than constant) subcategory : 3. config flags units : unitless @@ -362,7 +362,7 @@ general_parms : default_value : .false. _append_to_config_keywords : true lo2_consumption_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) subcategory : 3. config flags units : unitless @@ -371,112 +371,112 @@ general_parms : default : .false. GRID == "CESM_x1" : .true. lp_remin_scalef : - defined_if : base_bio_on + dependencies : base_bio_on longname : Apply p_remin_scalef to particulate remin (and request it as a forcing) subcategory : 3. config flags units : unitless datatype : logical default_value : .false. bftt_dz_sum_thres: - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0e-14 Jint_Ctot_thres_molpm2pyr : - defined_if : base_bio_on + dependencies : base_bio_on longname : MARBL will abort if abs(Jint_Ctot) exceeds this threshold subcategory : 5. general parameters units : mol m-2 yr-1 datatype : real default_value : 1.0e-9 gQsi_0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : initial Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.137 gQsi_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : max Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.685 gQsi_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : min Si/C ratio for growth subcategory : 5. general parameters units : 1 datatype : real default_value : 0.0457 gQ_Fe_kFe_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe:kFe ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 10.0 gQ_Si_kSi_thres : - defined_if : base_bio_on + dependencies : base_bio_on longname : Si:kSi ratio threshold in uptake ratio computations subcategory : 5. general parameters units : 1 datatype : real default_value : 5.0 parm_Fe_bioavail : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of Fe flux that is bioavailable subcategory : 5. general parameters units : unitless datatype : real default_value : 1.0 particulate_flux_ref_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : reference depth for particulate flux diagnostics subcategory : 5. general parameters units : m datatype : real default_value : 100.0 parm_o2_min : - defined_if : base_bio_on + dependencies : base_bio_on longname : Minimum O2 needed for production & consumption subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_o2_min_delta : - defined_if : base_bio_on + dependencies : base_bio_on longname : Width of min O2 range subcategory : 5. general parameters units : nmol/cm^3 datatype : real default_value : 5.0 parm_kappa_nitrif_per_day : - defined_if : base_bio_on + dependencies : base_bio_on longname : Nitrification inverse time constant subcategory : 5. general parameters (nitrification) units : 1/day datatype : real default_value : 0.06 parm_nitrif_par_lim : - defined_if : base_bio_on + dependencies : base_bio_on longname : PAR limit for nitrification subcategory : 5. general parameters (nitrification) units : W/m^2 datatype : real default_value : 1.0 parm_labile_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of loss to DOC that routed directly to DIC subcategory : 5. general parameters units : unitless datatype : real default_value : 0.94 parm_init_POC_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POC, PON subcategory : 5. general parameters (bury coeffs) units : unitless @@ -485,7 +485,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_POP_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of POP subcategory : 5. general parameters (bury coeffs) units : unitless @@ -494,7 +494,7 @@ general_parms : default : 1.1 GRID == "CESM_x3" : 5.0 parm_init_bSi_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Initial scale factor for burial of bSi subcategory : 5. general parameters (bury coeffs) units : unitless @@ -503,42 +503,42 @@ general_parms : default : 1.0 GRID == "CESM_x3" : 1.1 parm_Fe_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for Fe subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 24.0 parm_Lig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound ligand subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 0.015 parm_FeLig_scavenge_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scavenging base rate for bound iron subcategory : 5. general parameters (scavenging) units : cm^2/ng s/yr datatype : real default_value : 1.3 parm_Lig_degrade_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fe-binding ligand bacterial degradation base rate coefficient subcategory : 5. general parameters units : unitless datatype : real default_value : 0.000094 parm_Fe_desorption_rate0 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Desorption rate for scavenged Fe from particles subcategory : 5. general parameters units : 1/cm datatype : real default_value : 1e-6 parm_f_prod_sp_CaCO3 : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of sp production as CaCO3 production subcategory : 5. general parameters units : unitless @@ -547,84 +547,84 @@ general_parms : default : 0.07 GRID == "CESM_x3" : 0.075 parm_POC_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base POC dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 100e2 parm_SiO2_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base SiO2 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 650e2 parm_SiO2_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : SiO2 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_SiO2_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to SiO2 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_CaCO3_diss : - defined_if : base_bio_on + dependencies : base_bio_on longname : Base CaCO3 dissolution length scale subcategory : 5. general parameters (dissolution) units : cm datatype : real default_value : 500e2 parm_CaCO3_gamma : - defined_if : base_bio_on + dependencies : base_bio_on longname : CaCO3 gamma (fraction of production -> hard subclass) subcategory : 5. general parameters units : 1 datatype : real default_value : 0.1 parm_hPOC_CaCO3_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to CaCO3 ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 parm_hPOC_dust_ratio : - defined_if : base_bio_on + dependencies : base_bio_on longname : hPOC to dust ratio subcategory : 5. general parameters units : 1 datatype : real default_value : 0.05 o2_sf_o2_range_hi : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is applied to diss length scales for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 45.0 o2_sf_o2_range_lo : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor is constant for O2 less than this subcategory : 5. general parameters units : mmol/m^3 datatype : real default_value : 5.0 o2_sf_val_lo_o2 : - defined_if : base_bio_on + dependencies : base_bio_on longname : o2_scalefactor constant for O2 less than o2_sf_o2_range_lo subcategory : 5. general parameters units : 1 datatype : real default_value : 3.0 parm_sed_denitrif_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Global scaling factor for sed_denitrif subcategory : 5. general parameters units : unitless @@ -633,14 +633,14 @@ general_parms : default : 1 GRID == "CESM_x3" : 1.4 bury_coeff_rmean_timescale_years : - defined_if : base_bio_on + dependencies : base_bio_on longname : Running mean time scale for bury coefficients subcategory : 5. general parameters units : years datatype : real default_value : 10 parm_scalelen_z : - defined_if : base_bio_on + dependencies : base_bio_on longname : Depths of prescribed scalelen values subcategory : 6. Scale lengths units : cm @@ -652,7 +652,7 @@ general_parms : - 500.0e2 - 1000.0e2 parm_scalelen_vals : - defined_if : base_bio_on + dependencies : base_bio_on longname : Prescribed scalelen values subcategory : 6. Scale lengths units : unitless @@ -670,7 +670,7 @@ general_parms : - 4.2 - 4.4 caco3_bury_thres_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Option of threshold of CaCO3 burial subcategory : 5. general parameters units : non-numeric @@ -680,70 +680,70 @@ general_parms : - fixed_depth - omega_calc caco3_bury_thres_depth : - defined_if : base_bio_on + dependencies : base_bio_on longname : Threshold depth for CaCO3 burial when opt = 'fixed_depth' subcategory : 5. general parameters units : cm datatype : real default_value : 3000e2 caco3_bury_thres_omega_calc : - defined_if : base_bio_on + dependencies : base_bio_on longname : omega calcite threshold for CaCO3 burial when opt = 'omega_calc' subcategory : 5. general parameters units : 1 datatype : real default_value : 1.0 PON_bury_coeff : - defined_if : base_bio_on + dependencies : base_bio_on longname : Scale factor for burial of PON subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.5 POM_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for POM subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 0.8 bSi_bury_frac_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : maximum bury fraction for bSi subcategory : 5. general parameters (bury coeffs) units : unitless datatype : real default_value : 1.0 ciso_fract_factors : - defined_if : ciso_on + dependencies : ciso_on longname : Option for which biological fractionation calculation to use subcategory : 5. general parameters units : non-numeric datatype : string default_value : Laws auto_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for autotrophs subcategory : 5. general parameters units : unitless datatype : real default_value : 1.75 zoo_mort2_exp : - defined_if : base_bio_on + dependencies : base_bio_on longname : Value of power loss exponent for zooplankton subcategory : 5. general parameters units : unitless datatype : real default_value : 1.5 QCaCO3_max : - defined_if : base_bio_on + dependencies : base_bio_on longname : Max CaCO3/C ratio for calcifiers subcategory : 5. general parameters units : mmol CaCO3/mmol C datatype : real default_value : 0.40 f_graze_CaCO3_remin : - defined_if : base_bio_on + dependencies : base_bio_on longname : Fraction of spCaCO3 grazing which is remineralized in zooplankton guts subcategory : 5. general parameters units : unitless @@ -756,7 +756,7 @@ general_parms : general_parms2 : init_bury_coeff_opt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Source of initial burial coefficient subcategory : 4. config strings units : unitless @@ -778,7 +778,7 @@ general_parms2 : PFT_counts : autotroph_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of autotroph classes subcategory : 2. config PFTs units : unitless @@ -790,7 +790,7 @@ PFT_counts : cannot change : PFT_defaults == 'CESM2' must set : PFT_defaults == 'user-specified' zooplankton_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of zooplankton classes subcategory : 2. config PFTs units : unitless @@ -800,7 +800,7 @@ PFT_counts : PFT_defaults == "CESM2" : 1 PFT_defaults == "None" : 0 max_grazer_prey_cnt : - defined_if : base_bio_on + dependencies : base_bio_on longname : Number of grazer prey classes subcategory : 2. config PFTs units : unitless From 967fa2a08bfea73d5f597f5f6119e28dd536aa4b Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 09:02:22 -0600 Subject: [PATCH 48/64] Clean up MARBL_settings_class Inserted missing word in a comment, and removed assumption that any array of length zero we want to remove from settings file is in the PFT_defaults category (instead we loop through all categories looking for the variable we want to remove) --- MARBL_tools/MARBL_settings_file_class.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MARBL_tools/MARBL_settings_file_class.py b/MARBL_tools/MARBL_settings_file_class.py index 61cb37fd..b1bb2c99 100644 --- a/MARBL_tools/MARBL_settings_file_class.py +++ b/MARBL_tools/MARBL_settings_file_class.py @@ -275,7 +275,9 @@ def _process_variable_value(self, category_name, variable_name, unit_system): # If array is length 0, remove it from settings dictionary if len(_get_array_info(this_var["_array_shape"], self.settings_dict, self.tracers_dict)) == 0: - del self._settings['PFT_derived_types'][variable_name] + for key in self.get_category_names(): + if variable_name in self._settings[key]: + del self._settings[key][variable_name] ################################################################################ @@ -289,7 +291,7 @@ def _update_settings_dict(self, this_var, var_name, unit_system, base_name=''): (just varname for scalars, but multiple keys for arrays) """ - # Return immediately if variable should not be settings file + # Return immediately if variable should not be in settings file if 'dependencies' in this_var: if this_var['dependencies'] not in self._config_keyword: return From 39a008d20067ddbf94557dcded344d8adee0bb74 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 09:13:39 -0600 Subject: [PATCH 49/64] lean up marbl_interface_private_types Following code review, a few small changes (mostly updating comments); I did rename the indices in the saved state type, which required updating a few other modules as well --- src/marbl_abio_dic_surface_flux_mod.F90 | 2 +- src/marbl_diagnostics_mod.F90 | 68 ++++++++++++------------- src/marbl_interface_private_types.F90 | 28 +++++----- src/marbl_saved_state_mod.F90 | 6 +-- src/marbl_surface_flux_mod.F90 | 66 ++++++++++++------------ 5 files changed, 86 insertions(+), 84 deletions(-) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 5ef3734c..efcc88c1 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -114,7 +114,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Values computed for abio and bio pv_co2 => surface_flux_internal%pv_co2(:), & ! Saved state - ph_surf => saved_state%state(saved_state_ind%abio_ph_surf)%field_2d, & + ph_surf => saved_state%state(saved_state_ind%abio_dic_ph_surf)%field_2d, & ! Tracer indices dic_ind => marbl_tracer_indices%abio_dic_ind, & di14c_ind => marbl_tracer_indices%abio_di14c_ind, & diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index cb440d72..ea7a6682 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -3304,40 +3304,40 @@ subroutine marbl_diagnostics_surface_flux_compute( & nox_flux => surface_flux_forcings(surface_flux_forcing_ind%nox_flux_id)%field_0d, & nhy_flux => surface_flux_forcings(surface_flux_forcing_ind%nhy_flux_id)%field_0d, & - flux_co2 => surface_flux_internal%flux_co2, & - flux_alt_co2 => surface_flux_internal%flux_alt_co2, & - co2star => surface_flux_internal%co2star, & - dco2star => surface_flux_internal%dco2star, & - pco2surf => surface_flux_internal%pco2surf, & - dpco2 => surface_flux_internal%dpco2, & - co2star_alt => surface_flux_internal%co2star_alt, & - dco2star_alt => surface_flux_internal%dco2star_alt, & - pco2surf_alt => surface_flux_internal%pco2surf_alt, & - dpco2_alt => surface_flux_internal%dpco2_alt, & - pv_o2 => surface_flux_internal%pv_o2, & - schmidt_o2 => surface_flux_internal%schmidt_o2, & - o2sat => surface_flux_internal%o2sat, & - nhx_surface_emis => surface_flux_internal%nhx_surface_emis, & - - - ph_prev => saved_state%state(saved_state_ind%base_ph_surf)%field_2d, & - ph_prev_alt_co2 => saved_state%state(saved_state_ind%base_ph_alt_co2_surf)%field_2d, & - - po4_ind => marbl_tracer_indices%po4_ind, & - no3_ind => marbl_tracer_indices%no3_ind, & - sio3_ind => marbl_tracer_indices%sio3_ind, & - nh4_ind => marbl_tracer_indices%nh4_ind, & - fe_ind => marbl_tracer_indices%fe_ind, & - o2_ind => marbl_tracer_indices%o2_ind, & - dic_ind => marbl_tracer_indices%dic_ind, & - dic_alt_co2_ind => marbl_tracer_indices%dic_alt_co2_ind, & - alk_ind => marbl_tracer_indices%alk_ind, & - doc_ind => marbl_tracer_indices%doc_ind, & - don_ind => marbl_tracer_indices%don_ind, & - dop_ind => marbl_tracer_indices%dop_ind, & - dopr_ind => marbl_tracer_indices%dopr_ind, & - donr_ind => marbl_tracer_indices%donr_ind, & - docr_ind => marbl_tracer_indices%docr_ind & + flux_co2 => surface_flux_internal%flux_co2, & + flux_alt_co2 => surface_flux_internal%flux_alt_co2, & + co2star => surface_flux_internal%co2star, & + dco2star => surface_flux_internal%dco2star, & + pco2surf => surface_flux_internal%pco2surf, & + dpco2 => surface_flux_internal%dpco2, & + co2star_alt => surface_flux_internal%co2star_alt, & + dco2star_alt => surface_flux_internal%dco2star_alt, & + pco2surf_alt => surface_flux_internal%pco2surf_alt, & + dpco2_alt => surface_flux_internal%dpco2_alt, & + pv_o2 => surface_flux_internal%pv_o2, & + schmidt_o2 => surface_flux_internal%schmidt_o2, & + o2sat => surface_flux_internal%o2sat, & + nhx_surface_emis => surface_flux_internal%nhx_surface_emis, & + + + ph_prev => saved_state%state(saved_state_ind%base_bio_ph_surf)%field_2d, & + ph_prev_alt_co2 => saved_state%state(saved_state_ind%base_bio_ph_alt_co2_surf)%field_2d, & + + po4_ind => marbl_tracer_indices%po4_ind, & + no3_ind => marbl_tracer_indices%no3_ind, & + sio3_ind => marbl_tracer_indices%sio3_ind, & + nh4_ind => marbl_tracer_indices%nh4_ind, & + fe_ind => marbl_tracer_indices%fe_ind, & + o2_ind => marbl_tracer_indices%o2_ind, & + dic_ind => marbl_tracer_indices%dic_ind, & + dic_alt_co2_ind => marbl_tracer_indices%dic_alt_co2_ind, & + alk_ind => marbl_tracer_indices%alk_ind, & + doc_ind => marbl_tracer_indices%doc_ind, & + don_ind => marbl_tracer_indices%don_ind, & + dop_ind => marbl_tracer_indices%dop_ind, & + dopr_ind => marbl_tracer_indices%dopr_ind, & + donr_ind => marbl_tracer_indices%donr_ind, & + docr_ind => marbl_tracer_indices%docr_ind & ) !----------------------------------------------------------------------- diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 6b22de9e..100835a6 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -337,7 +337,7 @@ module marbl_interface_private_types type (marbl_tracer_count_type) :: abio_dic type (marbl_tracer_count_type) :: ciso - ! base tracers + ! base biotic tracers integer (int_kind) :: po4_ind = 0 ! dissolved inorganic phosphate integer (int_kind) :: no3_ind = 0 ! dissolved inorganic nitrate integer (int_kind) :: sio3_ind = 0 ! dissolved inorganic silicate @@ -356,11 +356,11 @@ module marbl_interface_private_types integer (int_kind) :: donr_ind = 0 ! refractory DON integer (int_kind) :: docr_ind = 0 ! refractory DOC - ! ABIO tracers + ! abiotic dic tracers integer (int_kind) :: abio_dic_ind = 0 ! abiotic dissolved inorganic carbon integer (int_kind) :: abio_di14c_ind = 0 ! abiotic dissolved inorganic carbon 14 - ! CISO tracers + ! carbon isotope tracers integer (int_kind) :: di13c_ind = 0 ! dissolved inorganic carbon 13 integer (int_kind) :: do13ctot_ind = 0 ! dissolved organic carbon 13 (semi-labile+refractory) integer (int_kind) :: di14c_ind = 0 ! dissolved inorganic carbon 14 @@ -436,9 +436,9 @@ module marbl_interface_private_types !***************************************************************************** type, public :: marbl_surface_flux_saved_state_indexing_type - integer :: base_ph_surf = 0 - integer :: base_ph_alt_co2_surf = 0 - integer :: abio_ph_surf = 0 + integer :: base_bio_ph_surf = 0 + integer :: base_bio_ph_alt_co2_surf = 0 + integer :: abio_dic_ph_surf = 0 end type marbl_surface_flux_saved_state_indexing_type !***************************************************************************** @@ -1461,7 +1461,7 @@ subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lva allocate(this%auto_inds(autotroph_cnt)) allocate(this%zoo_inds(zooplankton_cnt)) - ! General ecosys tracers + ! Base biotic tracers if (base_bio_on) then call this%add_tracer_index('po4', 'base_bio', this%po4_ind, marbl_status_log) call this%add_tracer_index('no3', 'base_bio', this%no3_ind, marbl_status_log) @@ -1514,6 +1514,7 @@ subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lva end do end if + ! Carbon isotope tracers if (ciso_on) then call this%add_tracer_index('di13c', 'ciso', this%di13c_ind, marbl_status_log) call this%add_tracer_index('do13ctot', 'ciso', this%do13ctot_ind, marbl_status_log) @@ -1540,9 +1541,10 @@ subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lva end do end if + ! Abiotic tracers if (abio_dic_on) then - call this%add_tracer_index('abio_dic', 'abio', this%abio_dic_ind, marbl_status_log) - call this%add_tracer_index('abio_di14c', 'abio', this%abio_di14c_ind, marbl_status_log) + call this%add_tracer_index('abio_dic', 'abio_dic', this%abio_dic_ind, marbl_status_log) + call this%add_tracer_index('abio_di14c', 'abio_dic', this%abio_di14c_ind, marbl_status_log) end if if (marbl_status_log%labort_marbl) then @@ -1602,7 +1604,7 @@ subroutine add_tracer_index(this, ind_name, category, ind, marbl_status_log) select case (trim(category)) case ('base_bio') call this%base_bio%update_count(ind, marbl_status_log) - case ('abio') + case ('abio_dic') call this%abio_dic%update_count(ind, marbl_status_log) case ('ciso') call this%ciso%update_count(ind, marbl_status_log) @@ -1678,9 +1680,9 @@ subroutine surface_flux_forcing_index_constructor(this, base_bio_on, abio_dic_on forcing_cnt = 0 - ! ------------------------------------------------------- - ! | Request these fields if abio or base tracers are on | - ! ------------------------------------------------------- + ! ----------------------------------------------------------------- + ! | Request these fields if abiotic or base biotic tracers are on | + ! ----------------------------------------------------------------- if (base_bio_on .or. abio_dic_on) then ! Square of 10m wind diff --git a/src/marbl_saved_state_mod.F90 b/src/marbl_saved_state_mod.F90 index 16b3c95a..a3f851f8 100644 --- a/src/marbl_saved_state_mod.F90 +++ b/src/marbl_saved_state_mod.F90 @@ -41,7 +41,7 @@ subroutine marbl_saved_state_init(surface_state, interior_state, surf_ind, & vgrid = 'none' rank = 2 call surface_state%add_state(lname, sname, units, vgrid, rank, & - surf_ind%base_ph_surf, marbl_status_log) + surf_ind%base_bio_ph_surf, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("add_state(PH_SURF)", subname) return @@ -53,7 +53,7 @@ subroutine marbl_saved_state_init(surface_state, interior_state, surf_ind, & vgrid = 'none' rank = 2 call surface_state%add_state(lname, sname, units, vgrid, rank, & - surf_ind%abio_ph_surf, marbl_status_log) + surf_ind%abio_dic_ph_surf, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("add_state(ABIO_PH_SURF)", subname) return @@ -65,7 +65,7 @@ subroutine marbl_saved_state_init(surface_state, interior_state, surf_ind, & vgrid = 'none' rank = 2 call surface_state%add_state(lname, sname, units, vgrid, rank, & - surf_ind%base_ph_alt_co2_surf, marbl_status_log) + surf_ind%base_bio_ph_alt_co2_surf, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_status_log%log_error_trace("add_state(PH_SURF_ALT_CO2)", subname) return diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 6e681718..fa3b96f2 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -143,39 +143,39 @@ subroutine marbl_surface_flux_compute( & nox_flux => surface_flux_forcings(surface_flux_forcing_ind%nox_flux_id)%field_0d, & nhy_flux => surface_flux_forcings(surface_flux_forcing_ind%nhy_flux_id)%field_0d, & - piston_velocity => surface_flux_internal%piston_velocity(:), & - xkw_ice => surface_flux_internal%xkw_ice(:), & - flux_co2 => surface_flux_internal%flux_co2(:), & - co2star => surface_flux_internal%co2star(:), & - dco2star => surface_flux_internal%dco2star(:), & - pco2surf => surface_flux_internal%pco2surf(:), & - dpco2 => surface_flux_internal%dpco2(:), & - co3 => surface_flux_internal%co3(:), & - co2star_alt => surface_flux_internal%co2star_alt(:), & - dco2star_alt => surface_flux_internal%dco2star_alt(:), & - pco2surf_alt => surface_flux_internal%pco2surf_alt(:), & - dpco2_alt => surface_flux_internal%dpco2_alt(:), & - schmidt_co2 => surface_flux_internal%schmidt_co2(:), & - schmidt_o2 => surface_flux_internal%schmidt_o2(:), & - pv_o2 => surface_flux_internal%pv_o2(:), & - pv_co2 => surface_flux_internal%pv_co2(:), & - o2sat => surface_flux_internal%o2sat(:), & - flux_alt_co2 => surface_flux_internal%flux_alt_co2(:), & - nhx_surface_emis => surface_flux_internal%nhx_surface_emis(:), & - - ph_prev_surf => saved_state%state(saved_state_ind%base_ph_surf)%field_2d, & - ph_prev_alt_co2_surf => saved_state%state(saved_state_ind%base_ph_alt_co2_surf)%field_2d, & - - po4_ind => marbl_tracer_indices%po4_ind, & - no3_ind => marbl_tracer_indices%no3_ind, & - sio3_ind => marbl_tracer_indices%sio3_ind, & - nh4_ind => marbl_tracer_indices%nh4_ind, & - fe_ind => marbl_tracer_indices%fe_ind, & - o2_ind => marbl_tracer_indices%o2_ind, & - dic_ind => marbl_tracer_indices%dic_ind, & - dic_alt_co2_ind => marbl_tracer_indices%dic_alt_co2_ind, & - alk_ind => marbl_tracer_indices%alk_ind, & - alk_alt_co2_ind => marbl_tracer_indices%alk_alt_co2_ind & + piston_velocity => surface_flux_internal%piston_velocity(:), & + xkw_ice => surface_flux_internal%xkw_ice(:), & + flux_co2 => surface_flux_internal%flux_co2(:), & + co2star => surface_flux_internal%co2star(:), & + dco2star => surface_flux_internal%dco2star(:), & + pco2surf => surface_flux_internal%pco2surf(:), & + dpco2 => surface_flux_internal%dpco2(:), & + co3 => surface_flux_internal%co3(:), & + co2star_alt => surface_flux_internal%co2star_alt(:), & + dco2star_alt => surface_flux_internal%dco2star_alt(:), & + pco2surf_alt => surface_flux_internal%pco2surf_alt(:), & + dpco2_alt => surface_flux_internal%dpco2_alt(:), & + schmidt_co2 => surface_flux_internal%schmidt_co2(:), & + schmidt_o2 => surface_flux_internal%schmidt_o2(:), & + pv_o2 => surface_flux_internal%pv_o2(:), & + pv_co2 => surface_flux_internal%pv_co2(:), & + o2sat => surface_flux_internal%o2sat(:), & + flux_alt_co2 => surface_flux_internal%flux_alt_co2(:), & + nhx_surface_emis => surface_flux_internal%nhx_surface_emis(:), & + + ph_prev_surf => saved_state%state(saved_state_ind%base_bio_ph_surf)%field_2d, & + ph_prev_alt_co2_surf => saved_state%state(saved_state_ind%base_bio_ph_alt_co2_surf)%field_2d, & + + po4_ind => marbl_tracer_indices%po4_ind, & + no3_ind => marbl_tracer_indices%no3_ind, & + sio3_ind => marbl_tracer_indices%sio3_ind, & + nh4_ind => marbl_tracer_indices%nh4_ind, & + fe_ind => marbl_tracer_indices%fe_ind, & + o2_ind => marbl_tracer_indices%o2_ind, & + dic_ind => marbl_tracer_indices%dic_ind, & + dic_alt_co2_ind => marbl_tracer_indices%dic_alt_co2_ind, & + alk_ind => marbl_tracer_indices%alk_ind, & + alk_alt_co2_ind => marbl_tracer_indices%alk_alt_co2_ind & ) !----------------------------------------------------------------------- From 4f2f6b83d52f259d4057bde6e060ee35325e1479 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 10:12:11 -0600 Subject: [PATCH 50/64] Clean up marbl_abio_dic_surface_flux_mod Turned some divisions into multiplications, cleaned up local variable names, and added a new settings variable to control whether we compute the derivative diagnostics. Also fixed a missing-import bug in MARBL_share.py --- MARBL_tools/MARBL_share.py | 3 + defaults/diagnostics_latest.yaml | 3 + defaults/json/diagnostics_latest.json | 9 +- defaults/json/settings_cesm2.0.json | 8 + defaults/json/settings_cesm2.1+cocco.json | 8 + defaults/json/settings_cesm2.1.json | 8 + defaults/json/settings_latest+4p2z.json | 8 + defaults/json/settings_latest+cocco.json | 8 + defaults/json/settings_latest.json | 9 ++ defaults/settings_cesm2.0.yaml | 7 + defaults/settings_cesm2.1+cocco.yaml | 7 + defaults/settings_cesm2.1.yaml | 7 + defaults/settings_latest+4p2z.yaml | 7 + defaults/settings_latest+cocco.yaml | 7 + defaults/settings_latest.yaml | 8 + src/marbl_abio_dic_diagnostics_mod.F90 | 79 +++++----- src/marbl_abio_dic_surface_flux_mod.F90 | 141 +++++++++--------- src/marbl_settings_mod.F90 | 13 ++ .../settings/marbl_with_abio_only.settings | 1 + 19 files changed, 232 insertions(+), 109 deletions(-) diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index 25f4f705..c0a9b379 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -221,6 +221,9 @@ def expand_template_value(key_name, MARBL_settings, unit_system, unprocessed_dic ################################################################################ def meet_dependencies(input_dict, MARBL_settings): + import logging + logger = logging.getLogger(__name__) + if "dependencies" in input_dict.keys(): for dependency in input_dict["dependencies"].keys(): if dependency not in MARBL_settings.settings_dict.keys(): diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 3b98a922..82128fa0 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -307,6 +307,7 @@ ABIO_FG_DI14C : d_SF_ABIO_DIC_d_ABIO_DIC : dependencies : abio_dic_on : .true. + labio_derivative_diags : .true. longname : Derivative of STF_ABIO_DIC wrt ABIO_DIC units : cm/s vertical_grid : none @@ -315,6 +316,7 @@ d_SF_ABIO_DIC_d_ABIO_DIC : d_SF_ABIO_DI14C_d_ABIO_DIC : dependencies : abio_dic_on : .true. + labio_derivative_diags : .true. longname : Derivative of STF_ABIO_DI14C wrt ABIO_DIC units : cm/s vertical_grid : none @@ -323,6 +325,7 @@ d_SF_ABIO_DI14C_d_ABIO_DIC : d_SF_ABIO_DI14C_d_ABIO_DI14C : dependencies : abio_dic_on : .true. + labio_derivative_diags : .true. longname : Derivative of STF_ABIO_DI14C wrt ABIO_DI14C units : cm/s vertical_grid : none diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 1512702b..c076351a 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -2363,7 +2363,8 @@ }, "d_SF_ABIO_DI14C_d_ABIO_DI14C": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "labio_derivative_diags": ".true." }, "frequency": "never", "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DI14C", @@ -2373,7 +2374,8 @@ }, "d_SF_ABIO_DI14C_d_ABIO_DIC": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "labio_derivative_diags": ".true." }, "frequency": "never", "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DIC", @@ -2383,7 +2385,8 @@ }, "d_SF_ABIO_DIC_d_ABIO_DIC": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "labio_derivative_diags": ".true." }, "frequency": "never", "longname": "Derivative of STF_ABIO_DIC wrt ABIO_DIC", diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index 30763755..d989bfca 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -1097,6 +1097,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 28f7f47e..73124350 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -1139,6 +1139,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index d2c3de83..7b0c8730 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -1097,6 +1097,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index ffae6fdb..59e4f119 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -1192,6 +1192,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index 6ea8f0cd..ab8a6421 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -1139,6 +1139,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index 3c57b918..68ba6bc0 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -1103,6 +1103,14 @@ "subcategory": "5. general parameters", "units": 1 }, + "labio_derivative_diags": { + "datatype": "logical", + "default_value": ".false.", + "dependencies": "abio_dic_on", + "longname": "Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)", + "subcategory": "3. config flags", + "units": "unitless" + }, "ladjust_bury_coeff": { "_append_to_config_keywords": true, "datatype": "logical", @@ -1519,6 +1527,7 @@ }, "tracer_modules": { "abio_dic_on": { + "_append_to_config_keywords": true, "datatype": "logical", "default_value": ".false.", "longname": "Control whether abiotic carbon tracer module is active", diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 05fa8cc4..9be372ea 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -374,6 +374,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index 0cbf6f54..afb8a369 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -378,6 +378,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index d985531c..ebc8871e 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -376,6 +376,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index fdc4d912..0eac3a76 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -394,6 +394,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 81a2f01b..940d4715 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -378,6 +378,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index 162d6875..b2affdcf 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -263,6 +263,7 @@ tracer_modules : units : unitless datatype : logical default_value : .false. + _append_to_config_keywords : true ciso_on : longname : Control whether CISO tracer module is active subcategory : 1. tracer modules @@ -377,6 +378,13 @@ general_parms : units : unitless datatype : logical default_value : .false. + labio_derivative_diags : + dependencies : abio_dic_on + longname : Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov) + subcategory : 3. config flags + units : unitless + datatype : logical + default_value : .false. bftt_dz_sum_thres: dependencies : base_bio_on longname : MARBL will abort if abs(1 - sum(bot_flux_to_tend)) exceeds this threshold diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 818a2e82..0ab66fc9 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -8,6 +8,7 @@ module marbl_abio_dic_diagnostics_mod use marbl_kinds_mod, only : char_len use marbl_settings_mod, only : unit_system_type + use marbl_settings_mod, only : labio_derivative_diags use marbl_interface_public_types, only : marbl_diagnostics_type @@ -187,40 +188,42 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Derivative of STF_ABIO_DIC wrt ABIO_DIC' - sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DIC_d_ABIO_DIC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DIC' - sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DI14C_d_ABIO_DIC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DI14C' - sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DI14C_d_ABIO_DI14C, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + if (labio_derivative_diags) then + lname = 'Derivative of STF_ABIO_DIC wrt ABIO_DIC' + sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DIC_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DIC' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DI14C' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DI14C, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if end if end associate @@ -297,9 +300,11 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) - diags(ind%d_SF_ABIO_DIC_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,1) - diags(ind%d_SF_ABIO_DI14C_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,2) - diags(ind%d_SF_ABIO_DI14C_d_ABIO_DI14C)%field_2d(:) = derivative_terms(:,3) + if (labio_derivative_diags) then + diags(ind%d_SF_ABIO_DIC_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,1) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,2) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DI14C)%field_2d(:) = derivative_terms(:,3) + end if end associate diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index efcc88c1..1ef2668b 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -14,6 +14,7 @@ module marbl_abio_dic_surface_flux_mod use marbl_settings_mod, only : phlo_surf_init use marbl_settings_mod, only : phhi_surf_init use marbl_settings_mod, only : abio_dic_on + use marbl_settings_mod, only : labio_derivative_diags use marbl_interface_private_types, only : marbl_tracer_index_type use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type @@ -87,15 +88,15 @@ subroutine marbl_abio_dic_surface_flux_compute(& real(r8) :: dpco2(num_elements) real(r8) :: co3(num_elements) ! Terms for computing derivative diagnostics - real(r8) :: ph_surf_tmp(num_elements) - real(r8) :: phlo_tmp(num_elements) - real(r8) :: phhi_tmp(num_elements) - real(r8) :: co2star_tmp1(num_elements) - real(r8) :: co2star_tmp2(num_elements) - real(r8) :: dco2star_tmp(num_elements) - real(r8) :: pco2surf_tmp(num_elements) - real(r8) :: dpco2_tmp(num_elements) - real(r8) :: co3_tmp(num_elements) + real(r8) :: ph_surf_pert(num_elements) + real(r8) :: phlo_pert(num_elements) + real(r8) :: phhi_pert(num_elements) + real(r8) :: co2star_pert_p1(num_elements) + real(r8) :: co2star_pert_m1(num_elements) + real(r8) :: dco2star_pert(num_elements) + real(r8) :: pco2surf_pert(num_elements) + real(r8) :: dpco2_pert(num_elements) + real(r8) :: co3_pert(num_elements) real(r8) :: derivative_terms(num_elements, 3) ! d[SF_ABIO_DIC]/d[ABIO_DIC] ! d[SF_ABIO_DI14C]/d[ABIO_DIC] ! d[SF_ABIO_DI14C]/d[ABIO_DI14C] @@ -136,7 +137,7 @@ subroutine marbl_abio_dic_surface_flux_compute(& else where R14C_ocn = c0 end where - R14C_atm = c1 + d14c(:) / 1000._r8 + R14C_atm = c1 + d14c(:) * 1.0e-3_r8 !----------------------------------------------------------------------- ! Use constant concentrations of silicate and phosphate @@ -159,15 +160,15 @@ subroutine marbl_abio_dic_surface_flux_compute(& phlo(:) = phlo_surf_init phhi(:) = phhi_surf_init end where - phlo_tmp(:) = phlo(:) - phhi_tmp(:) = phhi(:) + phlo_pert(:) = phlo(:) + phhi_pert(:) = phhi(:) ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g ! and ocn_ref_salinity comes from shr_const (SHR_CONST_OCN_REF_SAL = 34.7) ! Orr et al eq (27): ! 2297 micromol / kg ! Sbar = "global- and annual- mean salinity" - alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) / 34.7_r8 + alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) * (c1 / 34.7_r8) ! Note the following computes a new ph_surf ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 @@ -202,62 +203,64 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Compute derivative diagnostics derivative_terms(:,:) = c0 - call marbl_co2calc_surface(& - num_elements = num_elements, & - lcomp_co2calc_coeffs = .false., & - dic_in = tracers_at_surface(:,dic_ind) + c1, & - xco2_in = xco2(:), & - ta_in = alk_surf(:), & - pt_in = PO4(:), & - sit_in = SiO2(:), & - temp = sst(:), & - salt = sss(:), & - atmpres = ap_used(:), & - unit_system = unit_system, & - phlo = phlo_tmp, & - phhi = phhi_tmp, & - ph = ph_surf_tmp, & - co3 = co3_tmp(:), & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co2star = co2star_tmp1, & - dco2star = dco2star_tmp, & - pco2surf = pco2surf_tmp, & - dpco2 = dpco2_tmp, & - marbl_status_log = marbl_status_log) - call marbl_co2calc_surface(& - num_elements = num_elements, & - lcomp_co2calc_coeffs = .false., & - dic_in = tracers_at_surface(:,dic_ind) - c1, & - xco2_in = xco2(:), & - ta_in = alk_surf(:), & - pt_in = PO4(:), & - sit_in = SiO2(:), & - temp = sst(:), & - salt = sss(:), & - atmpres = ap_used(:), & - unit_system = unit_system, & - phlo = phlo_tmp, & - phhi = phhi_tmp, & - ph = ph_surf_tmp, & - co3 = co3_tmp(:), & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co2star = co2star_tmp2, & - dco2star = dco2star_tmp, & - pco2surf = pco2surf_tmp, & - dpco2 = dpco2_tmp, & - marbl_status_log = marbl_status_log) - derivative_terms(:,1) = -p5 * (co2star_tmp1(:) - co2star_tmp2(:)) * pv_co2(:) - where (tracers_at_surface(:,dic_ind) > 0) - derivative_terms(:,2) = -p5 * (co2star_tmp1(:) / (tracers_at_surface(:,dic_ind) + c1) & - - co2star_tmp2(:) / (tracers_at_surface(:,dic_ind) - c1)) & - * tracers_at_surface(:,di14c_ind) * pv_co2(:) - derivative_terms(:,3) = -pv_co2(:) * co2star(:) / tracers_at_surface(:,dic_ind) - else where - derivative_terms(:,2) = c0 - derivative_terms(:,3) = c0 - end where + if (labio_derivative_diags) then + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) + c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_pert, & + phhi = phhi_pert, & + ph = ph_surf_pert, & + co3 = co3_pert(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_pert_p1, & + dco2star = dco2star_pert, & + pco2surf = pco2surf_pert, & + dpco2 = dpco2_pert, & + marbl_status_log = marbl_status_log) + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) - c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_pert, & + phhi = phhi_pert, & + ph = ph_surf_pert, & + co3 = co3_pert(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_pert_m1, & + dco2star = dco2star_pert, & + pco2surf = pco2surf_pert, & + dpco2 = dpco2_pert, & + marbl_status_log = marbl_status_log) + derivative_terms(:,1) = -p5 * (co2star_pert_p1(:) - co2star_pert_m1(:)) * pv_co2(:) + where (tracers_at_surface(:,dic_ind) > 0) + derivative_terms(:,2) = -p5 * (co2star_pert_p1(:) / (tracers_at_surface(:,dic_ind) + c1) & + - co2star_pert_m1(:) / (tracers_at_surface(:,dic_ind) - c1)) & + * tracers_at_surface(:,di14c_ind) * pv_co2(:) + derivative_terms(:,3) = -pv_co2(:) * co2star(:) / tracers_at_surface(:,dic_ind) + else where + derivative_terms(:,2) = c0 + derivative_terms(:,3) = c0 + end where + end if ! update abiotic DIC diagnostics call marbl_abio_dic_diagnostics_surface_flux_compute( & diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index 7db8e855..b548776b 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -256,6 +256,7 @@ module marbl_settings_mod ! (this is done primarily in spinup runs) logical(log_kind), target :: lo2_consumption_scalef ! Apply o2_consumption_scalef to o2 consumption (and request it as a forcing) logical(log_kind), target :: lp_remin_scalef ! Apply p_remin_scalef to particulate remin (and request it as a forcing) + logical(log_kind), target :: labio_derivative_diags ! Compute derivative diagnostic terms in abiotic surface flux module character(len=char_len), target :: init_bury_coeff_opt @@ -426,6 +427,7 @@ subroutine marbl_settings_set_defaults_general_parms(unit_system) ladjust_bury_coeff = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lo2_consumption_scalef = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lp_remin_scalef = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + labio_derivative_diags = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above particulate_flux_ref_depth = 100._r8 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above bftt_dz_sum_thres = 1.0e-14_r8 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above Jint_Ctot_thres_molpm2pyr = 1.0e-9_r8 ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above @@ -719,6 +721,17 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) end if + if (abio_dic_on) then + sname = 'labio_derivative_diags' + lname = 'Control whether derivative diagnostics are computed in abiotic surface flux (useful for Newton-Krylov)' + units = 'unitless' + datatype = 'logical' + lptr => labio_derivative_diags + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + end if + sname = 'lcheck_forcing' lname = 'Control whether consistency checks are performed on forcing input (useful for debugging)' units = 'unitless' diff --git a/tests/input_files/settings/marbl_with_abio_only.settings b/tests/input_files/settings/marbl_with_abio_only.settings index aa4dabf1..6abdb91d 100644 --- a/tests/input_files/settings/marbl_with_abio_only.settings +++ b/tests/input_files/settings/marbl_with_abio_only.settings @@ -1,2 +1,3 @@ abio_dic_on = .true. base_bio_on = .false. +labio_derivative_diags = .true. From 7e87ae5ce36d15f75afa4ed214947cf7a0fb7fbf Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 10:35:46 -0600 Subject: [PATCH 51/64] Fix get_put test Need to turn all tracer modules on to be able to test all possible config flags --- tests/driver_src/marbl_get_put_drv.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/driver_src/marbl_get_put_drv.F90 b/tests/driver_src/marbl_get_put_drv.F90 index ca2339a6..b9455b41 100644 --- a/tests/driver_src/marbl_get_put_drv.F90 +++ b/tests/driver_src/marbl_get_put_drv.F90 @@ -46,7 +46,8 @@ subroutine test(marbl_instance, driver_status_log) zt(k) = p5*(zw(k-1)+zw(k)) end do - ! Set ciso_on = .true. for local instance + ! Set abio_dic_on and ciso_on = .true. for local instance + call marbl_instance_loc%put_setting('abio_dic_on', .true.) call marbl_instance_loc%put_setting('ciso_on', .true.) if (marbl_instance_loc%StatusLog%labort_marbl) then call driver_status_log%log_error_trace('marbl_loc%put_setting', subname) From 82c85a32287f5d3be3acec8a616e142e43f1a106 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 10:53:07 -0600 Subject: [PATCH 52/64] Clean up marbl_settings_mod following review Want to use lflux_gas_co2 with both base_biotic and abio_dic tracer modules; setting default value for lflux_gas_o2 = base_bio_on then cleans up a lot of the logic in surface_flux_compute(). Also added spaces after several ".not." statements and took xkw_ice out of the interior share type (it's only needed in surface_flux_compute) --- src/marbl_diagnostics_mod.F90 | 5 +- src/marbl_interface_private_types.F90 | 3 - src/marbl_settings_mod.F90 | 30 +-- src/marbl_surface_flux_mod.F90 | 309 +++++++++++++------------- 4 files changed, 169 insertions(+), 178 deletions(-) diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index ea7a6682..cced9d9e 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -3415,7 +3415,6 @@ subroutine marbl_diagnostics_surface_flux_share( & use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type - use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : lflux_gas_o2 use marbl_settings_mod, only : lflux_gas_co2 @@ -3438,7 +3437,7 @@ subroutine marbl_diagnostics_surface_flux_share( & ! calculate gas flux quantities if necessary !----------------------------------------------------------------------- - if (abio_dic_on .or. (base_bio_on .and. (lflux_gas_o2 .or. lflux_gas_co2))) then + if (lflux_gas_o2 .or. lflux_gas_co2) then diags(ind_diag%ECOSYS_IFRAC)%field_2d(:) = ifrac(:) diags(ind_diag%ECOSYS_XKW)%field_2d(:) = piston_velocity(:) @@ -3450,7 +3449,7 @@ subroutine marbl_diagnostics_surface_flux_share( & ! compute CO2 flux, computing disequilibrium one row at a time !----------------------------------------------------------------------- - if (abio_dic_on .or. (base_bio_on .and. lflux_gas_co2)) then + if (lflux_gas_co2) then diags(ind_diag%PV_CO2)%field_2d(:) = pv_co2(:) diags(ind_diag%SCHMIDT_CO2)%field_2d(:) = schmidt_co2(:) diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 100835a6..8ac48a2f 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -181,7 +181,6 @@ module marbl_interface_private_types ! that makes it easy to pass to the diagnostics type, public :: marbl_surface_flux_internal_type real (r8), allocatable, dimension(:) :: piston_velocity - real (r8), allocatable, dimension(:) :: xkw_ice real (r8), allocatable, dimension(:) :: flux_co2 real (r8), allocatable, dimension(:) :: flux_alt_co2 ! tracer flux alternative CO2 (conc flux units) real (r8), allocatable, dimension(:) :: co2star @@ -1344,7 +1343,6 @@ subroutine marbl_surface_flux_internal_constructor(this, num_elements) integer (int_kind), intent(in) :: num_elements allocate(this%piston_velocity(num_elements), source=c0) - allocate(this%xkw_ice(num_elements), source=c0) allocate(this%flux_co2(num_elements), source=c0) allocate(this%flux_alt_co2(num_elements), source=c0) allocate(this%co2star(num_elements), source=c0) @@ -1373,7 +1371,6 @@ subroutine marbl_surface_flux_internal_destructor(this) if (allocated(this%piston_velocity)) then deallocate(this%piston_velocity) - deallocate(this%xkw_ice) deallocate(this%flux_co2) deallocate(this%flux_alt_co2) deallocate(this%co2star) diff --git a/src/marbl_settings_mod.F90 b/src/marbl_settings_mod.F90 index b548776b..33df5aaa 100644 --- a/src/marbl_settings_mod.F90 +++ b/src/marbl_settings_mod.F90 @@ -419,7 +419,7 @@ subroutine marbl_settings_set_defaults_general_parms(unit_system) ciso_lsource_sink = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lcheck_forcing = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lecovars_full_depth_tavg = .false. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above - lflux_gas_o2 = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above + lflux_gas_o2 = base_bio_on ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lflux_gas_co2 = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lcompute_nhx_surface_emis = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above lvariable_PtoC = .true. ! CESM USERS - DO NOT CHANGE HERE! POP calls put_setting() for this var, see CESM NOTE above @@ -710,6 +710,15 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + sname = 'lflux_gas_co2' + lname = 'Run CO2 gas flux portion of the code' + units = 'unitless' + datatype = 'logical' + lptr => lflux_gas_co2 + call this%add_var(sname, lname, units, datatype, category, & + marbl_status_log, lptr=lptr) + call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) + if (ciso_on) then sname = 'ciso_lsource_sink' lname = 'Control which portions of carbon isotope code are executed (useful for debugging)' @@ -751,15 +760,6 @@ subroutine marbl_settings_define_general_parms(this, marbl_status_log) marbl_status_log, lptr=lptr) call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lflux_gas_co2' - lname = 'Run CO2 gas flux portion of the code' - units = 'unitless' - datatype = 'logical' - lptr => lflux_gas_co2 - call this%add_var(sname, lname, units, datatype, category, & - marbl_status_log, lptr=lptr) - call check_and_log_add_var_error(marbl_status_log, sname, subname, labort_marbl_loc) - sname = 'lcompute_nhx_surface_emis' lname = 'control if NHx emissions are computed' units = 'unitless' @@ -2220,13 +2220,13 @@ subroutine marbl_settings_consistency_check(lallow_glo_ops, marbl_status_log) end if ! Abort if ciso is on but base_bio is not - if (ciso_on .and. (.not.base_bio_on)) then + if (ciso_on .and. (.not. base_bio_on)) then write(log_message, '(A)') 'You can not run with carbon isotopes without the base biotic tracers' call marbl_status_log%log_error(log_message, subname) end if ! Abort if GCM doesn't support global ops but configuration requires them - if (ladjust_bury_coeff .and. (.not.lallow_glo_ops)) then + if (ladjust_bury_coeff .and. (.not. lallow_glo_ops)) then write(log_message,'(2A)') 'Can not run with ladjust_bury_coeff = ', & '.true. unless GCM can perform global operations' call marbl_status_log%log_error(log_message, subname) @@ -2502,7 +2502,7 @@ subroutine add_var(this, sname, lname, units, datatype, category, & end if ! 4) Append new entry to list - if (.not.associated(this%vars)) then + if (.not. associated(this%vars)) then this%vars => new_entry else ll_prev%next => new_entry @@ -2888,7 +2888,7 @@ subroutine put(this, var, marbl_status_log, rval, ival, lval, sval, uval) new_entry%datatype = 'unknown' end if - if (.not.associated(this%VarsFromPut)) then + if (.not. associated(this%VarsFromPut)) then this%VarsFromPut => new_entry else this%LastVarFromPut%next => new_entry @@ -2933,7 +2933,7 @@ subroutine get(this, var, marbl_status_log, rval, ival, lval, sval) if (case_insensitive_eq((ll_ptr%short_name), trim(var))) exit ll_ptr => ll_ptr%next end do - if (.not.associated(ll_ptr)) then + if (.not. associated(ll_ptr)) then write(log_message, "(2A)") trim(var), 'not found!' call marbl_status_log%log_error(log_message, subname) return diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index fa3b96f2..8ffa2b32 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -87,7 +87,6 @@ subroutine marbl_surface_flux_compute( & use marbl_oxygen, only : o2sat_surf use marbl_nhx_surface_emis_mod, only : marbl_nhx_surface_emis_compute use marbl_settings_mod, only : base_bio_on - use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : lcompute_nhx_surface_emis use marbl_settings_mod, only : xkw_coeff use marbl_surface_flux_share_mod, only : marbl_surface_flux_share_export_variables @@ -120,12 +119,13 @@ subroutine marbl_surface_flux_compute( & !----------------------------------------------------------------------- character(len=*), parameter :: subname = 'marbl_surface_flux_mod:marbl_surface_flux_compute' - integer (int_kind) :: auto_ind ! autotroph functional group index - real (r8) :: phlo(num_elements) ! lower bound for ph in solver - real (r8) :: phhi(num_elements) ! upper bound for ph in solver - real (r8) :: o2sat_1atm(num_elements) ! o2 saturation @ 1 atm (conc units) - real (r8) :: totalChl_loc(num_elements) ! local value of totalChl - real (r8) :: flux_o2_loc(num_elements) ! local value of o2 flux + integer(int_kind) :: auto_ind ! autotroph functional group index + real(r8) :: phlo(num_elements) ! lower bound for ph in solver + real(r8) :: phhi(num_elements) ! upper bound for ph in solver + real(r8) :: xkw_ice(num_elements) ! common portion of piston vel., (1-fice)*xkw (cm/s) + real(r8) :: o2sat_1atm(num_elements) ! o2 saturation @ 1 atm (conc units) + real(r8) :: totalChl_loc(num_elements) ! local value of totalChl + real(r8) :: flux_o2_loc(num_elements) ! local value of o2 flux !----------------------------------------------------------------------- associate( & @@ -144,7 +144,6 @@ subroutine marbl_surface_flux_compute( & nhy_flux => surface_flux_forcings(surface_flux_forcing_ind%nhy_flux_id)%field_0d, & piston_velocity => surface_flux_internal%piston_velocity(:), & - xkw_ice => surface_flux_internal%xkw_ice(:), & flux_co2 => surface_flux_internal%flux_co2(:), & co2star => surface_flux_internal%co2star(:), & dco2star => surface_flux_internal%dco2star(:), & @@ -188,13 +187,16 @@ subroutine marbl_surface_flux_compute( & ! fields used for both abiotic and biotic surface flux computation !----------------------------------------------------------------------- - if (abio_dic_on .or. (base_bio_on .and. (lflux_gas_o2 .or. lflux_gas_co2))) then + if (lflux_gas_o2 .or. lflux_gas_co2) then piston_velocity = xkw_coeff*u10_sqr(:) xkw_ice(:) = (c1 - ifrac(:)) * piston_velocity end if - if (abio_dic_on .or. (base_bio_on .and. lflux_gas_co2)) then + if (lflux_gas_co2) then schmidt_co2(:) = schmidt_co2_surf(num_elements, sst) pv_co2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_co2(:)) + else + schmidt_co2(:) = c0 + pv_co2(:) = c0 end if !----------------------------------------------------------------------- @@ -254,154 +256,147 @@ subroutine marbl_surface_flux_compute( & ! compute CO2 flux, computing disequilibrium one row at a time !----------------------------------------------------------------------- - if (lflux_gas_o2 .or. lflux_gas_co2) then + !----------------------------------------------------------------------- + ! compute O2 flux + !----------------------------------------------------------------------- + + if (lflux_gas_o2) then + schmidt_o2(:) = schmidt_o2_surf(num_elements, sst) + + o2sat_1atm(:) = o2sat_surf(num_elements, sst, sss) + + pv_o2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_o2(:)) + o2sat(:) = ap_used(:) * o2sat_1atm(:) + flux_o2_loc(:) = pv_o2(:) * (o2sat(:) - tracers_at_surface(:, o2_ind)) + surface_fluxes(:, o2_ind) = surface_fluxes(:, o2_ind) + flux_o2_loc(:) + if (sfo_ind%flux_o2_id.ne.0) then + surface_flux_output%outputs_for_GCM(sfo_ind%flux_o2_id)%forcing_field_0d(:) = flux_o2_loc + end if + else + schmidt_o2(:) = c0 + pv_o2(:) = c0 + o2sat(:) = c0 + endif ! lflux_gas_o2 + + !----------------------------------------------------------------------- + ! compute CO2 flux, computing disequilibrium + !----------------------------------------------------------------------- + + if (lflux_gas_co2) then + + !----------------------------------------------------------------------- + ! Set flux_co2 + !----------------------------------------------------------------------- + + where (ph_prev_surf(:) /= c0) + phlo(:) = ph_prev_surf(:) - del_ph + phhi(:) = ph_prev_surf(:) + del_ph + elsewhere + phlo(:) = phlo_surf_init + phhi(:) = phhi_surf_init + end where + + ! Note the following computes a new ph_prev_surf + ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 + call marbl_co2calc_surface( & + num_elements = num_elements, & + lcomp_co2calc_coeffs = .true., & + dic_in = tracers_at_surface(:,dic_ind), & + xco2_in = surface_flux_forcings(ind%xco2_id)%field_0d, & + ta_in = tracers_at_surface(:,alk_ind), & + pt_in = tracers_at_surface(:,po4_ind), & + sit_in = tracers_at_surface(:,sio3_ind), & + temp = surface_flux_forcings(ind%sst_id)%field_0d, & + salt = surface_flux_forcings(ind%sss_id)%field_0d, & + atmpres = surface_flux_forcings(ind%atm_pressure_id)%field_0d, & + unit_system = unit_system, & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co3 = co3, & + co2star = co2star, & + dco2star = dco2star, & + pco2surf = pco2surf, & + dpco2 = dpco2, & + phlo = phlo, & + phhi = phhi, & + ph = ph_prev_surf, & + marbl_status_log = marbl_status_log) + + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace('marbl_co2calc_surface() with flux_co2', subname) + return + end if + + if (marbl_status_log%lwarning) then + call marbl_status_log%log_warning_trace('marbl_co2calc_surface() with flux_co2', subname) + end if + + flux_co2(:) = pv_co2(:) * dco2star(:) + if (sfo_ind%flux_co2_id.ne.0) then + surface_flux_output%outputs_for_GCM(sfo_ind%flux_co2_id)%forcing_field_0d(:) = flux_co2 + end if + + !------------------------------------------------------------------- + ! The following variables need to be shared with other modules, + ! and are now defined in marbl_share as targets. + !------------------------------------------------------------------- + + call marbl_surface_flux_share_export_variables(surface_flux_internal, tracers_at_surface, & + marbl_tracer_indices, surface_flux_share) + + !----------------------------------------------------------------------- + ! Set flux_alt_co2 + !----------------------------------------------------------------------- + + where (ph_prev_alt_co2_surf(:) /= c0) + phlo(:) = ph_prev_alt_co2_surf(:) - del_ph + phhi(:) = ph_prev_alt_co2_surf(:) + del_ph + elsewhere + phlo(:) = phlo_surf_init + phhi(:) = phhi_surf_init + end where + + ! Note the following computes a new ph_prev_alt_co2 + ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 + call marbl_co2calc_surface( & + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_alt_co2_ind), & + xco2_in = surface_flux_forcings(ind%xco2_alt_co2_id)%field_0d, & + ta_in = tracers_at_surface(:,alk_alt_co2_ind), & + pt_in = tracers_at_surface(:,po4_ind), & + sit_in = tracers_at_surface(:,sio3_ind), & + temp = surface_flux_forcings(ind%sst_id)%field_0d, & + salt = surface_flux_forcings(ind%sss_id)%field_0d, & + atmpres = surface_flux_forcings(ind%atm_pressure_id)%field_0d, & + unit_system = unit_system, & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co3 = co3, & + co2star = co2star_alt, & + dco2star = dco2star_alt, & + pco2surf = pco2surf_alt, & + dpco2 = dpco2_alt, & + phlo = phlo, & + phhi = phhi, & + ph = ph_prev_alt_co2_surf, & + marbl_status_log = marbl_status_log) + + if (marbl_status_log%labort_marbl) then + call marbl_status_log%log_error_trace('marbl_co2calc_surface() with flux_alt_co2', subname) + return + end if + + if (marbl_status_log%lwarning) then + call marbl_status_log%log_warning_trace('marbl_co2calc_surface() with flux_alt_co2', subname) + end if + + flux_alt_co2(:) = pv_co2(:) * dco2star_alt(:) + + surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) + surface_fluxes(:, dic_alt_co2_ind) = surface_fluxes(:, dic_alt_co2_ind) + flux_alt_co2(:) - !----------------------------------------------------------------------- - ! compute O2 flux - !----------------------------------------------------------------------- - - if (lflux_gas_o2) then - schmidt_o2(:) = schmidt_o2_surf(num_elements, sst) - - o2sat_1atm(:) = o2sat_surf(num_elements, sst, sss) - - pv_o2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_o2(:)) - o2sat(:) = ap_used(:) * o2sat_1atm(:) - flux_o2_loc(:) = pv_o2(:) * (o2sat(:) - tracers_at_surface(:, o2_ind)) - surface_fluxes(:, o2_ind) = surface_fluxes(:, o2_ind) + flux_o2_loc(:) - if (sfo_ind%flux_o2_id.ne.0) then - surface_flux_output%outputs_for_GCM(sfo_ind%flux_o2_id)%forcing_field_0d(:) = flux_o2_loc - end if - else - schmidt_o2(:) = c0 - pv_o2(:) = c0 - o2sat(:) = c0 - endif ! lflux_gas_o2 - - !----------------------------------------------------------------------- - ! compute CO2 flux, computing disequilibrium - !----------------------------------------------------------------------- - - if (lflux_gas_co2) then - - !----------------------------------------------------------------------- - ! Set flux_co2 - !----------------------------------------------------------------------- - - where (ph_prev_surf(:) /= c0) - phlo(:) = ph_prev_surf(:) - del_ph - phhi(:) = ph_prev_surf(:) + del_ph - elsewhere - phlo(:) = phlo_surf_init - phhi(:) = phhi_surf_init - end where - - ! Note the following computes a new ph_prev_surf - ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 - call marbl_co2calc_surface( & - num_elements = num_elements, & - lcomp_co2calc_coeffs = .true., & - dic_in = tracers_at_surface(:,dic_ind), & - xco2_in = surface_flux_forcings(ind%xco2_id)%field_0d, & - ta_in = tracers_at_surface(:,alk_ind), & - pt_in = tracers_at_surface(:,po4_ind), & - sit_in = tracers_at_surface(:,sio3_ind), & - temp = surface_flux_forcings(ind%sst_id)%field_0d, & - salt = surface_flux_forcings(ind%sss_id)%field_0d, & - atmpres = surface_flux_forcings(ind%atm_pressure_id)%field_0d, & - unit_system = unit_system, & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co3 = co3, & - co2star = co2star, & - dco2star = dco2star, & - pco2surf = pco2surf, & - dpco2 = dpco2, & - phlo = phlo, & - phhi = phhi, & - ph = ph_prev_surf, & - marbl_status_log = marbl_status_log) - - if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace('marbl_co2calc_surface() with flux_co2', subname) - return - end if - - if (marbl_status_log%lwarning) then - call marbl_status_log%log_warning_trace('marbl_co2calc_surface() with flux_co2', subname) - end if - - flux_co2(:) = pv_co2(:) * dco2star(:) - if (sfo_ind%flux_co2_id.ne.0) then - surface_flux_output%outputs_for_GCM(sfo_ind%flux_co2_id)%forcing_field_0d(:) = flux_co2 - end if - - !------------------------------------------------------------------- - ! The following variables need to be shared with other modules, - ! and are now defined in marbl_share as targets. - !------------------------------------------------------------------- - - call marbl_surface_flux_share_export_variables(surface_flux_internal, tracers_at_surface, & - marbl_tracer_indices, surface_flux_share) - - !----------------------------------------------------------------------- - ! Set flux_alt_co2 - !----------------------------------------------------------------------- - - where (ph_prev_alt_co2_surf(:) /= c0) - phlo(:) = ph_prev_alt_co2_surf(:) - del_ph - phhi(:) = ph_prev_alt_co2_surf(:) + del_ph - elsewhere - phlo(:) = phlo_surf_init - phhi(:) = phhi_surf_init - end where - - ! Note the following computes a new ph_prev_alt_co2 - ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 - call marbl_co2calc_surface( & - num_elements = num_elements, & - lcomp_co2calc_coeffs = .false., & - dic_in = tracers_at_surface(:,dic_alt_co2_ind), & - xco2_in = surface_flux_forcings(ind%xco2_alt_co2_id)%field_0d, & - ta_in = tracers_at_surface(:,alk_alt_co2_ind), & - pt_in = tracers_at_surface(:,po4_ind), & - sit_in = tracers_at_surface(:,sio3_ind), & - temp = surface_flux_forcings(ind%sst_id)%field_0d, & - salt = surface_flux_forcings(ind%sss_id)%field_0d, & - atmpres = surface_flux_forcings(ind%atm_pressure_id)%field_0d, & - unit_system = unit_system, & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co3 = co3, & - co2star = co2star_alt, & - dco2star = dco2star_alt, & - pco2surf = pco2surf_alt, & - dpco2 = dpco2_alt, & - phlo = phlo, & - phhi = phhi, & - ph = ph_prev_alt_co2_surf, & - marbl_status_log = marbl_status_log) - - if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace('marbl_co2calc_surface() with flux_alt_co2', subname) - return - end if - - if (marbl_status_log%lwarning) then - call marbl_status_log%log_warning_trace('marbl_co2calc_surface() with flux_alt_co2', subname) - end if - - flux_alt_co2(:) = pv_co2(:) * dco2star_alt(:) - - surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + flux_co2(:) - surface_fluxes(:, dic_alt_co2_ind) = surface_fluxes(:, dic_alt_co2_ind) + flux_alt_co2(:) - - else - schmidt_co2(:) = c0 - pv_co2(:) = c0 - endif ! lflux_gas_co2 - - endif ! lflux_gas_o2 .or. lflux_gas_co2 + endif ! lflux_gas_co2 !----------------------------------------------------------------------- ! compute NHx emissions From 149c0c04515185b74cd8c3a443da045e34c4b779 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 11:34:39 -0600 Subject: [PATCH 53/64] Clean up diagnostic names Remove "in permil" from long name of variables ("permil" is already noted in the "units" attribute) and dropped "for base biotic tracer fluxes" from the few variables where I had added it. Also updated the long name of the abiotic derivative diagnostics to refer to ABIO_FG_DIC (what the diagnostic is called) instead of STF_ABIO_DIC. --- defaults/diagnostics_latest.yaml | 24 ++++++++++++------------ defaults/json/diagnostics_latest.json | 24 ++++++++++++------------ src/marbl_abio_dic_diagnostics_mod.F90 | 11 +++++------ src/marbl_ciso_diagnostics_mod.F90 | 4 ++-- src/marbl_diagnostics_mod.F90 | 10 +++++----- 5 files changed, 36 insertions(+), 37 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 82128fa0..5ac9644b 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -22,7 +22,7 @@ #################### ECOSYS_IFRAC : - longname : Ice Fraction for base biotic tracer fluxes # Want more consistent capitalization + longname : Ice Fraction units : fraction vertical_grid : none frequency : @@ -32,7 +32,7 @@ ECOSYS_IFRAC : - average - average ECOSYS_XKW : - longname : XKW for base biotic tracer fluxes # Want more consistent capitalization + longname : XKW units : cm/s vertical_grid : none frequency : @@ -42,13 +42,13 @@ ECOSYS_XKW : - average - average ECOSYS_ATM_PRESS : - longname : Atmospheric Pressure for base biotic tracer fluxes # Want more consistent capitalization + longname : Atmospheric Pressure units : atmospheres vertical_grid : none frequency : medium operator : average PV_CO2 : - longname : CO2 Piston Velocity for base biotic tracer fluxes + longname : CO2 Piston Velocity units : cm/s vertical_grid : none frequency : never @@ -126,7 +126,7 @@ pCO2SURF_ALT_CO2 : DpCO2 : &DpCO2 dependencies : base_bio_on : .true. - longname : D pCO2 for base biotic tracer fluxes + longname : D pCO2 units : ppmv vertical_grid : none frequency : @@ -235,7 +235,7 @@ ABIO_pCO2 : ABIO_D14C_atm : dependencies : abio_dic_on : .true. - longname : Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes + longname : Atmospheric Delta 14C for Abiotic DIC tracer fluxes units : permil vertical_grid : none frequency : medium @@ -308,7 +308,7 @@ d_SF_ABIO_DIC_d_ABIO_DIC : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. - longname : Derivative of STF_ABIO_DIC wrt ABIO_DIC + longname : Derivative of ABIO_FG_DIC wrt ABIO_DIC units : cm/s vertical_grid : none frequency : never @@ -317,7 +317,7 @@ d_SF_ABIO_DI14C_d_ABIO_DIC : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. - longname : Derivative of STF_ABIO_DI14C wrt ABIO_DIC + longname : Derivative of ABIO_FG_DI14C wrt ABIO_DIC units : cm/s vertical_grid : none frequency : never @@ -326,7 +326,7 @@ d_SF_ABIO_DI14C_d_ABIO_DI14C : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. - longname : Derivative of STF_ABIO_DI14C wrt ABIO_DI14C + longname : Derivative of ABIO_FG_DI14C wrt ABIO_DI14C units : cm/s vertical_grid : none frequency : never @@ -371,7 +371,7 @@ CISO_FG_d13C : CISO_D13C_atm : dependencies : ciso_on : .true. - longname : Atmospheric Delta 13C in permil + longname : Atmospheric Delta 13C units : permil vertical_grid : none frequency : medium @@ -443,7 +443,7 @@ CISO_FG_d14C : CISO_D14C_atm : dependencies : ciso_on : .true. - longname : Atmospheric Delta 14C in permil + longname : Atmospheric Delta 14C units : permil vertical_grid : none frequency : medium @@ -1443,7 +1443,7 @@ Nfix : ABIO_D14C_ocn : dependencies : abio_dic_on : .true. - longname : Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes + longname : Oceanic Delta 14C for Abiotic DIC tracer fluxes units : permil vertical_grid : layer_avg frequency : medium diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index c076351a..edcd23af 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -383,7 +383,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes", + "longname": "Atmospheric Delta 14C for Abiotic DIC tracer fluxes", "operator": "average", "units": "permil", "vertical_grid": "none" @@ -393,7 +393,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes", + "longname": "Oceanic Delta 14C for Abiotic DIC tracer fluxes", "operator": "average", "units": "permil", "vertical_grid": "layer_avg" @@ -609,7 +609,7 @@ "ciso_on": ".true." }, "frequency": "medium", - "longname": "Atmospheric Delta 13C in permil", + "longname": "Atmospheric Delta 13C", "operator": "average", "units": "permil", "vertical_grid": "none" @@ -619,7 +619,7 @@ "ciso_on": ".true." }, "frequency": "medium", - "longname": "Atmospheric Delta 14C in permil", + "longname": "Atmospheric Delta 14C", "operator": "average", "units": "permil", "vertical_grid": "none" @@ -1510,7 +1510,7 @@ "medium", "high" ], - "longname": "D pCO2 for base biotic tracer fluxes", + "longname": "D pCO2", "operator": [ "average", "average" @@ -1530,7 +1530,7 @@ }, "ECOSYS_ATM_PRESS": { "frequency": "medium", - "longname": "Atmospheric Pressure for base biotic tracer fluxes", + "longname": "Atmospheric Pressure", "operator": "average", "units": "atmospheres", "vertical_grid": "none" @@ -1540,7 +1540,7 @@ "medium", "high" ], - "longname": "Ice Fraction for base biotic tracer fluxes", + "longname": "Ice Fraction", "operator": [ "average", "average" @@ -1553,7 +1553,7 @@ "medium", "high" ], - "longname": "XKW for base biotic tracer fluxes", + "longname": "XKW", "operator": [ "average", "average" @@ -2138,7 +2138,7 @@ }, "PV_CO2": { "frequency": "never", - "longname": "CO2 Piston Velocity for base biotic tracer fluxes", + "longname": "CO2 Piston Velocity", "operator": "average", "units": "cm/s", "vertical_grid": "none" @@ -2367,7 +2367,7 @@ "labio_derivative_diags": ".true." }, "frequency": "never", - "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DI14C", + "longname": "Derivative of ABIO_FG_DI14C wrt ABIO_DI14C", "operator": "average", "units": "cm/s", "vertical_grid": "none" @@ -2378,7 +2378,7 @@ "labio_derivative_diags": ".true." }, "frequency": "never", - "longname": "Derivative of STF_ABIO_DI14C wrt ABIO_DIC", + "longname": "Derivative of ABIO_FG_DI14C wrt ABIO_DIC", "operator": "average", "units": "cm/s", "vertical_grid": "none" @@ -2389,7 +2389,7 @@ "labio_derivative_diags": ".true." }, "frequency": "never", - "longname": "Derivative of STF_ABIO_DIC wrt ABIO_DIC", + "longname": "Derivative of ABIO_FG_DIC wrt ABIO_DIC", "operator": "average", "units": "cm/s", "vertical_grid": "none" diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index 0ab66fc9..f31b6664 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -79,7 +79,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Atmospheric Delta 14C in permil for Abiotic DIC tracer fluxes' + lname = 'Atmospheric Delta 14C for Abiotic DIC tracer fluxes' sname = 'ABIO_D14C_atm' units = 'permil' vgrid = 'none' @@ -151,7 +151,6 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface Alkalinity for Abiotic DIC tracer fluxes' sname = 'ABIO_ALK_SURF' units = unit_system%alk_conc_units @@ -189,7 +188,7 @@ subroutine marbl_abio_dic_diagnostics_init( & end if if (labio_derivative_diags) then - lname = 'Derivative of STF_ABIO_DIC wrt ABIO_DIC' + lname = 'Derivative of ABIO_FG_DIC wrt ABIO_DIC' sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' units = vel_units vgrid = 'none' @@ -201,7 +200,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DIC' + lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DIC' sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' units = vel_units vgrid = 'none' @@ -213,7 +212,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Derivative of STF_ABIO_DI14C wrt ABIO_DI14C' + lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DI14C' sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' units = vel_units vgrid = 'none' @@ -237,7 +236,7 @@ subroutine marbl_abio_dic_diagnostics_init( & diags => marbl_interior_tendency_diags & ) - lname = 'Oceanic Delta 14C in permil for Abiotic DIC tracer fluxes' + lname = 'Oceanic Delta 14C for Abiotic DIC tracer fluxes' sname = 'ABIO_D14C_ocn' units = 'permil' vgrid = 'layer_avg' diff --git a/src/marbl_ciso_diagnostics_mod.F90 b/src/marbl_ciso_diagnostics_mod.F90 index 9cbda89d..d1e3c006 100644 --- a/src/marbl_ciso_diagnostics_mod.F90 +++ b/src/marbl_ciso_diagnostics_mod.F90 @@ -113,7 +113,7 @@ subroutine marbl_ciso_diagnostics_init( & return end if - lname = 'Atmospheric Delta 13C in permil' + lname = 'Atmospheric Delta 13C' sname = 'CISO_D13C_atm' units = 'permil' vgrid = 'none' @@ -221,7 +221,7 @@ subroutine marbl_ciso_diagnostics_init( & return end if - lname = 'Atmospheric Delta 14C in permil' + lname = 'Atmospheric Delta 14C' sname = 'CISO_D14C_atm' units = 'permil' vgrid = 'none' diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index cced9d9e..16b3ef01 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -130,7 +130,7 @@ subroutine marbl_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'Ice Fraction for base biotic tracer fluxes' + lname = 'Ice Fraction' sname = 'ECOSYS_IFRAC' units = 'fraction' vgrid = 'none' @@ -142,7 +142,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'XKW for base biotic tracer fluxes' + lname = 'XKW' sname = 'ECOSYS_XKW' units = vel_units vgrid = 'none' @@ -154,7 +154,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'Atmospheric Pressure for base biotic tracer fluxes' + lname = 'Atmospheric Pressure' sname = 'ECOSYS_ATM_PRESS' units = 'atmospheres' vgrid = 'none' @@ -166,7 +166,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'CO2 Piston Velocity for base biotic tracer fluxes' + lname = 'CO2 Piston Velocity' sname = 'PV_CO2' units = vel_units vgrid = 'none' @@ -263,7 +263,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'D pCO2 for base biotic tracer fluxes' + lname = 'D pCO2' sname = 'DpCO2' units = 'ppmv' vgrid = 'none' From 0ce48a804e808d4752c7a0b5e5630ee22a451b96 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 11:56:24 -0600 Subject: [PATCH 54/64] Don't need to set tendencies to 0 multiple times We set surface_fluxes(:,:) and interior_tendencies(:,:) to c0 at the beginning of their respective compute routines, so the abio and ciso versions of those routines don't need to set the specific subset to c0 as well. Note that these subroutines no longer require abio_ind_beg, abio_ind_end, or the ciso equivalents. --- src/marbl_abio_dic_interior_tendency_mod.F90 | 5 +---- src/marbl_abio_dic_surface_flux_mod.F90 | 10 +--------- src/marbl_ciso_surface_flux_mod.F90 | 10 +--------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/marbl_abio_dic_interior_tendency_mod.F90 b/src/marbl_abio_dic_interior_tendency_mod.F90 index 9b774ee9..7d08cc6a 100644 --- a/src/marbl_abio_dic_interior_tendency_mod.F90 +++ b/src/marbl_abio_dic_interior_tendency_mod.F90 @@ -38,12 +38,9 @@ subroutine marbl_abio_dic_interior_tendency_compute(marbl_tracer_indices, & dic => tracer_local(marbl_tracer_indices%abio_dic_ind, :), & di14c => tracer_local(marbl_tracer_indices%abio_di14c_ind, :), & ! Tracer indices - di14c_ind => marbl_tracer_indices%abio_di14c_ind, & - abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & - abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & + di14c_ind => marbl_tracer_indices%abio_di14c_ind & ) - interior_tendencies(abio_ind_beg:abio_ind_end, :) = c0 interior_tendencies(di14c_ind, :) = -c14_lambda * di14c(:) call marbl_abio_dic_diagnostics_interior_tendency_compute(dic, di14c, interior_tendency_diags) diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 1ef2668b..8aea8ef1 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -118,17 +118,9 @@ subroutine marbl_abio_dic_surface_flux_compute(& ph_surf => saved_state%state(saved_state_ind%abio_dic_ph_surf)%field_2d, & ! Tracer indices dic_ind => marbl_tracer_indices%abio_dic_ind, & - di14c_ind => marbl_tracer_indices%abio_di14c_ind, & - abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & - abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & + di14c_ind => marbl_tracer_indices%abio_di14c_ind & ) - !----------------------------------------------------------------------- - ! abio fluxes initially set to 0 - !----------------------------------------------------------------------- - - surface_fluxes(:,abio_ind_beg:abio_ind_end) = c0 - !----------------------------------------------------------------------- ! Set C14 ratios !----------------------------------------------------------------------- diff --git a/src/marbl_ciso_surface_flux_mod.F90 b/src/marbl_ciso_surface_flux_mod.F90 index 862de6c3..d990fd09 100644 --- a/src/marbl_ciso_surface_flux_mod.F90 +++ b/src/marbl_ciso_surface_flux_mod.F90 @@ -111,17 +111,9 @@ subroutine marbl_ciso_surface_flux_compute(& di13c_ind => marbl_tracer_indices%di13c_ind , & do13ctot_ind => marbl_tracer_indices%do13ctot_ind , & di14c_ind => marbl_tracer_indices%di14c_ind , & - do14ctot_ind => marbl_tracer_indices%do14ctot_ind , & - ciso_ind_beg => marbl_tracer_indices%ciso%ind_beg , & - ciso_ind_end => marbl_tracer_indices%ciso%ind_end & + do14ctot_ind => marbl_tracer_indices%do14ctot_ind & ) - !----------------------------------------------------------------------- - ! ciso fluxes initially set to 0 - !----------------------------------------------------------------------- - - surface_fluxes(:,ciso_ind_beg:ciso_ind_end) = c0 - !----------------------------------------------------------------------- ! initialize R13C_atm and R14C_atm !----------------------------------------------------------------------- From a064eb93c5126d1ca154db061f7913a997ea4850 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 13:02:58 -0600 Subject: [PATCH 55/64] Clean up diag indices 1. renamed lconstructed() -> lallocated() 2. only allocate indices for autotroph / zooplankton diags if base_bio_on is true (requires checking base_bio_on before deallocating) -- this reverts some of the allocate statements to put them back where they are on development (modulo additional whitespace because it is now in a new "if (base_bio_on)" block) --- src/marbl_ciso_diagnostics_mod.F90 | 2 +- src/marbl_diagnostics_mod.F90 | 178 +++++++++++----------- src/marbl_interface_private_types.F90 | 205 +++++++++++++------------- 3 files changed, 196 insertions(+), 189 deletions(-) diff --git a/src/marbl_ciso_diagnostics_mod.F90 b/src/marbl_ciso_diagnostics_mod.F90 index d1e3c006..5cb01a71 100644 --- a/src/marbl_ciso_diagnostics_mod.F90 +++ b/src/marbl_ciso_diagnostics_mod.F90 @@ -608,7 +608,7 @@ subroutine marbl_ciso_diagnostics_init( & end if ! Nonstandard autotroph 2D and 3D fields for each autotroph - if (.not.ind%lconstructed()) then + if (.not.ind%lallocated()) then allocate(ind%CISO_eps_autotroph(autotroph_cnt)) allocate(ind%CISO_mui_to_co2star(autotroph_cnt)) allocate(ind%CISO_Ca13CO3_form(autotroph_cnt)) diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 16b3ef01..cb587394 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -467,92 +467,6 @@ subroutine marbl_diagnostics_init( & diags => marbl_interior_tendency_diags & ) - ! Allocate memory for PFT diagnostics - if (.not.ind%lconstructed()) then - allocate(ind%N_lim_surf(autotroph_cnt)) - allocate(ind%N_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%P_lim_surf(autotroph_cnt)) - allocate(ind%P_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%Fe_lim_surf(autotroph_cnt)) - allocate(ind%Fe_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%SiO3_lim_surf(autotroph_cnt)) - allocate(ind%SiO3_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%C_lim_surf(autotroph_cnt)) - allocate(ind%C_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%light_lim_surf(autotroph_cnt)) - allocate(ind%light_lim_Cweight_avg_100m(autotroph_cnt)) - allocate(ind%photoC_zint(autotroph_cnt)) - allocate(ind%photoC_zint_100m(autotroph_cnt)) - allocate(ind%photoC_NO3_zint(autotroph_cnt)) - allocate(ind%CaCO3_form_zint(autotroph_cnt)) - allocate(ind%CaCO3_form_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_zint(autotroph_cnt)) - allocate(ind%auto_graze_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_poc_zint(autotroph_cnt)) - allocate(ind%auto_graze_poc_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_doc_zint(autotroph_cnt)) - allocate(ind%auto_graze_doc_zint_100m(autotroph_cnt)) - allocate(ind%auto_graze_zoo_zint(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_graze_zoo_zint_100m(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_loss_zint(autotroph_cnt)) - allocate(ind%auto_loss_zint_100m(autotroph_cnt)) - allocate(ind%auto_loss_poc_zint(autotroph_cnt)) - allocate(ind%auto_loss_poc_zint_100m(autotroph_cnt)) - allocate(ind%auto_loss_doc_zint(autotroph_cnt)) - allocate(ind%auto_loss_doc_zint_100m(autotroph_cnt)) - allocate(ind%auto_agg_zint(autotroph_cnt)) - allocate(ind%auto_agg_zint_100m(autotroph_cnt)) - allocate(ind%zoo_loss_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_zint_150m(zooplankton_cnt)) - allocate(ind%zoo_loss_basal_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_basal_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_poc_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_poc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_loss_doc_zint(zooplankton_cnt)) - allocate(ind%zoo_loss_doc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_poc_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_poc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_doc_zint(zooplankton_cnt)) - allocate(ind%zoo_graze_doc_zint_100m(zooplankton_cnt)) - allocate(ind%zoo_graze_zoo_zint(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%zoo_graze_zoo_zint_100m(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%x_graze_zoo_zint(zooplankton_cnt)) - allocate(ind%x_graze_zoo_zint_100m(zooplankton_cnt)) - allocate(ind%Qp(autotroph_cnt)) - allocate(ind%photoC(autotroph_cnt)) - allocate(ind%photoC_NO3(autotroph_cnt)) - allocate(ind%photoFe(autotroph_cnt)) - allocate(ind%photoNO3(autotroph_cnt)) - allocate(ind%photoNH4(autotroph_cnt)) - allocate(ind%DOP_uptake(autotroph_cnt)) - allocate(ind%PO4_uptake(autotroph_cnt)) - allocate(ind%auto_graze(autotroph_cnt)) - allocate(ind%auto_graze_poc(autotroph_cnt)) - allocate(ind%auto_graze_doc(autotroph_cnt)) - allocate(ind%auto_graze_zootot(autotroph_cnt)) - allocate(ind%auto_graze_zoo(autotroph_cnt, zooplankton_cnt)) - allocate(ind%auto_loss(autotroph_cnt)) - allocate(ind%auto_loss_poc(autotroph_cnt)) - allocate(ind%auto_loss_doc(autotroph_cnt)) - allocate(ind%auto_agg(autotroph_cnt)) - allocate(ind%bSi_form(autotroph_cnt)) - allocate(ind%CaCO3_form(autotroph_cnt)) - allocate(ind%Nfix(autotroph_cnt)) - allocate(ind%zoo_loss(zooplankton_cnt)) - allocate(ind%zoo_loss_basal(zooplankton_cnt)) - allocate(ind%zoo_loss_poc(zooplankton_cnt)) - allocate(ind%zoo_loss_doc(zooplankton_cnt)) - allocate(ind%zoo_graze(zooplankton_cnt)) - allocate(ind%zoo_graze_poc(zooplankton_cnt)) - allocate(ind%zoo_graze_doc(zooplankton_cnt)) - allocate(ind%zoo_graze_zootot(zooplankton_cnt)) - allocate(ind%zoo_graze_zoo(zooplankton_cnt, zooplankton_cnt)) - allocate(ind%x_graze_zoo(zooplankton_cnt)) - end if - if (base_bio_on) then ! General 2D diags lname = 'Calcite Saturation Depth' @@ -929,6 +843,41 @@ subroutine marbl_diagnostics_init( & end if ! Autotroph 2D diags + if (.not.ind%lallocated()) then + allocate(ind%N_lim_surf(autotroph_cnt)) + allocate(ind%N_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%P_lim_surf(autotroph_cnt)) + allocate(ind%P_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%Fe_lim_surf(autotroph_cnt)) + allocate(ind%Fe_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%SiO3_lim_surf(autotroph_cnt)) + allocate(ind%SiO3_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%C_lim_surf(autotroph_cnt)) + allocate(ind%C_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%light_lim_surf(autotroph_cnt)) + allocate(ind%light_lim_Cweight_avg_100m(autotroph_cnt)) + allocate(ind%photoC_zint(autotroph_cnt)) + allocate(ind%photoC_zint_100m(autotroph_cnt)) + allocate(ind%photoC_NO3_zint(autotroph_cnt)) + allocate(ind%CaCO3_form_zint(autotroph_cnt)) + allocate(ind%CaCO3_form_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_zint(autotroph_cnt)) + allocate(ind%auto_graze_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_poc_zint(autotroph_cnt)) + allocate(ind%auto_graze_poc_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_doc_zint(autotroph_cnt)) + allocate(ind%auto_graze_doc_zint_100m(autotroph_cnt)) + allocate(ind%auto_graze_zoo_zint(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_graze_zoo_zint_100m(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_loss_zint(autotroph_cnt)) + allocate(ind%auto_loss_zint_100m(autotroph_cnt)) + allocate(ind%auto_loss_poc_zint(autotroph_cnt)) + allocate(ind%auto_loss_poc_zint_100m(autotroph_cnt)) + allocate(ind%auto_loss_doc_zint(autotroph_cnt)) + allocate(ind%auto_loss_doc_zint_100m(autotroph_cnt)) + allocate(ind%auto_agg_zint(autotroph_cnt)) + allocate(ind%auto_agg_zint_100m(autotroph_cnt)) + end if do n=1,autotroph_cnt lname = trim(autotroph_settings(n)%lname) // ' N Limitation, Surface' sname = trim(autotroph_settings(n)%sname) // '_N_lim_surf' @@ -1373,6 +1322,27 @@ subroutine marbl_diagnostics_init( & end if ! Zooplankton 2D diags + if (.not.ind%lallocated()) then + allocate(ind%zoo_loss_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_zint_150m(zooplankton_cnt)) + allocate(ind%zoo_loss_basal_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_basal_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_poc_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_poc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_loss_doc_zint(zooplankton_cnt)) + allocate(ind%zoo_loss_doc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_poc_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_poc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_doc_zint(zooplankton_cnt)) + allocate(ind%zoo_graze_doc_zint_100m(zooplankton_cnt)) + allocate(ind%zoo_graze_zoo_zint(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%zoo_graze_zoo_zint_100m(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%x_graze_zoo_zint(zooplankton_cnt)) + allocate(ind%x_graze_zoo_zint_100m(zooplankton_cnt)) + end if do n = 1,zooplankton_cnt lname = trim(zooplankton_settings(n)%lname) // ' Loss Vertical Integral' sname = trim(zooplankton_settings(n)%sname) // '_loss_zint' @@ -2604,6 +2574,28 @@ subroutine marbl_diagnostics_init( & end if ! Autotroph 3D diags + if (.not.ind%lallocated()) then + allocate(ind%Qp(autotroph_cnt)) + allocate(ind%photoC(autotroph_cnt)) + allocate(ind%photoC_NO3(autotroph_cnt)) + allocate(ind%photoFe(autotroph_cnt)) + allocate(ind%photoNO3(autotroph_cnt)) + allocate(ind%photoNH4(autotroph_cnt)) + allocate(ind%DOP_uptake(autotroph_cnt)) + allocate(ind%PO4_uptake(autotroph_cnt)) + allocate(ind%auto_graze(autotroph_cnt)) + allocate(ind%auto_graze_poc(autotroph_cnt)) + allocate(ind%auto_graze_doc(autotroph_cnt)) + allocate(ind%auto_graze_zootot(autotroph_cnt)) + allocate(ind%auto_graze_zoo(autotroph_cnt, zooplankton_cnt)) + allocate(ind%auto_loss(autotroph_cnt)) + allocate(ind%auto_loss_poc(autotroph_cnt)) + allocate(ind%auto_loss_doc(autotroph_cnt)) + allocate(ind%auto_agg(autotroph_cnt)) + allocate(ind%bSi_form(autotroph_cnt)) + allocate(ind%CaCO3_form(autotroph_cnt)) + allocate(ind%Nfix(autotroph_cnt)) + end if do n=1,autotroph_cnt if (lvariable_PtoC) then lname = trim(autotroph_settings(n)%lname) // ' P:C ratio' @@ -2902,6 +2894,18 @@ subroutine marbl_diagnostics_init( & end if ! Zooplankton 3D diags + if (.not.ind%lallocated()) then + allocate(ind%zoo_loss(zooplankton_cnt)) + allocate(ind%zoo_loss_basal(zooplankton_cnt)) + allocate(ind%zoo_loss_poc(zooplankton_cnt)) + allocate(ind%zoo_loss_doc(zooplankton_cnt)) + allocate(ind%zoo_graze(zooplankton_cnt)) + allocate(ind%zoo_graze_poc(zooplankton_cnt)) + allocate(ind%zoo_graze_doc(zooplankton_cnt)) + allocate(ind%zoo_graze_zootot(zooplankton_cnt)) + allocate(ind%zoo_graze_zoo(zooplankton_cnt, zooplankton_cnt)) + allocate(ind%x_graze_zoo(zooplankton_cnt)) + end if do n = 1,zooplankton_cnt lname = trim(zooplankton_settings(n)%lname) // ' Loss' sname = trim(zooplankton_settings(n)%sname) // '_loss' @@ -3058,7 +3062,7 @@ subroutine marbl_diagnostics_init( & ! FIXME #60: this approach is not thread-safe ! i.e. if this is called from 2 threads simulatneously, a race condition ! on the allocation status check and allocation is introduced - if (.not.ind%lconstructed()) then + if (.not. ind%lallocated()) then allocate(ind%restore_tend(marbl_tracer_indices%total_cnt)) end if diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 8ac48a2f..486c8941 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -790,7 +790,7 @@ module marbl_interface_private_types ! restoring 3D diags integer(int_kind), dimension(:), allocatable :: restore_tend contains - procedure, public :: lconstructed => interior_diag_ind_constructed + procedure, public :: lallocated => interior_diag_ind_allocated procedure, public :: destruct => interior_diag_ind_destructor end type marbl_interior_tendency_diagnostics_indexing_type @@ -1928,121 +1928,124 @@ end subroutine interior_tendency_forcing_index_constructor !***************************************************************************** - function interior_diag_ind_constructed(this) result(constructed) + function interior_diag_ind_allocated(this) result(constructed) class(marbl_interior_tendency_diagnostics_indexing_type), intent(inout) :: this logical(log_kind) :: constructed constructed = allocated(this%restore_tend) - end function interior_diag_ind_constructed + end function interior_diag_ind_allocated !***************************************************************************** subroutine interior_diag_ind_destructor(this) + use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : ciso_on class(marbl_interior_tendency_diagnostics_indexing_type), intent(inout) :: this - if (this%lconstructed()) then - deallocate(this%N_lim_surf) - deallocate(this%N_lim_Cweight_avg_100m) - deallocate(this%P_lim_surf) - deallocate(this%P_lim_Cweight_avg_100m) - deallocate(this%Fe_lim_surf) - deallocate(this%Fe_lim_Cweight_avg_100m) - deallocate(this%SiO3_lim_surf) - deallocate(this%SiO3_lim_Cweight_avg_100m) - deallocate(this%C_lim_surf) - deallocate(this%C_lim_Cweight_avg_100m) - deallocate(this%light_lim_surf) - deallocate(this%light_lim_Cweight_avg_100m) - deallocate(this%photoC_zint) - deallocate(this%photoC_zint_100m) - deallocate(this%photoC_NO3_zint) - deallocate(this%CaCO3_form_zint) - deallocate(this%CaCO3_form_zint_100m) - deallocate(this%auto_graze_zint) - deallocate(this%auto_graze_zint_100m) - deallocate(this%auto_graze_poc_zint) - deallocate(this%auto_graze_poc_zint_100m) - deallocate(this%auto_graze_doc_zint) - deallocate(this%auto_graze_doc_zint_100m) - deallocate(this%auto_graze_zoo_zint) - deallocate(this%auto_graze_zoo_zint_100m) - deallocate(this%auto_loss_zint) - deallocate(this%auto_loss_zint_100m) - deallocate(this%auto_loss_poc_zint) - deallocate(this%auto_loss_poc_zint_100m) - deallocate(this%auto_loss_doc_zint) - deallocate(this%auto_loss_doc_zint_100m) - deallocate(this%auto_agg_zint) - deallocate(this%auto_agg_zint_100m) - deallocate(this%zoo_loss_zint) - deallocate(this%zoo_loss_zint_100m) - deallocate(this%zoo_loss_zint_150m) - deallocate(this%zoo_loss_basal_zint) - deallocate(this%zoo_loss_basal_zint_100m) - deallocate(this%zoo_loss_poc_zint) - deallocate(this%zoo_loss_poc_zint_100m) - deallocate(this%zoo_loss_doc_zint) - deallocate(this%zoo_loss_doc_zint_100m) - deallocate(this%zoo_graze_zint) - deallocate(this%zoo_graze_zint_100m) - deallocate(this%zoo_graze_poc_zint) - deallocate(this%zoo_graze_poc_zint_100m) - deallocate(this%zoo_graze_doc_zint) - deallocate(this%zoo_graze_doc_zint_100m) - deallocate(this%zoo_graze_zoo_zint) - deallocate(this%zoo_graze_zoo_zint_100m) - deallocate(this%x_graze_zoo_zint) - deallocate(this%x_graze_zoo_zint_100m) - deallocate(this%Qp) - deallocate(this%photoC) - deallocate(this%photoC_NO3) - deallocate(this%photoFe) - deallocate(this%photoNO3) - deallocate(this%photoNH4) - deallocate(this%DOP_uptake) - deallocate(this%PO4_uptake) - deallocate(this%auto_graze) - deallocate(this%auto_graze_poc) - deallocate(this%auto_graze_doc) - deallocate(this%auto_graze_zootot) - deallocate(this%auto_graze_zoo) - deallocate(this%auto_loss) - deallocate(this%auto_loss_poc) - deallocate(this%auto_loss_doc) - deallocate(this%auto_agg) - deallocate(this%bSi_form) - deallocate(this%CaCO3_form) - deallocate(this%Nfix) - deallocate(this%zoo_loss) - deallocate(this%zoo_loss_basal) - deallocate(this%zoo_loss_poc) - deallocate(this%zoo_loss_doc) - deallocate(this%zoo_graze) - deallocate(this%zoo_graze_poc) - deallocate(this%zoo_graze_doc) - deallocate(this%zoo_graze_zootot) - deallocate(this%zoo_graze_zoo) - deallocate(this%x_graze_zoo) - if (ciso_on) then - deallocate(this%CISO_eps_autotroph) - deallocate(this%CISO_mui_to_co2star) - deallocate(this%CISO_Ca13CO3_form) - deallocate(this%CISO_Ca14CO3_form) - deallocate(this%CISO_Ca13CO3_form_zint) - deallocate(this%CISO_Ca14CO3_form_zint) - deallocate(this%CISO_photo13C) - deallocate(this%CISO_photo14C) - deallocate(this%CISO_photo13C_zint) - deallocate(this%CISO_photo14C_zint) - deallocate(this%CISO_d13C) - deallocate(this%CISO_d14C) - deallocate(this%CISO_autotrophCaCO3_d14C) - deallocate(this%CISO_autotrophCaCO3_d13C) + if (this%lallocated()) then + if (base_bio_on) then + deallocate(this%N_lim_surf) + deallocate(this%N_lim_Cweight_avg_100m) + deallocate(this%P_lim_surf) + deallocate(this%P_lim_Cweight_avg_100m) + deallocate(this%Fe_lim_surf) + deallocate(this%Fe_lim_Cweight_avg_100m) + deallocate(this%SiO3_lim_surf) + deallocate(this%SiO3_lim_Cweight_avg_100m) + deallocate(this%C_lim_surf) + deallocate(this%C_lim_Cweight_avg_100m) + deallocate(this%light_lim_surf) + deallocate(this%light_lim_Cweight_avg_100m) + deallocate(this%photoC_zint) + deallocate(this%photoC_zint_100m) + deallocate(this%photoC_NO3_zint) + deallocate(this%CaCO3_form_zint) + deallocate(this%CaCO3_form_zint_100m) + deallocate(this%auto_graze_zint) + deallocate(this%auto_graze_zint_100m) + deallocate(this%auto_graze_poc_zint) + deallocate(this%auto_graze_poc_zint_100m) + deallocate(this%auto_graze_doc_zint) + deallocate(this%auto_graze_doc_zint_100m) + deallocate(this%auto_graze_zoo_zint) + deallocate(this%auto_graze_zoo_zint_100m) + deallocate(this%auto_loss_zint) + deallocate(this%auto_loss_zint_100m) + deallocate(this%auto_loss_poc_zint) + deallocate(this%auto_loss_poc_zint_100m) + deallocate(this%auto_loss_doc_zint) + deallocate(this%auto_loss_doc_zint_100m) + deallocate(this%auto_agg_zint) + deallocate(this%auto_agg_zint_100m) + deallocate(this%zoo_loss_zint) + deallocate(this%zoo_loss_zint_100m) + deallocate(this%zoo_loss_zint_150m) + deallocate(this%zoo_loss_basal_zint) + deallocate(this%zoo_loss_basal_zint_100m) + deallocate(this%zoo_loss_poc_zint) + deallocate(this%zoo_loss_poc_zint_100m) + deallocate(this%zoo_loss_doc_zint) + deallocate(this%zoo_loss_doc_zint_100m) + deallocate(this%zoo_graze_zint) + deallocate(this%zoo_graze_zint_100m) + deallocate(this%zoo_graze_poc_zint) + deallocate(this%zoo_graze_poc_zint_100m) + deallocate(this%zoo_graze_doc_zint) + deallocate(this%zoo_graze_doc_zint_100m) + deallocate(this%zoo_graze_zoo_zint) + deallocate(this%zoo_graze_zoo_zint_100m) + deallocate(this%x_graze_zoo_zint) + deallocate(this%x_graze_zoo_zint_100m) + deallocate(this%Qp) + deallocate(this%photoC) + deallocate(this%photoC_NO3) + deallocate(this%photoFe) + deallocate(this%photoNO3) + deallocate(this%photoNH4) + deallocate(this%DOP_uptake) + deallocate(this%PO4_uptake) + deallocate(this%auto_graze) + deallocate(this%auto_graze_poc) + deallocate(this%auto_graze_doc) + deallocate(this%auto_graze_zootot) + deallocate(this%auto_graze_zoo) + deallocate(this%auto_loss) + deallocate(this%auto_loss_poc) + deallocate(this%auto_loss_doc) + deallocate(this%auto_agg) + deallocate(this%bSi_form) + deallocate(this%CaCO3_form) + deallocate(this%Nfix) + deallocate(this%zoo_loss) + deallocate(this%zoo_loss_basal) + deallocate(this%zoo_loss_poc) + deallocate(this%zoo_loss_doc) + deallocate(this%zoo_graze) + deallocate(this%zoo_graze_poc) + deallocate(this%zoo_graze_doc) + deallocate(this%zoo_graze_zootot) + deallocate(this%zoo_graze_zoo) + deallocate(this%x_graze_zoo) + if (ciso_on) then + deallocate(this%CISO_eps_autotroph) + deallocate(this%CISO_mui_to_co2star) + deallocate(this%CISO_Ca13CO3_form) + deallocate(this%CISO_Ca14CO3_form) + deallocate(this%CISO_Ca13CO3_form_zint) + deallocate(this%CISO_Ca14CO3_form_zint) + deallocate(this%CISO_photo13C) + deallocate(this%CISO_photo14C) + deallocate(this%CISO_photo13C_zint) + deallocate(this%CISO_photo14C_zint) + deallocate(this%CISO_d13C) + deallocate(this%CISO_d14C) + deallocate(this%CISO_autotrophCaCO3_d14C) + deallocate(this%CISO_autotrophCaCO3_d13C) + end if end if deallocate(this%restore_tend) end if From da59455be376375115570256026e6c76d4f55ff7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 13:07:06 -0600 Subject: [PATCH 56/64] Clean up log output from main driver There were a few messages being added to the log inside if statements that should always evaluate to .false. (there will always be at least one tracer, and currently there is guaranteed to be at least one forcing field requested for surface_flux_compute() as well) --- tests/driver_src/marbl.F90 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/driver_src/marbl.F90 b/tests/driver_src/marbl.F90 index 5689119c..f61f3000 100644 --- a/tests/driver_src/marbl.F90 +++ b/tests/driver_src/marbl.F90 @@ -373,9 +373,6 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log tracers requested for initialization call driver_status_log%log_header('Requested tracers', subname) - ! Provide message if no tracers are requested - if (size(marbl_instances(1)%tracer_metadata) == 0) & - call driver_status_log%log_noerror('No tracers requested!', subname) do n=1, size(marbl_instances(1)%tracer_metadata) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%tracer_metadata(n)%short_name), ' (units: ', & @@ -393,9 +390,6 @@ Program marbl if (.not. marbl_instances(1)%StatusLog%labort_marbl) then ! Log requested surface forcing fields call driver_status_log%log_header('Requested surface forcing fields', subname) - ! Provide message if no surface flux forcings are requested - if (size(marbl_instances(1)%surface_flux_forcings) == 0) & - call driver_status_log%log_noerror('No forcing fields requested!', subname) do n=1,size(marbl_instances(1)%surface_flux_forcings) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%surface_flux_forcings(n)%metadata%varname), & @@ -407,7 +401,7 @@ Program marbl call driver_status_log%log_header('Requested interior forcing fields', subname) ! Provide message if no itnerior tendency forcings are requested if (size(marbl_instances(1)%interior_tendency_forcings) == 0) & - call driver_status_log%log_noerror('No forcing fields requested!', subname) + call driver_status_log%log_noerror('No forcing fields requested for interior_tendency_compute()!', subname) do n=1,size(marbl_instances(1)%interior_tendency_forcings) write(log_message, "(I0, 5A)") n, '. ', & trim(marbl_instances(1)%interior_tendency_forcings(n)%metadata%varname), & From 70318b81e28f6979e057539c855d4e1f4275b085 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 13:43:25 -0600 Subject: [PATCH 57/64] Improve dependencies for some diagnostics 1. ECOSYS_IFRAC, ECOSYS_XKW, and ECOSYS_ATMPRESS are only available if either lflux_gas_co2 or lflux_gas_o2 are true 2. PV_CO2 and SCHMIDT_CO2 are only available if lflux_gas_co2 is true Adding [1] required adding a mechanism for specifying that only one of a set of dependencies need to evaluate to true (the default behavior is that all dependencies must evaluate to true). I tested this by running with base_bio_on = .false. abio_dic_on = .true. lflux_gas_co2 = .false. And needed to add an if (lflux_gas_co2) block to abio_dic_surface_flux_compute() to avoid seg faults. --- MARBL_tools/MARBL_share.py | 20 +- defaults/diagnostics_latest.yaml | 16 ++ defaults/json/diagnostics_latest.json | 21 ++ defaults/json/settings_cesm2.0.json | 1 - defaults/json/settings_cesm2.1+cocco.json | 1 - defaults/json/settings_cesm2.1.json | 1 - defaults/json/settings_latest+4p2z.json | 1 - defaults/json/settings_latest+cocco.json | 1 - defaults/json/settings_latest.json | 1 - defaults/settings_cesm2.0.yaml | 1 - defaults/settings_cesm2.1+cocco.yaml | 1 - defaults/settings_cesm2.1.yaml | 1 - defaults/settings_latest+4p2z.yaml | 1 - defaults/settings_latest+cocco.yaml | 1 - defaults/settings_latest.yaml | 1 - src/marbl_abio_dic_surface_flux_mod.F90 | 224 +++++++++++----------- src/marbl_diagnostics_mod.F90 | 112 ++++++----- 17 files changed, 224 insertions(+), 181 deletions(-) diff --git a/MARBL_tools/MARBL_share.py b/MARBL_tools/MARBL_share.py index c0a9b379..18fd623a 100644 --- a/MARBL_tools/MARBL_share.py +++ b/MARBL_tools/MARBL_share.py @@ -224,11 +224,19 @@ def meet_dependencies(input_dict, MARBL_settings): import logging logger = logging.getLogger(__name__) + dependencies_or = input_dict.get('dependencies_or', False) if "dependencies" in input_dict.keys(): - for dependency in input_dict["dependencies"].keys(): - if dependency not in MARBL_settings.settings_dict.keys(): - logger.error("'%s' is not a valid dependency" % dependency) - abort(1) - if input_dict["dependencies"][dependency] != MARBL_settings.settings_dict[dependency]['value']: - return False + if dependencies_or: + for dependency in input_dict["dependencies"].keys(): + if dependency in MARBL_settings.settings_dict.keys(): + if input_dict["dependencies"][dependency] == MARBL_settings.settings_dict[dependency]['value']: + return True + return False + else: + for dependency in input_dict["dependencies"].keys(): + if dependency not in MARBL_settings.settings_dict.keys(): + logger.error("'%s' is not a valid dependency" % dependency) + abort(1) + if input_dict["dependencies"][dependency] != MARBL_settings.settings_dict[dependency]['value']: + return False return True diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 5ac9644b..252e7917 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -22,6 +22,10 @@ #################### ECOSYS_IFRAC : + dependencies : + lflux_gas_o2 : .true. + lflux_gas_co2 : .true. + dependencies_or : true longname : Ice Fraction units : fraction vertical_grid : none @@ -32,6 +36,10 @@ ECOSYS_IFRAC : - average - average ECOSYS_XKW : + dependencies : + lflux_gas_o2 : .true. + lflux_gas_co2 : .true. + dependencies_or : true longname : XKW units : cm/s vertical_grid : none @@ -42,18 +50,26 @@ ECOSYS_XKW : - average - average ECOSYS_ATM_PRESS : + dependencies : + lflux_gas_o2 : .true. + lflux_gas_co2 : .true. + dependencies_or : true longname : Atmospheric Pressure units : atmospheres vertical_grid : none frequency : medium operator : average PV_CO2 : + dependencies : + lflux_gas_co2 : .true. longname : CO2 Piston Velocity units : cm/s vertical_grid : none frequency : never operator : average SCHMIDT_CO2 : + dependencies : + lflux_gas_co2 : .true. longname : CO2 Schmidt Number for base biotic tracers fluxes units : 1 vertical_grid : none diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index edcd23af..0f64685b 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -1529,6 +1529,11 @@ "vertical_grid": "none" }, "ECOSYS_ATM_PRESS": { + "dependencies": { + "lflux_gas_co2": ".true.", + "lflux_gas_o2": ".true." + }, + "dependencies_or": true, "frequency": "medium", "longname": "Atmospheric Pressure", "operator": "average", @@ -1536,6 +1541,11 @@ "vertical_grid": "none" }, "ECOSYS_IFRAC": { + "dependencies": { + "lflux_gas_co2": ".true.", + "lflux_gas_o2": ".true." + }, + "dependencies_or": true, "frequency": [ "medium", "high" @@ -1549,6 +1559,11 @@ "vertical_grid": "none" }, "ECOSYS_XKW": { + "dependencies": { + "lflux_gas_co2": ".true.", + "lflux_gas_o2": ".true." + }, + "dependencies_or": true, "frequency": [ "medium", "high" @@ -2137,6 +2152,9 @@ "vertical_grid": "layer_avg" }, "PV_CO2": { + "dependencies": { + "lflux_gas_co2": ".true." + }, "frequency": "never", "longname": "CO2 Piston Velocity", "operator": "average", @@ -2205,6 +2223,9 @@ "vertical_grid": "layer_avg" }, "SCHMIDT_CO2": { + "dependencies": { + "lflux_gas_co2": ".true." + }, "frequency": "medium", "longname": "CO2 Schmidt Number for base biotic tracers fluxes", "operator": "average", diff --git a/defaults/json/settings_cesm2.0.json b/defaults/json/settings_cesm2.0.json index d989bfca..fe00827a 100644 --- a/defaults/json/settings_cesm2.0.json +++ b/defaults/json/settings_cesm2.0.json @@ -1139,7 +1139,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/json/settings_cesm2.1+cocco.json b/defaults/json/settings_cesm2.1+cocco.json index 73124350..31e40282 100644 --- a/defaults/json/settings_cesm2.1+cocco.json +++ b/defaults/json/settings_cesm2.1+cocco.json @@ -1181,7 +1181,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/json/settings_cesm2.1.json b/defaults/json/settings_cesm2.1.json index 7b0c8730..5bda7925 100644 --- a/defaults/json/settings_cesm2.1.json +++ b/defaults/json/settings_cesm2.1.json @@ -1139,7 +1139,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/json/settings_latest+4p2z.json b/defaults/json/settings_latest+4p2z.json index 59e4f119..0d1c0888 100644 --- a/defaults/json/settings_latest+4p2z.json +++ b/defaults/json/settings_latest+4p2z.json @@ -1234,7 +1234,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/json/settings_latest+cocco.json b/defaults/json/settings_latest+cocco.json index ab8a6421..e3935275 100644 --- a/defaults/json/settings_latest+cocco.json +++ b/defaults/json/settings_latest+cocco.json @@ -1181,7 +1181,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/json/settings_latest.json b/defaults/json/settings_latest.json index 68ba6bc0..cb09cf79 100644 --- a/defaults/json/settings_latest.json +++ b/defaults/json/settings_latest.json @@ -1145,7 +1145,6 @@ "lflux_gas_co2": { "datatype": "logical", "default_value": ".true.", - "dependencies": "base_bio_on", "longname": "Control which portions of code are executed (useful for debugging)", "subcategory": "3. config flags", "units": "unitless" diff --git a/defaults/settings_cesm2.0.yaml b/defaults/settings_cesm2.0.yaml index 9be372ea..d7c4c826 100644 --- a/defaults/settings_cesm2.0.yaml +++ b/defaults/settings_cesm2.0.yaml @@ -332,7 +332,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/defaults/settings_cesm2.1+cocco.yaml b/defaults/settings_cesm2.1+cocco.yaml index afb8a369..ff5fb1a5 100644 --- a/defaults/settings_cesm2.1+cocco.yaml +++ b/defaults/settings_cesm2.1+cocco.yaml @@ -334,7 +334,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/defaults/settings_cesm2.1.yaml b/defaults/settings_cesm2.1.yaml index ebc8871e..824271c9 100644 --- a/defaults/settings_cesm2.1.yaml +++ b/defaults/settings_cesm2.1.yaml @@ -332,7 +332,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/defaults/settings_latest+4p2z.yaml b/defaults/settings_latest+4p2z.yaml index 0eac3a76..875ba595 100644 --- a/defaults/settings_latest+4p2z.yaml +++ b/defaults/settings_latest+4p2z.yaml @@ -350,7 +350,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/defaults/settings_latest+cocco.yaml b/defaults/settings_latest+cocco.yaml index 940d4715..b27afe40 100644 --- a/defaults/settings_latest+cocco.yaml +++ b/defaults/settings_latest+cocco.yaml @@ -334,7 +334,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/defaults/settings_latest.yaml b/defaults/settings_latest.yaml index b2affdcf..67b178b7 100644 --- a/defaults/settings_latest.yaml +++ b/defaults/settings_latest.yaml @@ -334,7 +334,6 @@ general_parms : datatype : logical default_value : .true. lflux_gas_co2 : - dependencies : base_bio_on longname : Control which portions of code are executed (useful for debugging) subcategory : 3. config flags units : unitless diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 8aea8ef1..96ae364d 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -8,6 +8,7 @@ module marbl_abio_dic_surface_flux_mod use marbl_constants_mod, only : c1 use marbl_constants_mod, only : rho_sw + use marbl_settings_mod, only : lflux_gas_co2 use marbl_settings_mod, only : unit_system_type use marbl_settings_mod, only : xkw_coeff use marbl_settings_mod, only : del_ph @@ -145,84 +146,30 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! Compute CO2 flux !----------------------------------------------------------------------- - where (ph_surf(:) /= c0) - phlo(:) = ph_surf(:) - del_ph - phhi(:) = ph_surf(:) + del_ph - elsewhere - phlo(:) = phlo_surf_init - phhi(:) = phhi_surf_init - end where - phlo_pert(:) = phlo(:) - phhi_pert(:) = phhi(:) - - ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g - ! and ocn_ref_salinity comes from shr_const (SHR_CONST_OCN_REF_SAL = 34.7) - ! Orr et al eq (27): - ! 2297 micromol / kg - ! Sbar = "global- and annual- mean salinity" - alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) * (c1 / 34.7_r8) - - ! Note the following computes a new ph_surf - ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 - call marbl_co2calc_surface(& - num_elements = num_elements, & - lcomp_co2calc_coeffs = .true., & - dic_in = tracers_at_surface(:,dic_ind), & - xco2_in = xco2(:), & - ta_in = alk_surf(:), & - pt_in = PO4(:), & - sit_in = SiO2(:), & - temp = sst(:), & - salt = sss(:), & - atmpres = ap_used(:), & - unit_system = unit_system, & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co3 = co3(:), & - co2star = co2star, & - dco2star = dco2star, & - pco2surf = pco2surf, & - dpco2 = dpco2, & - phlo = phlo, & - phhi = phhi, & - ph = ph_surf, & - marbl_status_log = marbl_status_log) - - fg_dic(:) = pv_co2(:) * dco2star(:) - fg_di14c(:) = pv_co2(:) * ((dco2star(:) + co2star(:)) * R14C_atm(:) - co2star(:) * R14C_ocn(:)) - surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + fg_dic(:) - surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + fg_di14c(:) - - ! Compute derivative diagnostics - derivative_terms(:,:) = c0 - if (labio_derivative_diags) then - call marbl_co2calc_surface(& - num_elements = num_elements, & - lcomp_co2calc_coeffs = .false., & - dic_in = tracers_at_surface(:,dic_ind) + c1, & - xco2_in = xco2(:), & - ta_in = alk_surf(:), & - pt_in = PO4(:), & - sit_in = SiO2(:), & - temp = sst(:), & - salt = sss(:), & - atmpres = ap_used(:), & - unit_system = unit_system, & - phlo = phlo_pert, & - phhi = phhi_pert, & - ph = ph_surf_pert, & - co3 = co3_pert(:), & - co2calc_coeffs = co2calc_coeffs, & - co2calc_state = co2calc_state, & - co2star = co2star_pert_p1, & - dco2star = dco2star_pert, & - pco2surf = pco2surf_pert, & - dpco2 = dpco2_pert, & - marbl_status_log = marbl_status_log) + if (lflux_gas_co2) then + where (ph_surf(:) /= c0) + phlo(:) = ph_surf(:) - del_ph + phhi(:) = ph_surf(:) + del_ph + elsewhere + phlo(:) = phlo_surf_init + phhi(:) = phhi_surf_init + end where + phlo_pert(:) = phlo(:) + phhi_pert(:) = phhi(:) + + ! In POP, ALK_bar_global = 2310._r8 microeq/kg = 2310._r8 neq/g + ! and ocn_ref_salinity comes from shr_const (SHR_CONST_OCN_REF_SAL = 34.7) + ! Orr et al eq (27): + ! 2297 micromol / kg + ! Sbar = "global- and annual- mean salinity" + alk_surf(:) = (2310._r8 * (unit_system%nmol2mol_prefix * unit_system%mass2g)) * rho_sw * sss(:) * (c1 / 34.7_r8) + + ! Note the following computes a new ph_surf + ! pass in sections of surface_flux_forcings instead of associated vars because of problems with intel/15.0.3 call marbl_co2calc_surface(& num_elements = num_elements, & - lcomp_co2calc_coeffs = .false., & - dic_in = tracers_at_surface(:,dic_ind) - c1, & + lcomp_co2calc_coeffs = .true., & + dic_in = tracers_at_surface(:,dic_ind), & xco2_in = xco2(:), & ta_in = alk_surf(:), & pt_in = PO4(:), & @@ -231,43 +178,100 @@ subroutine marbl_abio_dic_surface_flux_compute(& salt = sss(:), & atmpres = ap_used(:), & unit_system = unit_system, & - phlo = phlo_pert, & - phhi = phhi_pert, & - ph = ph_surf_pert, & - co3 = co3_pert(:), & co2calc_coeffs = co2calc_coeffs, & co2calc_state = co2calc_state, & - co2star = co2star_pert_m1, & - dco2star = dco2star_pert, & - pco2surf = pco2surf_pert, & - dpco2 = dpco2_pert, & + co3 = co3(:), & + co2star = co2star, & + dco2star = dco2star, & + pco2surf = pco2surf, & + dpco2 = dpco2, & + phlo = phlo, & + phhi = phhi, & + ph = ph_surf, & marbl_status_log = marbl_status_log) - derivative_terms(:,1) = -p5 * (co2star_pert_p1(:) - co2star_pert_m1(:)) * pv_co2(:) - where (tracers_at_surface(:,dic_ind) > 0) - derivative_terms(:,2) = -p5 * (co2star_pert_p1(:) / (tracers_at_surface(:,dic_ind) + c1) & - - co2star_pert_m1(:) / (tracers_at_surface(:,dic_ind) - c1)) & - * tracers_at_surface(:,di14c_ind) * pv_co2(:) - derivative_terms(:,3) = -pv_co2(:) * co2star(:) / tracers_at_surface(:,dic_ind) - else where - derivative_terms(:,2) = c0 - derivative_terms(:,3) = c0 - end where - end if - - ! update abiotic DIC diagnostics - call marbl_abio_dic_diagnostics_surface_flux_compute( & - xco2, & - d14c, & - co2star, & - dco2star, & - pco2surf, & - dpco2, & - ph_surf, & - alk_surf, & - fg_dic, & - fg_di14c, & - derivative_terms, & - surface_flux_diags) + + fg_dic(:) = pv_co2(:) * dco2star(:) + fg_di14c(:) = pv_co2(:) * ((dco2star(:) + co2star(:)) * R14C_atm(:) - co2star(:) * R14C_ocn(:)) + surface_fluxes(:, dic_ind) = surface_fluxes(:, dic_ind) + fg_dic(:) + surface_fluxes(:, di14c_ind) = surface_fluxes(:, di14c_ind) + fg_di14c(:) + + ! Compute derivative diagnostics + derivative_terms(:,:) = c0 + if (labio_derivative_diags) then + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) + c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_pert, & + phhi = phhi_pert, & + ph = ph_surf_pert, & + co3 = co3_pert(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_pert_p1, & + dco2star = dco2star_pert, & + pco2surf = pco2surf_pert, & + dpco2 = dpco2_pert, & + marbl_status_log = marbl_status_log) + call marbl_co2calc_surface(& + num_elements = num_elements, & + lcomp_co2calc_coeffs = .false., & + dic_in = tracers_at_surface(:,dic_ind) - c1, & + xco2_in = xco2(:), & + ta_in = alk_surf(:), & + pt_in = PO4(:), & + sit_in = SiO2(:), & + temp = sst(:), & + salt = sss(:), & + atmpres = ap_used(:), & + unit_system = unit_system, & + phlo = phlo_pert, & + phhi = phhi_pert, & + ph = ph_surf_pert, & + co3 = co3_pert(:), & + co2calc_coeffs = co2calc_coeffs, & + co2calc_state = co2calc_state, & + co2star = co2star_pert_m1, & + dco2star = dco2star_pert, & + pco2surf = pco2surf_pert, & + dpco2 = dpco2_pert, & + marbl_status_log = marbl_status_log) + derivative_terms(:,1) = -p5 * (co2star_pert_p1(:) - co2star_pert_m1(:)) * pv_co2(:) + where (tracers_at_surface(:,dic_ind) > 0) + derivative_terms(:,2) = -p5 * (co2star_pert_p1(:) / (tracers_at_surface(:,dic_ind) + c1) & + - co2star_pert_m1(:) / (tracers_at_surface(:,dic_ind) - c1)) & + * tracers_at_surface(:,di14c_ind) * pv_co2(:) + derivative_terms(:,3) = -pv_co2(:) * co2star(:) / tracers_at_surface(:,dic_ind) + else where + derivative_terms(:,2) = c0 + derivative_terms(:,3) = c0 + end where + end if + + ! update abiotic DIC diagnostics + call marbl_abio_dic_diagnostics_surface_flux_compute( & + xco2, & + d14c, & + co2star, & + dco2star, & + pco2surf, & + dpco2, & + ph_surf, & + alk_surf, & + fg_dic, & + fg_di14c, & + derivative_terms, & + surface_flux_diags) + + end if ! lflux_gas_co2 end associate diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index cb587394..bc7ede1a 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -85,6 +85,8 @@ subroutine marbl_diagnostics_init( & marbl_surface_flux_diags, & marbl_status_log) + use marbl_settings_mod, only : lflux_gas_o2 + use marbl_settings_mod, only : lflux_gas_co2 use marbl_settings_mod, only : lo2_consumption_scalef use marbl_settings_mod, only : lp_remin_scalef use marbl_settings_mod, only : lvariable_PtoC @@ -130,64 +132,68 @@ subroutine marbl_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'Ice Fraction' - sname = 'ECOSYS_IFRAC' - units = 'fraction' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ECOSYS_IFRAC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (lflux_gas_o2 .or. lflux_gas_co2) then + lname = 'Ice Fraction' + sname = 'ECOSYS_IFRAC' + units = 'fraction' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ECOSYS_IFRAC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'XKW' - sname = 'ECOSYS_XKW' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ECOSYS_XKW, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'XKW' + sname = 'ECOSYS_XKW' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ECOSYS_XKW, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Atmospheric Pressure' - sname = 'ECOSYS_ATM_PRESS' - units = 'atmospheres' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ECOSYS_ATM_PRESS, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + lname = 'Atmospheric Pressure' + sname = 'ECOSYS_ATM_PRESS' + units = 'atmospheres' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ECOSYS_ATM_PRESS, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if end if - lname = 'CO2 Piston Velocity' - sname = 'PV_CO2' - units = vel_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%PV_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (lflux_gas_co2) then + lname = 'CO2 Piston Velocity' + sname = 'PV_CO2' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%PV_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'CO2 Schmidt Number for base biotic tracers fluxes' - sname = 'SCHMIDT_CO2' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%SCHMIDT_CO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + lname = 'CO2 Schmidt Number for base biotic tracers fluxes' + sname = 'SCHMIDT_CO2' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%SCHMIDT_CO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if end if if (base_bio_on) then From 117b43cbafd73d72e999c0062a4a2717d738904f Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 13:52:50 -0600 Subject: [PATCH 58/64] Make totalChl_local a local var in compute_PAR() Rather than computing totalChl_local in setup_local_tracers(), we pass autotroph_local to compute_PAR and let that subroutine compute the sum of the Chl tracer values. --- src/marbl_interior_tendency_mod.F90 | 33 ++++++++++++----------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/marbl_interior_tendency_mod.F90 b/src/marbl_interior_tendency_mod.F90 index 7659e6f8..8f2f5be2 100644 --- a/src/marbl_interior_tendency_mod.F90 +++ b/src/marbl_interior_tendency_mod.F90 @@ -204,7 +204,6 @@ subroutine marbl_interior_tendency_compute( & real (r8) :: Lig_photochem(domain%km) ! loss of Fe-binding Ligand from UV radiation real (r8) :: Lig_deg(domain%km) ! loss of Fe-binding Ligand from bacterial degradation real (r8) :: Lig_loss(domain%km) ! loss of Fe-binding Ligand - real (r8) :: totalChl_local(domain%km) ! local value of totalChl ! NOTE(bja, 2015-07) vectorization: arrays that are (n, k, c, i) ! probably can not be vectorized reasonably over c without memory @@ -235,7 +234,7 @@ subroutine marbl_interior_tendency_compute( & !----------------------------------------------------------------------- call setup_local_tracers(domain%kmt, marbl_tracer_indices, tracers(:,:), autotroph_local, & - tracer_local(:,:), zooplankton_local, totalChl_local) + tracer_local(:,:), zooplankton_local) !----------------------------------------------------------------------- ! Set all interior diagnostics to zero @@ -371,7 +370,7 @@ subroutine marbl_interior_tendency_compute( & end if call compute_PAR(domain, interior_tendency_forcings, interior_tendency_forcing_indices, & - totalChl_local, unit_system, PAR) + autotroph_local, unit_system, PAR) call compute_autotroph_elemental_ratios(km, autotroph_local, marbl_tracer_indices, tracer_local, & autotroph_derived_terms) @@ -546,7 +545,7 @@ end subroutine marbl_interior_tendency_compute !*********************************************************************** subroutine compute_PAR(domain, interior_tendency_forcings, interior_tendency_forcing_ind, & - totalChl_local, unit_system, PAR) + autotroph_local, unit_system, PAR) !----------------------------------------------------------------------- ! compute PAR related quantities @@ -558,12 +557,12 @@ subroutine compute_PAR(domain, interior_tendency_forcings, interior_tendency_for ! PAR is intent(inout) because it components, while entirely set here, are allocated elsewhere - type(marbl_domain_type) , intent(in) :: domain - type(marbl_forcing_fields_type) , intent(in) :: interior_tendency_forcings(:) - type(marbl_interior_tendency_forcing_indexing_type), intent(in) :: interior_tendency_forcing_ind - real(r8) , intent(in) :: totalChl_local(:) - type(unit_system_type) , intent(in) :: unit_system - type(marbl_PAR_type) , intent(inout) :: PAR + type(marbl_domain_type), intent(in) :: domain + type(marbl_forcing_fields_type), intent(in) :: interior_tendency_forcings(:) + type(marbl_interior_tendency_forcing_indexing_type), intent(in) :: interior_tendency_forcing_ind + type(autotroph_local_type), intent(in) :: autotroph_local + type(unit_system_type), intent(in) :: unit_system + type(marbl_PAR_type), intent(inout) :: PAR !----------------------------------------------------------------------- ! local variables @@ -574,6 +573,7 @@ subroutine compute_PAR(domain, interior_tendency_forcings, interior_tendency_for real (r8), parameter :: PAR_threshold = 1.0e-19_r8 real (r8) :: WORK1(domain%kmt) + real (r8) :: totalChl_local(domain%kmt) integer(int_kind) :: k, subcol_ind !----------------------------------------------------------------------- @@ -624,7 +624,8 @@ subroutine compute_PAR(domain, interior_tendency_forcings, interior_tendency_for ! compute attenuation coefficient over column !----------------------------------------------------------------------- - WORK1(:) = max(totalChl_local(1:column_kmt), 0.02_r8) + totalChl_local(:) = sum(autotroph_local%Chl(:,1:column_kmt), dim=1) + WORK1(:) = max(totalChl_local(:), 0.02_r8) do k = 1, column_kmt if (WORK1(k) < 0.13224_r8) then PAR%KPARdz(k) = (0.0919_r8*unit_system%len2m)*(WORK1(k)**0.3536_r8) @@ -752,7 +753,7 @@ end subroutine marbl_interior_tendency_adjust_bury_coeff !*********************************************************************** subroutine setup_local_tracers(column_kmt, marbl_tracer_indices, tracers, & - autotroph_local, tracer_local, zooplankton_local, totalChl_local) + autotroph_local, tracer_local, zooplankton_local) !----------------------------------------------------------------------- ! create local copies of model tracers @@ -765,7 +766,6 @@ subroutine setup_local_tracers(column_kmt, marbl_tracer_indices, tracers, & type(autotroph_local_type) , intent(inout) :: autotroph_local real (r8) , intent(out) :: tracer_local(:,:) type(zooplankton_local_type) , intent(inout) :: zooplankton_local - real (r8) , intent(out) :: totalChl_local(:) !----------------------------------------------------------------------- ! local variables @@ -846,13 +846,6 @@ subroutine setup_local_tracers(column_kmt, marbl_tracer_indices, tracers, & ! autotroph consistency check call autotroph_zero_consistency_enforce(column_kmt, marbl_tracer_indices, autotroph_local) - ! set totalChl_local - if (autotroph_cnt > 0) then - totalChl_local = sum(autotroph_local%Chl(:,:), dim=1) - else - totalChl_local = c0 - end if - end subroutine setup_local_tracers !*********************************************************************** From 9a988f24855a16bc236e8b6acdafd872c4c7e0a0 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 14:59:28 -0600 Subject: [PATCH 59/64] Remove abio_init and ciso_init modules The tracer initialization was moved into marbl_init_mod, but the next commit will refactor it once more to create a marbl_init_tracer_metadata module --- src/marbl_abio_dic_init_mod.F90 | 66 -------- src/marbl_ciso_init_mod.F90 | 136 ----------------- src/marbl_init_mod.F90 | 259 +++++++++++++++++++------------- 3 files changed, 152 insertions(+), 309 deletions(-) delete mode 100644 src/marbl_abio_dic_init_mod.F90 delete mode 100644 src/marbl_ciso_init_mod.F90 diff --git a/src/marbl_abio_dic_init_mod.F90 b/src/marbl_abio_dic_init_mod.F90 deleted file mode 100644 index 0b0d9762..00000000 --- a/src/marbl_abio_dic_init_mod.F90 +++ /dev/null @@ -1,66 +0,0 @@ -module marbl_abio_dic_init_mod - - use marbl_kinds_mod, only : int_kind - use marbl_settings_mod, only : abio_dic_on - use marbl_interface_public_types, only : marbl_tracer_metadata_type - use marbl_interface_private_types, only : marbl_tracer_index_type - - implicit none - private - - public :: marbl_abio_dic_init_tracer_metadata - -contains - - !***************************************************************************** - - subroutine marbl_abio_dic_init_tracer_metadata(unit_system, & - marbl_tracer_indices, & - marbl_tracer_metadata) - - ! Set tracer and forcing metadata - use marbl_settings_mod, only : unit_system_type - - type(unit_system_type), intent(in) :: unit_system - type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices - type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer - - !----------------------------------------------------------------------- - ! local variables - !----------------------------------------------------------------------- - integer (int_kind) :: n ! tracer index - - if (.not. abio_dic_on) return - - !----------------------------------------------------------------------- - ! initialize non-autotroph metadata values - !----------------------------------------------------------------------- - - associate(abio_dic_ind => marbl_tracer_indices%abio_dic_ind, & - abio_di14c_ind => marbl_tracer_indices%abio_di14c_ind, & - abio_ind_beg => marbl_tracer_indices%abio_dic%ind_beg, & - abio_ind_end => marbl_tracer_indices%abio_dic%ind_end & - ) - - ! All abio tracers share units, tend_units, flux_units, and - ! tracer_module_name - do n=abio_ind_beg,abio_ind_end - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - marbl_tracer_metadata(n)%tracer_module_name = 'abio' - end do - marbl_tracer_metadata(abio_dic_ind)%short_name='ABIO_DIC' - marbl_tracer_metadata(abio_dic_ind)%long_name='Abiotic Dissolved Inorganic Carbon' - - marbl_tracer_metadata(abio_di14c_ind)%short_name='ABIO_DI14C' - marbl_tracer_metadata(abio_di14c_ind)%long_name='Abiotic Dissolved Inorganic Carbon-14' - - - end associate - - end subroutine marbl_abio_dic_init_tracer_metadata - - !***************************************************************************** - -end module marbl_abio_dic_init_mod diff --git a/src/marbl_ciso_init_mod.F90 b/src/marbl_ciso_init_mod.F90 deleted file mode 100644 index d569384e..00000000 --- a/src/marbl_ciso_init_mod.F90 +++ /dev/null @@ -1,136 +0,0 @@ -module marbl_ciso_init_mod - - use marbl_kinds_mod, only : int_kind - use marbl_settings_mod, only : ciso_on - use marbl_interface_public_types, only : marbl_tracer_metadata_type - use marbl_interface_private_types, only : marbl_tracer_index_type - - implicit none - private - - public :: marbl_ciso_init_tracer_metadata - -contains - - !***************************************************************************** - - subroutine marbl_ciso_init_tracer_metadata(unit_system, & - marbl_tracer_indices, & - marbl_tracer_metadata) - - ! Set tracer and forcing metadata - use marbl_settings_mod, only : lecovars_full_depth_tavg - use marbl_settings_mod, only : autotroph_cnt - use marbl_settings_mod, only : autotroph_settings - use marbl_settings_mod, only : unit_system_type - - type(unit_system_type), intent(in) :: unit_system - type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices - type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer - - !----------------------------------------------------------------------- - ! local variables - !----------------------------------------------------------------------- - integer (int_kind) :: n ! tracer index - integer (int_kind) :: auto_ind ! autotroph functional group index - - if (.not. ciso_on) return - - !----------------------------------------------------------------------- - ! initialize non-autotroph metadata values - !----------------------------------------------------------------------- - - associate(di13c_ind => marbl_tracer_indices%di13c_ind, & - do13ctot_ind => marbl_tracer_indices%do13ctot_ind, & - zootot13C_ind => marbl_tracer_indices%zootot13C_ind, & - di14c_ind => marbl_tracer_indices%di14c_ind, & - do14ctot_ind => marbl_tracer_indices%do14ctot_ind, & - zootot14C_ind => marbl_tracer_indices%zootot14C_ind, & - ciso_ind_beg => marbl_tracer_indices%ciso%ind_beg, & - ciso_ind_end => marbl_tracer_indices%ciso%ind_end & - ) - - ! All CISO tracers share units, tend_units, flux_units, and - ! tracer_module_name - do n=ciso_ind_beg,ciso_ind_end - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - marbl_tracer_metadata(n)%tracer_module_name = 'ciso' - end do - marbl_tracer_metadata(di13c_ind)%short_name='DI13C' - marbl_tracer_metadata(di13c_ind)%long_name='Dissolved Inorganic Carbon-13' - - marbl_tracer_metadata(do13ctot_ind)%short_name='DO13Ctot' - marbl_tracer_metadata(do13ctot_ind)%long_name='Dissolved Organic Carbon-13 (semi-labile+refractory)' - - marbl_tracer_metadata(zootot13C_ind)%short_name='zootot13C' - marbl_tracer_metadata(zootot13C_ind)%long_name='Zooplankton Carbon-13 (sum over all zooplankton)' - - marbl_tracer_metadata(di14c_ind)%short_name='DI14C' - marbl_tracer_metadata(di14c_ind)%long_name='Dissolved Inorganic Carbon-14' - - marbl_tracer_metadata(do14ctot_ind)%short_name='DO14Ctot' - marbl_tracer_metadata(do14ctot_ind)%long_name='Dissolved Organic Carbon-14 (semi-labile+refractory)' - - marbl_tracer_metadata(zootot14C_ind)%short_name='zootot14C' - marbl_tracer_metadata(zootot14C_ind)%long_name='Zooplankton Carbon-14 (sum over all zooplankton)' - - !----------------------------------------------------------------------- - ! initialize autotroph tracer_d values and tracer indices - !----------------------------------------------------------------------- - - do auto_ind = 1, autotroph_cnt - n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '13C' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-13' - - n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '14C' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-14' - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' - end if - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' - endif - end do - - !----------------------------------------------------------------------- - ! set lfull_depth_tavg flag for short-lived ecosystem tracers - !----------------------------------------------------------------------- - - marbl_tracer_metadata(zootot13C_ind)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(zootot14C_ind)%lfull_depth_tavg = lecovars_full_depth_tavg - - do auto_ind = 1, autotroph_cnt - n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - - n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - endif - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - endif - end do - - end associate - - end subroutine marbl_ciso_init_tracer_metadata - - !***************************************************************************** - -end module marbl_ciso_init_mod diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index 4fcaea4e..20920644 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -11,6 +11,9 @@ module marbl_init_mod use marbl_logging, only : marbl_log_type + use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : abio_dic_on + use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : autotroph_cnt use marbl_settings_mod, only : zooplankton_cnt use marbl_settings_mod, only : unit_system_type @@ -162,15 +165,10 @@ subroutine marbl_init_tracers(num_levels, & tracer_metadata, & marbl_status_log) - use marbl_settings_mod, only : base_bio_on - use marbl_settings_mod, only : abio_dic_on - use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : lvariable_PtoC use marbl_settings_mod, only : autotroph_settings use marbl_settings_mod, only : zooplankton_settings use marbl_settings_mod, only : tracer_restore_vars - use marbl_abio_dic_init_mod, only : marbl_abio_dic_init_tracer_metadata - use marbl_ciso_init_mod, only : marbl_ciso_init_tracer_metadata integer(int_kind), intent(in) :: num_levels integer(int_kind), intent(in) :: num_elements_surface_flux @@ -210,8 +208,6 @@ subroutine marbl_init_tracers(num_levels, & ! Set up tracer metadata call marbl_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) - call marbl_abio_dic_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) - call marbl_ciso_init_tracer_metadata(unit_system, tracer_indices, tracer_metadata) ! Log what tracers are being used call marbl_status_log%log_header('MARBL Tracer indices', subname) @@ -251,7 +247,6 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! Set tracer and forcing metadata - use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : lecovars_full_depth_tavg type(unit_system_type), intent(in) :: unit_system @@ -270,55 +265,117 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! initialize tracer metatdata !----------------------------------------------------------------------- - if (.not. base_bio_on) return - - marbl_tracer_metadata(:)%lfull_depth_tavg = .true. - marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' - - call marbl_init_non_autotroph_tracers_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - call marbl_init_zooplankton_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - call marbl_init_autotroph_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - !----------------------------------------------------------------------- - ! set lfull_depth_tavg flag for short-lived ecosystem tracers - !----------------------------------------------------------------------- - - ! Should be done in marbl_diagnostics, and without the _tavg name - do zoo_ind = 1, zooplankton_cnt - n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - end do - - do auto_ind = 1, autotroph_cnt - n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - - n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - - n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - endif + if (base_bio_on) then + + marbl_tracer_metadata(:)%lfull_depth_tavg = .true. + marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' + + call marbl_init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) + call marbl_init_non_autotroph_tracer_metadata('NO3', 'Dissolved Inorganic Nitrate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%no3_ind)) + call marbl_init_non_autotroph_tracer_metadata('SiO3', 'Dissolved Inorganic Silicate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%sio3_ind)) + call marbl_init_non_autotroph_tracer_metadata('NH4', 'Dissolved Ammonia', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%nh4_ind)) + call marbl_init_non_autotroph_tracer_metadata('Fe', 'Dissolved Inorganic Iron', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%fe_ind)) + call marbl_init_non_autotroph_tracer_metadata('Lig', 'Iron Binding Ligand', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%lig_ind)) + call marbl_init_non_autotroph_tracer_metadata('O2', 'Dissolved Oxygen', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%o2_ind)) + call marbl_init_non_autotroph_tracer_metadata('DIC', 'Dissolved Inorganic Carbon', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_ind)) + call marbl_init_non_autotroph_tracer_metadata('ALK', 'Alkalinity', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_ind)) + call marbl_init_non_autotroph_tracer_metadata('DOC', 'Dissolved Organic Carbon', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%doc_ind)) + call marbl_init_non_autotroph_tracer_metadata('DON', 'Dissolved Organic Nitrogen', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%don_ind)) + call marbl_init_non_autotroph_tracer_metadata('DOP', 'Dissolved Organic Phosphorus', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dop_ind)) + call marbl_init_non_autotroph_tracer_metadata('DOPr', 'Refractory DOP', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dopr_ind)) + call marbl_init_non_autotroph_tracer_metadata('DONr', 'Refractory DON', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%donr_ind)) + call marbl_init_non_autotroph_tracer_metadata('DOCr', 'Refractory DOC', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%docr_ind)) + call marbl_init_non_autotroph_tracer_metadata('DIC_ALT_CO2', 'Dissolved Inorganic Carbon, Alternative CO2', & + 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_alt_co2_ind)) + call marbl_init_non_autotroph_tracer_metadata('ALK_ALT_CO2', 'Alkalinity, Alternative CO2', & + 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_alt_co2_ind)) + + call marbl_init_zooplankton_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + call marbl_init_autotroph_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + !----------------------------------------------------------------------- + ! set lfull_depth_tavg flag for short-lived ecosystem tracers + !----------------------------------------------------------------------- + + ! Should be done in marbl_diagnostics, and without the _tavg name + do zoo_ind = 1, zooplankton_cnt + n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + end do - n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + do auto_ind = 1, autotroph_cnt + n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + end do + end if - n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - endif + if (ciso_on) then + call marbl_init_non_autotroph_tracer_metadata('DI13C', 'Dissolved Inorganic Carbon-13', 'ciso', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%di13c_ind)) + call marbl_init_non_autotroph_tracer_metadata('DO13Ctot', 'Dissolved Organic Carbon-13 (semi-labile+refractory)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do13ctot_ind)) + call marbl_init_non_autotroph_tracer_metadata('zootot13C', 'Zooplankton Carbon-13 (sum over all zooplankton)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot13C_ind)) + call marbl_init_non_autotroph_tracer_metadata('DI14C', 'Dissolved Inorganic Carbon-14', 'ciso', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%di14c_ind)) + call marbl_init_non_autotroph_tracer_metadata('DO14Ctot', 'Dissolved Organic Carbon-14 (semi-labile+refractory)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do14ctot_ind)) + call marbl_init_non_autotroph_tracer_metadata('zootot14C', 'Zooplankton Carbon-14 (sum over all zooplankton)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot14C_ind)) + end if - n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - endif - end do + if (abio_dic_on) then + call marbl_init_non_autotroph_tracer_metadata('ABIO_DIC', 'Abiotic Dissolved Inorganic Carbon', 'abio_dic', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_dic_ind)) + call marbl_init_non_autotroph_tracer_metadata('ABIO_DI14C', 'Abiotic Dissolved Inorganic Carbon-14', 'abio_dic', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_di14c_ind)) + end if end subroutine marbl_init_tracer_metadata @@ -506,7 +563,7 @@ end subroutine marbl_init_forcing_fields !*********************************************************************** - subroutine marbl_init_non_autotroph_tracer_metadata(short_name, long_name, unit_system, & + subroutine marbl_init_non_autotroph_tracer_metadata(short_name, long_name, tracer_module_name, unit_system, & marbl_tracer_metadata) !----------------------------------------------------------------------- @@ -516,11 +573,13 @@ subroutine marbl_init_non_autotroph_tracer_metadata(short_name, long_name, unit_ character(len=*), intent(in) :: short_name character(len=*), intent(in) :: long_name + character(len=*), intent(in) :: tracer_module_name type(unit_system_type), intent(in) :: unit_system type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata marbl_tracer_metadata%short_name = short_name marbl_tracer_metadata%long_name = long_name + marbl_tracer_metadata%tracer_module_name = tracer_module_name if ((trim(short_name) == "ALK") .or. & (trim(short_name) == "ALK_ALT_CO2")) then marbl_tracer_metadata%units = unit_system%alk_conc_units @@ -536,58 +595,6 @@ end subroutine marbl_init_non_autotroph_tracer_metadata !*********************************************************************** - subroutine marbl_init_non_autotroph_tracers_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - !----------------------------------------------------------------------- - ! initialize non-autotroph tracer_d values and accumulate - ! non_living_biomass_ecosys_tracer_cnt - !----------------------------------------------------------------------- - - type(marbl_tracer_metadata_type) , intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer - type(marbl_tracer_index_type) , intent(in) :: marbl_tracer_indices - type(unit_system_type) , intent(in) :: unit_system - - call marbl_init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) - call marbl_init_non_autotroph_tracer_metadata('NO3', 'Dissolved Inorganic Nitrate', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%no3_ind)) - call marbl_init_non_autotroph_tracer_metadata('SiO3', 'Dissolved Inorganic Silicate', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%sio3_ind)) - call marbl_init_non_autotroph_tracer_metadata('NH4', 'Dissolved Ammonia', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%nh4_ind)) - call marbl_init_non_autotroph_tracer_metadata('Fe', 'Dissolved Inorganic Iron', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%fe_ind)) - call marbl_init_non_autotroph_tracer_metadata('Lig', 'Iron Binding Ligand', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%lig_ind)) - call marbl_init_non_autotroph_tracer_metadata('O2', 'Dissolved Oxygen', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%o2_ind)) - call marbl_init_non_autotroph_tracer_metadata('DIC', 'Dissolved Inorganic Carbon', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_ind)) - call marbl_init_non_autotroph_tracer_metadata('ALK', 'Alkalinity', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOC', 'Dissolved Organic Carbon', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%doc_ind)) - call marbl_init_non_autotroph_tracer_metadata('DON', 'Dissolved Organic Nitrogen', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%don_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOP', 'Dissolved Organic Phosphorus', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dop_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOPr', 'Refractory DOP', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dopr_ind)) - call marbl_init_non_autotroph_tracer_metadata('DONr', 'Refractory DON', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%donr_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOCr', 'Refractory DOC', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%docr_ind)) - - call marbl_init_non_autotroph_tracer_metadata('DIC_ALT_CO2', 'Dissolved Inorganic Carbon, Alternative CO2', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_alt_co2_ind)) - call marbl_init_non_autotroph_tracer_metadata('ALK_ALT_CO2', 'Alkalinity, Alternative CO2', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_alt_co2_ind)) - - end subroutine marbl_init_non_autotroph_tracers_metadata - - !*********************************************************************** - subroutine marbl_init_zooplankton_tracer_metadata(marbl_tracer_metadata, & marbl_tracer_indices, unit_system) @@ -690,6 +697,44 @@ subroutine marbl_init_autotroph_tracer_metadata(marbl_tracer_metadata, & marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units endif + + ! ciso tracers + n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '13C' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-13' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '14C' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-14' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + end do end subroutine marbl_init_autotroph_tracer_metadata From bab7fe62fbbdd933fe9cff3af6d5e34a0e8879ad Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 15:19:24 -0600 Subject: [PATCH 60/64] Move marbl_init_tracer_metadata to new module This splits marbl_init_mod.F90 up and makes it a little easier to read. I also renamed all the private functions in both marbl_init_mod.F90 and the new marbl_init_tracer_metadata_mod.F90 modules so they no longer begin with "marbl_" -- this keeps with the convention that public subroutines should begin with marbl_ to avoid namespace conflicts in the GCM. --- src/marbl_init_mod.F90 | 349 ++----------------------- src/marbl_init_tracer_metadata_mod.F90 | 339 ++++++++++++++++++++++++ 2 files changed, 354 insertions(+), 334 deletions(-) create mode 100644 src/marbl_init_tracer_metadata_mod.F90 diff --git a/src/marbl_init_mod.F90 b/src/marbl_init_mod.F90 index 20920644..35731fed 100644 --- a/src/marbl_init_mod.F90 +++ b/src/marbl_init_mod.F90 @@ -7,15 +7,11 @@ module marbl_init_mod use marbl_interface_public_types, only : marbl_tracer_metadata_type use marbl_interface_public_types, only : marbl_forcing_fields_type - use marbl_interface_private_types, only : marbl_tracer_index_type - use marbl_logging, only : marbl_log_type use marbl_settings_mod, only : base_bio_on use marbl_settings_mod, only : abio_dic_on use marbl_settings_mod, only : ciso_on - use marbl_settings_mod, only : autotroph_cnt - use marbl_settings_mod, only : zooplankton_cnt use marbl_settings_mod, only : unit_system_type implicit none @@ -170,6 +166,10 @@ subroutine marbl_init_tracers(num_levels, & use marbl_settings_mod, only : zooplankton_settings use marbl_settings_mod, only : tracer_restore_vars + use marbl_interface_private_types, only : marbl_tracer_index_type + + use marbl_init_tracer_metadata_mod, only : marbl_init_tracer_metadata + integer(int_kind), intent(in) :: num_levels integer(int_kind), intent(in) :: num_elements_surface_flux type(unit_system_type), intent(in) :: unit_system @@ -243,144 +243,6 @@ end subroutine marbl_init_tracers !*********************************************************************** - subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_tracer_metadata) - - ! Set tracer and forcing metadata - - use marbl_settings_mod, only : lecovars_full_depth_tavg - - type(unit_system_type), intent(in) :: unit_system - type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices - type (marbl_tracer_metadata_type), intent(out) :: marbl_tracer_metadata(:) ! descriptors for each tracer - - !----------------------------------------------------------------------- - ! local variables - !----------------------------------------------------------------------- - - integer (int_kind) :: n ! index for looping over tracers - integer (int_kind) :: zoo_ind ! zooplankton functional group index - integer (int_kind) :: auto_ind ! autotroph functional group index - - !----------------------------------------------------------------------- - ! initialize tracer metatdata - !----------------------------------------------------------------------- - - if (base_bio_on) then - - marbl_tracer_metadata(:)%lfull_depth_tavg = .true. - marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' - - call marbl_init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) - call marbl_init_non_autotroph_tracer_metadata('NO3', 'Dissolved Inorganic Nitrate', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%no3_ind)) - call marbl_init_non_autotroph_tracer_metadata('SiO3', 'Dissolved Inorganic Silicate', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%sio3_ind)) - call marbl_init_non_autotroph_tracer_metadata('NH4', 'Dissolved Ammonia', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%nh4_ind)) - call marbl_init_non_autotroph_tracer_metadata('Fe', 'Dissolved Inorganic Iron', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%fe_ind)) - call marbl_init_non_autotroph_tracer_metadata('Lig', 'Iron Binding Ligand', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%lig_ind)) - call marbl_init_non_autotroph_tracer_metadata('O2', 'Dissolved Oxygen', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%o2_ind)) - call marbl_init_non_autotroph_tracer_metadata('DIC', 'Dissolved Inorganic Carbon', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_ind)) - call marbl_init_non_autotroph_tracer_metadata('ALK', 'Alkalinity', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOC', 'Dissolved Organic Carbon', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%doc_ind)) - call marbl_init_non_autotroph_tracer_metadata('DON', 'Dissolved Organic Nitrogen', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%don_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOP', 'Dissolved Organic Phosphorus', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dop_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOPr', 'Refractory DOP', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%dopr_ind)) - call marbl_init_non_autotroph_tracer_metadata('DONr', 'Refractory DON', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%donr_ind)) - call marbl_init_non_autotroph_tracer_metadata('DOCr', 'Refractory DOC', 'base_bio', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%docr_ind)) - call marbl_init_non_autotroph_tracer_metadata('DIC_ALT_CO2', 'Dissolved Inorganic Carbon, Alternative CO2', & - 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_alt_co2_ind)) - call marbl_init_non_autotroph_tracer_metadata('ALK_ALT_CO2', 'Alkalinity, Alternative CO2', & - 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_alt_co2_ind)) - - call marbl_init_zooplankton_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - call marbl_init_autotroph_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - !----------------------------------------------------------------------- - ! set lfull_depth_tavg flag for short-lived ecosystem tracers - !----------------------------------------------------------------------- - - ! Should be done in marbl_diagnostics, and without the _tavg name - do zoo_ind = 1, zooplankton_cnt - n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - end do - - do auto_ind = 1, autotroph_cnt - n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - - n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - - n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - endif - - n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - - n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - endif - - n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind - if (n > 0) then - marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg - marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' - endif - end do - end if - - if (ciso_on) then - call marbl_init_non_autotroph_tracer_metadata('DI13C', 'Dissolved Inorganic Carbon-13', 'ciso', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%di13c_ind)) - call marbl_init_non_autotroph_tracer_metadata('DO13Ctot', 'Dissolved Organic Carbon-13 (semi-labile+refractory)', & - 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do13ctot_ind)) - call marbl_init_non_autotroph_tracer_metadata('zootot13C', 'Zooplankton Carbon-13 (sum over all zooplankton)', & - 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot13C_ind)) - call marbl_init_non_autotroph_tracer_metadata('DI14C', 'Dissolved Inorganic Carbon-14', 'ciso', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%di14c_ind)) - call marbl_init_non_autotroph_tracer_metadata('DO14Ctot', 'Dissolved Organic Carbon-14 (semi-labile+refractory)', & - 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do14ctot_ind)) - call marbl_init_non_autotroph_tracer_metadata('zootot14C', 'Zooplankton Carbon-14 (sum over all zooplankton)', & - 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot14C_ind)) - end if - - if (abio_dic_on) then - call marbl_init_non_autotroph_tracer_metadata('ABIO_DIC', 'Abiotic Dissolved Inorganic Carbon', 'abio_dic', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_dic_ind)) - call marbl_init_non_autotroph_tracer_metadata('ABIO_DI14C', 'Abiotic Dissolved Inorganic Carbon-14', 'abio_dic', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_di14c_ind)) - end if - - end subroutine marbl_init_tracer_metadata - - !*********************************************************************** - subroutine marbl_init_parameters_post_tracers(marbl_settings, marbl_status_log) use marbl_settings_mod, only : marbl_settings_type @@ -461,9 +323,6 @@ subroutine marbl_init_forcing_fields(domain, & use marbl_interface_public_types, only : marbl_domain_type use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type use marbl_interface_private_types, only : marbl_interior_tendency_forcing_indexing_type - use marbl_settings_mod, only : base_bio_on - use marbl_settings_mod, only : abio_dic_on - use marbl_settings_mod, only : ciso_on use marbl_settings_mod, only : lflux_gas_o2 use marbl_settings_mod, only : lflux_gas_co2 use marbl_settings_mod, only : ladjust_bury_coeff @@ -512,20 +371,20 @@ subroutine marbl_init_forcing_fields(domain, & ! Initialize surface forcing fields allocate(surface_flux_forcings(num_surface_flux_forcing_fields)) - call marbl_init_surface_flux_forcing_fields( & + call init_surface_flux_forcing_fields( & num_elements = num_elements_surface_flux, & surface_flux_forcing_indices = surface_flux_forcing_ind, & unit_system = unit_system, & surface_flux_forcings = surface_flux_forcings, & marbl_status_log = marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace("marbl_init_surface_flux_forcing_fields()", subname) + call marbl_status_log%log_error_trace("init_surface_flux_forcing_fields()", subname) return end if ! Initialize interior forcing fields allocate(interior_tendency_forcings(num_interior_tendency_forcing_fields)) - call marbl_init_interior_tendency_forcing_fields( & + call init_interior_tendency_forcing_fields( & num_elements = domain%num_elements_interior_tendency, & interior_tendency_forcing_indices = interior_tendency_forcing_ind, & tracer_metadata = tracer_metadata, & @@ -535,7 +394,7 @@ subroutine marbl_init_forcing_fields(domain, & interior_tendency_forcings = interior_tendency_forcings, & marbl_status_log = marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_status_log%log_error_trace("marbl_init_interior_tendency_forcing_fields()", subname) + call marbl_status_log%log_error_trace("init_interior_tendency_forcing_fields()", subname) return end if @@ -563,186 +422,8 @@ end subroutine marbl_init_forcing_fields !*********************************************************************** - subroutine marbl_init_non_autotroph_tracer_metadata(short_name, long_name, tracer_module_name, unit_system, & - marbl_tracer_metadata) - - !----------------------------------------------------------------------- - ! initialize non-autotroph tracer_d values and accumulate - ! non_living_biomass_ecosys_tracer_cnt - !----------------------------------------------------------------------- - - character(len=*), intent(in) :: short_name - character(len=*), intent(in) :: long_name - character(len=*), intent(in) :: tracer_module_name - type(unit_system_type), intent(in) :: unit_system - type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata - - marbl_tracer_metadata%short_name = short_name - marbl_tracer_metadata%long_name = long_name - marbl_tracer_metadata%tracer_module_name = tracer_module_name - if ((trim(short_name) == "ALK") .or. & - (trim(short_name) == "ALK_ALT_CO2")) then - marbl_tracer_metadata%units = unit_system%alk_conc_units - marbl_tracer_metadata%tend_units = unit_system%alk_conc_tend_units - marbl_tracer_metadata%flux_units = unit_system%alk_conc_flux_units - else - marbl_tracer_metadata%units = unit_system%conc_units - marbl_tracer_metadata%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata%flux_units = unit_system%conc_flux_units - endif - - end subroutine marbl_init_non_autotroph_tracer_metadata - - !*********************************************************************** - - subroutine marbl_init_zooplankton_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - !----------------------------------------------------------------------- - ! initialize zooplankton tracer_d values and tracer indices - !----------------------------------------------------------------------- - - use marbl_settings_mod, only : zooplankton_settings - - type (marbl_tracer_metadata_type) , intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer - type (marbl_tracer_index_type) , intent(in) :: marbl_tracer_indices - type(unit_system_type) , intent(in) :: unit_system - - !----------------------------------------------------------------------- - ! local variables - !----------------------------------------------------------------------- - integer (int_kind) :: n, zoo_ind ! zooplankton functional group index - !----------------------------------------------------------------------- - - do zoo_ind = 1, zooplankton_cnt - n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind - marbl_tracer_metadata(n)%short_name = trim(zooplankton_settings(zoo_ind)%sname) // 'C' - marbl_tracer_metadata(n)%long_name = trim(zooplankton_settings(zoo_ind)%lname) // ' Carbon' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end do - - end subroutine marbl_init_zooplankton_tracer_metadata - - !*********************************************************************** - - subroutine marbl_init_autotroph_tracer_metadata(marbl_tracer_metadata, & - marbl_tracer_indices, unit_system) - - !----------------------------------------------------------------------- - ! initialize autotroph tracer_d values and tracer indices - !----------------------------------------------------------------------- - - use marbl_settings_mod, only : autotroph_settings - - type (marbl_tracer_metadata_type) , intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer - type (marbl_tracer_index_type) , intent(in) :: marbl_tracer_indices - type(unit_system_type) , intent(in) :: unit_system - - !----------------------------------------------------------------------- - ! local variables - !----------------------------------------------------------------------- - integer (int_kind) :: n, auto_ind - !----------------------------------------------------------------------- - - do auto_ind = 1, autotroph_cnt - n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Chl' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Chlorophyll' - marbl_tracer_metadata(n)%units = 'mg/m^3' - marbl_tracer_metadata(n)%tend_units = 'mg/m^3/s' - if (unit_system%unit_system == 'cgs') then - marbl_tracer_metadata(n)%flux_units = 'mg/m^3 cm/s' - else - marbl_tracer_metadata(n)%flux_units = 'mg/m^2/s' - endif - n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'C' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - - n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind - if (n.gt.0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'P' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Phosphorus' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - endif - - n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Fe' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Iron' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - - n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Si' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Silicon' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - endif - - n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'CaCO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' CaCO3' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - endif - - ! ciso tracers - n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '13C' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-13' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - - n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '14C' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-14' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind - if (n .gt. 0) then - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - - end do - - end subroutine marbl_init_autotroph_tracer_metadata - - !*********************************************************************** - - subroutine marbl_init_surface_flux_forcing_fields(num_elements, surface_flux_forcing_indices, & - unit_system, surface_flux_forcings, marbl_status_log) + subroutine init_surface_flux_forcing_fields(num_elements, surface_flux_forcing_indices, unit_system, & + surface_flux_forcings, marbl_status_log) ! Initialize the surface forcing_fields datatype with information from the ! namelist read @@ -759,7 +440,7 @@ subroutine marbl_init_surface_flux_forcing_fields(num_elements, surface_flux_for !----------------------------------------------------------------------- ! local variables !----------------------------------------------------------------------- - character(len=*), parameter :: subname = 'marbl_init_mod:marbl_init_surface_flux_forcing_fields' + character(len=*), parameter :: subname = 'marbl_init_mod:init_surface_flux_forcing_fields' character(len=char_len) :: log_message integer :: id @@ -902,11 +583,11 @@ subroutine marbl_init_surface_flux_forcing_fields(num_elements, surface_flux_for ! FIXME #26: do we have any forcing fields that are required to be set? ! If so, check to make sure those indices are not zero here. - end subroutine marbl_init_surface_flux_forcing_fields + end subroutine init_surface_flux_forcing_fields !***************************************************************************** - subroutine marbl_init_interior_tendency_forcing_fields(& + subroutine init_interior_tendency_forcing_fields(& num_elements, & interior_tendency_forcing_indices, & tracer_metadata, & @@ -933,7 +614,7 @@ subroutine marbl_init_interior_tendency_forcing_fields(& !----------------------------------------------------------------------- ! local variables !----------------------------------------------------------------------- - character(len=*), parameter :: subname = 'marbl_init_mod:marbl_init_interior_tendency_forcing_fields' + character(len=*), parameter :: subname = 'marbl_init_mod:init_interior_tendency_forcing_fields' character(len=char_len) :: log_message ! NAG didn't like associating to tracer_metadata(:)%* @@ -1067,7 +748,7 @@ subroutine marbl_init_interior_tendency_forcing_fields(& ! FIXME #26: do we have any forcing fields that are required to be set? ! If so, check to make sure those indices are not zero here. - end subroutine marbl_init_interior_tendency_forcing_fields + end subroutine init_interior_tendency_forcing_fields !***************************************************************************** diff --git a/src/marbl_init_tracer_metadata_mod.F90 b/src/marbl_init_tracer_metadata_mod.F90 new file mode 100644 index 00000000..85799586 --- /dev/null +++ b/src/marbl_init_tracer_metadata_mod.F90 @@ -0,0 +1,339 @@ +module marbl_init_tracer_metadata_mod + + use marbl_kinds_mod, only : int_kind + + use marbl_interface_public_types, only : marbl_tracer_metadata_type + + use marbl_interface_private_types, only : marbl_tracer_index_type + + use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : abio_dic_on + use marbl_settings_mod, only : ciso_on + use marbl_settings_mod, only : autotroph_cnt + use marbl_settings_mod, only : zooplankton_cnt + use marbl_settings_mod, only : unit_system_type + + implicit none + private + + public :: marbl_init_tracer_metadata + + contains + + subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_tracer_metadata) + + ! Set tracer and forcing metadata + + use marbl_settings_mod, only : lecovars_full_depth_tavg + + type(unit_system_type), intent(in) :: unit_system + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + type(marbl_tracer_metadata_type), intent(out) :: marbl_tracer_metadata(:) ! descriptors for each tracer + + !----------------------------------------------------------------------- + ! local variables + !----------------------------------------------------------------------- + + integer(int_kind) :: n ! index for looping over tracers + integer(int_kind) :: zoo_ind ! zooplankton functional group index + integer(int_kind) :: auto_ind ! autotroph functional group index + + !----------------------------------------------------------------------- + ! initialize tracer metatdata + !----------------------------------------------------------------------- + + if (base_bio_on) then + + marbl_tracer_metadata(:)%lfull_depth_tavg = .true. + marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' + + call init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) + call init_non_autotroph_tracer_metadata('NO3', 'Dissolved Inorganic Nitrate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%no3_ind)) + call init_non_autotroph_tracer_metadata('SiO3', 'Dissolved Inorganic Silicate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%sio3_ind)) + call init_non_autotroph_tracer_metadata('NH4', 'Dissolved Ammonia', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%nh4_ind)) + call init_non_autotroph_tracer_metadata('Fe', 'Dissolved Inorganic Iron', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%fe_ind)) + call init_non_autotroph_tracer_metadata('Lig', 'Iron Binding Ligand', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%lig_ind)) + call init_non_autotroph_tracer_metadata('O2', 'Dissolved Oxygen', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%o2_ind)) + call init_non_autotroph_tracer_metadata('DIC', 'Dissolved Inorganic Carbon', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_ind)) + call init_non_autotroph_tracer_metadata('ALK', 'Alkalinity', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_ind)) + call init_non_autotroph_tracer_metadata('DOC', 'Dissolved Organic Carbon', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%doc_ind)) + call init_non_autotroph_tracer_metadata('DON', 'Dissolved Organic Nitrogen', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%don_ind)) + call init_non_autotroph_tracer_metadata('DOP', 'Dissolved Organic Phosphorus', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dop_ind)) + call init_non_autotroph_tracer_metadata('DOPr', 'Refractory DOP', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%dopr_ind)) + call init_non_autotroph_tracer_metadata('DONr', 'Refractory DON', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%donr_ind)) + call init_non_autotroph_tracer_metadata('DOCr', 'Refractory DOC', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%docr_ind)) + call init_non_autotroph_tracer_metadata('DIC_ALT_CO2', 'Dissolved Inorganic Carbon, Alternative CO2', & + 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%dic_alt_co2_ind)) + call init_non_autotroph_tracer_metadata('ALK_ALT_CO2', 'Alkalinity, Alternative CO2', & + 'base_bio', unit_system, marbl_tracer_metadata(marbl_tracer_indices%alk_alt_co2_ind)) + + call init_zooplankton_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + call init_autotroph_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + !----------------------------------------------------------------------- + ! set lfull_depth_tavg flag for short-lived ecosystem tracers + !----------------------------------------------------------------------- + + ! Should be done in marbl_diagnostics, and without the _tavg name + do zoo_ind = 1, zooplankton_cnt + n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + end do + + do auto_ind = 1, autotroph_cnt + n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + + n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind + if (n > 0) then + marbl_tracer_metadata(n)%lfull_depth_tavg = lecovars_full_depth_tavg + marbl_tracer_metadata(n)%tracer_module_name = 'base_bio' + endif + end do + end if + + if (ciso_on) then + call init_non_autotroph_tracer_metadata('DI13C', 'Dissolved Inorganic Carbon-13', 'ciso', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%di13c_ind)) + call init_non_autotroph_tracer_metadata('DO13Ctot', 'Dissolved Organic Carbon-13 (semi-labile+refractory)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do13ctot_ind)) + call init_non_autotroph_tracer_metadata('zootot13C', 'Zooplankton Carbon-13 (sum over all zooplankton)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot13C_ind)) + call init_non_autotroph_tracer_metadata('DI14C', 'Dissolved Inorganic Carbon-14', 'ciso', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%di14c_ind)) + call init_non_autotroph_tracer_metadata('DO14Ctot', 'Dissolved Organic Carbon-14 (semi-labile+refractory)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%do14ctot_ind)) + call init_non_autotroph_tracer_metadata('zootot14C', 'Zooplankton Carbon-14 (sum over all zooplankton)', & + 'ciso', unit_system, marbl_tracer_metadata(marbl_tracer_indices%zootot14C_ind)) + end if + + if (abio_dic_on) then + call init_non_autotroph_tracer_metadata('ABIO_DIC', 'Abiotic Dissolved Inorganic Carbon', 'abio_dic', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_dic_ind)) + call init_non_autotroph_tracer_metadata('ABIO_DI14C', 'Abiotic Dissolved Inorganic Carbon-14', 'abio_dic', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%abio_di14c_ind)) + end if + + end subroutine marbl_init_tracer_metadata + + !*********************************************************************** + + subroutine init_non_autotroph_tracer_metadata(short_name, long_name, tracer_module_name, unit_system, & + marbl_tracer_metadata) + + !----------------------------------------------------------------------- + ! initialize non-autotroph tracer_d values and accumulate + ! non_living_biomass_ecosys_tracer_cnt + !----------------------------------------------------------------------- + + character(len=*), intent(in) :: short_name + character(len=*), intent(in) :: long_name + character(len=*), intent(in) :: tracer_module_name + type(unit_system_type), intent(in) :: unit_system + type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata + + marbl_tracer_metadata%short_name = short_name + marbl_tracer_metadata%long_name = long_name + marbl_tracer_metadata%tracer_module_name = tracer_module_name + if ((trim(short_name) == "ALK") .or. & + (trim(short_name) == "ALK_ALT_CO2")) then + marbl_tracer_metadata%units = unit_system%alk_conc_units + marbl_tracer_metadata%tend_units = unit_system%alk_conc_tend_units + marbl_tracer_metadata%flux_units = unit_system%alk_conc_flux_units + else + marbl_tracer_metadata%units = unit_system%conc_units + marbl_tracer_metadata%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata%flux_units = unit_system%conc_flux_units + endif + + end subroutine init_non_autotroph_tracer_metadata + + !*********************************************************************** + + subroutine init_zooplankton_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + !----------------------------------------------------------------------- + ! initialize zooplankton tracer_d values and tracer indices + !----------------------------------------------------------------------- + + use marbl_settings_mod, only : zooplankton_settings + + type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + type(unit_system_type), intent(in) :: unit_system + + !----------------------------------------------------------------------- + ! local variables + !----------------------------------------------------------------------- + integer (int_kind) :: n, zoo_ind ! zooplankton functional group index + !----------------------------------------------------------------------- + + do zoo_ind = 1, zooplankton_cnt + n = marbl_tracer_indices%zoo_inds(zoo_ind)%C_ind + marbl_tracer_metadata(n)%short_name = trim(zooplankton_settings(zoo_ind)%sname) // 'C' + marbl_tracer_metadata(n)%long_name = trim(zooplankton_settings(zoo_ind)%lname) // ' Carbon' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end do + + end subroutine init_zooplankton_tracer_metadata + + !*********************************************************************** + + subroutine init_autotroph_tracer_metadata(marbl_tracer_metadata, & + marbl_tracer_indices, unit_system) + + !----------------------------------------------------------------------- + ! initialize autotroph tracer_d values and tracer indices + !----------------------------------------------------------------------- + + use marbl_settings_mod, only : autotroph_settings + + type(marbl_tracer_metadata_type), intent(inout) :: marbl_tracer_metadata(:) ! descriptors for each tracer + type(marbl_tracer_index_type), intent(in) :: marbl_tracer_indices + type(unit_system_type), intent(in) :: unit_system + + !----------------------------------------------------------------------- + ! local variables + !----------------------------------------------------------------------- + integer (int_kind) :: n, auto_ind + !----------------------------------------------------------------------- + + do auto_ind = 1, autotroph_cnt + n = marbl_tracer_indices%auto_inds(auto_ind)%Chl_ind + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Chl' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Chlorophyll' + marbl_tracer_metadata(n)%units = 'mg/m^3' + marbl_tracer_metadata(n)%tend_units = 'mg/m^3/s' + if (unit_system%unit_system == 'cgs') then + marbl_tracer_metadata(n)%flux_units = 'mg/m^3 cm/s' + else + marbl_tracer_metadata(n)%flux_units = 'mg/m^2/s' + endif + n = marbl_tracer_indices%auto_inds(auto_ind)%C_ind + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'C' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + + n = marbl_tracer_indices%auto_inds(auto_ind)%P_ind + if (n.gt.0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'P' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Phosphorus' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%Fe_ind + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Fe' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Iron' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + + n = marbl_tracer_indices%auto_inds(auto_ind)%Si_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Si' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Silicon' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + endif + + n = marbl_tracer_indices%auto_inds(auto_ind)%CaCO3_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'CaCO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' CaCO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + endif + + ! ciso tracers + n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '13C' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-13' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '14C' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-14' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if + + end do + + end subroutine init_autotroph_tracer_metadata + + !*********************************************************************** + +end module marbl_init_tracer_metadata_mod \ No newline at end of file From 5a1f06e188a8f438009c4a350baae3acb168b6d7 Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 15:39:41 -0600 Subject: [PATCH 61/64] Cleaned up diagnostic long names The abiotic diagnostic long names were not consistent in how they were capitalized, but now all of them are treated as titles (capitalizing all words except articles, prepositions, etc. A few base biotic diagnostic long names had comments suggesting improved names, and there was also a comment about changing a variable name in the indexing type -- I addressed those as well. Also changed some logic in how autotroph metadata is set -- rather than making sure the index of every ciso tracer is positive, I just wrapped all of the metadata updates in an "if (ciso_on)" block. --- defaults/diagnostics_latest.yaml | 26 +++++++++++++------------- defaults/json/diagnostics_latest.json | 26 +++++++++++++------------- src/marbl_abio_dic_diagnostics_mod.F90 | 22 +++++++++++----------- src/marbl_diagnostics_mod.F90 | 12 ++++++------ src/marbl_init_tracer_metadata_mod.F90 | 16 +++++----------- src/marbl_interface_private_types.F90 | 4 ++-- 6 files changed, 50 insertions(+), 56 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 252e7917..18ecc905 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -83,7 +83,7 @@ SCHMIDT_CO2 : PV_O2 : dependencies : base_bio_on : .true. - longname : PV_O2 # Should be "O2 Piston Velocity" to match PV_CO2? + longname : O2 Piston Velocity units : cm/s vertical_grid : none frequency : never @@ -206,7 +206,7 @@ IRON_FLUX : DUST_FLUX : dependencies : base_bio_on : .true. - longname : Dust Flux # Should be "Atmospheric Dust Flux?" + longname : Atmospheric Dust Flux units : g/cm^2/s vertical_grid : none frequency : never @@ -243,7 +243,7 @@ NHx_SURFACE_EMIS : ABIO_pCO2 : dependencies : abio_dic_on : .true. - longname : CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes + longname : CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes units : ppm vertical_grid : none frequency : medium @@ -251,7 +251,7 @@ ABIO_pCO2 : ABIO_D14C_atm : dependencies : abio_dic_on : .true. - longname : Atmospheric Delta 14C for Abiotic DIC tracer fluxes + longname : Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes units : permil vertical_grid : none frequency : medium @@ -259,7 +259,7 @@ ABIO_D14C_atm : ABIO_CO2STAR : dependencies : abio_dic_on : .true. - longname : CO2 Star for Abiotic DIC tracer fluxes + longname : CO2 Star for Abiotic DIC Tracer Fluxes units : mmol/m^3 vertical_grid : none frequency : medium @@ -267,7 +267,7 @@ ABIO_CO2STAR : ABIO_DCO2STAR : dependencies : abio_dic_on : .true. - longname : D CO2 Star for Abiotic DIC tracer fluxes + longname : D CO2 Star for Abiotic DIC Tracer Fluxes units : mmol/m^3 vertical_grid : none frequency : medium @@ -275,7 +275,7 @@ ABIO_DCO2STAR : ABIO_pCO2SURF : dependencies : abio_dic_on : .true. - longname : Surface pCO2 for Abiotic DIC tracer fluxes + longname : Surface pCO2 for Abiotic DIC Tracer Fluxes units : ppmv vertical_grid : none frequency : medium @@ -283,7 +283,7 @@ ABIO_pCO2SURF : ABIO_DpCO2 : dependencies : abio_dic_on : .true. - longname : D pCO2 for Abiotic DIC tracer fluxes + longname : D pCO2 for Abiotic DIC Tracer Fluxes units : ppmv vertical_grid : none frequency : medium @@ -291,7 +291,7 @@ ABIO_DpCO2 : ABIO_PH : dependencies : abio_dic_on : .true. - longname : Surface pH for Abiotic DIC tracer fluxes + longname : Surface pH for Abiotic DIC Tracer Fluxes units : 1 vertical_grid : none frequency : medium @@ -299,7 +299,7 @@ ABIO_PH : ABIO_ALK_SURF : dependencies : abio_dic_on : .true. - longname : Surface Alkalinity for Abiotic DIC tracer fluxes + longname : Surface Alkalinity for Abiotic DIC Tracer Fluxes units : meq/m^3 vertical_grid : none frequency : medium @@ -307,7 +307,7 @@ ABIO_ALK_SURF : ABIO_FG_DIC : dependencies : abio_dic_on : .true. - longname : Surface gas flux of abiotic DIC + longname : Surface Gas Flux of Abiotic DIC units : mmol/m^3 cm/s vertical_grid : none frequency : medium @@ -315,7 +315,7 @@ ABIO_FG_DIC : ABIO_FG_DI14C : dependencies : abio_dic_on : .true. - longname : Surface gas flux of abiotic DI14C + longname : Surface Gas Flux of Abiotic DI14C units : mmol/m^3 cm/s vertical_grid : none frequency : medium @@ -1459,7 +1459,7 @@ Nfix : ABIO_D14C_ocn : dependencies : abio_dic_on : .true. - longname : Oceanic Delta 14C for Abiotic DIC tracer fluxes + longname : Oceanic Delta 14C for Abiotic DIC Tracer Fluxes units : permil vertical_grid : layer_avg frequency : medium diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index 0f64685b..b3b8e682 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -363,7 +363,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface Alkalinity for Abiotic DIC tracer fluxes", + "longname": "Surface Alkalinity for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "meq/m^3", "vertical_grid": "none" @@ -373,7 +373,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "CO2 Star for Abiotic DIC tracer fluxes", + "longname": "CO2 Star for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "mmol/m^3", "vertical_grid": "none" @@ -383,7 +383,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Atmospheric Delta 14C for Abiotic DIC tracer fluxes", + "longname": "Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "permil", "vertical_grid": "none" @@ -393,7 +393,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Oceanic Delta 14C for Abiotic DIC tracer fluxes", + "longname": "Oceanic Delta 14C for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "permil", "vertical_grid": "layer_avg" @@ -403,7 +403,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "D CO2 Star for Abiotic DIC tracer fluxes", + "longname": "D CO2 Star for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "mmol/m^3", "vertical_grid": "none" @@ -413,7 +413,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "D pCO2 for Abiotic DIC tracer fluxes", + "longname": "D pCO2 for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "ppmv", "vertical_grid": "none" @@ -423,7 +423,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface gas flux of abiotic DI14C", + "longname": "Surface Gas Flux of Abiotic DI14C", "operator": "average", "units": "mmol/m^3 cm/s", "vertical_grid": "none" @@ -433,7 +433,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface gas flux of abiotic DIC", + "longname": "Surface Gas Flux of Abiotic DIC", "operator": "average", "units": "mmol/m^3 cm/s", "vertical_grid": "none" @@ -443,7 +443,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface pH for Abiotic DIC tracer fluxes", + "longname": "Surface pH for Abiotic DIC Tracer Fluxes", "operator": "average", "units": 1, "vertical_grid": "none" @@ -453,7 +453,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes", + "longname": "CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "ppm", "vertical_grid": "none" @@ -463,7 +463,7 @@ "abio_dic_on": ".true." }, "frequency": "medium", - "longname": "Surface pCO2 for Abiotic DIC tracer fluxes", + "longname": "Surface pCO2 for Abiotic DIC Tracer Fluxes", "operator": "average", "units": "ppmv", "vertical_grid": "none" @@ -1497,7 +1497,7 @@ "base_bio_on": ".true." }, "frequency": "never", - "longname": "Dust Flux", + "longname": "Atmospheric Dust Flux", "operator": "average", "units": "g/cm^2/s", "vertical_grid": "none" @@ -2166,7 +2166,7 @@ "base_bio_on": ".true." }, "frequency": "never", - "longname": "PV_O2", + "longname": "O2 Piston Velocity", "operator": "average", "units": "cm/s", "vertical_grid": "none" diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index f31b6664..c16ebeca 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -67,7 +67,7 @@ subroutine marbl_abio_dic_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'CO2 atmospheric partial pressure for Abiotic DIC tracer fluxes' + lname = 'CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes' sname = 'ABIO_pCO2' units = 'ppm' vgrid = 'none' @@ -79,7 +79,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Atmospheric Delta 14C for Abiotic DIC tracer fluxes' + lname = 'Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes' sname = 'ABIO_D14C_atm' units = 'permil' vgrid = 'none' @@ -91,7 +91,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'CO2 Star for Abiotic DIC tracer fluxes' + lname = 'CO2 Star for Abiotic DIC Tracer Fluxes' sname = 'ABIO_CO2STAR' units = unit_system%conc_units vgrid = 'none' @@ -103,7 +103,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'D CO2 Star for Abiotic DIC tracer fluxes' + lname = 'D CO2 Star for Abiotic DIC Tracer Fluxes' sname = 'ABIO_DCO2STAR' units = unit_system%conc_units vgrid = 'none' @@ -115,7 +115,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface pCO2 for Abiotic DIC tracer fluxes' + lname = 'Surface pCO2 for Abiotic DIC Tracer Fluxes' sname = 'ABIO_pCO2SURF' units = 'ppmv' vgrid = 'none' @@ -127,7 +127,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'D pCO2 for Abiotic DIC tracer fluxes' + lname = 'D pCO2 for Abiotic DIC Tracer Fluxes' sname = 'ABIO_DpCO2' units = 'ppmv' vgrid = 'none' @@ -139,7 +139,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface pH for Abiotic DIC tracer fluxes' + lname = 'Surface pH for Abiotic DIC Tracer Fluxes' sname = 'ABIO_PH' units = '1' vgrid = 'none' @@ -151,7 +151,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface Alkalinity for Abiotic DIC tracer fluxes' + lname = 'Surface Alkalinity for Abiotic DIC Tracer Fluxes' sname = 'ABIO_ALK_SURF' units = unit_system%alk_conc_units vgrid = 'none' @@ -163,7 +163,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface gas flux of abiotic DIC' + lname = 'Surface Gas Flux of Abiotic DIC' sname = 'ABIO_FG_DIC' units = unit_system%conc_flux_units vgrid = 'none' @@ -175,7 +175,7 @@ subroutine marbl_abio_dic_diagnostics_init( & return end if - lname = 'Surface gas flux of abiotic DI14C' + lname = 'Surface Gas Flux of Abiotic DI14C' sname = 'ABIO_FG_DI14C' units = unit_system%conc_flux_units vgrid = 'none' @@ -236,7 +236,7 @@ subroutine marbl_abio_dic_diagnostics_init( & diags => marbl_interior_tendency_diags & ) - lname = 'Oceanic Delta 14C for Abiotic DIC tracer fluxes' + lname = 'Oceanic Delta 14C for Abiotic DIC Tracer Fluxes' sname = 'ABIO_D14C_ocn' units = 'permil' vgrid = 'layer_avg' diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index bc7ede1a..06f6c8e3 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -197,7 +197,7 @@ subroutine marbl_diagnostics_init( & end if if (base_bio_on) then - lname = 'PV_O2' + lname = 'O2 Piston Velocity' sname = 'PV_O2' units = vel_units vgrid = 'none' @@ -287,7 +287,7 @@ subroutine marbl_diagnostics_init( & vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DIC_GAS_FLUX, marbl_status_log) + ind%FG_CO2, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -371,7 +371,7 @@ subroutine marbl_diagnostics_init( & vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%DIC_GAS_FLUX_ALT_CO2, marbl_status_log) + ind%FG_CO2_ALT_CO2, marbl_status_log) if (marbl_status_log%labort_marbl) then call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) return @@ -413,7 +413,7 @@ subroutine marbl_diagnostics_init( & return end if - lname = 'Dust Flux' + lname = 'Atmospheric Dust Flux' sname = 'DUST_FLUX' write(units, "(4A)") trim(unit_system%M), '/', trim(unit_system%L), '^2/s' vgrid = 'none' @@ -3378,11 +3378,11 @@ subroutine marbl_diagnostics_surface_flux_compute( & diags(ind_diag%pCO2SURF_ALT_CO2)%field_2d(:) = pco2surf_alt(:) diags(ind_diag%DpCO2_ALT_CO2)%field_2d(:) = dpco2_alt(:) - diags(ind_diag%DIC_GAS_FLUX)%field_2d(:) = flux_co2(:) + diags(ind_diag%FG_CO2)%field_2d(:) = flux_co2(:) diags(ind_diag%PH)%field_2d(:) = ph_prev(:) diags(ind_diag%ATM_CO2)%field_2d(:) = xco2(:) - diags(ind_diag%DIC_GAS_FLUX_ALT_CO2)%field_2d(:) = flux_alt_co2(:) + diags(ind_diag%FG_CO2_ALT_CO2)%field_2d(:) = flux_alt_co2(:) diags(ind_diag%PH_ALT_CO2)%field_2d(:) = ph_prev_alt_co2(:) diags(ind_diag%ATM_ALT_CO2)%field_2d(:) = xco2_alt_co2(:) diff --git a/src/marbl_init_tracer_metadata_mod.F90 b/src/marbl_init_tracer_metadata_mod.F90 index 85799586..ef82480e 100644 --- a/src/marbl_init_tracer_metadata_mod.F90 +++ b/src/marbl_init_tracer_metadata_mod.F90 @@ -294,35 +294,29 @@ subroutine init_autotroph_tracer_metadata(marbl_tracer_metadata, & endif ! ciso tracers - n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind - if (n .gt. 0) then + if (ciso_on) then + n = marbl_tracer_indices%auto_inds(auto_ind)%C13_ind marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '13C' marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-13' marbl_tracer_metadata(n)%units = unit_system%conc_units marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind - if (n .gt. 0) then + n = marbl_tracer_indices%auto_inds(auto_ind)%C14_ind marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // '14C' marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Carbon-14' marbl_tracer_metadata(n)%units = unit_system%conc_units marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind - if (n .gt. 0) then + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' marbl_tracer_metadata(n)%units = unit_system%conc_units marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units - end if - n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind - if (n .gt. 0) then + n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' marbl_tracer_metadata(n)%units = unit_system%conc_units diff --git a/src/marbl_interface_private_types.F90 b/src/marbl_interface_private_types.F90 index 486c8941..a5e08fe4 100644 --- a/src/marbl_interface_private_types.F90 +++ b/src/marbl_interface_private_types.F90 @@ -462,14 +462,14 @@ module marbl_interface_private_types integer(int_kind) :: DpCO2 integer(int_kind) :: PV_CO2 integer(int_kind) :: SCHMIDT_CO2 - integer(int_kind) :: DIC_GAS_FLUX + integer(int_kind) :: FG_CO2 integer(int_kind) :: PH integer(int_kind) :: ATM_CO2 integer(int_kind) :: CO2STAR_ALT_CO2 integer(int_kind) :: DCO2STAR_ALT_CO2 integer(int_kind) :: pCO2SURF_ALT_CO2 integer(int_kind) :: DpCO2_ALT_CO2 - integer(int_kind) :: DIC_GAS_FLUX_ALT_CO2 + integer(int_kind) :: FG_CO2_ALT_CO2 integer(int_kind) :: PH_ALT_CO2 integer(int_kind) :: ATM_ALT_CO2 integer(int_kind) :: IRON_FLUX From 9a2b019c061623a40653fe1b59f66f4c5822144d Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 16:46:27 -0600 Subject: [PATCH 62/64] Still need n > 0 check for calcifiers Not every autotroph will have a Ca13CO3 or Ca14CO3 tracer, even if ciso_on is true. Kind of shocked these tests passed on my laptop when accessing index 0 of an array... --- src/marbl_init_tracer_metadata_mod.F90 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/marbl_init_tracer_metadata_mod.F90 b/src/marbl_init_tracer_metadata_mod.F90 index ef82480e..5c32429a 100644 --- a/src/marbl_init_tracer_metadata_mod.F90 +++ b/src/marbl_init_tracer_metadata_mod.F90 @@ -310,18 +310,22 @@ subroutine init_autotroph_tracer_metadata(marbl_tracer_metadata, & marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units n = marbl_tracer_indices%auto_inds(auto_ind)%Ca13CO3_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca13CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca13CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if n = marbl_tracer_indices%auto_inds(auto_ind)%Ca14CO3_ind - marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' - marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' - marbl_tracer_metadata(n)%units = unit_system%conc_units - marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units - marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + if (n .gt. 0) then + marbl_tracer_metadata(n)%short_name = trim(autotroph_settings(auto_ind)%sname) // 'Ca14CO3' + marbl_tracer_metadata(n)%long_name = trim(autotroph_settings(auto_ind)%lname) // ' Ca14CO3' + marbl_tracer_metadata(n)%units = unit_system%conc_units + marbl_tracer_metadata(n)%tend_units = unit_system%conc_tend_units + marbl_tracer_metadata(n)%flux_units = unit_system%conc_flux_units + end if end if end do From 55a0c71a1f76a3cdbd29b5c011cec46b311e89aa Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Fri, 13 Oct 2023 17:11:26 -0600 Subject: [PATCH 63/64] Update new tracer documentation We don't have a documentation page about what tracers are available in MARBL, but we do provide instructions for adding a new tracer and some of the sample code listed on that page has changed with the addition of the abio tracers (and subsequent refactoring). Updating the documentation also highlighted a few issues with comments in the Fortran code, and pointed out an issue with how we were setting lfull_depth_tavg --- docs/src/dev-guide/add-tracer.rst | 97 ++++++++++++++------------ src/marbl_init_tracer_metadata_mod.F90 | 6 +- src/marbl_surface_flux_mod.F90 | 12 +--- 3 files changed, 55 insertions(+), 60 deletions(-) diff --git a/docs/src/dev-guide/add-tracer.rst b/docs/src/dev-guide/add-tracer.rst index 5a4eb0da..f0e77207 100644 --- a/docs/src/dev-guide/add-tracer.rst +++ b/docs/src/dev-guide/add-tracer.rst @@ -27,14 +27,19 @@ Due to the many ways to introduce tracers (different modules, living tracers, et ! Book-keeping (tracer count and index ranges) integer (int_kind) :: total_cnt = 0 type (marbl_tracer_count_type) :: base_bio + type (marbl_tracer_count_type) :: abio_dic type (marbl_tracer_count_type) :: ciso - ! General tracers + ! base biotic tracers integer (int_kind) :: po4_ind = 0 ! dissolved inorganic phosphate . . . - ! CISO tracers + ! abiotic dic tracers + integer (int_kind) :: abio_dic_ind = 0 ! abiotic dissolved inorganic carbon + integer (int_kind) :: abio_di14c_ind = 0 ! abiotic dissolved inorganic carbon 14 + + ! carbon isotope tracers integer (int_kind) :: di13c_ind = 0 ! dissolved inorganic carbon 13 . . @@ -66,19 +71,20 @@ For example, here we set in index for the refractory DOC tracer: .. block comes from marbl_interface_private_types .. code-block:: fortran - subroutine tracer_index_constructor(this, ciso_on, lvariable_PtoC, autotroph_settings, & - zooplankton_settings, marbl_status_log) - . - . - . - ! General ecosys tracers - . - . - . - call this%add_tracer_index('docr', 'base_bio', this%docr_ind, marbl_status_log) + subroutine tracer_index_constructor(this, base_bio_on, abio_dic_on, ciso_on, lvariable_PtoC, & + autotroph_settings, zooplankton_settings, marbl_status_log) . . . + ! Base biotic tracers + if (base_bio_on) then + . + . + . + call this%add_tracer_index('docr', 'base_bio', this%docr_ind, marbl_status_log) + . + . + . end subroutine tracer_index_constructor .. note:: @@ -106,40 +112,39 @@ MARBL provides the following metadata to describe each tracer: Note that the ``units`` will depend on whether MARBL is running in ``cgs`` or ``mks``, so a ``unit_system_type`` object will be passed around in this step. -There are a few different subroutines in ``marbl_init_mod.F90`` to define the metadata for different classes of tracers. -(Metadata for carbon isotope tracers is handled in ``marbl_ciso_init_mod::marbl_ciso_init_tracer_metadata``.) +There are a few different subroutines in ``marbl_init_tracer_metadata_mod.F90`` to define the metadata for different classes of tracers. -.. block comes from marbl_init_mod +.. block comes from marbl_init_tracer_metadata_mod .. code-block:: fortran subroutine marbl_init_tracer_metadata - subroutine marbl_init_non_autotroph_tracer_metadata - subroutine marbl_init_non_autotroph_tracers_metadata - subroutine marbl_init_zooplankton_tracer_metadata - subroutine marbl_init_autotroph_tracer_metadata + subroutine init_non_autotroph_tracer_metadata + subroutine init_zooplankton_tracer_metadata + subroutine init_autotroph_tracer_metadata -The last three subroutines above are called from ``marbl_init_tracer_metadata()``, and ``marbl_init_non_autotroph_tracer_metadata()`` is called from ``marbl_init_non_autotroph_tracers_metadata()`` -Prior to those calls, ``marbl_init_tracer_metadata()`` sets two attributes in the metadata type: +The last three subroutines above are called from ``marbl_init_tracer_metadata()``. +Prior to those calls, ``marbl_init_tracer_metadata()`` sets the `lfull_depth_tavg` attribute in the metadata type: -.. block from marbl_init_mod +.. block from marbl_init_tracer_metadata_mod .. code-block:: fortran marbl_tracer_metadata(:)%lfull_depth_tavg = .true. - marbl_tracer_metadata(:)%tracer_module_name = 'ecosys' -Metadata for all base ecosystem non-living tracers is set in ``marbl_init_non_autotroph_tracers_metadata()``. +This value may be overwritten by the `lecovars_full_depth_tavg` setting for some tracers. + +Metadata for all non-living tracers is set in ``marbl_init_non_autotroph_tracers_metadata()``. For example, here is where the dissolved inorganic phosphate index is set: -.. block from marbl_init_mod +.. block from marbl_init_tracer_metadata_mod .. code-block:: fortran - subroutine marbl_init_non_autotroph_tracer_metadata(short_name, long_name, unit_system, & - marbl_tracer_metadata) - . - . - . - call marbl_init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', & - unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) + subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_tracer_metadata) + . + . + . + if (base_bio_on) then + call init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', 'base_bio', & + unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Step 4. Compute surface flux for new tracer (if necessary) @@ -175,21 +180,17 @@ Surface fluxes are computed in ``marbl_surface_flux_mod::marbl_surface_flux_comp . . !----------------------------------------------------------------------- - ! compute CO2 flux, computing disequilibrium one row at a time + ! compute O2 flux (if necessary) !----------------------------------------------------------------------- - if (lflux_gas_o2 .or. lflux_gas_co2) then - . - . - . - if (lflux_gas_o2) then - . - . - . - pv_o2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_o2(:)) - o2sat(:) = ap_used(:) * o2sat_1atm(:) - flux_o2_loc(:) = pv_o2(:) * (o2sat(:) - tracers_at_surface(:, o2_ind)) - surface_fluxes(:, o2_ind) = surface_fluxes(:, o2_ind) + flux_o2_loc(:) + if (lflux_gas_o2) then + . + . + . + pv_o2(:) = xkw_ice(:) * sqrt(660.0_r8 / schmidt_o2(:)) + o2sat(:) = ap_used(:) * o2sat_1atm(:) + flux_o2_loc(:) = pv_o2(:) * (o2sat(:) - tracers_at_surface(:, o2_ind)) + surface_fluxes(:, o2_ind) = surface_fluxes(:, o2_ind) + flux_o2_loc(:) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Step 5. Compute tracer tendency @@ -207,7 +208,7 @@ This is done in ``marbl_interior_tendency_mod::interior_tendency_compute``: . . call compute_PAR(domain, interior_tendency_forcings, interior_tendency_forcing_indices, & - totalChl_local, unit_system, PAR) + autotroph_local, unit_system, PAR) call compute_autotroph_elemental_ratios(km, autotroph_local, marbl_tracer_indices, tracer_local, & autotroph_derived_terms) @@ -349,9 +350,13 @@ The block of code defining the tracers looks like this: _tracer_list : # Non-living tracers PO4 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Phosphate units : mmol/m^3 NO3 : + dependencies : + base_bio_on : .true. long_name : Dissolved Inorganic Nitrate units : mmol/m^3 . diff --git a/src/marbl_init_tracer_metadata_mod.F90 b/src/marbl_init_tracer_metadata_mod.F90 index 5c32429a..b5bdec34 100644 --- a/src/marbl_init_tracer_metadata_mod.F90 +++ b/src/marbl_init_tracer_metadata_mod.F90 @@ -42,11 +42,9 @@ subroutine marbl_init_tracer_metadata(unit_system, marbl_tracer_indices, marbl_t ! initialize tracer metatdata !----------------------------------------------------------------------- - if (base_bio_on) then - - marbl_tracer_metadata(:)%lfull_depth_tavg = .true. - marbl_tracer_metadata(:)%tracer_module_name = 'base_biotic' + marbl_tracer_metadata(:)%lfull_depth_tavg = .true. + if (base_bio_on) then call init_non_autotroph_tracer_metadata('PO4', 'Dissolved Inorganic Phosphate', 'base_bio', & unit_system, marbl_tracer_metadata(marbl_tracer_indices%po4_ind)) call init_non_autotroph_tracer_metadata('NO3', 'Dissolved Inorganic Nitrate', 'base_bio', & diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 8ffa2b32..2fa8e9a5 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -249,15 +249,7 @@ subroutine marbl_surface_flux_compute( & end if !----------------------------------------------------------------------- - ! calculate gas flux quantities if necessary - !----------------------------------------------------------------------- - - !----------------------------------------------------------------------- - ! compute CO2 flux, computing disequilibrium one row at a time - !----------------------------------------------------------------------- - - !----------------------------------------------------------------------- - ! compute O2 flux + ! compute O2 flux (if necessary) !----------------------------------------------------------------------- if (lflux_gas_o2) then @@ -279,7 +271,7 @@ subroutine marbl_surface_flux_compute( & endif ! lflux_gas_o2 !----------------------------------------------------------------------- - ! compute CO2 flux, computing disequilibrium + ! compute CO2 flux, computing disequilibrium (if necessary) !----------------------------------------------------------------------- if (lflux_gas_co2) then From e024578486d19bb35b19e868cfce6444d89f75ac Mon Sep 17 00:00:00 2001 From: Michael Levy Date: Mon, 16 Oct 2023 09:50:55 -0600 Subject: [PATCH 64/64] lflux_gas_co2 works as expected in abio module I cleaned up the diagnostics calls and also the metadata in diagnostics_latest.yaml so that we only define the abio_dic surface flux diagnostics if lflux_gas_co2 = .true. Originally I was just trying to track down a seg-fault when running with abio_dic_on = .true. and lflux_gas_co2 = .false. -- it turns out that the xco2 forcing is not requested if lflux_gas_co2 = .false., but the abio module was still trying to add it to the diagnostics. The fix is to treat abio surface fluxes similar to the base biotic surface fluxes, and only define some of them if lflux_gas_co2 = .true. --- defaults/diagnostics_latest.yaml | 13 + defaults/json/diagnostics_latest.json | 39 ++- src/marbl_abio_dic_diagnostics_mod.F90 | 331 ++++++++++++------------ src/marbl_abio_dic_surface_flux_mod.F90 | 4 +- src/marbl_diagnostics_mod.F90 | 29 +-- src/marbl_surface_flux_mod.F90 | 4 +- 6 files changed, 223 insertions(+), 197 deletions(-) diff --git a/defaults/diagnostics_latest.yaml b/defaults/diagnostics_latest.yaml index 18ecc905..e9d17506 100644 --- a/defaults/diagnostics_latest.yaml +++ b/defaults/diagnostics_latest.yaml @@ -243,6 +243,7 @@ NHx_SURFACE_EMIS : ABIO_pCO2 : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes units : ppm vertical_grid : none @@ -251,6 +252,7 @@ ABIO_pCO2 : ABIO_D14C_atm : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes units : permil vertical_grid : none @@ -259,6 +261,7 @@ ABIO_D14C_atm : ABIO_CO2STAR : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : CO2 Star for Abiotic DIC Tracer Fluxes units : mmol/m^3 vertical_grid : none @@ -267,6 +270,7 @@ ABIO_CO2STAR : ABIO_DCO2STAR : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : D CO2 Star for Abiotic DIC Tracer Fluxes units : mmol/m^3 vertical_grid : none @@ -275,6 +279,7 @@ ABIO_DCO2STAR : ABIO_pCO2SURF : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Surface pCO2 for Abiotic DIC Tracer Fluxes units : ppmv vertical_grid : none @@ -283,6 +288,7 @@ ABIO_pCO2SURF : ABIO_DpCO2 : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : D pCO2 for Abiotic DIC Tracer Fluxes units : ppmv vertical_grid : none @@ -291,6 +297,7 @@ ABIO_DpCO2 : ABIO_PH : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Surface pH for Abiotic DIC Tracer Fluxes units : 1 vertical_grid : none @@ -299,6 +306,7 @@ ABIO_PH : ABIO_ALK_SURF : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Surface Alkalinity for Abiotic DIC Tracer Fluxes units : meq/m^3 vertical_grid : none @@ -307,6 +315,7 @@ ABIO_ALK_SURF : ABIO_FG_DIC : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Surface Gas Flux of Abiotic DIC units : mmol/m^3 cm/s vertical_grid : none @@ -315,6 +324,7 @@ ABIO_FG_DIC : ABIO_FG_DI14C : dependencies : abio_dic_on : .true. + lflux_gas_co2 : .true. longname : Surface Gas Flux of Abiotic DI14C units : mmol/m^3 cm/s vertical_grid : none @@ -324,6 +334,7 @@ d_SF_ABIO_DIC_d_ABIO_DIC : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. + lflux_gas_co2 : .true. longname : Derivative of ABIO_FG_DIC wrt ABIO_DIC units : cm/s vertical_grid : none @@ -333,6 +344,7 @@ d_SF_ABIO_DI14C_d_ABIO_DIC : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. + lflux_gas_co2 : .true. longname : Derivative of ABIO_FG_DI14C wrt ABIO_DIC units : cm/s vertical_grid : none @@ -342,6 +354,7 @@ d_SF_ABIO_DI14C_d_ABIO_DI14C : dependencies : abio_dic_on : .true. labio_derivative_diags : .true. + lflux_gas_co2 : .true. longname : Derivative of ABIO_FG_DI14C wrt ABIO_DI14C units : cm/s vertical_grid : none diff --git a/defaults/json/diagnostics_latest.json b/defaults/json/diagnostics_latest.json index b3b8e682..42242873 100644 --- a/defaults/json/diagnostics_latest.json +++ b/defaults/json/diagnostics_latest.json @@ -360,7 +360,8 @@ }, "ABIO_ALK_SURF": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Surface Alkalinity for Abiotic DIC Tracer Fluxes", @@ -370,7 +371,8 @@ }, "ABIO_CO2STAR": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "CO2 Star for Abiotic DIC Tracer Fluxes", @@ -380,7 +382,8 @@ }, "ABIO_D14C_atm": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes", @@ -400,7 +403,8 @@ }, "ABIO_DCO2STAR": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "D CO2 Star for Abiotic DIC Tracer Fluxes", @@ -410,7 +414,8 @@ }, "ABIO_DpCO2": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "D pCO2 for Abiotic DIC Tracer Fluxes", @@ -420,7 +425,8 @@ }, "ABIO_FG_DI14C": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Surface Gas Flux of Abiotic DI14C", @@ -430,7 +436,8 @@ }, "ABIO_FG_DIC": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Surface Gas Flux of Abiotic DIC", @@ -440,7 +447,8 @@ }, "ABIO_PH": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Surface pH for Abiotic DIC Tracer Fluxes", @@ -450,7 +458,8 @@ }, "ABIO_pCO2": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes", @@ -460,7 +469,8 @@ }, "ABIO_pCO2SURF": { "dependencies": { - "abio_dic_on": ".true." + "abio_dic_on": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "medium", "longname": "Surface pCO2 for Abiotic DIC Tracer Fluxes", @@ -2385,7 +2395,8 @@ "d_SF_ABIO_DI14C_d_ABIO_DI14C": { "dependencies": { "abio_dic_on": ".true.", - "labio_derivative_diags": ".true." + "labio_derivative_diags": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "never", "longname": "Derivative of ABIO_FG_DI14C wrt ABIO_DI14C", @@ -2396,7 +2407,8 @@ "d_SF_ABIO_DI14C_d_ABIO_DIC": { "dependencies": { "abio_dic_on": ".true.", - "labio_derivative_diags": ".true." + "labio_derivative_diags": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "never", "longname": "Derivative of ABIO_FG_DI14C wrt ABIO_DIC", @@ -2407,7 +2419,8 @@ "d_SF_ABIO_DIC_d_ABIO_DIC": { "dependencies": { "abio_dic_on": ".true.", - "labio_derivative_diags": ".true." + "labio_derivative_diags": ".true.", + "lflux_gas_co2": ".true." }, "frequency": "never", "longname": "Derivative of ABIO_FG_DIC wrt ABIO_DIC", diff --git a/src/marbl_abio_dic_diagnostics_mod.F90 b/src/marbl_abio_dic_diagnostics_mod.F90 index c16ebeca..20f8f303 100644 --- a/src/marbl_abio_dic_diagnostics_mod.F90 +++ b/src/marbl_abio_dic_diagnostics_mod.F90 @@ -7,6 +7,7 @@ module marbl_abio_dic_diagnostics_mod use marbl_kinds_mod, only : int_kind use marbl_kinds_mod, only : char_len + use marbl_settings_mod, only : lflux_gas_co2 use marbl_settings_mod, only : unit_system_type use marbl_settings_mod, only : labio_derivative_diags @@ -67,162 +68,165 @@ subroutine marbl_abio_dic_diagnostics_init( & diags => marbl_surface_flux_diags & ) - lname = 'CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_pCO2' - units = 'ppm' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_pCO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_D14C_atm' - units = 'permil' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_D14C_atm, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'CO2 Star for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_CO2STAR' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_CO2STAR, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if - - lname = 'D CO2 Star for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_DCO2STAR' - units = unit_system%conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_DCO2STAR, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + if (lflux_gas_co2) then + lname = 'CO2 Atmospheric Partial Pressure for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_pCO2' + units = 'ppm' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_pCO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface pCO2 for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_pCO2SURF' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_pCO2SURF, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Atmospheric Delta 14C for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_D14C_atm' + units = 'permil' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_D14C_atm, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'D pCO2 for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_DpCO2' - units = 'ppmv' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_DpCO2, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'CO2 Star for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_CO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_CO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface pH for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_PH' - units = '1' - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_PH, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D CO2 Star for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_DCO2STAR' + units = unit_system%conc_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_DCO2STAR, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface Alkalinity for Abiotic DIC Tracer Fluxes' - sname = 'ABIO_ALK_SURF' - units = unit_system%alk_conc_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_ALK_SURF, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Surface pCO2 for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_pCO2SURF' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_pCO2SURF, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface Gas Flux of Abiotic DIC' - sname = 'ABIO_FG_DIC' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_FG_DIC, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'D pCO2 for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_DpCO2' + units = 'ppmv' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_DpCO2, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - lname = 'Surface Gas Flux of Abiotic DI14C' - sname = 'ABIO_FG_DI14C' - units = unit_system%conc_flux_units - vgrid = 'none' - truncate = .false. - call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%ABIO_FG_DI14C, marbl_status_log) - if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return - end if + lname = 'Surface pH for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_PH' + units = '1' + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%ABIO_PH, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if - if (labio_derivative_diags) then - lname = 'Derivative of ABIO_FG_DIC wrt ABIO_DIC' - sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' - units = vel_units + lname = 'Surface Alkalinity for Abiotic DIC Tracer Fluxes' + sname = 'ABIO_ALK_SURF' + units = unit_system%alk_conc_units vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DIC_d_ABIO_DIC, marbl_status_log) + ind%ABIO_ALK_SURF, marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DIC' - sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' - units = vel_units + lname = 'Surface Gas Flux of Abiotic DIC' + sname = 'ABIO_FG_DIC' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DI14C_d_ABIO_DIC, marbl_status_log) + ind%ABIO_FG_DIC, marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if - lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DI14C' - sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' - units = vel_units + lname = 'Surface Gas Flux of Abiotic DI14C' + sname = 'ABIO_FG_DI14C' + units = unit_system%conc_flux_units vgrid = 'none' truncate = .false. call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & - ind%d_SF_ABIO_DI14C_d_ABIO_DI14C, marbl_status_log) + ind%ABIO_FG_DI14C, marbl_status_log) if (marbl_status_log%labort_marbl) then - call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) - return + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return end if + + if (labio_derivative_diags) then + lname = 'Derivative of ABIO_FG_DIC wrt ABIO_DIC' + sname = 'd_SF_ABIO_DIC_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DIC_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DIC' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DIC' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DIC, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + + lname = 'Derivative of ABIO_FG_DI14C wrt ABIO_DI14C' + sname = 'd_SF_ABIO_DI14C_d_ABIO_DI14C' + units = vel_units + vgrid = 'none' + truncate = .false. + call diags%add_diagnostic(lname, sname, units, vgrid, truncate, & + ind%d_SF_ABIO_DI14C_d_ABIO_DI14C, marbl_status_log) + if (marbl_status_log%labort_marbl) then + call marbl_logging_add_diagnostics_error(marbl_status_log, sname, subname) + return + end if + end if + end if end associate @@ -255,8 +259,8 @@ end subroutine marbl_abio_dic_diagnostics_init !*********************************************************************** subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & - xco2, & - d14c, & + surface_flux_forcing_ind, & + surface_flux_forcings, & co2star, & dco2star, & pco2surf, & @@ -271,38 +275,45 @@ subroutine marbl_abio_dic_diagnostics_surface_flux_compute( & ! !DESCRIPTION: ! Compute surface fluxes for ecosys tracer module. - real (r8), dimension(:), intent(in) :: xco2 - real (r8), dimension(:), intent(in) :: d14c - real (r8), dimension(:), intent(in) :: co2star - real (r8), dimension(:), intent(in) :: dco2star - real (r8), dimension(:), intent(in) :: pco2surf - real (r8), dimension(:), intent(in) :: dpco2 - real (r8), dimension(:), intent(in) :: ph_surf - real (r8), dimension(:), intent(in) :: alk_surf - real (r8), dimension(:), intent(in) :: fg_dic - real (r8), dimension(:), intent(in) :: fg_di14c - real (r8), dimension(:,:), intent(in) :: derivative_terms - type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags + use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type + use marbl_interface_public_types, only : marbl_forcing_fields_type + + type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind + type(marbl_forcing_fields_type), intent(in) :: surface_flux_forcings(:) + real (r8), dimension(:), intent(in) :: co2star + real (r8), dimension(:), intent(in) :: dco2star + real (r8), dimension(:), intent(in) :: pco2surf + real (r8), dimension(:), intent(in) :: dpco2 + real (r8), dimension(:), intent(in) :: ph_surf + real (r8), dimension(:), intent(in) :: alk_surf + real (r8), dimension(:), intent(in) :: fg_dic + real (r8), dimension(:), intent(in) :: fg_di14c + real (r8), dimension(:,:), intent(in) :: derivative_terms + type(marbl_diagnostics_type), intent(inout) :: marbl_surface_flux_diags associate( & + xco2 => surface_flux_forcings(surface_flux_forcing_ind%xco2_id)%field_0d, & + d14c => surface_flux_forcings(surface_flux_forcing_ind%d14c_id)%field_0d, & diags => marbl_surface_flux_diags%diags, & ind => marbl_surface_flux_diag_ind & ) - diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) - diags(ind%ABIO_D14C_atm)%field_2d(:) = d14c(:) - diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) - diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) - diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) - diags(ind%ABIO_DpCO2)%field_2d(:) = dpco2(:) - diags(ind%ABIO_PH)%field_2d(:) = ph_surf(:) - diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) - diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) - diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) - if (labio_derivative_diags) then - diags(ind%d_SF_ABIO_DIC_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,1) - diags(ind%d_SF_ABIO_DI14C_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,2) - diags(ind%d_SF_ABIO_DI14C_d_ABIO_DI14C)%field_2d(:) = derivative_terms(:,3) + if (lflux_gas_co2) then + diags(ind%ABIO_pCO2)%field_2d(:) = xco2(:) + diags(ind%ABIO_D14C_atm)%field_2d(:) = d14c(:) + diags(ind%ABIO_CO2STAR)%field_2d(:) = co2star(:) + diags(ind%ABIO_DCO2STAR)%field_2d(:) = dco2star(:) + diags(ind%ABIO_pCO2SURF)%field_2d(:) = pco2surf(:) + diags(ind%ABIO_DpCO2)%field_2d(:) = dpco2(:) + diags(ind%ABIO_PH)%field_2d(:) = ph_surf(:) + diags(ind%ABIO_ALK_SURF)%field_2d(:) = alk_surf(:) + diags(ind%ABIO_FG_DIC)%field_2d(:) = fg_dic(:) + diags(ind%ABIO_FG_DI14C)%field_2d(:) = fg_di14c(:) + if (labio_derivative_diags) then + diags(ind%d_SF_ABIO_DIC_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,1) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DIC)%field_2d(:) = derivative_terms(:,2) + diags(ind%d_SF_ABIO_DI14C_d_ABIO_DI14C)%field_2d(:) = derivative_terms(:,3) + end if end if end associate diff --git a/src/marbl_abio_dic_surface_flux_mod.F90 b/src/marbl_abio_dic_surface_flux_mod.F90 index 96ae364d..fd9a42e2 100644 --- a/src/marbl_abio_dic_surface_flux_mod.F90 +++ b/src/marbl_abio_dic_surface_flux_mod.F90 @@ -258,8 +258,8 @@ subroutine marbl_abio_dic_surface_flux_compute(& ! update abiotic DIC diagnostics call marbl_abio_dic_diagnostics_surface_flux_compute( & - xco2, & - d14c, & + surface_flux_forcing_ind, & + surface_flux_forcings, & co2star, & dco2star, & pco2surf, & diff --git a/src/marbl_diagnostics_mod.F90 b/src/marbl_diagnostics_mod.F90 index 06f6c8e3..8433544f 100644 --- a/src/marbl_diagnostics_mod.F90 +++ b/src/marbl_diagnostics_mod.F90 @@ -8,6 +8,8 @@ module marbl_diagnostics_mod use marbl_kinds_mod, only : char_len use marbl_settings_mod, only : base_bio_on + use marbl_settings_mod, only : lflux_gas_co2 + use marbl_settings_mod, only : lflux_gas_o2 use marbl_settings_mod, only : unit_system_type use marbl_settings_mod, only : autotroph_cnt use marbl_settings_mod, only : zooplankton_cnt @@ -85,8 +87,6 @@ subroutine marbl_diagnostics_init( & marbl_surface_flux_diags, & marbl_status_log) - use marbl_settings_mod, only : lflux_gas_o2 - use marbl_settings_mod, only : lflux_gas_co2 use marbl_settings_mod, only : lo2_consumption_scalef use marbl_settings_mod, only : lp_remin_scalef use marbl_settings_mod, only : lvariable_PtoC @@ -3289,10 +3289,8 @@ subroutine marbl_diagnostics_surface_flux_compute( & ! !DESCRIPTION: ! Compute surface flux diagnostics for base biotic tracer module. - use marbl_interface_private_types , only : marbl_surface_flux_forcing_indexing_type - use marbl_interface_private_types , only : marbl_surface_flux_saved_state_indexing_type - use marbl_settings_mod , only : lflux_gas_o2 - use marbl_settings_mod , only : lflux_gas_co2 + use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type + use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind type(marbl_forcing_fields_type) , intent(in) :: surface_flux_forcings(:) @@ -3355,19 +3353,16 @@ subroutine marbl_diagnostics_surface_flux_compute( & !----------------------------------------------------------------------- if (lflux_gas_o2) then - diags(ind_diag%PV_O2)%field_2d(:) = pv_o2(:) diags(ind_diag%SCHMIDT_O2)%field_2d(:) = schmidt_o2(:) diags(ind_diag%O2SAT)%field_2d(:) = o2sat(:) - - endif ! lflux_gas_o2 + endif !----------------------------------------------------------------------- ! compute CO2 flux, computing disequilibrium one row at a time !----------------------------------------------------------------------- if (lflux_gas_co2) then - diags(ind_diag%CO2STAR)%field_2d(:) = co2star(:) diags(ind_diag%DCO2STAR)%field_2d(:) = dco2star(:) diags(ind_diag%pCO2SURF)%field_2d(:) = pco2surf(:) @@ -3385,8 +3380,7 @@ subroutine marbl_diagnostics_surface_flux_compute( & diags(ind_diag%FG_CO2_ALT_CO2)%field_2d(:) = flux_alt_co2(:) diags(ind_diag%PH_ALT_CO2)%field_2d(:) = ph_prev_alt_co2(:) diags(ind_diag%ATM_ALT_CO2)%field_2d(:) = xco2_alt_co2(:) - - endif ! lflux_gas_co2 + endif !----------------------------------------------------------------------- ! calculate nox and nhy fluxes and nhx emissions @@ -3425,9 +3419,6 @@ subroutine marbl_diagnostics_surface_flux_share( & use marbl_interface_private_types, only : marbl_surface_flux_forcing_indexing_type use marbl_interface_private_types, only : marbl_surface_flux_saved_state_indexing_type - use marbl_settings_mod, only : lflux_gas_o2 - use marbl_settings_mod, only : lflux_gas_co2 - type(marbl_surface_flux_forcing_indexing_type), intent(in) :: surface_flux_forcing_ind type(marbl_forcing_fields_type) , intent(in) :: surface_flux_forcings(:) type(marbl_surface_flux_internal_type) , intent(in) :: surface_flux_internal @@ -3460,11 +3451,9 @@ subroutine marbl_diagnostics_surface_flux_share( & !----------------------------------------------------------------------- if (lflux_gas_co2) then - - diags(ind_diag%PV_CO2)%field_2d(:) = pv_co2(:) - diags(ind_diag%SCHMIDT_CO2)%field_2d(:) = schmidt_co2(:) - - endif ! lflux_gas_co2 + diags(ind_diag%PV_CO2)%field_2d(:) = pv_co2(:) + diags(ind_diag%SCHMIDT_CO2)%field_2d(:) = schmidt_co2(:) + endif end associate diff --git a/src/marbl_surface_flux_mod.F90 b/src/marbl_surface_flux_mod.F90 index 2fa8e9a5..dc880840 100644 --- a/src/marbl_surface_flux_mod.F90 +++ b/src/marbl_surface_flux_mod.F90 @@ -294,7 +294,7 @@ subroutine marbl_surface_flux_compute( & num_elements = num_elements, & lcomp_co2calc_coeffs = .true., & dic_in = tracers_at_surface(:,dic_ind), & - xco2_in = surface_flux_forcings(ind%xco2_id)%field_0d, & + xco2_in = xco2(:), & ta_in = tracers_at_surface(:,alk_ind), & pt_in = tracers_at_surface(:,po4_ind), & sit_in = tracers_at_surface(:,sio3_ind), & @@ -354,7 +354,7 @@ subroutine marbl_surface_flux_compute( & num_elements = num_elements, & lcomp_co2calc_coeffs = .false., & dic_in = tracers_at_surface(:,dic_alt_co2_ind), & - xco2_in = surface_flux_forcings(ind%xco2_alt_co2_id)%field_0d, & + xco2_in = xco2_alt_co2(:), & ta_in = tracers_at_surface(:,alk_alt_co2_ind), & pt_in = tracers_at_surface(:,po4_ind), & sit_in = tracers_at_surface(:,sio3_ind), &