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

Feature/wind profiles #350

Merged
merged 26 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a18999c
first draft wind added
vgro Oct 27, 2023
eef1daa
revisited all functions
vgro Nov 22, 2023
a529560
Merge branch 'develop' into feature/wind_profiles
vgro Nov 22, 2023
9376d80
old todos deleted
vgro Nov 24, 2023
4b01dec
docstring typo fixed
vgro Nov 24, 2023
bea6655
Constants rework into dataclass format.
TaranRallings Nov 24, 2023
c6943d3
simplified, constants description updated
vgro Nov 27, 2023
6ccb750
constants moved to CoreConsts
vgro Nov 27, 2023
a6b4c6f
Merge branch 'feature/abiotic_tools' into feature/wind_profiles
vgro Nov 27, 2023
599bd21
Merge branch 'feature/abiotic_tools' into feature/wind_profiles
vgro Nov 27, 2023
fef089f
bugfix documentation
vgro Nov 27, 2023
95e9f60
merged dummy data sets, fix dimensions attencoeff
vgro Nov 28, 2023
8b78874
Fixed a small bug in plant_resource testing.
TaranRallings Nov 28, 2023
49e159c
Merge pull request #343 from ImperialCollegeLondon/feature/animal_module
TaranRallings Nov 28, 2023
15f8648
wind tests revisited and wind in model.update
vgro Nov 30, 2023
46bbab3
Merge branch 'develop' into feature/wind_profiles
vgro Nov 30, 2023
8e10949
required vars in abiotic model and tests updated
vgro Dec 4, 2023
2c1a01b
updated docstrings
vgro Dec 4, 2023
67cbfbd
updateds on time index and dimesnions
vgro Dec 4, 2023
62443ff
constants values in some tests to make it clearer
vgro Dec 4, 2023
2593adb
Merge branch 'develop' into feature/new_abiotic_model
vgro Dec 5, 2023
1c289f8
Merge branch 'feature/new_abiotic_model' of https://github.com/Imperi…
vgro Dec 5, 2023
a1c4506
Merge branch 'feature/new_abiotic_model' into feature/wind_profiles
vgro Dec 5, 2023
f736c7d
Jacob's suggestions implemented
vgro Dec 5, 2023
02a7068
flake8 fix
vgro Dec 5, 2023
bd9f8d7
use of constants in AbioticModel fixed
vgro Dec 5, 2023
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
24 changes: 24 additions & 0 deletions docs/source/api/abiotic/wind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
jupytext:
cell_metadata_filter: -all
formats: md:myst
main_language: python
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.13.8
kernelspec:
display_name: vr_python3
language: python
name: vr_python3
---

#  API for the {mod}`~virtual_rainforest.models.abiotic.wind` module

```{eval-rst}
.. automodule:: virtual_rainforest.models.abiotic.wind
:autosummary:
:members:
:special-members: __init__
```
1 change: 1 addition & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ team.
Abiotic Mechanistic Model <api/abiotic/abiotic_model.md>
Abiotic Mechanistic Constants <api/abiotic/abiotic_constants.md>
Abiotic Mechanistic Tools <api/abiotic/abiotic_tools.md>
Abiotic Mechanistic Wind <api/abiotic/wind.md>
Hydrology Overview <api/hydrology.md>
Hydrology Model <api/hydrology/hydrology_model.md>
Hydrology Above-ground <api/hydrology/above_ground.md>
Expand Down
10 changes: 10 additions & 0 deletions docs/source/refs.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

@article{yasuda_turbulent_1988,
title = {Turbulent diffusivity and diurnal variations in the atmospheric boundary layer.},
volume = {43},
doi = {https://doi.org/10.1007/BF00128403},
journal = {Boundary-layer meteorology},
author = {Yasuda, N.},
year = {1988},
pages = {209--221},
}

@article{henderson-sellers_new_1984,
title = {A new formula for latent heat of vaporization of water as a function of temperature},
volume = {110},
Expand Down
18 changes: 18 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ def dummy_climate_data(layer_roles_fixture):
np.full((3, 3), 30),
dims=["cell_id", "time_index"],
)
data["wind_speed_ref"] = DataArray(
[[0, 5, 10], [0, 5, 10], [0, 5, 10]], dims=["time_index", "cell_id"]
)
data["mean_annual_temperature"] = DataArray(
np.full((3), 20),
dims=["cell_id"],
Expand All @@ -339,6 +342,18 @@ def dummy_climate_data(layer_roles_fixture):
np.full((3, 3), 400),
dims=["cell_id", "time_index"],
)
pressure = np.repeat(a=[96.0, np.nan], repeats=[13, 2])
data["atmospheric_pressure"] = DataArray(
np.broadcast_to(pressure, (3, 15)).T,
dims=["layers", "cell_id"],
coords={
"layers": np.arange(15),
"layer_roles": ("layers", layer_roles_fixture),
"cell_id": data.grid.cell_id,
},
name="atmospheric_pressure",
)

evapotranspiration = np.repeat(a=[np.nan, 20.0, np.nan], repeats=[1, 3, 11])
data["evapotranspiration"] = DataArray(
np.broadcast_to(evapotranspiration, (3, 15)).T,
Expand Down Expand Up @@ -472,5 +487,8 @@ def dummy_climate_data(layer_roles_fixture):
np.full((2, 3), 450),
dims=("groundwater_layers", "cell_id"),
)
data["canopy_height"] = DataArray([32, 32, 32], dims=["cell_id"])
data["sensible_heat_flux_topofcanopy"] = DataArray([100, 50, 10], dims=["cell_id"])
data["friction_velocity"] = DataArray([12, 5, 2], dims=["cell_id"])

return data
Loading