Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
9e232ee
Basic conversion operators for humidity, temperature and pressure
daflack Jan 2, 2026
c072a26
Add mixing ratio to specific humidity operator
daflack Jan 2, 2026
191ac7c
Add standard atmospheric constants
daflack Jan 2, 2026
2dc4795
Add vapour pressure conversion
daflack Jan 2, 2026
f6ca912
Add vapour pressure if dewpoint unknown
daflack Jan 2, 2026
b49f776
Update naming convections for vapour pressures
daflack Jan 2, 2026
cef08a9
Calculate saturation mixing ratio and specific humidity
daflack Jan 2, 2026
9cf07b2
Rename vapour_pressure_if_dewpoint_unknown to vapour_pressure_from_RH
daflack Jan 2, 2026
80b08f6
Add mixing ratio from relative humidity conversion
daflack Jan 2, 2026
3d87c7a
Add specific humidity from RH conversion
daflack Jan 2, 2026
bff14ae
Add relative humidity conversions from mixing ratio and specific
daflack Jan 2, 2026
7be43e7
Add dewpoint temperature calculation
daflack Jan 2, 2026
678d89c
Add virtual temperature calculation
daflack Jan 2, 2026
d258924
Update atmospheric constants with kappa
daflack Jan 2, 2026
a925103
Add potential temperature and exner pressure convertors
daflack Jan 5, 2026
68ea438
Adds virtual potential temperature convertor
daflack Jan 5, 2026
4084822
Adds equivalent potential temperature conversion and fixes unit assig…
daflack Jan 5, 2026
d9f1d0c
Remove if loop for RH and switch to convert units
daflack Jan 5, 2026
ae72d4e
Adds wet-bulb temperature convertor
daflack Jan 5, 2026
4fe1e39
Adds relevant references for temperature calculations where required
daflack Jan 5, 2026
e7d7297
Adds wet-bulb potential temperature convertor
daflack Jan 5, 2026
dfe7657
Adds saturation equivalent potential temperature convertor
daflack Jan 5, 2026
1c6fef4
Adds to init file and updates name for atmospheric constants
daflack Jan 5, 2026
2e0bd49
Update argument names in specific humidity to mixing ratio and vice
daflack Jan 6, 2026
a1a9fd0
Uses convert_units for pressure consistency
daflack Jan 6, 2026
be0eb2d
Adds names to humidity cubes where missing
daflack Jan 7, 2026
cdecfc5
Correct units
daflack Jan 7, 2026
127fecb
Adds tests data and fixtures
daflack Jan 7, 2026
db88423
Update copyright year
daflack Jan 7, 2026
19d63be
Add tests for vapour pressure
daflack Jan 7, 2026
51da41f
Update to assignment in pressure convertors
daflack Jan 7, 2026
25ebb9b
Rename vapour_pressure_from_RH to relative_humidity_to_vapour_pressure
daflack Jan 7, 2026
5251814
Adds tests for relative_humidity_to_vapour_pressure
daflack Jan 7, 2026
dea81b0
Adds tests for exner pressure
daflack Jan 7, 2026
9041869
Uses atmospheric constants in tests
daflack Jan 7, 2026
26dccaf
Change to vapour pressure from relative humidity as more intuitive
daflack Jan 7, 2026
3a7a197
Update aming convention to be x_from_y rather than y_from_x
daflack Jan 7, 2026
3a46b54
Update operators in temperature for correct conversion name
daflack Jan 7, 2026
7d78260
Adds test data and fixtures for humidity convertors
daflack Jan 7, 2026
6b420f5
Adds tests for specific humidity and mixing ratio conversions
daflack Jan 7, 2026
95386b0
Adds tests for saturation mixing ratio
daflack Jan 8, 2026
00e4039
Adds tests for saturation specific humidity
daflack Jan 8, 2026
2c7c267
Adds tests for mixing ratio from relative humidity
daflack Jan 8, 2026
bdd90eb
Adds tests for specific humidity from relative humidity
daflack Jan 8, 2026
6e8ed4f
Adds tests for relative humidity from mixing ratio
daflack Jan 8, 2026
3a5ec8d
Update tests for relative humidity from mixing ratio and correct RH
daflack Jan 8, 2026
4f65220
Adds tests for relative humidity from specific humidity
daflack Jan 8, 2026
21671c8
Adds tests and fixes calculation for dewpoint temperature
daflack Jan 8, 2026
0bbed29
Adds tests for virtual temperature
daflack Jan 8, 2026
201a187
Adds tests for wet-bulb temperature conversions
daflack Jan 13, 2026
c4e383c
Adds tests for potenital temperature
daflack Jan 14, 2026
4c59f41
Adds tests for virtual potential temperature
daflack Jan 14, 2026
a0a3fe1
Adds tests for equivalent potential temperature
daflack Jan 15, 2026
a6535a2
Adds tests for saturation equivalent potenital temperature
daflack Jan 15, 2026
9809d46
Adds tests for wet-bulb potential temperature and fixes its calculation
daflack Jan 19, 2026
e1098fb
Add documentation to _atomspheric_constants.py
daflack Jan 19, 2026
b8918a2
Update copyright years
daflack Jan 19, 2026
1370f60
Add documentation to exner pressure and fix brackets in beaufort scale
daflack Jan 19, 2026
fe67c08
Adds documentation for vapour pressure conversion
daflack Jan 19, 2026
8ef9d26
Adds documentation for vapour_pressure_from_relative_humidity
daflack Jan 19, 2026
8457637
Adds documentation for specific humidity and mixing ratio conversions
daflack Jan 19, 2026
3f43d06
Adds documentation for specific humidity and mixing ratio from RH
daflack Jan 19, 2026
9b4a4cf
Adds documentation for relative humidity conversions from different
daflack Jan 19, 2026
1523c50
Adds documentation for dewpoint temperature
daflack Jan 19, 2026
743f30b
Fix documentaiton
daflack Jan 19, 2026
469eda7
Adds documentation for virtual temperature
daflack Jan 19, 2026
e772aac
Adds documentation for wet-bulb temperature
daflack Jan 19, 2026
fb0f655
Adds further documentation to wet-bulb temperature
daflack Jan 19, 2026
4752491
Adds potential temperature documentation
daflack Jan 19, 2026
d2499e1
Adds virtual potential temperature documentation
daflack Jan 20, 2026
52b6e34
Adds documentation for wet-bulb potential temperature
daflack Jan 20, 2026
3dccf83
Adds equivalent potenital temperature documentation
daflack Jan 20, 2026
472b289
Adds clarification to theta_e documentation
daflack Jan 20, 2026
24d6e6a
Adds saturation equivalent potenital temperature documentation
daflack Jan 20, 2026
0f9eaae
Update copyright years
daflack Jan 20, 2026
d192448
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
7266f67
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
5421039
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
6de578c
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
bb9e6b5
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
081e872
Update humidity.py
Sylviabohnenstengel Jan 26, 2026
01240c6
Update pressure.py
Sylviabohnenstengel Jan 27, 2026
dae1ab5
Update pressure.py
Sylviabohnenstengel Jan 27, 2026
4d59531
Update pressure.py
Sylviabohnenstengel Jan 27, 2026
fe3aaba
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
afde16f
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
7d439b1
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
d503287
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
a0e81cd
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
1e3e9fc
Update temperature.py
Sylviabohnenstengel Jan 27, 2026
fd29736
Update temperature.py
Sylviabohnenstengel Jan 27, 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
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "CSET"
copyright = "Crown copyright, Met Office (2022-2025) and CSET contributors."
copyright = "Crown copyright, Met Office (2022-2026) and CSET contributors."
author = "Met Office and Partners"

# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Conduct`_.
Licence
-------

© Crown copyright, Met Office (2022-2025) and CSET contributors.
© Crown copyright, Met Office (2022-2026) and CSET contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may obtain a
Expand Down
27 changes: 27 additions & 0 deletions docs/source/reference/operators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ CSET.operators.ensembles
.. automodule:: CSET.operators.ensembles
:members:

Humidity Operators
~~~~~~~~~~~~~~~~~~

CSET.operators.humidity
-----------------------

.. automodule:: CSET.operators.humidity
:members:

Image Processing Operators
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -113,6 +122,24 @@ CSET.operators.mesoscale
.. automodule:: CSET.operators.mesoscale
:members:

Pressure Operators
~~~~~~~~~~~~~~~~~~

CSET.operators.pressure
-----------------------

.. automodule:: CSET.operators.pressure
:members:

Temperature Operators
~~~~~~~~~~~~~~~~~~~~~

CSET.operators.temperature
--------------------------

.. automodule:: CSET.operators.temperature
:members:

Wind Operators
~~~~~~~~~~~~~~~~~~~

Expand Down
8 changes: 7 additions & 1 deletion src/CSET/operators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# © Crown copyright, Met Office (2022-2024) and CSET contributors.
# © Crown copyright, Met Office (2022-2026) and CSET contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,12 +34,15 @@
convection,
ensembles,
filters,
humidity,
imageprocessing,
mesoscale,
misc,
plot,
pressure,
read,
regrid,
temperature,
transect,
wind,
write,
Expand All @@ -56,13 +59,16 @@
"ensembles",
"execute_recipe",
"filters",
"humidity",
"get_operator",
"imageprocessing",
"mesoscale",
"misc",
"plot",
"pressure",
"read",
"regrid",
"temperature",
"transect",
"wind",
"write",
Expand Down
41 changes: 41 additions & 0 deletions src/CSET/operators/_atmospheric_constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# © Crown copyright, Met Office (2022-2026) and CSET contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Constants for the atmosphere."""

# Reference pressure.
P0 = 1000.0 # hPa.

# Specific gas constant for dry air.
RD = 287.0 # J/kg/K.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to 287.05?


# Specific gas constant for water vapour.
RV = 461.0 # J/kg/K.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

461.52?


# Specific heat capacity for dry air.
CPD = 1005.7 # J/kg/K.

# Latent heat of vaporization.
LV = 2.501e6 # J/kg/K.

# Reference vapour pressure.
E0 = 6.1078 # hPa.

# Reference temperature.
T0 = 273.15 # K.

# Ratio between mixing ratio of dry and moist air.
EPSILON = 0.622

# Ratio between specific gas constant and specific heat capacity.
KAPPA = RD / CPD
Loading
Loading