Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial commit for 4p2z settings #423

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions MARBL_tools/MARBL_settings_file_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def _process_variable_value(self, category_name, variable_name):
# Process derived type!
# Check to see if PFT_defaults leads to specific PFT declarations
if (category_name == "PFT_derived_types"):
for valid_PFT_default in ["CESM2", "CESM2+cocco"]:
for valid_PFT_default in ["CESM2", "CESM2+cocco", "4p2z"]:
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)
Expand All @@ -241,13 +241,15 @@ def _process_variable_value(self, category_name, variable_name):
base_name = "%s%s%%" % (variable_name, elem_index)

if append_to_keys:
if n < len(PFT_keys):
PFT_keys.append('null')
# Add key for specific PFT
if variable_name == 'zooplankton_settings':
self._config_keyword.append('((zooplankton_sname)) == "%s"' % PFT_keys[n])
self._config_keyword.append('((zooplankton_sname)) == "%s"' % PFT_keys[n])
elif variable_name == 'autotroph_settings':
self._config_keyword.append('((autotroph_sname)) == "%s"' % PFT_keys[n])
self._config_keyword.append('((autotroph_sname)) == "%s"' % PFT_keys[n])
elif variable_name == 'grazing_relationship_settings':
self._config_keyword.append('((grazer_sname)) == "%s"' % PFT_keys[n])
self._config_keyword.append('((grazer_sname)) == "%s"' % PFT_keys[n])

for key in _sort_with_specific_suffix_first(this_var["datatype"].keys(),'_cnt'):
if key[0] != '_':
Expand Down
30 changes: 20 additions & 10 deletions defaults/diagnostics_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,12 @@ pocToFloor :
longname : POC Flux Hitting Sea Floor
units : nmol/cm^2/s
vertical_grid : none
frequency : never
operator : average
frequency :
- medium
- high
operator :
- average
- average
pocToSed :
longname : POC Flux to Sediments
units : nmol/cm^2/s
Expand Down Expand Up @@ -1490,14 +1494,14 @@ graze_((autotroph_sname))_doc_zint_100m :
vertical_grid : none
frequency : medium
operator : average
graze_((autotroph_sname))_zoo_zint :
longname : ((autotroph_lname)) Grazing to ZOO Vertical Integral
graze_((autotroph_sname))_((zooplankton_sname))_zint :
longname : ((autotroph_lname)) Grazing to ((zooplankton_lname)) Vertical Integral
units : mmol/m^3 cm/s
vertical_grid : none
frequency : never
operator : average
graze_((autotroph_sname))_zoo_zint_100m :
longname : ((autotroph_lname)) Grazing to ZOO Vertical Integral, 0-100m
graze_((autotroph_sname))_((zooplankton_sname))_zint_100m :
longname : ((autotroph_lname)) Grazing to ((zooplankton_lname)) Vertical Integral, 0-100m
units : mmol/m^3 cm/s
vertical_grid : none
frequency : medium
Expand Down Expand Up @@ -1859,6 +1863,12 @@ CISO_mui_to_co2star_((autotroph_sname)) :
vertical_grid : none
frequency : medium
operator : average
((zooplankton_sname))_loss_zint_150m :
longname : ((zooplankton_lname)) Loss Vertical Integral, 0-150m
units : mmol/m^3 cm/s
vertical_grid : none
frequency : high
operator : average
((zooplankton_sname))_loss_basal_zint :
longname : ((zooplankton_lname)) Basal Respiration Vertical Integral
units : mmol/m^3 cm/s
Expand Down Expand Up @@ -1931,14 +1941,14 @@ graze_((zooplankton_sname))_doc_zint_100m :
vertical_grid : none
frequency : never
operator : average
graze_((zooplankton_sname))_zoo_zint :
longname : ((zooplankton_lname)) Grazing to ZOO Vertical Integral
graze_((zooplankton_sname))_((zooplankton_sname))_zint :
longname : ((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral
units : mmol/m^3 cm/s
vertical_grid : none
frequency : never
operator : average
graze_((zooplankton_sname))_zoo_zint_100m :
longname : ((zooplankton_lname)) Grazing to ZOO Vertical Integral, 0-100m
graze_((zooplankton_sname))_((zooplankton_sname))_zint_100m :
longname : ((zooplankton_lname)) Grazing to ((zooplankton_lname)) Vertical Integral, 0-100m
units : mmol/m^3 cm/s
vertical_grid : none
frequency : never
Expand Down
73 changes: 43 additions & 30 deletions defaults/json/diagnostics_latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"((zooplankton_sname))_loss_zint_150m": {
"frequency": "high",
"longname": "((zooplankton_lname)) Loss Vertical Integral, 0-150m",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"AOU": {
"frequency": "medium",
"longname": "Apparent O2 Utilization",
Expand Down Expand Up @@ -1931,6 +1938,20 @@
"units": "mmol/m^3/s",
"vertical_grid": "layer_avg"
},
"graze_((autotroph_sname))_((zooplankton_sname))_zint": {
"frequency": "never",
"longname": "((autotroph_lname)) Grazing to ((zooplankton_lname)) Vertical Integral",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((autotroph_sname))_((zooplankton_sname))_zint_100m": {
"frequency": "medium",
"longname": "((autotroph_lname)) Grazing to ((zooplankton_lname)) Vertical Integral, 0-100m",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((autotroph_sname))_doc": {
"frequency": "never",
"longname": "((autotroph_lname)) Grazing to DOC",
Expand Down Expand Up @@ -1989,20 +2010,6 @@
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((autotroph_sname))_zoo_zint": {
"frequency": "never",
"longname": "((autotroph_lname)) Grazing to ZOO Vertical Integral",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((autotroph_sname))_zoo_zint_100m": {
"frequency": "medium",
"longname": "((autotroph_lname)) Grazing to ZOO Vertical Integral, 0-100m",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((autotroph_sname))_zootot": {
"frequency": "medium",
"longname": "((autotroph_lname)) Grazing to ZOO TOT",
Expand All @@ -2027,6 +2034,20 @@
"units": "mmol/m^3/s",
"vertical_grid": "layer_avg"
},
"graze_((zooplankton_sname))_((zooplankton_sname))_zint": {
"frequency": "never",
"longname": "((zooplankton_lname)) Grazing to ((zooplankton_lname)) 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",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((zooplankton_sname))_doc": {
"frequency": "never",
"longname": "((zooplankton_lname)) grazing loss to DOC",
Expand Down Expand Up @@ -2085,20 +2106,6 @@
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((zooplankton_sname))_zoo_zint": {
"frequency": "never",
"longname": "((zooplankton_lname)) Grazing to ZOO Vertical Integral",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((zooplankton_sname))_zoo_zint_100m": {
"frequency": "never",
"longname": "((zooplankton_lname)) Grazing to ZOO Vertical Integral, 0-100m",
"operator": "average",
"units": "mmol/m^3 cm/s",
"vertical_grid": "none"
},
"graze_((zooplankton_sname))_zootot": {
"frequency": "never",
"longname": "((zooplankton_lname)) grazing loss to ZOO TOT",
Expand Down Expand Up @@ -2266,9 +2273,15 @@
"vertical_grid": "layer_avg"
},
"pocToFloor": {
"frequency": "never",
"frequency": [
"medium",
"high"
],
"longname": "POC Flux Hitting Sea Floor",
"operator": "average",
"operator": [
"average",
"average"
],
"units": "nmol/cm^2/s",
"vertical_grid": "none"
},
Expand Down
Loading