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

Vertical interpolation in View menu #205

Closed xinqu2016 closed 3 years ago

xinqu2016 commented 3 years ago

Describe the bug After loading a raw wrfout file, I'd like to view geopotential height on 500 hPa. I know I need to interpolate the variable onto 500 hPa. I checked the Interpolate Vertical Level box, picked the hydrostatic pressure as the vertical variable and enter 500 in the Desired Level box. Then I click the Interpolate button. Got the following error:

plugins/gis4wrf/core/transforms/wrf_netcdf_to_gdal.py", line 162, in convert_wrf_nc_var_to_gdal_dataset assert len(dims) == len(shape), f'|{dims}| != |{shape}|' AssertionError: |('Time', 'south_north', 'west_east')| != |(399, 399)|

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

System Information (please complete the following information):

Additional context Add any other context about the problem here.

dmey commented 3 years ago

How many time steps does the wrfout contain?

letmaik commented 3 years ago

I assume a single time step. I put in a PR that fixes this case, but in the meantime I suggest to simply run WRF for at least two timesteps to avoid the issue.

xinqu2016 commented 3 years ago

It's one timestep indeed.

xinqu2016

xinqu2016 commented 3 years ago

To confirm, the file needs to contain at two timesteps. The dimension of Time needs to be 2 or above.

xinqu2016