## How to calculate surface relative humidity from wrfot file?

Any problems/questions that might not fall into the other topics in this category.

### How to calculate surface relative humidity from wrfot file?

Hi,

Does anyone know the formula for calculating the surface RH from wrfout file? I have extracted 'PSFC', 'Q2' and 'T2' but unable to move forward.

I have found similar question in the forum but no one has the answer for it. Just a formula will be just fine.
wrf.guy

Posts: 10
Joined: Sat Nov 01, 2014 7:03 am

### Re: How to calculate surface relative humidity from wrfot fi

Hi,

You can use the Clausius-Clapeyron equation to calculate saturation vapour pressure (es). You can then calculate mixing ratio ws=0.622(sat vap./(psfc - sat vap.)) you can find these equations by googling.

Relative humidity is: (Q2/ws)*100

Another method is to also compute vapour pressure, e, and RH= (e/es)*100

Make sure you use the correct units. es is returned in hPa.

Liam
liam.till

Posts: 4
Joined: Sat Mar 26, 2016 2:21 pm

### Re: How to calculate surface relative humidity from wrfot fi

Thank you. I have checked your wrfplot package and it looks very good. Keep up the good work.
wrf.guy

Posts: 10
Joined: Sat Nov 01, 2014 7:03 am

### Re: How to calculate surface relative humidity from wrfot fi

I found in this website one way to calculate Humidity.

http://mailman.ucar.edu/pipermail/wrf-u ... 02546.html

I worked with python and the library netCDF4:

f = Dataset('wrfout_1', 'r')

pq0 = 379.90516
a2 = 17.2693882
a3 = 273.16
a4 = 35.86

t2 = (f.variables['T2'][ : ,latitud, longitud])

q2 = (f.variables['Q2'][ : ,latitud, longitud])
psfc = (f.variables['PSFC'][ : ,latitud, longitud])

f_rh2 = q2 * 100 / ( (pq0 / psfc) * np.exp(a2 * (t2 - a3) / (t2 - a4)) )
etorresm

Posts: 5
Joined: Wed Mar 07, 2018 4:47 pm