Skip to content

Commit

Permalink
Merge branch 'master' into outbands
Browse files Browse the repository at this point in the history
  • Loading branch information
nichollsh committed Aug 29, 2024
2 parents 66f2045 + 3328d56 commit 3176bf1
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Get SOCRATES
uses: actions/checkout@v4
with:
repository: 'FormingWorlds/SOCRATES'
repository: 'nichollsh/SOCRATES'
path: 'SOCRATES'

- uses: actions/cache@v3
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ The versioning scheme we use is [CalVer](https://calver.org/).
0. Update requirements files:

```console
python tools/requirements_txt.py
python tools/generate_requirements_txt.py
pip-compile -o requirements_full.txt pyproject.toml
```

1. Bump the version (`release`/`patch`) as needed

```console
bump-my-version release
bump-my-version bump release
# 24.06.26
```

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ https://proteus-code.readthedocs.io
### Developer installation instructions
1. Download and install Socrates
```console
git clone [email protected]:FormingWorlds/SOCRATES.git
git clone [email protected]:nichollsh/SOCRATES.git
cd SOCRATES
./configure
./build-code
Expand All @@ -50,7 +50,7 @@ pip install -e .
* `janus download spectral`
* `janus download stellar`
* Alternatively, you can specify which spectral data you want to download, and optionally the number of bands
* `janus download spectral /Frostflow 4096`
* `janus download spectral -n Frostflow -b 4096`

### Run instructions
In the examples folder you can find python scripts showing typical usecases/workflows of atmosphere modelling with Janus.
2 changes: 2 additions & 0 deletions examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fwl-janus
fwl-mors
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fwl-janus"
version = "24.06.26"
version = "24.08.29"
description = "Temperature structure generator for planetory atmospheres."
readme = "README.md"
authors = [
Expand Down Expand Up @@ -41,7 +41,6 @@ dependencies = [
'toml',
'tomlkit',
'f90nml',
'fwl-mors',
]

[project.urls]
Expand All @@ -51,6 +50,7 @@ homepage = "https://github.com/FormingWorlds/JANUS"
develop = [
"bump-my-version",
"coverage[toml]",
'fwl-mors',
"pytest"
]
docs = [
Expand Down Expand Up @@ -81,7 +81,7 @@ testpaths = ["tests"]

[tool.bumpversion]
# https://callowayproject.github.io/bump-my-version/howtos/calver/
current_version = "24.06.26"
current_version = "24.08.29"
parse = """(?x) # Verbose mode
(?P<release> # The release part
(?:[1-9][0-9])\\. # YY.
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# generated by tools/generate_requirements_txt.py
click
matplotlib
natsort
netcdf4
numpy
osfclient
pandas
platformdirs
requests
scipy
seaborn
toml
Expand Down
26 changes: 24 additions & 2 deletions requirements_full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
# pip-compile --output-file=requirements_full.txt pyproject.toml
#
certifi==2024.6.2
# via netcdf4
# via
# netcdf4
# requests
cftime==1.6.4
# via netcdf4
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via fwl-janus (pyproject.toml)
contourpy==1.2.1
# via matplotlib
cycler==0.12.1
Expand All @@ -16,6 +22,8 @@ f90nml==1.4.4
# via fwl-janus (pyproject.toml)
fonttools==4.53.0
# via matplotlib
idna==3.8
# via requests
kiwisolver==1.4.5
# via matplotlib
matplotlib==3.9.0
Expand All @@ -36,6 +44,8 @@ numpy==2.0.0
# pandas
# scipy
# seaborn
osfclient==0.0.5
# via fwl-janus (pyproject.toml)
packaging==24.1
# via matplotlib
pandas==2.2.2
Expand All @@ -44,6 +54,8 @@ pandas==2.2.2
# seaborn
pillow==10.3.0
# via matplotlib
platformdirs==4.2.2
# via fwl-janus (pyproject.toml)
pyparsing==3.1.2
# via matplotlib
python-dateutil==2.9.0.post0
Expand All @@ -52,15 +64,25 @@ python-dateutil==2.9.0.post0
# pandas
pytz==2024.1
# via pandas
requests==2.32.3
# via
# fwl-janus (pyproject.toml)
# osfclient
scipy==1.14.0
# via fwl-janus (pyproject.toml)
seaborn==0.13.2
# via fwl-janus (pyproject.toml)
six==1.16.0
# via python-dateutil
# via
# osfclient
# python-dateutil
toml==0.10.2
# via fwl-janus (pyproject.toml)
tomlkit==0.12.5
# via fwl-janus (pyproject.toml)
tqdm==4.66.5
# via osfclient
tzdata==2024.1
# via pandas
urllib3==2.2.2
# via requests
2 changes: 1 addition & 1 deletion src/janus/set_socrates_env.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Import this file to set environment variables for socrates.
Based on:
https://github.com/FormingWorlds/SOCRATES/blob/main/sbin/set_rad_env_tmp
https://github.com/nichollsh/SOCRATES/blob/main/sbin/set_rad_env_tmp
"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion src/janus/utils/atmosphere_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def setPlanetProperties(self, pl_radius:float, pl_mass:float):
def setVolatiles(self, vol_mixing: dict):

tot_mixing = float(sum(vol_mixing.values())) # Ensure mixing ratios add up to unity
self.vol_list = {key: val/tot_mixing for key, val in self.vol_mixing.items()}
self.vol_list = {key: val/tot_mixing for key, val in vol_mixing.items()}

# H2O floor to prevent NaNs
self.vol_list["H2O"] = np.max( [ self.vol_list["H2O"], 1e-20 ] )
Expand Down

0 comments on commit 3176bf1

Please sign in to comment.