Skip to content

Commit

Permalink
Merge #37
Browse files Browse the repository at this point in the history
37: make Dierckx Spline1D return type stable r=szy21 a=trontrytel



Co-authored-by: Anna Jaruga <[email protected]>
  • Loading branch information
bors[bot] and trontrytel authored Mar 24, 2023
2 parents e2df773 + ec47bc0 commit aee7404
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AtmosphericProfilesLibrary"
uuid = "86bc3604-9858-485a-bdbe-831ec50de11d"
authors = ["Climate Modeling Alliance"]
version = "0.1.1"
version = "0.1.2"

[deps]
Dierckx = "39dd38d3-220a-591b-8e3c-4c3a8c710a94"
Expand Down
3 changes: 2 additions & 1 deletion src/profiles/ARM_SGP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function ARM_SGP_tke_prescribed(::Type{FT}) where {FT}
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end

""" [Brown2002](@cite) """
Expand Down
3 changes: 2 additions & 1 deletion src/profiles/Bomex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function Bomex_tke_prescribed(::Type{FT}) where {FT}
0.1468, 0.1470, 0.1458, 0.1423, 0.1351, 0.1224, 0.1033, 0.0793, 0.0542, 0.0322,
0.0162, 0.0068, 0.0024, 0.0007, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end

# Geostrophic velocity profiles
Expand Down
3 changes: 2 additions & 1 deletion src/profiles/Dycoms_RF01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function Dycoms_RF01_tke_prescribed(::Type{FT}) where {FT}
775.0, 825.0, 875.0, 925.0, 975.0, 1025.0, 1075.0, 1125.0, 1175.0, 1225.0, 1275.0, 1325.0, 1375.0, 1425.0, 1475.0]
tke_in = FT[0.2726, 0.5479, 0.6597, 0.7079, 0.7285, 0.7343, 0.7319, 0.7252, 0.7166, 0.7064, 0.6887, 0.6317,
0.6362, 0.6266, 0.5832, 0.4633, 0.0504, 0.0001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end

3 changes: 2 additions & 1 deletion src/profiles/GABLS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ GABLS_tke(::Type{FT}) where {FT} =
function GABLS_tke_prescribed(::Type{FT}) where {FT}
z_in = FT[25.0, 75.0, 125.0, 175.0, 225.0, 275.0, 325.0, 375.0]
tke_in = FT[0.4662, 0.3873, 0.2777, 0.0277, 0.0003, 5.89e-8, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end

""" :( """
Expand Down
3 changes: 2 additions & 1 deletion src/profiles/LifeCycleTan2018.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ function LifeCycleTan2018_tke_prescribed(::Type{FT}) where {FT}
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end

# Large-scale cooling
Expand Down
3 changes: 2 additions & 1 deletion src/profiles/Nieuwstadt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ function Nieuwstadt_tke_prescribed(::Type{FT}) where {FT}
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end
3 changes: 2 additions & 1 deletion src/profiles/Rico.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@ function Rico_tke_prescribed(::Type{FT}) where {FT}
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end
3 changes: 2 additions & 1 deletion src/profiles/Soares.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ function Soares_tke_prescribed(::Type{FT}) where {FT}
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end
3 changes: 2 additions & 1 deletion src/profiles/TRMM_LBA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ function TRMM_LBA_tke_prescribed(::Type{FT}) where {FT}
1.7938 , 1.56451, 1.37531, 1.17515, 0.96797, 0.61262, 0.26423,
0.14929, 0.07465, 0.00635, 0. , 0. , 0. , 0. ,
0. , 0. , 0. , 0. , 0. ]
return Dierckx.Spline1D(z_in, tke_in; k = 1)
not_type_stable_spline = Dierckx.Spline1D(z_in, tke_in; k = 1)
return x -> FT(not_type_stable_spline(x))
end


Expand Down

2 comments on commit aee7404

@trontrytel
Copy link
Member

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 updated: JuliaRegistries/General/80260

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.1.2 -m "<description of version>" aee7404ebcb72af3d6fcf62ad3582d4421b9236a
git push origin v0.1.2

Please sign in to comment.