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

Add age of air diagnostic functionality #480

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3c18bee
update aoa with original changes
jwarner8 Nov 12, 2024
a21bab1
more changes ported
jwarner8 Nov 12, 2024
9e3c407
add operator and entry in init
jwarner8 Nov 12, 2024
84a3901
first attempt yaml with datetime
jwarner8 Nov 12, 2024
251665e
add tests
jwarner8 Nov 12, 2024
59c784f
add test data
jwarner8 Nov 12, 2024
eeb6881
fix coord name call
jwarner8 Nov 12, 2024
a5bc540
Merge branch 'main' into 269_aoa_diag
jwarner8 Nov 12, 2024
c03ae40
add defaults
jwarner8 Nov 12, 2024
5aff53c
fix change of recipe name
jwarner8 Nov 12, 2024
268a450
update args
jwarner8 Nov 12, 2024
74d02b7
fix quotation and add new slurm directives
jwarner8 Nov 26, 2024
21b537d
updates to datetime cycling
jwarner8 Nov 26, 2024
24f47d9
fix coord names and vars
jwarner8 Nov 26, 2024
04c4c10
generalise variable and add new constraint for plev
jwarner8 Nov 27, 2024
9080e74
new tests
jwarner8 Nov 27, 2024
6df378f
default parallel
jwarner8 Nov 27, 2024
d6a5506
Merge branch 'main' into 269_aoa_diag
jwarner8 Nov 27, 2024
d61705a
add rotated geogcs to allowed grids
jwarner8 Nov 28, 2024
990a906
had some oom kills during testing so increasing
jwarner8 Nov 28, 2024
9796c41
ensemble support and better checking dim structure
jwarner8 Nov 28, 2024
d3c368d
new ensemble test data
jwarner8 Nov 28, 2024
c930395
new test data
jwarner8 Nov 28, 2024
cb4ffdd
change coords
jwarner8 Nov 28, 2024
d497550
failing with OOM
jwarner8 Nov 28, 2024
66421b9
request multiple cpu
jwarner8 Nov 28, 2024
c776281
Merge branch 'main' into 269_aoa_diag
jwarner8 Dec 5, 2024
36dd6eb
update pytest
jwarner8 Dec 5, 2024
bd16209
remove line series
jwarner8 Dec 5, 2024
0b3bcab
fix tests
jwarner8 Dec 5, 2024
150e491
Merge branch 'main' into 269_aoa_diag
jwarner8 Dec 9, 2024
c1cf658
Update cset-workflow/meta/diagnostics/rose-meta.conf
jwarner8 Dec 9, 2024
2195f90
Update cset-workflow/meta/diagnostics/rose-meta.conf
jwarner8 Dec 9, 2024
7e4cd77
[CI] Update conda lock files
github-actions[bot] Dec 9, 2024
8d3bce2
add units
jwarner8 Dec 9, 2024
86009e2
Update tests/operators/test_ageofair.py
jwarner8 Dec 9, 2024
9d1a32d
reorder tests and remove tbd
jwarner8 Dec 9, 2024
acd8b99
Use f strings
jwarner8 Dec 9, 2024
491ed07
Change logging type
jwarner8 Dec 9, 2024
01328a5
minor typo
jwarner8 Dec 9, 2024
42a7739
minor typos
jwarner8 Dec 9, 2024
e4a46a7
More minor typos
jwarner8 Dec 9, 2024
d1fb0aa
f strings
jwarner8 Dec 9, 2024
3fb24c8
fix docstring
jwarner8 Dec 9, 2024
0258cdb
capitalisation
jwarner8 Dec 9, 2024
3294398
reduce to 4gb
jwarner8 Dec 9, 2024
6632c27
remove incw
jwarner8 Dec 9, 2024
800d4ee
rm incW and refactor gaussian filter
jwarner8 Dec 9, 2024
7c4da52
sort files
jwarner8 Dec 9, 2024
9955330
update tests
jwarner8 Dec 9, 2024
e631fe2
new test for dim mapping
jwarner8 Dec 9, 2024
43bc630
raise valueerror
jwarner8 Dec 9, 2024
9b5ca9f
fix typos
jwarner8 Dec 9, 2024
d3faeb6
remove blank line
jwarner8 Dec 9, 2024
f0a8e6e
refactor multiprocessing
jwarner8 Dec 9, 2024
4710a54
more detailed docstring
jwarner8 Dec 9, 2024
9380f1f
fix quotation
jwarner8 Dec 9, 2024
d42ae46
fix transpose
jwarner8 Dec 9, 2024
c9e320b
more descriptive docstring
jwarner8 Dec 9, 2024
a0ad00b
refactor
jwarner8 Dec 9, 2024
522e8b7
tidy docstring
jwarner8 Dec 9, 2024
86cae36
general tidyup
jwarner8 Dec 9, 2024
d26b0cf
testing...
jwarner8 Dec 9, 2024
8d5d8c8
testing...
jwarner8 Dec 9, 2024
fe3bf2d
try no realise data
jwarner8 Dec 9, 2024
6371630
add call
jwarner8 Dec 9, 2024
32150fb
fix tests due to bug fix bit comparable
jwarner8 Dec 9, 2024
d296f02
transpose is inplace function, no return
jwarner8 Dec 9, 2024
1d216cd
new test
jwarner8 Dec 10, 2024
b094e12
more info in yaml
jwarner8 Dec 10, 2024
951fce3
add refs
jwarner8 Dec 10, 2024
b73c7e5
final tweaks
jwarner8 Dec 10, 2024
5257b08
Merge branch 'main' into 269_aoa_diag
jwarner8 Dec 10, 2024
78f3e5c
Merge branch 'main' into 269_aoa_diag
jwarner8 Dec 12, 2024
b1b9001
reorder multiproc
jwarner8 Dec 12, 2024
c1ef910
Update src/CSET/operators/ageofair.py
jwarner8 Dec 12, 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
19 changes: 19 additions & 0 deletions cset-workflow/includes/aoa_diag.cylc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% if AOA_DIAG|default(False) %}
{% for model in models %}
{% for plev in AOA_PLEV %}
[runtime]
[[aoa_diag_m{{model["number"]}}_plev{{plev}}]]
inherit = PROCESS
execution time limit = PT60M

[[[directives]]]
--mem=12000
--ntasks=12

[[[environment]]]
CSET_RECIPE_NAME = "ageofair.yaml"
CSET_ADDOPTS = "--AOA_PLEV={{plev}} --AOA_CYCLIC={{AOA_CYCLIC}} --MODEL_NAME='{{model["name"]}}'"
MODEL_NUMBER = {{model["number"]}}
{% endfor %}
{% endfor %}
{% endif %}
2 changes: 2 additions & 0 deletions cset-workflow/includes/plot_spatial_plevel_model_field.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
[runtime]
[[generic_plevel_spatial_plot_sequence_m{{model_number}}_{{sanitise_task_name(field)}}_lv{{sanitise_task_name(plevel)}}]]
inherit = PROCESS
[[[directives]]]
--mem=4000
[[[environment]]]
CSET_RECIPE_NAME = "generic_plevel_spatial_plot_sequence.yaml"
CSET_ADDOPTS = """
Expand Down
42 changes: 42 additions & 0 deletions cset-workflow/meta/diagnostics/rose-meta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -464,3 +464,45 @@ help=Set to True if you want a one-to-one line; false if not.
type=python_boolean
compulsory=true
sort-key=qq1h

[template variables=AOA_DIAG]
ns=Diagnostics/Other
title=Run age of air diagnostic on specified pressure levels.
description=Run the age of air diagnostic on model data.
help=The age of air diagnostic provides a qualtitative view of how old air is within
the domain, by calculating a back trajectory at each grid point at each lead time
to determine when air entered through the lateral boundary. This is useful for
diagnosing how quickly air ventilates the domain, depending on its size and the
prevailing meteorology.
The diagnostic uses the u, v and w components of wind, along with geopotential height to
perform the back trajectory. Data is first regridded to 0.5 degrees.
Note: the code here does not consider sub-grid transport, and only uses the postprocessed
velocity fields and geopotential height. Its applicability is for large-scale flow O(1000 km),
and not small scale flow where mixing is likely to play a larger role.
type=python_boolean
compulsory=true
trigger=template variables=AOA_PLEV: True;
template variables=AOA_CYCLIC: True;
sort-key=aoa1

[template variables=AOA_PLEV]
ns=Diagnostics/Other
title=AOA: Pressure Levels
description=List of pressure levels to calculate the age of air diagnostic.
help=The pressure levels must be specified in hPa, where the variables (U,V,W,Z)
jwarner8 marked this conversation as resolved.
Show resolved Hide resolved
exist on the pressure level.
type=python_list
compulsory=true
sort-key=aoa2

[template variables=AOA_CYCLIC]
ns=Diagnostics/Other
title=AOA: Use Cyclic Option
description=If True, LAM is considered cyclic in the east/west direction.
help=This option when True, will allow back trajectories to advect through the east/
west boundary and continue through the other side of the domain. This is useful
for large domains such as the cyclic tropical channel, where there is no east/
west boundary.
type=python_boolean
compulsory=true
sort-key=aoa3
6 changes: 6 additions & 0 deletions docs/source/reference/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,9 @@ CSET.operators.convection

.. automodule:: CSET.operators.convection
:members:

CSET.operators.ageofair
-----------------------

.. automodule:: CSET.operators.ageofair
:members:
2 changes: 2 additions & 0 deletions src/CSET/operators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import CSET.operators
from CSET._common import parse_recipe
from CSET.operators import (
ageofair,
aggregate,
collapse,
constraints,
Expand All @@ -42,6 +43,7 @@

# Exported operators & functions to use elsewhere.
__all__ = [
"ageofair",
"aggregate",
"collapse",
"constraints",
Expand Down
Loading
Loading