# Calculate the total cloud fraction with limited variables

#### esmwg2020

##### New member
Dear all,

I want to calculate the total cloud fraction through my specifed WRF outputs.
The WRFversion is V4.2, and it is a longtime running for 30 years. The variable CLDFRA is produced and outputed through a specifed stream as descriping in the "my_file_output_list.txt",(iofields_filename = “my_file_output_list.txt”):

+:h:19:SWDOWN,RAINNC,I_RAINNC,RAINC,I_RAINC,U10,V10,Q2,T2,QVAPOR,QRAIN,QICE,QSNOW,QGRAUP,W,T,P,PB,PH,PHB,HGT,PSFC,CLDFRA

So I want to know if I could use the NCL function wrf_user_getvar(*,"cfrac",-1) to get low,mid,high levels cloud fraction, and then averaged these 3 variables to get the total cloud fraction ?
If not, would you please tell me how can I calculate the total cloud fraction by using the limited variables as shown above ?

Thanks a lot!
Kavin.

Kavin,
I wonder whether you would like to try UPP, the post process package that can output total cloud fraction.
Another option is that, you can find the maximum cldfra for each column, and this maximum cldfra is treated as cldfra in that column. This is a relatively simple option, yet many people use this method. It is to a certain degree reasonable.
The function "wrf_user_getvar" doesn't really recalculate cldfra based on hydrometers like QC, QI, QS etc. It determines low, middle and high clouds based on CLDFRA in wrfout file.

Kavin,
I wonder whether you would like to try UPP, the post process package that can output total cloud fraction.
Another option is that, you can find the maximum cldfra for each column, and this maximum cldfra is treated as cldfra in that column. This is a relatively simple option, yet many people use this method. It is to a certain degree reasonable.
The function "wrf_user_getvar" doesn't really recalculate cldfra based on hydrometers like QC, QI, QS etc. It determines low, middle and high clouds based on CLDFRA in wrfout file.
By the way, as for the NCL fuction "wrf_user_getvar(*,"cfrac",-1) ", I found it also need the rh(Relative Humidity [%]) before it determines low, middle and high clouds in the script of "WRFUserARW.ncl" [Line1603: rh = wrf_user_getvar(file_handle,"rh",time)], which means that I can not apply this fuction any more because my specifed WRF outputs do not contain the variable rh, right?

NCL can derive RH from wrfout. Thereby you don't need RH in your wrfoput files.

NCL can derive RH from wrfout. Thereby you don't need RH in your wrfoput files.
But the question is my wrfoutput files as the NCl function inputs, it did not contain the variable RH ....

Please take a look at the website :
It shows that NCL can derive RH based on variables in wrfout. When NCL tries to derive CLDFRA, it will derive RH first, and uses RH in CLDFRA calculation.
Does this make sense for you?

Please take a look at the website :
It shows that NCL can derive RH based on variables in wrfout. When NCL tries to derive CLDFRA, it will derive RH first, and uses RH in CLDFRA calculation.
Does this make sense for you?
Thank you so much for your detailed and patient replies, it is really helpful.