[Met_help] grid_stat question

John Halley Gotway johnhg at rap.ucar.edu
Thu Apr 16 10:06:11 MDT 2009


Ming,

Thanks for sending those files over.  There are a few things I'd like to mention.

First, it appears that the files you sent are output from the METv1.1 version of pcp_combine.  We released METv2.0 last week, and if you're interested, I'd suggest upgrading to that.  However, please
note that the versions are not backward compatible - so you'll need to rerun your data through the METv2.0 version of pcp_combine.  And you'll need to use the version of the configuration files that
are distributed with METv2.0.

Second, I ran the NetCDF files you sent through the METv1.1 version of Grid-Stat, and it worked without any problems.  I'm not sure why you're getting an error.  Is is possible that you're passing the
wrong file name to Grid-Stat on the command line?  Please try to "ls /basswood/chenming/MET/out/pcp_combine/wrfprs_pcp_A12_d01.12" to make sure that file actually exists in that path.  I'm guessing
that's the problem here.

Third, the error message you're seeing is a bit misleading.  In METv1.1, we were reading gridded data files in a naive way.  We first try to open the files as NetCDF.  If we experience an error, we
assume the file is in GRIB format and attempt to open it as such.  For some reason, you're experiencing an error when trying to open this NetCDF file.  It's showing up as a GRIB file error - but
that's only because there was an error when trying to read it as NetCDF.

We've updated the logic for this in METv2.0.  We wrote a routine to determine the file type directly and treat the file as such.  When checking for the file type, we first check the file extension:
- Anything ending in "grib", "grb", or "gb" is assumed to be a GRIB file.
- Anything ending in "netcdf", "ncf", or "nc" is assumed to be a NetCDF file.
If the file doesn't end in any of these extensions (like yours don't), we then check the magic cookie in the file to determine the file type.

To sum up, please make sure that input file actually exists in the directory you specified on the Grid-Stat command line.  And I'd suggest upgrading to METv2.0.

Please let me know if you're still having problems.

Thanks,
John

Ming Chen wrote:
> Good morning John,
> 
> I have put 4 files at RAL's ftp site (i.e. stag4_2006121712_A12.nc,
> stag4_2006121718_A12.nc, wrfprs_pcp_A12_d01.12, wrfprs_pcp_A12_d01.18).
> These files are 12-hr total precip from pcp_combine with netCDF format.
> The model domain covers entire U.S.
> 
> I just use the default config file "GridStatConfig_APCP_12" for a 
> quick  test. It seems that grid_stat is looking for GRIB format data
> instead of reading the netCDF format data. Is there any parameter in
> config file that tells MET what format data to look for?
> 
> Thanks a lot!
> 
> Ming
> 
> 
> John Halley Gotway wrote:
>> Ming,
>>
>> Could you send me a copy of the file that's giving you trouble:
>> /basswood/chenming/MET/out/pcp_combine/wrfprs_pcp_A12_d01.12
>>
>> Or if it's too big for email, you could post it to RAL's anonymous ftp
>> site:
>> ftp ftp.rap.ucar.edu
>> username = anonymous
>> password = "your email address"
>> cd incoming/irap/johnhg
>>
>> You could put the file in that directory.  I'll take a look to see if I
>> can figure out what's going on.
>>
>> Thanks,
>> John
>>
>>  
>>> Hi John,
>>>
>>> I have run copygb/pcp_combine to generate netCDF format data (i.e. 12-hr
>>> precip) from stage IV observation and from wrf model. When I try to run
>>> stat_point, I got the error message that:
>>>
>>> GribFile::open(const char *) -> unable to open grib file
>>> /basswood/chenming/MET/out/pcp_combine/wrfprs_pcp_A12_d01.12
>>>
>>> But this file is a netCDF format file generated by pcp_combine, not Grib
>>> format.
>>>
>>> Please let me know how to fix this problem? Thanks a lot!
>>>
>>> Ming
>>>
>>>
>>>
>>>
>>>
>>>
>>>     
>>
>>
>>   
> 
> 


More information about the Met_help mailing list