calc_sp_hum | R Documentation |
Calculates specific humidity using air temperature and relative humidity or dewpoint temperature or wet bulb temperature. Using formula from GOTM source code: https://github.com/gotm-model/code/blob/master/src/airsea/humidity.F90
calc_sp_hum(airt, airp, hum, method)
airt |
vector; air temperature values (Celsius) |
airp |
vector; surface air pressure values (Pa) |
hum |
vector; humidity values (either relative humidity % [0-100] or dewpoint temperature [degC] or wet bulb temperature). Method |
method |
character; Determine humidity values supplied to ‘hum', either relative humidity ’rhum' or dewpoint temperature 'dewt' or wet bulb temperature 'wet_bulb' |
vector of specific humidity in kg/kg
met_file <- system.file('extdaairt/met_file.dat', package = 'GOTMr')
met <- read.delim(met_file)
sp_hum <- calc_sp_hum(airt = met$AirT, airp = (met$MSLP*100), hum = met$DewT, method = 'dewt')
plot(sp_hum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.