Skip to content

Commit

Permalink
Merge pull request #72 from CliMA/ne/update_cp
Browse files Browse the repository at this point in the history
Update to ClimaParams v0.10
  • Loading branch information
nefrathenrici authored Feb 26, 2024
2 parents 2a5a04e + c921626 commit 266d3cd
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name = "Insolation"
uuid = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8"
authors = ["Climate Modeling Alliance"]
version = "0.9.1"
version = "0.9.2"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"

[weakdeps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"

[extensions]
CreateParametersExt = "CLIMAParameters"
CreateParametersExt = "ClimaParams"

[compat]
Artifacts = "<0.0.1, 1"
Dates = "<0.0.1, 1"
DelimitedFiles = "<0.0.1, 1"
Interpolations = "0.13, 0.14, 0.15"
julia = "1.7"
CLIMAParameters = "0.9"
ClimaParams = "0.10"
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
Insolation = "e98cc03f-d57e-4e3c-b70c-8d51efe9e0d8"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/InsolationExamples.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ diurnal_cycle(lat, lon, date, od, timezone, "Finland_June.png")
```@example
import Insolation
import Insolation.Parameters as IP
import CLIMAParameters as CP
import ClimaParams as CP
FT = Float64
param_set = IP.InsolationParameters(FT)
Expand All @@ -49,7 +49,7 @@ plot_day_lat_insolation(days, lats, F0, "YlOrRd", title, "insol_example1.png")
```@example
import Insolation
import Insolation.Parameters as IP
import CLIMAParameters as CP
import ClimaParams as CP
FT = Float64
param_set = IP.InsolationParameters(FT)
Expand Down Expand Up @@ -78,7 +78,7 @@ plot_day_lat_insolation(days, lats, F2-F0, "PRGn", title, "insol_example2b.png")
```@example
import Insolation
import Insolation.Parameters as IP
import CLIMAParameters as CP
import ClimaParams as CP
FT = Float64
param_set = IP.InsolationParameters(FT)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/find_equinox_perihelion_dates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Dates

using Insolation
import Insolation.Parameters as IP
import CLIMAParameters as CP
import ClimaParams as CP

FT = Float64
param_set = IP.InsolationParameters(FT)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/plot_diurnal_cycle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Formatting

using Insolation
import Insolation.Parameters as IP
import CLIMAParameters as CP
import ClimaParams as CP

FT = Float64
param_set = IP.InsolationParameters(FT)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/plot_insolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Dates
using Statistics
using Formatting

import CLIMAParameters as CP
import ClimaParams as CP
import Insolation.Parameters as IP

"""
Expand Down
2 changes: 1 addition & 1 deletion ext/CreateParametersExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module CreateParametersExt

import Insolation.Parameters.InsolationParameters

import CLIMAParameters as CP
import ClimaParams as CP

InsolationParameters(
::Type{FT},
Expand Down
4 changes: 2 additions & 2 deletions src/InsolationCalc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export insolation, solar_flux_and_cos_sza
insolation(θ::FT, d::FT, param_set::IP.AIP) where {FT <: Real}
Returns the insolation given the zenith angle and earth-sun distance
param_set is an AbstractParameterSet from CLIMAParameters.jl.
param_set is an AbstractParameterSet from ClimaParams.jl.
"""
function insolation::FT, d::FT, param_set::IP.AIP) where {FT <: Real}
S0::FT = IP.tot_solar_irrad(param_set)
Expand All @@ -31,7 +31,7 @@ end
Returns the top-of-atmosphere (TOA) solar flux, i.e.
the total solar irradiance (TSI) weighted by the earth-sun distance
and cos(solar zenith angle) for input to RRTMGP.jl
param_set is an AbstractParameterSet from CLIMAParameters.jl.
param_set is an AbstractParameterSet from ClimaParams.jl.
"""
function solar_flux_and_cos_sza(
date::DateTime,
Expand Down
4 changes: 2 additions & 2 deletions src/ZenithAngleCalc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ helper_instantaneous_zenith_angle(
Returns the effective zenith angle corresponding to the diurnally averaged insolation
and earth-sun distance at a particular latitude given the date.
`param_set` is an AbstractParameterSet from CLIMAParameters.jl.
`param_set` is an AbstractParameterSet from ClimaParams.jl.
`eot_correction` is an optional Boolean keyword argument that defaults to true
when set to true the equation of time correction is turned on.
This switch functionality is implemented for easy comparisons with reanalyses.
`milankovitch` is an optional Boolean keyword argument that defaults to true
when set to true the orbital parameters are calculated for the given DateTime,
when set to false the orbital parameters at the J2000 epoch from CLIMAParameters are used.
when set to false the orbital parameters at the J2000 epoch from ClimaParams are used.
"""
function daily_zenith_angle(
date::DateTime,
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
CLIMAParameters = "6eacf6c3-8458-43b9-ae03-caf5306d3d53"
ClimaParams = "5c42b081-d73a-476f-9059-fd94b934656c"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Roots = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using Optim
using Insolation
import Insolation.Parameters as IP
import Insolation.OrbitalData
import CLIMAParameters as CP
import ClimaParams as CP

FT = Float32
param_set = IP.InsolationParameters(FT)
Expand Down

2 comments on commit 266d3cd

@nefrathenrici
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/101747

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.2 -m "<description of version>" 266d3cd19c39dafbd886acb703ed472dc0c85c53
git push origin v0.9.2

Please sign in to comment.