[ncl-talk] relhum documentation

Alan Brammer abrammer at albany.edu
Thu Feb 5 09:23:40 MST 2015


Can the documentation for the relhum() function be more explicit that it is
calculating with respect to ice below -20C and a mix phase between 0 and
-20C.   ( I checked the values in the lookup table against a textbook. )

Also that the other moisture functions mixhum... dewtemp... are not using
the same tables/formula.  Even relhum_ttd() isn't.  Therefore values from
relhum are not entirely compatible with the other functions.  Given that
many of those functions require rh as an input I imagine a lot of people
are first using relhum to then use a follow up function.   This could lead
to unexpected results given the lack of details in the documentation at the
moment.

To clarify this isn't an issue above 0C only once below ~-10C do the
differences start to become noticeable.

Thanks,
Alan.

Some code below to exemplify how using the functions back to back can add
moisture to a system.

tempc = -31.3
q_gkg = 0.6
hpa = 250
dewp_c= -37.7   ; calculated from
http://www.rotronic.com/humidity_measurement-feuchtemessung-mesure_de_l_humidite/humidity-calculator-feuchterechner-mr

tempk = tempc+273.15
q_kgkg = q_gkg/1000.
pa = hpa * 100.
dewp_k = dewp_c + 273.15

w_gkg = q_gkg / (1 - q_gkg)
w_kgkg = q_kgkg / (1 - q_kgkg)

print(" Differences between Relative Humidity with respect to ice and water
" )

print(" Starting Conditions")
print("   Air Temperature   : "+ tempc+" C"   )
print("   Specific Humidity : "+ q_gkg+" g/kg")
print("   Pressure Level    : "+  hpa +" hPa" )

print("  ")
print(" Using relhum() function; which calculates wrt ice below -20C")
r_hum = relhum( tempk, w_kgkg, pa)   ;;; wrt ice RH = ~73%
print("   Relative Humidity  : "+ sprintf("%2.1f",r_hum) +" % ")

print("  ")
print(" Using that RH what is our specific humidity and dewpoint? ")
q_gkg_ptrh = mixhum_ptrh(hpa, tempk, r_hum, -2)   ;;  answer is now 0.8g/kg
not 0.6g/kg
dew_k = dewtemp_trh( tempk, r_hum)
dew_c = dew_k - 273.15
print("   Specific Humidity  : "+sprintf("%2.1f", q_gkg_ptrh )+" g/kg   --
0.2g/kg higher than we started with!!")
print("   Dew Point Temp     : "+sprintf("%2.1f", dew_c )+" C")

print("  ")
print(" Using an online calculator a dew point of -37.7 was calculated")
print(" So what is the dew point? Using this dew point how does our
Specific humidiy look")
q_gkg_ptd = mixhum_ptd( pa, dewp_k, -2)          ;; now wrt to water so
~0.6g/kg
print("   Specific Humidity  : "+sprintf("%2.1f", q_gkg_ptd )+" g/kg")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150205/6d6820c0/attachment.html 


More information about the ncl-talk mailing list