Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
582859d
Add task
mranst Nov 25, 2025
37b668f
Add obs file
mranst Dec 1, 2025
9e7d021
fixes
mranst Dec 1, 2025
7aac23e
Merge branch 'feature/mranst/eva_comparison_obs' of discover.nccs.nas…
mranst Dec 1, 2025
357ad7b
Fixes
mranst Dec 1, 2025
65ef17f
add diff plot
mranst Dec 3, 2025
6b9353d
Fixes
mranst Dec 3, 2025
ce2edbd
Merge branch 'feature/mranst/eva_comparison_obs' of discover.nccs.nas…
mranst Dec 3, 2025
53b3c3a
Fix yaml
mranst Dec 3, 2025
21efed5
Add 3dfgat_cycle
mranst Dec 4, 2025
3e0f532
switch file
mranst Dec 5, 2025
27e71ea
Merge branch 'feature/mranst/eva_comparison_obs' of discover.nccs.nas…
mranst Dec 5, 2025
4c52a91
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Dec 5, 2025
9a09c78
remove window_offset
mranst Dec 5, 2025
dcda1d1
working 3dfgat_cycle
mranst Dec 5, 2025
1d70595
rename
mranst Dec 5, 2025
966745b
Fix title
mranst Dec 5, 2025
637bbe4
fix
mranst Dec 5, 2025
c1b7c6c
Fixes
mranst Dec 5, 2025
d896f81
Refine
mranst Dec 5, 2025
b69765c
3dfgat_atmos
mranst Dec 5, 2025
d07ebb3
update eva files
mranst Dec 5, 2025
fc27b0a
Formatting adjustments
mranst Dec 8, 2025
786a839
add 3dvar and 3dvar_atmos
mranst Dec 11, 2025
6cfee26
Add cost function
mranst Dec 15, 2025
51759dd
fix
mranst Dec 15, 2025
711dd2e
add other suites cost function
mranst Dec 15, 2025
ceec00b
add oman and ombg vs plots
mranst Dec 16, 2025
435ccf4
Revise plots
mranst Dec 16, 2025
08287da
Add other suites
mranst Dec 16, 2025
c6cf151
Fix figure size
mranst Dec 16, 2025
1d334d9
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Dec 16, 2025
7654c60
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Dec 17, 2025
351dbfe
Use tags for experiment names
mranst Jan 12, 2026
34b8062
fixes
mranst Jan 12, 2026
3c92211
Use tags in eva plots
mranst Jan 13, 2026
b9c87ca
add experiment ids
mranst Jan 13, 2026
cb73558
fixes
mranst Jan 13, 2026
31a613d
fixes
mranst Jan 13, 2026
9176f8e
formatting fixes
mranst Jan 13, 2026
8de4348
add tags to marine
mranst Jan 14, 2026
ccdbaf2
add jedi_log plots
mranst Jan 14, 2026
66f8cbc
fix
mranst Jan 14, 2026
ced4a08
Update obs to use tag
mranst Jan 14, 2026
c165885
fixes
mranst Jan 15, 2026
447845b
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Jan 20, 2026
9996ed0
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Jan 28, 2026
f20c937
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Jan 29, 2026
85fe197
pycodestyle fix
mranst Jan 29, 2026
e706b97
Remove cost function from marine plots
mranst Feb 2, 2026
c6b2ff3
Make eva tasks optional
mranst Feb 2, 2026
6bf37ae
Run plots only when residual norm fails
mranst Feb 2, 2026
7337eb9
Merge branch 'develop' into feature/mranst/eva_comparison_obs
mranst Feb 11, 2026
0d9e000
Add task to publish comparisons
mranst Feb 11, 2026
c86c6b5
add task
mranst Feb 11, 2026
890dfa7
Fixes
mranst Feb 11, 2026
b945ffb
Add model_components
mranst Feb 11, 2026
e2f6a13
Merge branch 'feature/mranst/eva_comparison_obs' into feature/mranst/…
mranst Feb 11, 2026
a98dda8
Add to workflow
mranst Feb 11, 2026
df2033b
Make a cycling task
mranst Feb 11, 2026
26b0340
Fix flow.cylc
mranst Feb 11, 2026
0a3271b
Merge branch 'develop' into feature/mranst/publish_comparisons
mranst Feb 12, 2026
0ccff57
test fixes
mranst Feb 12, 2026
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
15 changes: 11 additions & 4 deletions src/swell/suites/compare/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@
runahead limit = {{runahead_limit}}

[[graph]]
R1 = """
{% for model_component in model_components %}
JediLogComparison-{{model_component}}?
{% endfor %}
"""
{% for cycle_time in cycle_times %}
{{cycle_time.cycle_time}} = """
{% for model_component in model_components %}
{% if cycle_time[model_component] %}
{% for path in comparison_experiment_paths %}
JediOopsLogParser-{{model_component}}-{{ loop.index0 }}
{% endfor %}
JediLogComparison-{{model_component}}?
JediLogComparison-{{model_component}}:fail? => EvaComparisonIncrement-{{model_component}}
JediLogComparison-{{model_component}}:fail? => EvaComparisonJediLog-{{model_component}}
JediLogComparison-{{model_component}}:fail? => EvaComparisonObservations-{{model_component}} => comparison_fail
JediLogComparison-{{model_component}}[^]:fail? => EvaComparisonIncrement-{{model_component}} => PublishComparisons => comparison_fail
JediLogComparison-{{model_component}}[^]:fail? => EvaComparisonJediLog-{{model_component}} => PublishComparisons => comparison_fail
JediLogComparison-{{model_component}}[^]:fail? => EvaComparisonObservations-{{model_component}} => PublishComparisons => comparison_fail
{% endif %}
{% endfor %}
"""
Expand Down Expand Up @@ -77,6 +81,9 @@
--{{key}} = {{value}}
{%- endfor %}

[[PublishComparisons]]
script = "swell task PublishComparisons $config -d $datetime -m {{model_component}}"

{% if comparison_experiment_paths is mapping %}
{% for path in comparison_experiment_paths.values() %}
[[JediOopsLogParser-{{model_component}}-{{ loop.index0 }}]]
Expand Down
66 changes: 66 additions & 0 deletions src/swell/tasks/publish_comparisons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# (C) Copyright 2021- United States Government as represented by the Administrator of the
# National Aeronautics and Space Administration. All Rights Reserved.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.


# --------------------------------------------------------------------------------------------------


import os
import glob
import shutil

from swell.tasks.base.task_base import taskBase

# --------------------------------------------------------------------------------------------------


class PublishComparisons(taskBase):

'''Copies releveant text files and plots to a specified "publish location".

If 'publish_directory' is None, the files will not be copied.
'''

def execute(self) -> None:

# Output path base to copy files to
publish_directory = self.config.publish_directory(None)

# Skip this task if there is no publish directory
if publish_directory is None:
print('Skipping')
return

print('Not skipped')
# For CI tests - contain results under the run ID
github_run_id = os.environ.get('GITHUB_RUN_ID')
experiment_id = self.experiment_id()
if github_run_id is not None:
experiment_id = os.path.join(github_run_id, experiment_id)

# Name the location after the experiment ID
publish_location = os.path.join(self.config.publish_directory(), experiment_id)

os.makedirs(publish_location, exist_ok=True)

# Copy the JEDI log file comparison
log_file = os.path.join(self.experiment_path(), 'jedi_log_comparison.txt')
shutil.copy(log_file, publish_location)

if os.path.isdir(os.path.join(self.cycle_dir(), 'eva')):

# Copy eva png files
files = glob.glob(os.path.join(self.cycle_dir(), 'eva', '**', '*.png'), recursive=True)

out_path = os.path.join(publish_location, self.__datetime__.string_directory(),
self.get_model())

os.makedirs(out_path, exist_ok=True)

for file in files:
shutil.copy(file, out_path)

# --------------------------------------------------------------------------------------------------
10 changes: 10 additions & 0 deletions src/swell/tasks/task_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,16 @@ class TaskQuestions(QuestionContainer, Enum):

# --------------------------------------------------------------------------------------------------

PublishComparisons = QuestionList(
list_name="PublishComparisons",
questions=[
qd.model_components(),
qd.publish_directory()
]
)

# --------------------------------------------------------------------------------------------------

PrepareAnalysis = QuestionList(
list_name="PrepareAnalysis",
questions=[
Expand Down
10 changes: 10 additions & 0 deletions src/swell/utilities/question_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,16 @@ class produce_geovals(TaskQuestion):

# --------------------------------------------------------------------------------------------------

@dataclass
class publish_directory(TaskQuestion):
default_value: str = None
question_name: str = "publish_directory"
ask_question: bool = False
prompt: str = "Provide an external directory to publish relevant results to."
widget_type: WType = WType.STRING

# --------------------------------------------------------------------------------------------------

@dataclass
class r2d2_local_path(TaskQuestion):
default_value: str = "defer_to_platform"
Expand Down