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

MARBL Support #92

Merged
merged 153 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 148 commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
9da34a9
Build MARBL
mnlevy1981 Sep 10, 2019
ca0a7bc
Merge branch 'master' into MARBL_support
mnlevy1981 Sep 10, 2019
daee02a
Add a C1850MOMECO compset
mnlevy1981 Sep 11, 2019
ed0391d
Add G1850MOMECO compset
mnlevy1981 Sep 11, 2019
ac8c8c2
Add MARBL tracers to diagnostic output list
mnlevy1981 Sep 11, 2019
d611a88
Update PE layouts for compsets with MARBL
mnlevy1981 Sep 11, 2019
afcf6d4
Generate marbl_in in RUNDIR
mnlevy1981 Sep 12, 2019
584ab44
Merge branch 'master' into MARBL_support
mnlevy1981 Oct 9, 2019
d6a7cfa
Merge branch 'master' into MARBL_support
mnlevy1981 Feb 13, 2020
2cb827b
Re-run yaml_to_json.py
mnlevy1981 Feb 13, 2020
3c39bf5
Update Externals.cfg and Externals_MOM.cfg
mnlevy1981 Feb 13, 2020
9e057ca
Add transports to diag_table
mnlevy1981 Feb 13, 2020
27a37c8
Merge branch 'master' into MARBL_support
mnlevy1981 Mar 11, 2020
9c8824e
MARBL is no longer a submodule of MOM
mnlevy1981 May 1, 2020
e883832
Group calls needed to add MARBL
mnlevy1981 May 4, 2020
26e3035
Update comment to refer to cime mods
mnlevy1981 May 4, 2020
31cd020
Split BGC fields into separate monthly stream
mnlevy1981 Jun 11, 2020
57a7731
Clean up additional stream definition
mnlevy1981 Jun 11, 2020
bdb8684
Merge branch 'master' into MARBL_support
mnlevy1981 Jun 12, 2020
dcc2814
Merge branch 'master' into MARBL_support
mnlevy1981 Jul 26, 2020
30385bf
Update to latest MARBL
mnlevy1981 Jul 26, 2020
a49ff68
Update PE layouts and output list
mnlevy1981 Aug 28, 2020
144a414
Add hm_bgc stream to testing
mnlevy1981 Sep 21, 2020
0533a99
Add DUST_FLUX and IRON_FLUX to output stream
mnlevy1981 Sep 29, 2020
70f5330
Add NOx_FLUX and NHy_FLUX to hm_bgc
mnlevy1981 Oct 2, 2020
427913f
Add FESEDFLUX to diag table
mnlevy1981 Nov 12, 2020
e183de8
Merge branch 'master' into MARBL_support
mnlevy1981 Jan 20, 2021
dbf4549
Multiple json files to generate diag_table
mnlevy1981 Jan 22, 2021
1103a56
Previous commit assumed momconf/ existed
mnlevy1981 Jan 22, 2021
0a850b7
generate Buildconf/momconf/ecosys_diagnostics
mnlevy1981 Feb 4, 2021
722e10e
Refactor buildnml
mnlevy1981 Feb 4, 2021
f961ffe
Updates to ecosys_diagnostics generation
mnlevy1981 Feb 5, 2021
877688c
Add STF_O2 and J_DIC to output lists
mnlevy1981 Feb 5, 2021
304797a
diag_table_MARBL.json from ecosys_diagnostics
mnlevy1981 Feb 9, 2021
8947002
Update some diag_manager namelist defaults
mnlevy1981 Feb 10, 2021
bfe7f62
3D tracers should be on z levels
mnlevy1981 Feb 11, 2021
1d225db
Add env_build.xml flag for building MARBL
mnlevy1981 Feb 18, 2021
fdec97e
Improvements for testing
mnlevy1981 Feb 18, 2021
dd9cb02
Add nuopc tests to test list
mnlevy1981 Mar 2, 2021
0eadbf0
Add more MARBL output to default diag_table
mnlevy1981 Mar 18, 2021
8ff2809
New compsets
mnlevy1981 Mar 18, 2021
a6d2dc3
Add JRA compsets with MOM6%ECO
mnlevy1981 Mar 18, 2021
a4a6065
Some general clean-up
mnlevy1981 Apr 1, 2021
637a623
Add FLUX_CPL diagnostics to history output
mnlevy1981 Apr 2, 2021
0cc72ab
Add RIV_FLUX output to history files
mnlevy1981 Apr 3, 2021
68445f0
Merge tag 'mi_20210409' into HEAD
mnlevy1981 Apr 16, 2021
7fee369
Update to latest MARBL release
mnlevy1981 Jul 8, 2021
9dbb3ae
Improved diagnostic handling
mnlevy1981 Jul 13, 2021
017cb8d
Set MIX_BOUNDARY_TRACER_ALE=True for MARBL
mnlevy1981 Jul 25, 2021
c769c1d
Updates from testing on izumi
mnlevy1981 Jul 26, 2021
db068ec
Merge branch 'main' into MARBL_support
mnlevy1981 Aug 13, 2021
8b03739
Update to latest MARBL tag
mnlevy1981 Aug 25, 2021
77a749a
Easier to set vertical grid for BGC history files
mnlevy1981 Sep 2, 2021
a4b9ba8
Revert changes to MOM_ecosys_diagnostics.py
mnlevy1981 Sep 2, 2021
285a1cd
Update to latest MARBL tag
mnlevy1981 Sep 10, 2021
8d57ecd
Make sure MARBL streams are archived / tested
mnlevy1981 Sep 15, 2021
3fbb5dc
Easier to switch between monthly and nstep output
mnlevy1981 Sep 23, 2021
1037aba
Remove "none" as valid OCN_BGC_CONFIG option
mnlevy1981 Sep 24, 2021
0a63337
Get use_MARBL from MOM_input_final
mnlevy1981 Sep 24, 2021
825c08b
ECO -> MARBL in compset names
mnlevy1981 Sep 27, 2021
8d055d9
Update default PE layouts
mnlevy1981 Oct 6, 2021
fcd4088
Avoid duplicate PE match
mnlevy1981 Oct 6, 2021
8571b4e
_SURF and _zint_100m diagnostics are 2D
mnlevy1981 Oct 6, 2021
05e3fd3
Pare down variables in 3D native output
mnlevy1981 Oct 7, 2021
cc53e05
Merge tag 'mi_220225' into MARBL_support
mnlevy1981 Apr 8, 2022
cba3546
More PEs when running with MARBL
mnlevy1981 Apr 15, 2022
f2d0c5a
Three different updates rolled into one
mnlevy1981 Apr 25, 2022
f445f4b
Merge branch 'main' into MARBL_support
mnlevy1981 Sep 12, 2022
e53f1f5
set CPL_I2O_PER_CAT to match use_MARBL
mnlevy1981 Sep 20, 2022
c0e3ccd
Add additional comment buildnml
mnlevy1981 Sep 21, 2022
3fcc024
Add ICE_NCAT and USE_ICE_CATEGORIES to MOM_input
mnlevy1981 Oct 3, 2022
b2a5678
add per-category fraction / sw diags
mnlevy1981 Oct 5, 2022
1640efe
Clean up CPL_I2O_PER_CAT and add some defaults
mnlevy1981 Oct 13, 2022
d1f39d9
Merge tag 'mi_230121' into MARBL_support
mnlevy1981 Jan 27, 2023
05d11fc
Update standalone to include KPP_MARBL
mnlevy1981 Jan 28, 2023
6a5ec39
Improvements to standalone KPP_MARBL
mnlevy1981 Feb 1, 2023
4406a7b
Move KPP_MARBL INPUT to new directory
mnlevy1981 Feb 2, 2023
c646066
Add support for standalone cases on macOS
mnlevy1981 Feb 2, 2023
cafe4cb
Update forcings to be uniform across grid cells
mnlevy1981 Feb 3, 2023
bbfd92f
CHL_FROM_FILE=FALSE when MARBL is active
mnlevy1981 Feb 24, 2023
7a0313c
Make it easier to turn off ice categories
mnlevy1981 Mar 7, 2023
2203d9c
Updates for stand-alone examples
mnlevy1981 Mar 23, 2023
e38f049
Two small updates
mnlevy1981 Mar 29, 2023
838afa9
Added NDEP and SEAICE forcings from A compset
mnlevy1981 Mar 31, 2023
5e5970d
Switch T&S IC file to TS_IC_FILE_COLUMN.nc
mnlevy1981 Mar 31, 2023
e66025f
Add support for submitting build script to PBS
mnlevy1981 Mar 31, 2023
461a710
Bugfix plus parameter reversion
mnlevy1981 Apr 11, 2023
60d131c
Updated INPUT files
mnlevy1981 Apr 14, 2023
fe38760
Update MOM_parameter_doc files
mnlevy1981 Apr 19, 2023
3bc41ed
Improve default values for CO2 variables
mnlevy1981 Apr 20, 2023
2842f73
Logic to add ALT_CO2 diagnostics when necessary
mnlevy1981 Apr 20, 2023
979bf5a
Some code clean-up following review
mnlevy1981 Apr 21, 2023
c477897
ParamGen computes DUST_RATIO_TO_FE_BIOAVAIL_FRAC
mnlevy1981 Apr 25, 2023
e359734
Updates to support 4p2z
mnlevy1981 May 2, 2023
54e3921
Update MOM_parameter_doc.all
mnlevy1981 May 2, 2023
299e90c
single_column/KPP_MARBL -> single_column_MARBL/BATS
mnlevy1981 May 2, 2023
02dee28
single_column_MARBL, not single_column_KPP
mnlevy1981 May 2, 2023
855c108
Update forcing files and MOM_input for BATS
mnlevy1981 May 3, 2023
39b2c7f
Updated BATS test, added EQPAC test
mnlevy1981 May 3, 2023
35c899a
Removed some unnecessary files
mnlevy1981 May 3, 2023
34e665d
Add inputs for HOT
mnlevy1981 May 4, 2023
f1920a8
Some directory restructuring and a bug fix
mnlevy1981 May 4, 2023
c5102d4
Moved marbl_in to INPUT/
mnlevy1981 May 5, 2023
3ee92e1
Adding more data for single-column locations
mnlevy1981 May 5, 2023
d8a1bfb
Update forcing for each column
mnlevy1981 May 10, 2023
8d5a105
Remove tracer restoring from marbl_in
mnlevy1981 May 10, 2023
2f804d6
PFT_defaults = "4p2z" is supported now
mnlevy1981 May 11, 2023
46f3917
Update SST_RESTORE in all forcing files
mnlevy1981 May 17, 2023
11afed9
Add submit scripts for running single_column_MARBL
mnlevy1981 May 17, 2023
d711d19
Update .gitignore
mnlevy1981 May 17, 2023
82d002e
Add script to run all 7 tests simultaneously
mnlevy1981 Jun 1, 2023
b755639
Move MOM_input and diag_table to INPUT/
mnlevy1981 Jun 16, 2023
fbffe41
Generate marbl_in in mks, not cgs
mnlevy1981 Aug 9, 2023
8cf5737
Merge tag 'mi_230601' into MARBL_support
mnlevy1981 Aug 14, 2023
d379bca
Update stream names to fit CESM convention
mnlevy1981 Aug 15, 2023
d988023
Add Fe forcing files to MOM_input
mnlevy1981 Aug 17, 2023
66a7a28
Add riverine input file to MOM_input
mnlevy1981 Aug 25, 2023
0bf688b
Small updates for t232 and single column
mnlevy1981 Oct 20, 2023
15a15e1
Update darwin build template
mnlevy1981 Oct 23, 2023
532e696
Use restoring for single_column_MARBL tests
mnlevy1981 Nov 15, 2023
3e15205
Merge tag 'mi_231107' into MARBL_support
mnlevy1981 Nov 28, 2023
2a364e9
Update casper build template
mnlevy1981 Nov 28, 2023
70ebfa0
MARBL_generate_diagnostics needs unit_system
mnlevy1981 Dec 1, 2023
35a3302
Update build template for casper
mnlevy1981 Dec 1, 2023
d490e60
Cleaned up casper / derecho builds
mnlevy1981 Dec 1, 2023
ef9d794
Update tx2_3v2 forcing files
mnlevy1981 Dec 15, 2023
a4c1dcb
Update to support ABIO tracers
mnlevy1981 Dec 21, 2023
49728bf
Add MARBL pe layouts for derecho
mnlevy1981 Dec 21, 2023
183ea8b
Update to get volcello in correct cells
mnlevy1981 Dec 23, 2023
9fda8c8
Update input_nml.yaml for MARBL support
mnlevy1981 Dec 23, 2023
b782315
Previous commit was missing a "value" key
mnlevy1981 Dec 23, 2023
468dbd2
Update a few functions to handle base_bio_on=False
mnlevy1981 Dec 29, 2023
c877bdc
Update river flux forcing file
mnlevy1981 Feb 2, 2024
8222444
Allow ABIO to be enabled from compset
mnlevy1981 Mar 1, 2024
fde48c4
Support for latest MARBL
mnlevy1981 Mar 7, 2024
064958f
Update MARBL_TRACER_OPT values
mnlevy1981 Mar 8, 2024
9889370
Update to latest MARBL tag
mnlevy1981 Mar 14, 2024
4eb5d71
Merge tag 'mi_240311' into MARBL_support
mnlevy1981 Mar 14, 2024
580b77e
Move CICE onto same node as CMEPS / CDEPS / etc
mnlevy1981 Mar 26, 2024
a6d18c2
Remove '=====' from testlist
mnlevy1981 Mar 27, 2024
da5ceea
Moved MARBL input files to input data
mnlevy1981 May 2, 2024
d0b3f67
Precision of MARBL fields matches rest of diags
mnlevy1981 May 6, 2024
cc88f3d
OCN_DIAG_MODE = "none" => no MARBL fields
mnlevy1981 May 6, 2024
38126dc
Update to marbl0.47.0
mnlevy1981 May 16, 2024
df106a6
Merge tag 'mi_240510' into MARBL_support
mnlevy1981 May 16, 2024
f908597
Add ability to have Jint_100m in minimal output
mnlevy1981 May 17, 2024
ea7afd0
Add thetao and so back to bgc stream
mnlevy1981 May 17, 2024
25bd28b
Fix input_data logic for river flux file
mnlevy1981 Jun 5, 2024
dbe3d4e
Lots of updates from code review
mnlevy1981 Jul 17, 2024
c0c8d88
Ran black in cime_config/MARBL_scripts/
mnlevy1981 Jul 17, 2024
1fc1ffa
Merge tag 'mi_240730' into MARBL_support
mnlevy1981 Aug 2, 2024
3d7a57f
Fix change in case in .gitmodules
mnlevy1981 Aug 2, 2024
0362b5a
Added G1850MARBL_JRA tests to prealpha and prebeta
mnlevy1981 Aug 2, 2024
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
4 changes: 2 additions & 2 deletions Externals.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[mom]
tag = dev/ncar_240510
branch = mnlevy1981/add_MARBL
protocol = git
local_path = MOM6
repo_url = https://github.com/NCAR/MOM6.git
repo_url = https://github.com/mnlevy1981/MOM6.git
required = True
externals = ../Externals_MOM.cfg

Expand Down
7 changes: 7 additions & 0 deletions Externals_MOM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@ protocol = git
from_submodule=True
required = True

[MARBL]
protocol = git
tag = marbl0.47.0
repo_url = https://github.com/marbl-ecosys/MARBL
local_path = pkg/MARBL
required = True

[externals_description]
schema_version = 1.0.0
61 changes: 61 additions & 0 deletions cime_config/MARBL_scripts/MARBL_diagnostics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
""" Interface to the marbl_diagnostics_class object
"""

class MARBL_diagnostics_for_MOM(object):
def __init__(self, MARBL_dir, caseroot, MARBL_settings):

import sys, os

# Set up arguments for marbl_diagnostics_class constructor
# Note that this is a dictionary that will be used to pass named variables to class constructor
# Arguments to be passed are
# 1. default_diagnostics_file: full path to default_diagnostics.json
# (can be in SourceMods, otherwise comes from MARBL)
# 2. MARBL_settings: a MARBL_settings_for_MOM object
MARBL_args = dict()

# User can put default_values.json in SourceMods, otherwise use file provided by MARBL
MARBL_args["default_diagnostics_file"] = os.path.join(caseroot,"SourceMods","src.mom","diagnostics_latest.json")
if not os.path.isfile(MARBL_args["default_diagnostics_file"]):
MARBL_args["default_diagnostics_file"] = os.path.join(MARBL_dir, "defaults", "json", "diagnostics_latest.json")

MARBL_args["MARBL_settings"] = MARBL_settings._MARBL_settings

# MARBL can run in mks unit system instead of requiring MOM to convert to / from cgs
MARBL_args["unit_system"] = "mks"

# Import MARBL_diagnostics_file_class, which may come from MARBL_tools or SourceMods/src.mom
# (i) need MARBL_dir in path for both branches of this if statement because even if
# MARBL_diagnostics_file_class.py is in SourceMods, it needs to import MARBL_tools itself
sys.path.append(MARBL_dir)
# (ii) Here's where we import from either MARBL_tools or SourceMods
diagnostics_class_dir = os.path.join(caseroot, "SourceMods", "src.mom")
if not os.path.isfile(os.path.join(diagnostics_class_dir, "MARBL_diagnostics_file_class.py")):
from MARBL_tools import MARBL_diagnostics_file_class
else:
import imp
import logging
logger = logging.getLogger(__name__)
logging.info('Importing MARBL_diagnostics_file_class.py from %s' % diagnostics_class_dir)
diagnostics_class_module = diagnostics_class_dir+'/MARBL_diagnostics_file_class.py'
if os.path.isfile(diagnostics_class_module):
MARBL_diagnostics_file_class = imp.load_source('MARBL_diagnostics_file_class', diagnostics_class_module)
else:
logger.error('Can not find %s' % diagnostics_class_module)
sys.exit(1)

# Generate diagnostics object
self.MARBL_diagnostic_dict = MARBL_diagnostics_file_class.MARBL_diagnostics_class(**MARBL_args)

################################################################################
# PUBLIC CLASS METHODS #
################################################################################

def write_diagnostics_file(self, diagnostics_file_out, diag_mode, append):
""" Add all MARBL diagnostics to file containing MOM diagnostics
Also create a list of diagnostics generated by MOM
"""
diag_mode_loc = 'full' if diag_mode == 'test_suite' else diag_mode
from MARBL_tools import generate_diagnostics_file
generate_diagnostics_file(self.MARBL_diagnostic_dict, diagnostics_file_out, diag_mode_loc, append)

378 changes: 378 additions & 0 deletions cime_config/MARBL_scripts/MARBL_diags_to_diag_table.py

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions cime_config/MARBL_scripts/MARBL_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
""" Interface to the marbl_settings_class object
"""

class MARBL_settings_for_MOM(object):
def __init__(self, MARBL_dir, caseroot, base_bio_on, abio_dic_on, ocn_grid, run_type, continue_run, ocn_bgc_config):

import sys, os

# Set up arguments for marbl_settings_class constructor
# Note that this is a dictionary that will be used to pass named variables to class constructor
# Arguments to be passed are
# 1. default_settings_file: full path to default_settings.json; can be in SourceMods, otherwise comes from MARBL
# 2. grid: CESM_MOM (until we come up with resolution-dependent tunings)
# 3. saved_state_vars_source: "settings_file" for startup run, otherwise GCM
MARBL_args = dict()

settings_file = "settings_"+ocn_bgc_config+".json"

# Users CAN NOT provide these variables in user_nl_marbl
MARBL_args["exclude_dict"] = {}
for var in ['base_bio_on', 'abio_dic_on']:
MARBL_args["exclude_dict"][var] = f'ERROR: {var} can not be set in user_nl_marbl -- ' + \
'it is controlled by MARBL_TRACER_OPTS in env_run.xml'
for var in ['ciso_on', 'ladjust_bury_coeff']:
MARBL_args["exclude_dict"][var] = f'ERROR: running with {var} is not supported in CESM+MOM6 yet'

# User can put settings_file in SourceMods, otherwise use file provided by MARBL
MARBL_args["default_settings_file"] = os.path.join(caseroot,"SourceMods","src.mom", settings_file)
if not os.path.isfile(MARBL_args["default_settings_file"]):
MARBL_args["default_settings_file"] = os.path.join(MARBL_dir, "defaults", "json", settings_file)

# User can modify user_nl_marbl (or user_nl_marbl_####) in caseroot
MARBL_args["input_file"] = os.path.join(caseroot, "user_nl_marbl")
if not os.path.isfile(MARBL_args["input_file"]):
MARBL_args["input_file"] = None

# Specify MARBL tracer opts
MARBL_args["base_bio_on"] = base_bio_on
MARBL_args["abio_dic_on"] = abio_dic_on

# Specify grid
MARBL_args["grid"] = "CESM_MOM"

# MARBL can run in mks unit system instead of requiring MOM to convert to / from cgs
MARBL_args["unit_system"] = "mks"

# If not a startup run, MARBL may want initial bury coefficient from restart file
if run_type == "startup" and not continue_run:
MARBL_args["saved_state_vars_source"] = "settings_file"
else:
MARBL_args["saved_state_vars_source"] = "GCM"

# Import MARBL_settings_file_class, which may come from MARBL_tools or SourceMods/src.mom
# (i) need MARBL_dir in path for both branches of this if statement because even if
# MARBL_settings_file_class.py is in SourceMods, it needs to import MARBL_tools itself
sys.path.append(MARBL_dir)
# (ii) Here's where we import from either MARBL_tools or SourceMods
settings_class_dir = os.path.join(caseroot, "SourceMods", "src.mom")
if not os.path.isfile(os.path.join(settings_class_dir, "MARBL_settings_file_class.py")):
from MARBL_tools import MARBL_settings_file_class
else:
import imp
import logging
logger = logging.getLogger(__name__)
logging.info('Importing MARBL_settings_file_class.py from %s' % settings_class_dir)
settings_class_module = settings_class_dir+'/MARBL_settings_file_class.py'
if os.path.isfile(settings_class_module):
MARBL_settings_file_class = imp.load_source('MARBL_settings_file_class', settings_class_module)
else:
logger.error('Can not find %s' % settings_class_module)
sys.exit(1)

# Generate settings object
self._MARBL_settings = MARBL_settings_file_class.MARBL_settings_class(**MARBL_args)

################################################################################
# PUBLIC CLASS METHODS #
################################################################################

def get_tracer_names(self):
""" Returns a list of all tracers in current configuration
"""
return self._MARBL_settings.get_tracer_names()

#######################################

def get_autotroph_names(self, calcifier_only=False):
""" Returns a list of all autotrophs in current configuration
"""
autotroph_list = []
try:
for n in range(1, self._MARBL_settings.settings_dict['autotroph_cnt']['value']+1):
autotroph_name = self._MARBL_settings.settings_dict['autotroph_settings(%d)%%sname' % n]['value'].strip('"')
imp_calcifier = (self._MARBL_settings.settings_dict['autotroph_settings(%d)%%imp_calcifier' % n]['value'].strip('"') == '.true.')
exp_calcifier = (self._MARBL_settings.settings_dict['autotroph_settings(%d)%%exp_calcifier' % n]['value'].strip('"') == '.true.')
if imp_calcifier or exp_calcifier or (not calcifier_only):
autotroph_list.append(autotroph_name)
except:
print('autotroph_cnt not found, treating as 0')
return autotroph_list

#######################################

def get_zooplankton_names(self):
""" Returns a list of all zooplankton in current configuration
"""
zooplankton_list = []
try:
for n in range(1, self._MARBL_settings.settings_dict['zooplankton_cnt']['value']+1):
zooplankton_name = self._MARBL_settings.settings_dict['zooplankton_settings(%d)%%sname' % n]['value'].strip('"')
zooplankton_list.append(zooplankton_name)
except:
print('zooplankton_cnt not found, treating as 0')
return zooplankton_list

#######################################

def get_ladjust_bury_coeff(self):
""" Returns True if ladjust_bury_coeff = .true.
"""
try:
return (self._MARBL_settings.settings_dict['ladjust_bury_coeff']['value'].strip('"') == '.true.')
except:
print('ladjust_bury_coeff not found, treating as False')
return False

#######################################

def write_settings_file(self, settings_file_out):
""" Write a settings file containing all MARBL settings
"""
from MARBL_tools import generate_settings_file
generate_settings_file(self._MARBL_settings, settings_file_out)
Loading