Skip to content

Commit

Permalink
add aerodynamic_conductance
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Sep 24, 2024
1 parent a6a2b0e commit ed30998
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.16.0"

[[deps.DataFrames]]
deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "04c738083f29f86e62c8afc341f0967d8717bdb8"
deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "fb61b4812c49343d7ef0b533ba982c46021938a6"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.6.1"
version = "1.7.0"

[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
Expand Down Expand Up @@ -118,11 +118,11 @@ version = "2.11.1+0"

[[deps.HydroTools]]
deps = ["DataFrames", "DataStructures", "Dates", "DocStringExtensions", "FieldMetadata", "Parameters", "Printf", "Random", "Reexport", "Statistics", "Test", "UnPack"]
git-tree-sha1 = "02016aaa78107c244abf6ec7c14c3c34653afcf3"
git-tree-sha1 = "57b061cd7fdbbe66d1830c1cc02c5a4b8b15ad00"
repo-rev = "master"
repo-url = "https://github.com/jl-pkgs/HydroTools.jl"
uuid = "179359cd-bac3-4aa1-bccd-287172463ab0"
version = "0.1.5"
version = "0.1.6"

[[deps.InlineStrings]]
git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d"
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
DataFrames = "1.6"
DataFrames = "1.6, 1.7"
DocStringExtensions = "0.9"
FieldMetadata = "0.3"
Parameters = "0.12"
Expand Down
20 changes: 20 additions & 0 deletions src/ET_helper.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
aerodynamic_conductance(U2, hc)
# Arguments
- `U2`: wind speed at 2m
- `hc`: canopy height
# Return
- `Ga`: aerodynamic conductance in m/s
"""
function aerodynamic_conductance(U2::T, hc::T; Zob=15.0) where {T<:Real}
kmar = 0.40 # von Karman's constant 0.40
d = 0.64 * hc
zom = 0.13 * hc
zoh = 0.10 * zom
uz = cal_Uz(U2, Zob) # convert from u2 to uz
@fastmath Ga = uz * kmar^2 / (log((Zob - d) / zom) * log((Zob - d) / zoh)) # m s-1
Ga
end

3 changes: 2 additions & 1 deletion src/PML.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PMLV2, T_adjust_Vm25, f_VPD_Zhang2019

using DocStringExtensions
using Parameters, DataFrames
import HydroTools: aerodynamic_conductance, cal_rho_a, ET0_eq,
import HydroTools: cal_rho_a, ET0_eq,
Cp, atm,
GOF, sceua

Expand All @@ -15,6 +15,7 @@ W2mm(Ra; λ) = Ra * 86400 / 1e6 / λ
include("main_Ipaper.jl")
include("Params.jl")
include("Utilize/Utilize.jl")
include("ET_helper.jl")
# include("PET_equilibrium.jl")
include("Ei_EvapIntercepted.jl")
# include("Ec_CanopyTrans.jl")
Expand Down

0 comments on commit ed30998

Please sign in to comment.