[Met_help] Grid_Stat error using NARR to do verification of WRF
output
John Halley Gotway
johnhg at rap.ucar.edu
Tue Dec 2 10:37:35 MST 2008
David,
I downloaded some NARR data and checked the grid definition using the wgrib -V command. Here's how it's defined:
Lambert Conf: Lat1 1.000000 Lon1 -145.500000 Lov -107.000000
Latin1 50.000000 Latin2 50.000000 LatSP 0.000000 LonSP 0.000000
North Pole (349 x 277) Dx 32.463000 Dy 32.463000 scan 64 mode 0
min/max data -260.274 299.726 num bits 11 BDS_Ref -260.274 DecScale 0 BinScale -1
So I'm guessing that you ran a copygb command to regrid the NARR data from Lambert Conformal to a Lat/Lon grid. But the grid definition you used in copygb may have been off.
Unfortunately, the documentation for copygb isn't very good. But on this website, they list an example of how to specify a user-defined lat/lon grid:
http://www.cpc.ncep.noaa.gov/products/wesley/copygb.html
So I'd suggest working on the copygb command you used, and then try running Grid-Stat again.
Good luck,
John
John Halley Gotway wrote:
> David,
>
> Looking at your data, I'm thinking there may be a problem with the way the grid is defined. When I run the "wgrib -V" command on your data, I see the following grid definition:
>
> center 7 subcenter 0 process 89 Table 2 scan: WE:NS winds(N/S)
> latlon: lat 38.744000 to 54.915000 by 0.000000 nxny 4380
> long -101.407000 to -72.652000 by 0.393000, (73 x 60) scan 0 mode 128 bdsgrid 1
> min/max data 100076 102453 num bits 16 BDS_Ref 1.00076e+07 DecScale 2 BinScale 2
>
> The problem is this line: "lat 38.744000 to 54.915000 by 0.000000"
> I believe that is should be set to something like: "by .270".
>
> Did you regrid the NARR data using the "copygb" tool or did you use the NARR data directly? Somehow this grid got definition got out of whack.
>
> To answer your question about times... having multiple times in the same file is a bit problematic. In the config file, you're specifying the field as "11/P500" - or 500mb Temperature. Grid-Stat
> will start looking for a GRIB record that matches that description from the beginning of the file. When it finds one that matches, it'll use it. So if you have two records in a GRIB file that both
> match the description "11/P500", you'll never be able to access the second one because Grid-Stat will always just use the first one it finds.
>
> You should be able to run a "copygb" command though to strip out all of the records for a particular time. So if a file has 3 times in it, you could split it out into 3 separate files, each
> containing one time. I don't know the "copygb" options to do this off the top of my head, but if that's something you'd like to do, I'd be happy to look into it.
>
> Thanks,
> John
>
> David Andrade wrote:
>> Hi John,
>>
>> Thanks for your help. I am attaching a sample file with 3 timesteps, and an
>> associated narr file with 3 time steps and the
>> config file. Together, they are under 6 Megabytes. I also checked the
>> contents of the grib files with ncl_filedump and it appears that the name
>> of the time variables are different. One is called forecast hour and the
>> other is called initial_time. Could that be a problem?
>>
>> Again, thanks for your help,
>> David
>>
>>
>> On Mon, Dec 1, 2008 at 2:15 PM, John Halley Gotway <johnhg at rap.ucar.edu>wrote:
>>
>>> David,
>>>
>>> It'd probably be easiest for you to just send me a sample forecast file, a
>>> sample observation file, and the config file you're using.
>>>
>>> I'll run it through Grid-Stat in debug mode and figure out what's going on.
>>> I'm guessing that for whatever reason, no matched pairs were found. But
>>> I'll take a look.
>>>
>>> You can either email the files to me or post them on our anonymous ftp
>>> site:
>>> ftp ftp.rap.ucar.edu
>>> username = anonymous
>>> password = "your email address"
>>> cd incoming/irap/johnhg
>>> put "names of files"
>>>
>>> Thanks,
>>> John Halley-Gotway
>>> johnhg at ucar.edu
>>>
>>> David Andrade wrote:
>>>> Hi,
>>>>
>>>> I am running into some trouble when I try to run gridstat using NARR and
>>> wrf
>>>> output.
>>>> Essentially, I get the following error:
>>>>
>>>> Forecast File: wrfout_regrid.grb
>>>> Observation File: narr_regrid.grb
>>>> Configuration File: GridStatConfig_default
>>>> GSL_RNG_TYPE=mt19937
>>>> GSL_RNG_SEED=18446744072124576585
>>>>
>>>> ERROR: compute_cntinfo() -> the forecast and observation arrays must have
>>>> the same non-zero length!
>>>>
>>>> terminate called after throwing an instance of 'int'
>>>> Aborted
>>>>
>>>> where wrfout_regrid.grb is the WPS output regridded to the NARR grid
>>> using
>>>> copygb and narr_regrid.grb is a NARR grib file
>>>> that has been formed by concatenating several single-time NARR files
>>>> together. I think the error may have something to do
>>>> with the time labeling in each file. In the wrfoutput, subsequent times
>>> are
>>>> referred to as a forecast for +X hours from the initial time,
>>>> whereas, in the concatenated NARR data, each time has its own label. Am I
>>>> doing something wrong? Any help would be
>>>> greatly appreciated.
>>>>
>>>>
>>>> ------------------------------------------------------------------
>>>>
>>>> The following config_file was used:
>>>>
>>>> model = "WRF";
>>>> vx_grib_code[] = [ "11/P500" ];
>>>> thresholds[] = [ "gt0.0 ge5.0" ];
>>>> mask_grids[] = [ "FULL" ];
>>>> mask_polys[] = [ "MET_BASE/data/poly/EAST.poly" ];
>>>> ci_alpha[] = [ 0.05 ];
>>>> boot_interval = 1;
>>>> boot_rep_prop = 1.0;
>>>> n_boot_rep = 1000;
>>>> boot_rng = "mt19937";
>>>> boot_seed = "";
>>>> interp_method[] = [ "UW_MEAN" ];
>>>> interp_width[] = [ 1 ];
>>>> interp_threshold = 1.0;
>>>> nbr_width[] = [ 3, 5 ];
>>>> nbr_threshold = 1.0;
>>>> nbr_frac_threshold[] = [ "ge0.5" ];
>>>> output_flag[] = [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1 ];
>>>> rank_corr_flag = 1;
>>>> ncep_defaults = 1;
>>>> tmp_dir = "./tmp";
>>>> version = "V1.1";
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> 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