GIS4WRF / gis4wrf

QGIS toolkit 🧰 for pre- and post-processing 🔨, visualizing 🔍, and running simulations 💻 in the Weather Research and Forecasting (WRF) model 🌀
https://gis4wrf.github.io
MIT License
159 stars 36 forks source link

WRF run with fdda #164

Closed Ydurs closed 3 years ago

Ydurs commented 4 years ago

Hello,

Yesterday, I tried to run WRF with nudging (upper air) on QGIS and got the following problem. As soon as I push the wrf.exe button, the program removes the required wrfdda-files for the nudging process in the run_wrf directory. Due to this, the WRF stopped because of the missing file. Same behaviour with WRF.4.1.3 out of QGIS.

WPS runs normal, real.exe also.

I tried the same namelist settings on an external WRF3.9 and it works.

System Information (please complete the following information):

It seems that is something within the python script.

I also got an info for another problem regarding the namelist: in file namelist (nml...) in readers, the key-word for open_xs is written with a blank. A minor problem.

Best regards Sebastian

dmey commented 4 years ago

I never used nudging myself -- Where do the files you are mentioning come from? Remember that the downloaded binaries use WRF-CMake so it may be that that feature is not supported (https://github.com/WRF-CMake/wrf#currently-unsupported-features). If you think that the issue is with the pre-built binaries you can this -- see WRF installation directory https://gis4wrf.github.io/configuration/#integration-with-wpswrf. With regards to Python, I do not know what the error is, please attach the full log.

Ydurs commented 4 years ago

The wrfdda_d files are generated by real.exe. This part works fine. It seems that, in the beginning of the wrf.exe start, the directory run_wrf in the directory projects is refilled by python which causes a delete on the wrfdda files.

I got no failure from python, but from WRF. The WRF (using WRFV4.0) reports the following error:

-------------------------------
 /root/src/WRF/share/mediation_integrate.F        1943 DATASET=HISTORY
 /root/src/WRF/share/mediation_integrate.F        1944  grid%id            1  grid%oid            1
Timing for Writing wrfout_d01_2019-08-03_18_00_00 for domain        1:    0.63974 elapsed seconds
d01 2019-08-03_18:00:00  Error trying to read metadata
d01 2019-08-03_18:00:00 File name that is causing troubles = wrfout_d01_2019-08-03_18_00_00
d01 2019-08-03_18:00:00 wrfout_d01_2019-08-03_18_00_00
d01 2019-08-03_18:00:00  Error trying to read metadata
d01 2019-08-03_18:00:00  You can try 1) ensure that the input file was created with WRF v4 pre-processors, or
d01 2019-08-03_18:00:00  2) use force_use_old_data=T in the time_control record of the namelist.input file
-------------- FATAL CALLED ---------------
 ---- ERROR: The input file appears to be from a pre-v4 version of WRF initialization routines
-------------------------------------------
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
---------------------------------------------
---------------------------------------------

I also tried the same with another WRF Version WRF-4.1.3 and got the same situation, but a clearly error-message:

D01 3-D analysis nudging for wind is applied and Guv=   0.3000E-03
D01 3-D analysis nudging for temperature is applied and Gt=   0.3000E-03
D01 3-D analysis nudging for water vapor mixing ratio is applied and Gq=   0.3000E-03
D01 3-D analysis nudging for temperature is turned off within the PBL.
D01 3-D analysis nudging for water vapor mixing ratio is turned off within the PBL.
 mediation_integrate.G        1944 DATASET=HISTORY
 mediation_integrate.G        1945  grid%id            1  grid%oid            1
Timing for Writing wrfout_d01_2019-08-03_18_00_00 for domain        1:    0.76415 elapsed seconds
-------------- FATAL CALLED ---------------
FATAL CALLED FROM FILE:  <stdin>  LINE:     314
Possibly missing file for = auxinput10
-------------------------------------------
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

Maybe this helps to figure out the problem. TKS for help.

letmaik commented 4 years ago

It's a gis4wrf issue which has to be fixed. Thanks for reporting this. Could you share the relevant parts of the namelist for reproduction?

dmey commented 4 years ago

I think you are right we remove everything except some file.

https://github.com/GIS4WRF/gis4wrf/blob/06971564cfe0b1c306760fd913ec1dcb62e59db5/gis4wrf/core/project.py#L474

I won't have time to fix this until next week. One you can try for now is to is to add that file to the exclude list as shown above.

Ydurs commented 4 years ago

I think I will find that part in the script. For reproduction add, as example, in namelist.input

&fdda grid_fdda = 1, 1 gfdda_inname = 'wrffdda_d' gfdda_interval_m = 360, 360 gfdda_end_h = 12, 12 fgdt = 0, 0 if_no_pbl_nudging_uv = 0, 0 if_no_pbl_nudging_t = 1, 1 if_no_pbl_nudging_q = 1, 1 if_zfac_uv = 0, 0 k_zfac_uv = 10, 10 if_zfac_t = 0, 0 k_zfac_t = 10, 10 if_zfac_q = 0, 0 k_zfac_q = 10, 10 guv = 0.0003, 0.0003 gt = 0.0003, 0.0003 gq = 0.0003, 0.0003 if_ramping = 1 dtramp_min = 60.0 io_form_gfdda = 2 /

This will perform nudging for upper air. It is also possible to run this for surface, but I did not try it.