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
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