You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so I think we can just get rid of that config flag completely, as we should be able to specify those paths in a different way. Also, the testing_and_setup/compass is incorrect now anyway.
@mark-petersen, I'm happy to do this, but I kind of think of things the other way around. With config files with extended interpolation, it makes sense to specify only the mpas_model path and have the config file (at least by default) figure everything else out from that path. Here's an example from what I'm working on:
# This config file has default config options for the ocean core# The paths section points COMPASS to external paths[paths]# the relative or absolute path to the root of a branch where MPAS-Ocean# has been builtmpas_model = MPAS-Model/ocean/develop
# The namelists section defines paths to template_compact namelists that will be used# to generate specific namelists. By default, these point to the forward and# init namelists in the default_inputs directory after a successful build of# the ocean model. Change these in a custom config file if you need a different# template_compact.[namelists]forward = ${paths:mpas_model}/default_inputs/namelist.ocean.forward
init = ${paths:mpas_model}/default_inputs/namelist.ocean.init
# The streams section defines paths to template_compact streams files that will be used# to generate specific streams files. By default, these point to the forward and# init streams files in the default_inputs directory after a successful build of# the ocean model. Change these in a custom config file if you need a different# template_compact.[streams]forward = ${paths:mpas_model}/default_inputs/streams.ocean.forward
init = ${paths:mpas_model}/default_inputs/streams.ocean.init
# The executables section defines paths to required executables. These# executables are provided for use by specific test cases. Most tools that# COMPASS needs should be in the conda environment, so this is only the path# to the MPAS-Ocean executable by default.[executables]model = ${paths:mpas_model}/ocean_model
Yes, your example config file is much better. I've never specified different paths for any of those things, and made a sed script a long time ago to replace them all at once.
Yes, I use sed for this, too. And this won't work with the ConfigParser as currently used in COMPASS, but it will work in the future version I'm working on.
@mark-petersen, I have a branch for this but I'm having trouble testing it because the LCRC server is down (monthly maintenance?) so I can't get mesh files I need.
Didn't respond to this. I didn't mean for my example to be a complete one. The way things will work, those paths will come from a machine-specific config file, which is separate from the config file where you specify the location of MPAS-Ocean. But I'm getting ahead of myself. I just wanted to point out that there may be a good reason to keep mpas_model as a path.
Activity
xylar commentedon Nov 9, 2020
@mark-petersen, I'm happy to do this, but I kind of think of things the other way around. With config files with extended interpolation, it makes sense to specify only the
mpas_modelpath and have the config file (at least by default) figure everything else out from that path. Here's an example from what I'm working on:xylar commentedon Nov 9, 2020
But I agree that the two cases you point out above should me altered to not use those silly paths anymore.
xylar commentedon Nov 9, 2020
I'll make a PR to fix these 2.
mark-petersen commentedon Nov 9, 2020
Yes, your example config file is much better. I've never specified different paths for any of those things, and made a sed script a long time ago to replace them all at once.
Your example above also removes
You don't mean to remove those, right? It is nice to point to files that are in-place on our shared machines.
xylar commentedon Nov 9, 2020
Yes, I use
sedfor this, too. And this won't work with theConfigParseras currently used in COMPASS, but it will work in the future version I'm working on.xylar commentedon Nov 9, 2020
@mark-petersen, I have a branch for this but I'm having trouble testing it because the LCRC server is down (monthly maintenance?) so I can't get mesh files I need.
xylar commentedon Nov 9, 2020
Didn't respond to this. I didn't mean for my example to be a complete one. The way things will work, those paths will come from a machine-specific config file, which is separate from the config file where you specify the location of MPAS-Ocean. But I'm getting ahead of myself. I just wanted to point out that there may be a good reason to keep
mpas_modelas a path.