Precipitation categorization from model output data

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
Post Reply
ZHB
Posts: 25
Joined: Wed May 30, 2012 10:49 am

Precipitation categorization from model output data

Post by ZHB » Fri Oct 30, 2015 4:10 pm

Hello,

I'm developing a small weather website and I need to display weather icons from wrf-ems output.

So, how would be the best solution to categorize precipitation (rain, sleet, snow, ...) with wrf-ems output data ? Is there an approximate formula for doing that ? Should I use wrf-ems precipitation type field or do you know a best way ?

Thank you for your answers,
Vince

Canuck64
Posts: 33
Joined: Tue Sep 04, 2012 10:41 pm
Contact:

Re: Precipitation categorization from model output data

Post by Canuck64 » Thu Nov 05, 2015 5:45 pm

Hello Vince,

This is what I added to my model.gs.all file to create precipitation type images.

--------------------------------------------------------------------------------
##########Precipitation Type##########

say 'starting hourly precipitation type production'
'set datawarn off'
'set grads off'

'set gxout shaded'
'set rgb 16 0 139 0'
'set clevs 1'
'set ccols 16 16'
'd maskout(crainsfc(t='dis_t'),crainsfc(t='dis_t')-0.5)'

'set gxout shaded'
'set rgb 17 30 144 255'
'set clevs 1'
'set ccols 17 17'
'd maskout(csnowsfc(t='dis_t'),csnowsfc(t='dis_t')-0.5)'

'set rgb 18 205 0 0'
'set clevs 1'
'set ccols 18 18'
'd maskout (cfrzrsfc(t='dis_t'),cfrzrsfc(t='dis_t')-0.5)'

'set rgb 19 139 0 139'
'set clevs 1'
'set ccols 254 19'
'd maskout (cicepsfc(t='dis_t'),cicepsfc(t='dis_t')-0.5)'

#Plot cities - if desired:
if(CITY = 1)
'run city_plot.gs'
endif

#Local WFO PSR Addition for La Paz County, AZ
if(COUNTY = 1)
if (LAPAZ = 1)
'run lapaz.gs'
endif
endif

#Local WFO PSR Addition for La Paz County, AZ
if (count = 2)
if (LAPAZ = 1)
'run lapaz.gs'
endif

if (CITY = 2)
'run city_plot.gs'
endif
endif

#Title
'set string 255 l 5'
'draw string 0.1 0.1 Cycle: 'init_vtime''
'draw title \\Hourly Precip Type valid 'fcstday' 'fcst_vtime''

#Bottom title
'set string 255 bc 4'
'set strsiz 0.15 0.15'
'draw string 5 0.3 Green=Rain Red=ZR Magenta=IP Blue=Snow'
if (DOMAINNAME = 1)
'printim 'domain'_'domname'_preciptype'fcst_hr'_'scale'.png x825 y650'
else
'printim 'domain'_preciptype'fcst_hr'_'scale'.png x825 y650'
endif

'clear'
'set clopts -1'
-----------------------------------------------------------------------------------------------

You can check this webpage http://www.goldenhorseshoeweather.com/d ... _loop.html from my webpage to see how it looks.

Brian

EdolatamaFebrinal
Posts: 3
Joined: Sun Feb 07, 2016 1:31 am

Re: Precipitation categorization from model output data

Post by EdolatamaFebrinal » Sun Feb 07, 2016 8:09 am

Hi, I'm Edo From Indonesia
I have problem how to show precipitation as mm unit....
It's seems you know how to do that,
Canuck64 wrote:Hello Vince,

This is what I added to my model.gs.all file to create precipitation type images.

--------------------------------------------------------------------------------
##########Precipitation Type##########

say 'starting hourly precipitation type production'
'set datawarn off'
'set grads off'

'set gxout shaded'
'set rgb 16 0 139 0'
'set clevs 1'
'set ccols 16 16'
'd maskout(crainsfc(t='dis_t'),crainsfc(t='dis_t')-0.5)'

'set gxout shaded'
'set rgb 17 30 144 255'
'set clevs 1'
'set ccols 17 17'
'd maskout(csnowsfc(t='dis_t'),csnowsfc(t='dis_t')-0.5)'

'set rgb 18 205 0 0'
'set clevs 1'
'set ccols 18 18'
'd maskout (cfrzrsfc(t='dis_t'),cfrzrsfc(t='dis_t')-0.5)'

'set rgb 19 139 0 139'
'set clevs 1'
'set ccols 254 19'
'd maskout (cicepsfc(t='dis_t'),cicepsfc(t='dis_t')-0.5)'

#Plot cities - if desired:
if(CITY = 1)
'run city_plot.gs'
endif

#Local WFO PSR Addition for La Paz County, AZ
if(COUNTY = 1)
if (LAPAZ = 1)
'run lapaz.gs'
endif
endif

#Local WFO PSR Addition for La Paz County, AZ
if (count = 2)
if (LAPAZ = 1)
'run lapaz.gs'
endif

if (CITY = 2)
'run city_plot.gs'
endif
endif

#Title
'set string 255 l 5'
'draw string 0.1 0.1 Cycle: 'init_vtime''
'draw title \\Hourly Precip Type valid 'fcstday' 'fcst_vtime''

#Bottom title
'set string 255 bc 4'
'set strsiz 0.15 0.15'
'draw string 5 0.3 Green=Rain Red=ZR Magenta=IP Blue=Snow'
if (DOMAINNAME = 1)
'printim 'domain'_'domname'_preciptype'fcst_hr'_'scale'.png x825 y650'
else
'printim 'domain'_preciptype'fcst_hr'_'scale'.png x825 y650'
endif

'clear'
'set clopts -1'
-----------------------------------------------------------------------------------------------

You can check this webpage http://www.goldenhorseshoeweather.com/d ... _loop.html from my webpage to see how it looks.

Brian
But I can do it, grads shows error after I entering the script....
Please help me

meteoadriatic
Posts: 1567
Joined: Wed Aug 19, 2009 10:05 am

Re: Precipitation categorization from model output data

Post by meteoadriatic » Sun Feb 07, 2016 3:01 pm

EdolatamaFebrinal wrote:But I can do it, grads shows error after I entering the script....
Please help me
Sure we would like to help, but don't you think that actual error is important to help you?

EdolatamaFebrinal
Posts: 3
Joined: Sun Feb 07, 2016 1:31 am

Re: Precipitation categorization from model output data

Post by EdolatamaFebrinal » Sun Feb 07, 2016 3:38 pm

meteoadriatic wrote: Sure we would like to help, but don't you think that actual error is important to help you?
I use GFS grb2 datasets,
Its have the same problem that cannot shows rain/precipitation variable, its only have APCPsfc with kg/m^2 unit....
What should I do?

meteoadriatic
Posts: 1567
Joined: Wed Aug 19, 2009 10:05 am

Re: Precipitation categorization from model output data

Post by meteoadriatic » Sun Feb 07, 2016 5:33 pm

EdolatamaFebrinal wrote: What should I do?
Copy/paste here actual error that you get in GrADS.

EdolatamaFebrinal
Posts: 3
Joined: Sun Feb 07, 2016 1:31 am

Re: Precipitation categorization from model output data

Post by EdolatamaFebrinal » Sun Feb 07, 2016 11:36 pm

meteoadriatic wrote: Copy/paste here actual error that you get in GrADS.
Syntax Error: Invalid dimension expression
Dimension value missing or invalid
Variable name = crainsfc
Operation Error: Error from maskout function
Error ocurred at column 1
DISPLAY error: Invalid expression
Expression = maskout(crainsfc(t=dis_t),crainsfc(t=dis_t)-0.5)

meteoadriatic
Posts: 1567
Joined: Wed Aug 19, 2009 10:05 am

Re: Precipitation categorization from model output data

Post by meteoadriatic » Mon Feb 08, 2016 7:24 am

First make sure there is that variable (crainsfc) and is populated properly.

What do you get if you give this command in grads prompt:

Code: Select all

d crainsfc
?

Post Reply