Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* Deploy docs on [Read The Docs](https://joseki.readthedocs.io/).
* Allow Numpy 2.
* Support Python 3.13.
* Internalized ussa1976 dependency, which is no longer maintained.

### Fixed

Expand Down
35 changes: 7 additions & 28 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,10 @@ charset-normalizer==3.4.2
click==8.1.8 ; python_full_version < '3.10'
# via
# joseki
# ussa1976
# uvicorn
click==8.2.1 ; python_full_version >= '3.10'
# via
# joseki
# ussa1976
# uvicorn
colorama==0.4.6
# via
Expand Down Expand Up @@ -255,9 +253,7 @@ nbstripout==0.8.1
nest-asyncio==1.6.0
# via ipykernel
netcdf4==1.7.2
# via
# joseki
# ussa1976
# via joseki
notebook-shim==0.2.4
# via jupyterlab
numpy==2.0.2 ; python_full_version < '3.10'
Expand All @@ -270,7 +266,6 @@ numpy==2.0.2 ; python_full_version < '3.10'
# pandas
# scipy
# seaborn
# ussa1976
# xarray
numpy==2.2.6 ; python_full_version == '3.10.*'
# via
Expand All @@ -282,7 +277,6 @@ numpy==2.2.6 ; python_full_version == '3.10.*'
# pandas
# scipy
# seaborn
# ussa1976
# xarray
numpy==2.3.2 ; python_full_version >= '3.11'
# via
Expand All @@ -294,7 +288,6 @@ numpy==2.3.2 ; python_full_version >= '3.11'
# pandas
# scipy
# seaborn
# ussa1976
# xarray
overrides==7.7.0
# via jupyter-server
Expand Down Expand Up @@ -415,17 +408,11 @@ rpds-py==0.26.0
# jsonschema
# referencing
scipy==1.13.1 ; python_full_version < '3.10'
# via
# joseki
# ussa1976
# via joseki
scipy==1.15.3 ; python_full_version == '3.10.*'
# via
# joseki
# ussa1976
# via joseki
scipy==1.16.0 ; python_full_version >= '3.11'
# via
# joseki
# ussa1976
# via joseki
seaborn==0.13.2
send2trash==1.8.3
# via jupyter-server
Expand Down Expand Up @@ -546,8 +533,6 @@ uri-template==1.3.0
# via jsonschema
urllib3==2.5.0
# via requests
ussa1976==0.3.4
# via joseki
uvicorn==0.35.0
# via sphinx-autobuild
watchfiles==1.1.0
Expand All @@ -565,17 +550,11 @@ websocket-client==1.8.0
websockets==15.0.1
# via sphinx-autobuild
xarray==2024.7.0 ; python_full_version < '3.10'
# via
# joseki
# ussa1976
# via joseki
xarray==2025.6.1 ; python_full_version == '3.10.*'
# via
# joseki
# ussa1976
# via joseki
xarray==2025.7.1 ; python_full_version >= '3.11'
# via
# joseki
# ussa1976
# via joseki
zipp==3.23.0 ; python_full_version < '3.10'
# via
# importlib-metadata
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies = [
"pandas>=1.5.2",
"scipy>=1.9.3",
"xarray>=2022.12.0",
"ussa1976>=0.3.4",
"attrs>=22.2.0",
"importlib-resources>=5.10.2",
]
Expand Down
16 changes: 14 additions & 2 deletions src/joseki/constants.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
from ussa1976.constants import F

from .units import ureg

# Boltzmann constant (according to SciPy v1.10.1 Manual)
K = 1.380649e-23 * ureg.joule / ureg.kelvin

# Sea level volume fractions below 86 km [dimensionless].
F = {
"N2": 0.78084,
"O2": 0.209476,
"Ar": 0.00934,
"CO2": 0.000314,
"Ne": 0.00001818,
"He": 0.00000524,
"Kr": 0.00000114,
"Xe": 0.000000087,
"CH4": 0.000002,
"H2": 0.0000005,
}

# air main constituents molar fractions (values according to US Standard
# Atmosphere 1976)
AIR_MAIN_CONSTITUENTS_MOLAR_FRACTION = {m: F[m] for m in ["N2", "O2", "Ar"]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import typing as t

import pint
import ussa1976
import xarray as xr
from attrs import define

from .core import Profile
from .factory import factory
from .schema import history, schema
from ..units import to_quantity
from .core import compute as compute
from ..core import Profile
from ..factory import factory
from ..schema import history, schema
from ...units import to_quantity

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -56,11 +56,11 @@ def to_dataset(
# compute profile
if z is None:
logging.debug("Computing profile with ussa1976 package")
ds = ussa1976.compute(variables=variables)
ds = compute(variables=variables)
else:
logging.debug("Computing profile with ussa1976 package")
logging.debug("z=%s", z)
ds = ussa1976.compute(z=z.m_as("m"), variables=variables)
ds = compute(z=z.m_as("m"), variables=variables)

# extract data
coords = {"z": to_quantity(ds["z"]).to("km")}
Expand Down
Loading