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
166 stars 36 forks source link

Grib2 support for output files #129

Closed Ian0Luhm closed 5 years ago

Ian0Luhm commented 5 years ago

Good day! Thank you so much for the wonderful tool - I really enjoy using the program, and testing the WRF to its fullest capacity in a variety of ways! Scouring your website, I wasn't able to find anything more on the grib2 support, but I do see it is a part of the namelist.input. Is there support for GRIB2 data as an output Using the downloaded nompi-wrf (my own build of WRF doesn't work on gis4wrf, but WPS does!) I can create the model, and migrate the file from hdf to .netcdf with NCL, or easily with netcdf's terminal command: nccopy wrfout. wrfout.nc. I haven't been able to find a way to convert the file from Netcdf to GRIB2. I tried CDO for further conversion from netcdf (i tried netcdf4, and 4-classic) to GRIB2, but it doesn't appear to work. Terminal command: cdo -b F64 -f nc4(grb2) copy wrfout.nc outputfile.nc(grb). The reason why GRIB2, is because I can't seem to get the gis4wrf's converted netcdf file to open in either OpenGrADS 2.0.1, or GraDS using sdfopen or xdfopen (GrADS terminal commands). Is there an easier way I am missing from within the gis4wrf application? Thank you for taking the time to read, and thank you again for the wonderful utility.

dmey commented 5 years ago

Are you trying to output GRIB instead of netCDF? If so, you would have to choose the appropriate option in the namelist.wps and namelist.input files. GIS4WRF does not produce files -- it relies on WRF-CMake. If you have already compiled a version of WRF on your system, have you been able to produce GRIB output files?

Ian0Luhm commented 5 years ago

I had got it to previously work and show an output when I had built the WRF (with a little luck) on Ubuntu 16 LTS with no gis4wrf support The build # was 33 I believe. I was forced to update to 18.04. In my configuration, I have changed the Config.pl line to true $I_really_want_to_output_grib2_from_WRF = "TRUE". The WPS build is # 1. Jasper is on my system and in my .bashrc file, along with HDF, all netCDF's. It may be worth noting that I built the WRF with export netcdf classic =1, and CDO sinfo on the wrfout.nc files shows the output file is written in netCDF2. When I change IO_FORM_HISTORY output to 10 (grib2), all pre-processes + runWRF will run just fine using the nonmpi-CMAKE WRF, but i don't see an output file afterwards. Using the same namelist.input and only switching to my compiled WRF build (# 33), I received a seg fault. The same testing process in reverse produces the same Seg fault when i am building with my own WRF. LIB_EXTERNAL in my configure.wrf file shows -L$(WRF_SRC_ROOT_DIR)/external/io_grib2 -lio_grib2 as part of the build. I run geo,ungrib,metgrib and real.exe successfully, as well as add these to the namelist.input: io_form_history = 10 ....grib2 background_proc_id = 255 forecast_proc_id = 255 production_status = 255 compression = 40 When I runWRF I get this error.

*************************************
Configuring physics suite 'conus'

         mp_physics:      6*
         cu_physics:      2*
      ra_lw_physics:      4
      ra_sw_physics:      4
     bl_pbl_physics:      2*
  sf_sfclay_physics:      2*
 sf_surface_physics:      2*

(* = option overrides suite setting)
*************************************
WRF V4.0 MODEL
 *************************************
 Parent domain
 ids,ide,jds,jde            1          15           1          14
 ims,ime,jms,jme           -4          20          -4          19
 ips,ipe,jps,jpe            1          15           1          14
 *************************************
DYNAMICS OPTION: Eulerian Mass Coordinate
 alloc_space_field: domain            1 ,              22437904  bytes allocated
med_initialdata_input: calling input_input
 Input data is acceptable to use: wrfinput_d01
Timing for processing wrfinput file (stream 0) for domain        1:    0.01215 elapsed seconds
Max map factor in domain 1 =  1.43. Scale the dt in the model accordingly.
INPUT LandUse = "MODIFIED_IGBP_MODIS_NOAH"
 LANDUSE TYPE = "MODIFIED_IGBP_MODIS_NOAH" FOUND          33  CATEGORIES           2  SEASONS WATER CATEGORY =           17  SNOW CATEGORY =           15
INITIALIZE THREE Noah LSM RELATED TABLES
Skipping over LUTYPE = USGS
 LANDUSE TYPE = MODIFIED_IGBP_MODIS_NOAH FOUND          20  CATEGORIES
 INPUT SOIL TEXTURE CLASSIFICATION = STAS
 SOIL TEXTURE CLASSIFICATION = STAS FOUND          19  CATEGORIES

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fb6dc7e52da in ???
#1  0x7fb6dc7e4503 in ???
#2  0x7fb6dba13f1f in ???
#3  0x7fb6dba6c98d in ???
#4  0x563a83c86022 in ???
#5  0x563a825307ac in ???
#6  0x563a825304b7 in ???
#7  0x563a82535eb5 in ???
#8  0x563a82871464 in ???
#9  0x563a8246095b in ???
#10  0x563a823dcad0 in ???
#11  0x563a824b8576 in ???
#12  0x563a824b9665 in ???
#13  0x563a824ba961 in ???
#14  0x563a8179f701 in ???
#15  0x563a81734fa9 in ???
#16  0x563a817348f5 in ???
#17  0x7fb6db9f6b96 in ???
#18  0x563a81734939 in ???
#19  0xffffffffffffffff in ???
Exit code: -11
Runtime: 0 s
********************

Thanks for reading! Ian

dmey commented 5 years ago

The issue you are reporting seems to be related to the configuration, I'd suggest having a look at the WRF user manual or reporting the issue directly to the WRF & MPAS-A Support Forum. I will close the issue now as it is not related to GIS4WRF. If you encounter an issue with GIS4WRF in the future, please feel free to open a new issue.

Ian0Luhm commented 5 years ago

Thanks for answer, still puzzled myself. My model will make and produce a .NC file with no segfault fault using gis4wrf. I can manipulate the file in. Google earth or the software. So my build works and outputs the data properly with a .NC.Same issue also exists with a serial build.  Ian  Sent from Yahoo Mail on Android

On Fri, Mar 29, 2019 at 4:43 PM, dmeynotifications@github.com wrote:
The issue you are reporting seems to be related to the configuration, I'd suggest having a look at the WRF user manual or reporting the issue directly to the WRF & MPAS-A Support Forum. I will close the issue now as it is not related to GIS4WRF. If you encounter an issue with GIS4WRF in the future, please feel free to open a new issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

theronmoustakes commented 1 year ago

Thanks for answer, still puzzled myself. My model will make and produce a .NC file with no segfault fault using gis4wrf. I can manipulate the file in. Google earth or the software. So my build works and outputs the data properly with a .NC.Same issue also exists with a serial build. Ian Sent from Yahoo Mail on Android On Fri, Mar 29, 2019 at 4:43 PM, dmeynotifications@github.com wrote: The issue you are reporting seems to be related to the configuration, I'd suggest having a look at the WRF user manual or reporting the issue directly to the WRF & MPAS-A Support Forum. I will close the issue now as it is not related to GIS4WRF. If you encounter an issue with GIS4WRF in the future, please feel free to open a new issue. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Did you ever figure this out? I'm sitll getting the Seg fault error as well.