anikfal / postwrf

Visualization and postprocessing of the WRF and ERA5 data
MIT License
54 stars 11 forks source link

Problem in domain plotting, based on Lambert projection #43

Closed prakriti3896 closed 2 months ago

prakriti3896 commented 6 months ago

I was trying to view/plot the domains using PostWRF but when I run ./postwrf.sh I get the following Error:

_PostWRF: Drawing the map of the model domain ...

Specify The Format Of The Images: 1, 2, or 3? 1) x11 2) pdf 3) png

? 2

Specify The Output File Name (Press Enter for the default name): domains warning:MapSetTrans: map limits invalid - using maximal area fatal:Subscript out of range, error in subscript #0 fatal:An error occurred reading xf fatal:["Execute.c":8637]:Execute: Error occurred at or near line 3950 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4165 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4967 in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 183 in file modules/domain.ncl

PostWRF: Drawing the map of domain finished._

anikfal commented 6 months ago

PostWRF can plot the model domains if they are based on the Lambert projection. In the new versions, this problem will be handled to support other projections as well.

XinzhuFang commented 3 months ago

Hello, I am experiencing the same error you are reporting and would like to ask how you solved this last problem when drawing “Mercator projections”?

XinzhuFang commented 3 months ago

I was trying to view/plot the domains using PostWRF but when I run ./postwrf.sh I get the following Error:

_PostWRF: Drawing the map of the model domain ...

Specify The Format Of The Images: 1, 2, or 3?

  1. x11
  2. pdf
  3. png

    ? 2

Specify The Output File Name (Press Enter for the default name): domains warning:MapSetTrans: map limits invalid - using maximal area fatal:Subscript out of range, error in subscript #0 fatal:An error occurred reading xf fatal:["Execute.c":8637]:Execute: Error occurred at or near line 3950 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4165 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 4967 in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 183 in file modules/domain.ncl

PostWRF: Drawing the map of domain finished._

  • The pdf generated does not have any plot, it does show some plotting which is wrong.
  • If I select the x11 option the display opens but shows no plot and after that it closes on its own.
  • I am able to plot domains using $ ncl util/plotgrids_new.ncl (NCL v6.6.2 is installed using miniconda3)

I am attaching my wps namelist, the plot generated by PostWRF and the plot generated by plotgrid.ncl . output_from_ncplot.pdf output_from_PostWRF.pdf namelist.wps.txt

anikfal commented 3 months ago

Hi @XinzhuFang I am working on this issue. It will be probably solved next week.

VladimirSobral commented 3 months ago

Hi,

The question about lambert and mercator projections is related only for plotting model domains and contour plot? I mean, when I extract data using DATA EXTRACTION (ON SURFACE), the wrfout file need to be in lambert projection? I'm sending a image to clarify my question.

Congrats for postwrf tool! contour-level-wrfout_d04

anikfal commented 3 months ago

Hi @VladimirSobral All wrfout files with any projection must be plotted by PostWRF without problems. However, the image you inserted looks weird. So for more investigation on your case, you can apply the command below on your wrfout_file and send out.nc to me: ncks -d Time,1,2 wrfout_file out.nc

VladimirSobral commented 3 months ago

Hi anikfal

Thank you for your reply. Attached the file out.nc. Just to inform you about some information of my area: City's name: João Pessoa - Brazil Projection of shapefile: WGS 84 25s

out.zip

anikfal commented 3 months ago

@VladimirSobral It seems you have stored every time slot of the WRF output in a single file. So there is no Time variable in the file. This issue makes some problem for plotting the data.

anikfal commented 2 months ago

Try to plot the domains again. I updated it and it should be okay now. Before trying, git pull postwrf, or clone it again.