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

Wrong initialization of temperature T00 in real.exe using ERA5 data.

MLandreau

Member
Hi,
I am currently making WRF realistic simulations using ERA5 data. I downloaded and compile the last version of WRF in November 2022. I've noticed surprisingly low temperatures in WRF results and while looking for the reason, I think that I found some bug in WRF initialization.

#-------- offset in potential temperature
I have plotted the real temperature (fig 1.b) and potential temperature (fig1.c) profiles at a given point for ERA5 data, wps metgrid data and wrfinput (output file of real.exe) data. One can see that there exist a constant offset of 10K in the potential temperature. To get the absolute potential temperature, I used the formula :
Theta = T00 + T
where T00 is the base temperature chosen in the namelist.input file (Here 290 K). Is that the correct formula ? In the wrfout file, the description of T is "perturbation potential temperature theta-t0". I assumed that "t0" is is fact "T00".

Assuming this formula is correct. I tried to understand why an offset of 10K existed in the potential temperature. I found that in the source code, a constant variable named "t0" exist and has a fixed value of 300 K. So I tried to change the base temperature "T00" of my namelist.input to 300K and it corrected the potential temperature profile. That bring me to the following conclusion :
- Either the base temperature needed to get the absolute Theta is "t0", and is fixed to 300 K, but then it is not printed in the output file.
- Or there exist an error in the real.exe source code where "t0" is used instead of "T00" to initialize the perturbation of potential temperature

I tried to look in the source code but it is quite difficult for me to find an error. I can't be sure but in file dyn_em/module_initialize_real.f90, in line 3611, one can read :
grid%t_init(i,k,j) = temp*(p00/grid%pb(i,k,j))**(r_d/cp) - t0
Should it be t00 instead of t0 ?

#------- unusual value of GHT vector in WPS
While looking for the former bug, I plotted the WPS profile and noticed something unusual in the GHT vector in metgrid output.
The first value of the vector GHT (GHT[0, :, :] in python) correspond to the terrain height while the following values seem to be height above ground level. This means that the first value can be greater than the second or the third if the terrain height is high in altitude. When plotting a profile PRES(GHT) the first point may seem a little bit incorrect (see fig02).
Is WRF decomposing the vector at the initialization or is it an wrong output ?

Thank you for your answers

best regards,

Mathieu
 

Attachments

  • fig01_comp_era5_wps_wrfinput.png
    fig01_comp_era5_wps_wrfinput.png
    57.7 KB · Views: 5
  • fig02.png
    fig02.png
    17.1 KB · Views: 6
Potential temperature should be theta = 300 + T, where T is perturbation potential temperature (in wrfinput).
 
Thank you for your answer.

If T is defined with that formula in wrfinput, then it moves my problem to WRF output (wrfout.dXX).
Is that the same formula : theta = 300 + T ?
- If yes, I wonder what is the role of T00 chosen in the namelist.input file.
- If no, I still have a difference of T00 - 300 (=10 K in my case) in the potential temperature in WRF output. (see fig03)

Mathieu

EDIT :
I have my answer, it is the same formula in wrfout files : theta = 300 + T
the "base state temperature" T00 chosen in namelist.input should not be used here.
Thank you again for your answer.
 

Attachments

  • fig03_compare_era5_wrfout.png
    fig03_compare_era5_wrfout.png
    27.3 KB · Views: 5
Last edited:
Top