Skip to content

Commit

Permalink
up version
Browse files Browse the repository at this point in the history
  • Loading branch information
dmetivie committed Jun 17, 2024
1 parent 66723c4 commit eb1a129
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 150 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/Manifest.toml
.vscode/settings.json
docs/Manifest.toml
docs/assets/tuto_1/*
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StochasticWeatherGenerators"
uuid = "3eadb0b9-5057-49d2-9b8f-52a8c334ebf6"
authors = ["David Métivier <[email protected]>"]
version = "1.0.4-DEV"
version = "1.0.5-DEV"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
144 changes: 0 additions & 144 deletions docs/src/examples/plot_utilities.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/src/examples/tuto_paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ default(fontfamily="Computer Modern")
cur_colors = get_color_palette(:auto, 100);
my_palette(K) = palette(vcat(cur_colors[1], [cur_colors[c] for c in 3:4], cur_colors[2]), K)
file_for_plot_utilities = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/plot_utilities.jl")
file_for_plot_utilities = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/utilities_plot.jl")
include(file_for_plot_utilities)
````

Expand All @@ -76,7 +76,7 @@ Pkg.add("HTTP", "JSON3", "GeoMakie", "CairoMakie")
```

````@example tuto_paper
file_for_maps_with_geomakie = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/geo_makie_features.jl") # download file from a GitHub repo
file_for_maps_with_geomakie = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/utilities_geo_makie_features.jl") # download file from a GitHub repo
include(file_for_maps_with_geomakie)
````

Expand Down
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Documentation for StochasticWeatherGenerators.jl
```@docs
fit_mle_stations
fit_mle_RR
fit_TN
```

### Climate indexes
Expand Down
2 changes: 1 addition & 1 deletion examples/tuto_paper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ md"""
#!nb # ```
#!nb # with
#!nb # ```math
#!nb # P_c(t) = c_0 + \sum_{j=1}^\cDeg \left(c_{2j-1}\cos\left(\dfrac{2\pi}{T}j t\right) + c_{2j}\sin\left(\dfrac{2\pi}{T}j t\right).
#!nb # P_c(t) = c_0 + \sum_{j=1}^\cDeg \left(c_{2j-1}\cos\left(\dfrac{2\pi}{T}j t\right) + c_{2j}\sin\left(\dfrac{2\pi}{T}j t\right)\right).
#!nb # ```

md"""
Expand Down
4 changes: 2 additions & 2 deletions src/temperature/correlations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ end
Genererate a random variable conditionnaly to another one
Using Copula
```math
X_1 \mid X_2 = ϵ \sim \mathbb{N}\left(\mu_1 + \dfrac{\sigma_1}{\sigma_2}\rho (a - \mu_2), (1-\rho^2)\sigma_1^2 \right)
X_1 \mid X_2 = ϵ \sim \mathcal{N}\left(\mu_1 + \dfrac{\sigma_1}{\sigma_2}\rho (a - \mu_2), (1-\rho^2)\sigma_1^2 \right)
```
For two N(0,1)
```math
X_1 \mid X_2 = ϵ \sim \mathbb{N}\left(\rho a , (1-\rho^2) \right)
X_1 \mid X_2 = ϵ \sim \mathcal{N}\left(\rho a , (1-\rho^2) \right)
```
"""
function rand_cond(ϵ, z, θ_uni, θ_cor, n2t, T)
Expand Down
4 changes: 4 additions & 0 deletions src/temperature/fit_mle.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#TODO: rebase that (with a part inside SmoothPeriodicStatsModels maybe), allow other distribution
"""
fit_TN(df_full::DataFrame, 𝐃𝐞𝐠, T; kwargs...)
Fit the variable `TN` (daily minimum temperature). In fact it fits the difference `ΔT = TX - TN` to ensure a positive difference between `TX` and `TN`
"""
function fit_TN(df_full::DataFrame, 𝐃𝐞𝐠, T; kwargs...)
#TODO check that dropmissing (and potentially not contigous data) does not cause issue in MLE
df = dropmissing(df_full[:, [:DATE, :TX, :TN, :z]])
Expand Down

0 comments on commit eb1a129

Please sign in to comment.