Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

CLDFRA is not calculated when icloud=0

HragN

New member
Hello,

Is there a simple edit I can make within the radiation driver to allow the calculation of CLDFRA when icloud=0? Currently when icloud=0, CLDFRA is set to zeros.

The current option we have is to create a dummy variable that takes on CLDFRA calculations within the radiation driver. We'd like to change it so that CLDFRA can be calculated regardless of what icloud is set to, but that might have unintended downstream affects if any variables use CLDFRA.

Additionally, is there any documentation on how CLDFRA is calculated, specifically the variables and the equation that goes into it.

Thank you very much,
Hrag
 
Hrag,

Please refer to the following papers for more information about cloud fraction calculation.

(1) A semiempirical cloudiness parameterization for use in climate models
KM Xu, DA Randall
Journal of the atmospheric sciences 53 (21), 3084-3102

(2) Condensation and Cloud Parameterization Studies with a Mesoscale Numerical Weather Prediction Model
DOI: https://doi.org/10.1175/1520-0493(1989)117<1641:CACPSW>2.0.CO;2

For your intention to handle CLDFRA , I guess you can always add your calculation to the radiation driver without any conditional control.
 
Hrag,

Please refer to the following papers for more information about cloud fraction calculation.

(1) A semiempirical cloudiness parameterization for use in climate models
KM Xu, DA Randall
Journal of the atmospheric sciences 53 (21), 3084-3102

(2) Condensation and Cloud Parameterization Studies with a Mesoscale Numerical Weather Prediction Model
DOI: https://doi.org/10.1175/1520-0493(1989)117<1641:CACPSW>2.0.CO;2

For your intention to handle CLDFRA , I guess you can always add your calculation to the radiation driver without any conditional control.

Thank you for your response Ming,

Within the radiation driver, there is a "Solar_step: IF" statement where CLDFRA is calculated. Within this statement, there are IF statements for ICLOUD where ICLOUD = 1, 2, and 3. If I would like CLDFRA to be calculated the same way as ICLOUD=1 when ICLOUD is set to 0, would it be acceptable to edit the radiation driver code from "IF ( ICLOUD == 1 ) THEN" to "IF ( ICLOUD == 0 .OR. ICLOUD == 1) THEN"?

I am currently using WRF V 4.3.3.

Hrag
 
Hrag,
That approach should work. Please try and let me know if there is any issue.
Hello Ming,

I wanted to update you with some good news!

After running two simulations, one without the edit on the radiation driver from above, and one with, the wrfout files that were produced with the edit show CLDFRA values that are non-zero, suggesting the edit is allowing CLDFRA to be populated when icloud=0.

To ensure no other variables were affected, I uploaded the files into python and checked if they were bitwise identical without the CLDFRA variable (see code below). This analysis resulted in a TRUE output, which means that the edit above did not have downstream affects onto any other variable output!

Therefore, for any users of WRF that are interested in analyzing cloud fraction between simulations where icloud=0 versus icloud!=0, the edit above allows CLDFRA to be populated for the icloud=0 simulation, allowing for analysis between cloud-radiative processes. Simply make the edit in my previous message above within the WRF/phys/module_radiation_driver.F, recompile the WRF folder after you run ./clean -a, and then you should be good to go!

Python:
# By Hrag Najarian, Jan 11, 2024
import xarray as xr

# Assign the path to the wrfout files
wrfout_file_edit = 'filename/with/the/rad_driver_edit'
wrfout_file_no_edit = 'filename/with/no_edit'

# Open the wrfout files
ds_wrfout_edit = xr.open_dataset(wrfout_file_edit)
ds_wrfout_no_edit = xr.open_dataset(wrfout_file_no_edit)

# Load the wrfout files
da_wrfout_edit = ds_wrfout_edit.compute()
da_wrfout_no_edit = ds_wrfout_no_edit.compute()

# Remove CLDFRA variable to check if every other variable is identical
da_wrfout_edit = T_edit.drop_vars('CLDFRA')
da_wrfout_no_edit = T.drop_vars('CLDFRA')

# If below is true, then they are bitwise identical
da_wrfout_edit.equals(da_wrfout_no_edit)
 
Top