[Met_help] MET Question

John Halley Gotway johnhg at ucar.edu
Mon Mar 22 13:09:37 MDT 2010


Thanks for registering.  You know it's funny that you'd like to see a numeric value rather than NA.  In METv1.1, we actually used "-9999" to indicate NA values and then changed it to "NA" for version
2.0.  I'd say you have two options - you could either modify MET code to write out a different bad data value or you could post-process the MET output to change NA's to a numeric value.  Do whichever
you prefer.  Here's some details:

(1) To post-process NA's to a numeric value, the "sed" command would do the trick:
    sed 's/ NA / -9999 /g' old_file.stat > new_file.stat
That'll change all instances of ' NA ' in the file to ' -9999 ' and write the output to new_file.stat.

(2) To change the NA string to a numeric value in the MET code, edit this file:
Change the line...
from: static const char na_str[] = "NA";
to:   static const char na_str[] = "-9999";
And then recompile doing a "make clean" followed by a "make".  Hopefully that'd to the trick.

The downside to changing the code is that you'll need to redo that change for any future versions of MET that you use.

Just let us know if any more questions come up.


Derek.Stratman at noaa.gov wrote:
> First, allow me to introduce myself.  I'm a meteorology graduate student at Oklahoma 
> University, and my Master's research entails using MET in the verification of storm scale 
> models.  My research advisor is Mike Coniglio of NOAA/NSSL, and I'm also working with Tara 
> Jensen of NCAR/DTC and Steve Koch of GSD.  
> Recently, I've successfully ran the GridStat tool in MET, but I have a question about the 
> output from GridStat and the other MET tools, as well.  When a calculation fails due to 
> missing data, the MET tools output "N/A" in place of a numeric value.  Is it possible to output 
> a numeric value, such as "-999", instead?  
> I'm using NCL to read in the data and then plot it, but it's difficult to read in data with "N/A" 
> stuck in at random places.  NCL can skip those "N/A"s, but that also means it skips individual 
> columns, which offsets the data in each column. 
> Thanks so much for the future help!
> Derek Stratman  
> _______________________________________________
> Met_help mailing list
> Met_help at mailman.ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/met_help

More information about the Met_help mailing list