-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cycling FGAT for geos_marine
and towards erasing geos_ocean
#419
Conversation
geos_ocean
geos_ocean
geos_marine
and towards erasing geos_ocean
src/swell/configuration/jedi/interfaces/geos_marine/model/background.yaml
Show resolved
Hide resolved
Thank you for the reviews! Before this one, the following needs to be merged: Then I will work on your suggestions. |
I'm still struggling with Also, following @ashiklom's suggestion on using swell/src/swell/utilities/shell_commands.py Lines 21 to 25 in 597bbbe
|
Unfortunately, type hinters don't seem to be smart enough to propagate type checking through If you use |
So I have one issue (more of a design flaw 🥲 ) left related to low-level design of task/suite/experiment config creation but this is good to go. For now I will set a hard-coded value in the task and move on but I can also create an issue depending on the comments. The issue arises a key in cice6_domains:
ask_question: true
default_value: defer_to_model
models:
- geos_marine
options: defer_to_model
prompt: Which CICE6 domains do you wish to run DA for?
tasks:
- RunJediConvertStateSoca2ciceExecutable
type: string-check-list Only the {% if 'cice6' in marine_models %}
[[RunJediConvertStateSoca2ciceExecutable-{{model_component}}]]
script = "swell task RunJediConvertStateSoca2ciceExecutable $config -d $datetime -m {{model_component}}"
platform = {{platform}}
execution time limit = {{scheduling["RunJediConvertStateSoca2ciceExecutable"]["execution_time_limit"]}}
[[[directives]]]
{%- for key, value in scheduling["RunJediConvertStateSoca2ciceExecutable"]["directives"][model_component].items() %}
--{{key}} = {{value}}
{%- endfor %}
{% endif %} While creating
Here, {% for model_component in model_components %}
[[LinkGeosOutput-{{model_component}}]]
script = "swell task LinkGeosOutput $config -d $datetime -m {{model_component}}"
{% endfor %} Anyways, this was really long explanation but happy to explain even further, I had to do some digging to find this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone else should review the DA aspects, but code looks good. Appreciate the documentation!
This is a step towards getting rid of
geos_ocean
model section and sticking withgeos_marine
but that will require further testing and verification beyond the scope of this PR.For context, SOCA (marine component of JEDI) is designed to handle different model types such as ocean(mom6), sea-ice (cice6), waves(ww3), and BGC. This means, there will be optional tasks (such as SOCA2CICE) that not need triggered while CICE model is not active. Additionally, there are optional configuration entries for the input config YAML, for instance
ice_filename
andwav_filename
below in thestate
section are optional entries. More detailed information here.To handle this, this PR introduces a new key called
marine_models
to be used inflow.cylc
and various tasks. Jinja is able to utilize this key using if statements, I tested it with bothflow.cylc
and EVA YAMLs.Second, I added a
dynamic_keys
feature, (seeutilities/render_jedi_interface_files.py
). These are entries that are dynamic, for instancestates
inPseudoModel
would be dependent onwindow_length
andbackground_frequency
as well asmarine_models
, see below for it's output, it has two entries becausebackground_frequency
is 3H andwindow_length
is 6H: