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

How does WRF calculate SWDOWN?

syyang

New member
I am calculating downward short wave flux using WRF.

I found a variable called SWDOWN among the output variables,
and I am curious whether this variable is instantaneous or averaged according to history_interval.

I would like to know whether the value of SWDOWN is the instantaneous value of 0:00, 0:10 and etc or the average over 10 minutes.

Or, please tell me where the code for writing swdown in the output file is located in the wrf source code.

can anyone please help me.
 
SWDOWN is an instantaneous variable in wrfout files. It is not averaged over the output interval.
Its calculation depends on the radiation scheme you activate. Please let me know what option you selected.
 
Thank you for your response.

My ra_sw_physics option is rrtmg (4).

I will also attach my namelist.input file.

According to your response, you mean that SWDOWN has nothing to do with the namelist.input's history_interval, right?
 

Attachments

  • namelist.input
    3.8 KB · Views: 2
Hi,

If you need an average value, I think you can use the "accumulated downwelling shortwave flux at bottom" : ACSWDNB
Note that I haven't already try.
I think that SWDOWN has nothing to do with history_interval

Mathieu
 
Mathieu is right that (1) SWDOWN has nothing to do with history_interval, and (2) you can obtain ACSWDNB, which is accumulated downward shortwave radiation at the bottom. The calculation is conducted in phys/module_radiation_driver.F, in which you can find the following piece of code (around line 3234 - 3245 in WRFV4.5):

Code:
       DO j=jts,jte

        DO i=its,ite

           ACSWUPT(I,J) = ACSWUPT(I,J) + SWUPT(I,J)*DTaccum

           ACSWUPTC(I,J) = ACSWUPTC(I,J) + SWUPTC(I,J)*DTaccum

           ACSWDNT(I,J) = ACSWDNT(I,J) + SWDNT(I,J)*DTaccum

           ACSWDNTC(I,J) = ACSWDNTC(I,J) + SWDNTC(I,J)*DTaccum

           ACSWUPB(I,J) = ACSWUPB(I,J) + SWUPB(I,J)*DTaccum

           ACSWUPBC(I,J) = ACSWUPBC(I,J) + SWUPBC(I,J)*DTaccum

           ACSWDNB(I,J) = ACSWDNB(I,J) + SWDNB(I,J)*DTaccum

           ACSWDNBC(I,J) = ACSWDNBC(I,J) + SWDNBC(I,J)*DTaccum

        ENDDO

        ENDDO

Hope this is helpful for you.
 
Mathieu is right that (1) SWDOWN has nothing to do with history_interval, and (2) you can obtain ACSWDNB, which is accumulated downward shortwave radiation at the bottom. The calculation is conducted in phys/module_radiation_driver.F, in which you can find the following piece of code (around line 3234 - 3245 in WRFV4.5):

Code:
       DO j=jts,jte

        DO i=its,ite

           ACSWUPT(I,J) = ACSWUPT(I,J) + SWUPT(I,J)*DTaccum

           ACSWUPTC(I,J) = ACSWUPTC(I,J) + SWUPTC(I,J)*DTaccum

           ACSWDNT(I,J) = ACSWDNT(I,J) + SWDNT(I,J)*DTaccum

           ACSWDNTC(I,J) = ACSWDNTC(I,J) + SWDNTC(I,J)*DTaccum

           ACSWUPB(I,J) = ACSWUPB(I,J) + SWUPB(I,J)*DTaccum

           ACSWUPBC(I,J) = ACSWUPBC(I,J) + SWUPBC(I,J)*DTaccum

           ACSWDNB(I,J) = ACSWDNB(I,J) + SWDNB(I,J)*DTaccum

           ACSWDNBC(I,J) = ACSWDNBC(I,J) + SWDNBC(I,J)*DTaccum

        ENDDO

        ENDDO

Hope this is helpful for you.
Thank you for answer.

Then I would like to get the average solar radiation per hour.
Can you please tell me how to calculate ACSWDNB as an hourly average?

The historical interval is 10 minutes, and time_step is 3 seconds.

+ Are its, ite, jts, and jte in phys/module_radiation_driver.F variables related to the "tiles" that split the model's domain?
 
This variable is like rain (rainc and rainnc), it is accumulated from the beginning of the model run. If you want hourly ACSWDNB, then you should set history_interval = 60, and the difference between hour N and the prior hour (N-1) is the hourly ACSWDNB.
 
Hello there,

I'm looking for some more information about solar irradiation accumulation - I hope doing well not opening another post.
Working with WRF 3.6, the User's Guide states that bucket_J only work for CAM and RRTMG, but I'm currently using RRTM (and I would rather not change as it works fine) ; hence I would like to know if there is an alternative to get (or compute) SW Accumulation at Bottom because for now, the best I can do is averaging time-step N-1 and N over 1 hour to get equivalent Wh/m2 at time-step N : I would be interested in a more accurate manner of getting the desired data.

Thanks for your help (and also the explanations above that helped).

Please let me know if I need to create a new dedicated post.
 
There are a few variables, e.g., ACSWUPB, ACSWDNB, are accumulated shortwave radiation flux at the bottom. However, these variables are also available only in RRTMG and CAM. You will have to modify codes to output similar variables for RRTM.
Please take a look at the code phys/module_radiation_driver.F, in which you can find the calculation of ACSWUPB, ACSWDNB, etc.
I suppose you can follow the simiar approach to get these variables for RRTM.
 
There are a few variables, e.g., ACSWUPB, ACSWDNB, are accumulated shortwave radiation flux at the bottom. However, these variables are also available only in RRTMG and CAM. You will have to modify codes to output similar variables for RRTM.
Please take a look at the code phys/module_radiation_driver.F, in which you can find the calculation of ACSWUPB, ACSWDNB, etc.
I suppose you can follow the simiar approach to get these variables for RRTM.
Thanks Ming. I was hopping there would be an easier solution, but I guess I'll have to choose between waht you proposed and change radiation scheme. I wonder how different are both RRTM and RRTMG schemes from one another (in term of results and compuatation time) ; I shall make some tests.
 
Thank you for your reply.
So, is it correct to do the following calculation to find the 1-hour average solar radiation using ACSWDNB?
(ACSWDNB at 01:00 - ACSWDNB at 00:00)/(60*60)

Is the unit "Wh/m2" correct?
This variable is like rain (rainc and rainnc), it is accumulated from the beginning of the model run. If you want hourly ACSWDNB, then you should set history_interval = 60, and the difference between hour N and the prior hour (N-1) is the hourly ACSWDNB.
 
@Arty If there is no special reason, I would suggest that you switch to RRTMG. This is because RRTMG is a more popular radiation scheme. It provides improved efficiency with minimal loss of accuracy compared to RRTM.
 
Top