Skip to content

Commit

Permalink
rm heat_index in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jan 21, 2024
1 parent 9af5e47 commit 79b2837
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
7 changes: 7 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ignore:
- "src/back/*"
- "src/*/deprecated"
- "src/*/temp"
- "ext/*/test"
- "src/CMIP/heat_index.jl"
- "ext/RbaseTerraExt.jl"
1 change: 0 additions & 1 deletion src/CMIP/CMIP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ end

include("esgf.jl")
include("CMIPFiles_info.jl")
include("q2RH.jl")
include("heat_index.jl")
# include("unit_convert.jl")

Expand Down
21 changes: 19 additions & 2 deletions src/CMIP/heat_index.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# - Pa: kPa
# - q: g/g
function vapour_press(q, Pa=101.325)
epsilon = 0.6220016
q * Pa / (epsilon + (1 - epsilon) * q)
end

function cal_es(Tair)
0.6108 * exp((17.27 * Tair) / (Tair + 237.3))
end

# RH in the unit of `%`
function q2RH(q, Tair; Pa=101.325)
ea = vapour_press(q, Pa)
es = cal_es(Tair)
ea / es * 100
end


"""
Tem_F2C(T_degF::Real)
Tem_C2F(T_degC::Real)
Expand Down Expand Up @@ -97,8 +116,6 @@ function heat_index(f_tair::AbstractString, f_rh::AbstractString, outfile::Abstr
end




function heat_index_q(f_tair::AbstractString, f_q::AbstractString, outfile::AbstractString;
raw=true, offset=-273.15,
varname="HI", FT=Float32, compress=0,
Expand Down
18 changes: 0 additions & 18 deletions src/CMIP/q2RH.jl

This file was deleted.

0 comments on commit 79b2837

Please sign in to comment.