[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #KUH-661833]: Missing winds



Hi Walt-

> Sound good Don, I will be interested to hear what the McIDAS folks say.

I'm not optimistic that they will change the decoder, but it's worth a try.

> I am going to try your code here in a little bit might take some time to
> understand as I am not familiar with Java or Jython (but it looks
> straight forward). 

Jython is pretty straightforward. str() makes a string, int() an integer and 
the standard +,-,/,* work on values.  + with strings concatenates them. There 
are some links to Jython resources in the User's Guide:

http://www.unidata.ucar.edu/software/IDV/docs/userguide/tools/Jython.html

Also, the nightly build has been updated to the latest version of Jython 
(2.5.1) and it has a built in function for padding values with 0.  This will 
give you
DDFF:

=str(int(DIR/10)).zfill(2)+str(int(SPD)).zfill(2)

it doesn't work in the 2.8u1 release though.  There is some documentation in 
the Layout Model Editor section of the User's Guide on using Jython in station 
models:

http://www.unidata.ucar.edu/software/IDV/docs/userguide/tools/StationModelEditor.html

>Also, I think you meant to write greater than 0 and
> <361 for wind direction as 360 is due north. 

actually, the code is <= 360, so I am catching that.   My brain and fingers 
aren't connected sometimes. ;-)

> A wind barb will be fine
> for calm winds, but something to think about in the future is the
> possibility of putting a circle around the station dot as this is
> standard nomenclature used by meteorologists for calm winds.

Calm winds are plotted as circles by the IDV wind barb code (as you can see by 
the many circles in the Caribbean ;-)).  Are you okay with no wind barb if the 
speed or direction is missing?

Don

P.S. I'm a meteorologist by degree.  I just play a software engineer on TV. ;-)


> Unidata IDV Support wrote:
> > Hi Walt-
> >
> >
> >> Winds from due north are reported as 360. I believe that the METAR
> >> messages will report 000 if the wind is calm, but that is the only case.
> >> Also, for wind direction 999, ///, or NaN is used for missing values
> >> instead of 0 to avoid confusion with 0 and 360 being the same direction
> >> (nothing more confusing than letting meteorologists work with data
> >> formats right? :))
> >>
> >
> > I sent something off to the McIDAS folks.  We'll see what they say.  In the 
> > mean time, I've been playing around with what we can do on the display 
> > side.  I'm thinking that if the wind is greater than 0 and < 360 or we have 
> > 0 direction and 0 speed, then the barb will be plotted, otherwise not.
> >
> > I'm not sure if you've done this, but you can use Jython in the station 
> > models to print out the values.  Here's a couple of item's I've been 
> > playing with for value plots:
> >
> > =str(int((DIR/10)*100 + SPD))  (to plot DDFF)
> > =str(int(DIR/10))+"/"+str(int(SPD)) (to plot DD/FF)
> >
> > it needs some work to handle zero padding, but it might help you to figure 
> > out what the raw values are vs. what gets plotted.
> >
> >
> >> The reason that the wind is 10M/S with no direction is that we failed
> >> the wind direction earlier.
> >>
> >> Thanks for taking a look at it for me. We are just starting to use IDV
> >> here for QC, so I'm sure we will find a few more issues later. ;)
> >>
> >
> > OK, you know where to find us. ;-)
> >
> > Don
> >
> >
> >> ----- Original Message -----
> >> From: Unidata IDV Support <address@hidden>
> >> Date: Thursday, March 25, 2010 5:02 pm
> >> Subject: [IDV #KUH-661833]: Missing winds
> >>
> >>> Hi Walt-
> >>>
> >>>
> >>>> I noticed that on some stations (42002) the wind direction is
> >>>>
> >>> missing in
> >>>
> >>>> the raw message, but IDV is coding the wind direction as 0
> >>>>
> >>> degrees and
> >>>
> >>>> then plotting the wind barb as north. I was wondering if there
> >>>>
> >>> was a
> >>>
> >>>> decoding issue on the server or something with IDV itself.
> >>>>
> >>>> KWBC 251900
> >>>> BBXX
> >>>> 42002 46/// ///10
> >>>>
> >>> It's the decoder.  If the wind is missing, it gets set to 0.  Does
> >>> the wind ever get reported as 0 instead of 360?  If not, we could
> >>> catch that in the IDV.  But, then you'd never know the wind speed
> >>> was 10 m/s. ;-)
> >>>
> >>> Don
> >>>
> >>> Ticket Details
> >>> ===================
> >>> Ticket ID: KUH-661833
> >>> Department: Support IDV
> >>> Priority: Normal
> >>> Status: Open
> >>>
> >>>
> >>>
> >>
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: KUH-661833
> > Department: Support IDV
> > Priority: Normal
> > Status: Open
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: KUH-661833
Department: Support IDV
Priority: Normal
Status: Open