[Met_help] [rt.rap.ucar.edu #41895] History for Trouble with netcdf file attribute using METv3.0
RAL HelpDesk {for John Halley Gotway}
met_help at ucar.edu
Wed Nov 3 11:05:46 MDT 2010
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Hi John,
I apologize for sending you this email this week as I imagine that everyone at DTC are busy with the workshop.
I sent this email to met_help earlier, but I'm forwarding you the email because you might be able to understand the problem I've run into with the released version of METv3.0. You gave me the beta version of METv3.0 and cdf files I prepared for it doesn't work for the released version of METv3.0. The error message of grid_stat.exe basically says "netcdf attribute not found", but won't tell me which attribute is missing. I've already changed some attributes according to some sample tutorial cdf file. If you have time, could you please look at my cdf file (chill_sample.cdf) and let me know which attribute is missing?
Thank you.
Kyoko
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Trouble with netcdf file attribute using METv3.0
From: John Halley Gotway
Time: Wed Nov 03 10:11:52 2010
Kyoko,
It's odd, but for some reason your question never came through via
met_help. So I went ahead and created a new ticket for your question.
Yes, those error messages from NetCDF are very frustrating! When the
MET code tries to read an attribute or variable that doesn't exist in
the NetCDF file, the NetCDF code errors out with that very
un-useful message. We've discussed writing a wrapper for the NetCDF
calls so that we could provide some more useful error messages.
I took a look at your file and found the culprit. The short answer
is, add a global attribute named "MET_version" and set it to "V3.0".
I've attached a file that includes this change and it now runs
through Grid-Stat.
The longer answer is that we were trying to make our support for
NetCDF files backwards compatible. We wanted METv3.0 to be able to
read the NetCDF output from the METv2.0 PCP-Combine tool. The way
we specified grids changed from METv2.0 to METv3.0. So we needed some
way to figure out whether we should parse the grid definition
information in the METv2.0 way or the METv3.0 way. We chose to
look at the "MET_version" attribute - which we added for METv3.0. If
it exists and is set to "V3.0", we parse the grid information in the
new way. But if it doesn't exist, we parse the data in the
old way. Since that attribute didn't exist in your file, the code was
parsing the grid information in the old way rather than the new way
which is what you're using.
That should fix the problem.
Thanks,
John
On 11/03/2010 08:38 AM, RAL HelpDesk {for John Halley Gotway} wrote:
>
> Wed Nov 03 08:38:50 2010: Request 41895 was acted upon.
> Transaction: Ticket created by johnhg
> Queue: met_help
> Subject: Trouble with netcdf file attribute using METv3.0
> Owner: johnhg
> Requestors: kyoko at ucar.edu
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41895 >
>
>
> Hi John,
>
> I apologize for sending you this email this week as I imagine that
everyone at DTC are busy with the workshop.
> I sent this email to met_help earlier, but I'm forwarding you the
email because you might be able to understand the problem I've run
into with the released version of METv3.0. You gave me the beta
version of METv3.0 and cdf files I prepared for it doesn't work for
the released version of METv3.0. The error message of grid_stat.exe
basically says "netcdf attribute not found", but won't tell me which
attribute is missing. I've already changed some attributes according
to some sample tutorial cdf file. If you have time, could you please
look at my cdf file (chill_sample.cdf) and let me know which attribute
is missing?
>
> Thank you.
>
> Kyoko
------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #41895] Trouble with netcdf file attribute using METv3.0
From: Kyoko Ikeda
Time: Wed Nov 03 11:00:49 2010
Hi John,
Thank you for taking time to look into the problem.
I was one step away from entering the MET version number into the
attribute yesterday! I just didn't imagine that it would be read into
the grid stat program. But it makes sense to have the info for future
development. Error messages might not always be intuitive, but I
understand that MET is always evolving. I believe that what you guys
have developed is a great tool, so a little bit of error messages
don't
bother me. In the future, it will be very helpful if there is a list
of
attributes, both global and data variable, that need to be in netcdf
files somewhere in the User's Guide.
Well, I added the attribute and both grid_stat and point_stat worked.
I appreciate you solving the trouble so quickly.
thanks,
Kyoko
On 11/3/10 10:11 AM, RAL HelpDesk {for John Halley Gotway} wrote:
> Kyoko,
>
> It's odd, but for some reason your question never came through via
met_help. So I went ahead and created a new ticket for your question.
>
> Yes, those error messages from NetCDF are very frustrating! When
the MET code tries to read an attribute or variable that doesn't exist
in the NetCDF file, the NetCDF code errors out with that very
> un-useful message. We've discussed writing a wrapper for the NetCDF
calls so that we could provide some more useful error messages.
>
> I took a look at your file and found the culprit. The short answer
is, add a global attribute named "MET_version" and set it to "V3.0".
I've attached a file that includes this change and it now runs
> through Grid-Stat.
>
> The longer answer is that we were trying to make our support for
NetCDF files backwards compatible. We wanted METv3.0 to be able to
read the NetCDF output from the METv2.0 PCP-Combine tool. The way
> we specified grids changed from METv2.0 to METv3.0. So we needed
some way to figure out whether we should parse the grid definition
information in the METv2.0 way or the METv3.0 way. We chose to
> look at the "MET_version" attribute - which we added for METv3.0.
If it exists and is set to "V3.0", we parse the grid information in
the new way. But if it doesn't exist, we parse the data in the
> old way. Since that attribute didn't exist in your file, the code
was parsing the grid information in the old way rather than the new
way which is what you're using.
>
> That should fix the problem.
>
> Thanks,
> John
>
> On 11/03/2010 08:38 AM, RAL HelpDesk {for John Halley Gotway} wrote:
>> Wed Nov 03 08:38:50 2010: Request 41895 was acted upon.
>> Transaction: Ticket created by johnhg
>> Queue: met_help
>> Subject: Trouble with netcdf file attribute using METv3.0
>> Owner: johnhg
>> Requestors: kyoko at ucar.edu
>> Status: new
>> Ticket<URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41895>
>>
>>
>> Hi John,
>>
>> I apologize for sending you this email this week as I imagine that
everyone at DTC are busy with the workshop.
>> I sent this email to met_help earlier, but I'm forwarding you the
email because you might be able to understand the problem I've run
into with the released version of METv3.0. You gave me the beta
version of METv3.0 and cdf files I prepared for it doesn't work for
the released version of METv3.0. The error message of grid_stat.exe
basically says "netcdf attribute not found", but won't tell me which
attribute is missing. I've already changed some attributes according
to some sample tutorial cdf file. If you have time, could you please
look at my cdf file (chill_sample.cdf) and let me know which attribute
is missing?
>>
>> Thank you.
>>
>> Kyoko
------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #41895] Trouble with netcdf file attribute using METv3.0
From: John Halley Gotway
Time: Wed Nov 03 11:05:18 2010
Kyoko,
Thanks for the feedback. For previous versions of MET, we did write a
few
pages defining what NetCDF files need to look like for MET to be able
read
them. But we haven't kept that documentation updated for the latest
releases. But it sounds like we should.
I'll go ahead and resolve this ticket.
Thanks,
John
>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41895 >
>
> Hi John,
>
> Thank you for taking time to look into the problem.
> I was one step away from entering the MET version number into the
> attribute yesterday! I just didn't imagine that it would be read
into
> the grid stat program. But it makes sense to have the info for
future
> development. Error messages might not always be intuitive, but I
> understand that MET is always evolving. I believe that what you guys
> have developed is a great tool, so a little bit of error messages
don't
> bother me. In the future, it will be very helpful if there is a list
of
> attributes, both global and data variable, that need to be in netcdf
> files somewhere in the User's Guide.
>
> Well, I added the attribute and both grid_stat and point_stat
worked.
> I appreciate you solving the trouble so quickly.
>
> thanks,
>
> Kyoko
>
>
>
> On 11/3/10 10:11 AM, RAL HelpDesk {for John Halley Gotway} wrote:
>> Kyoko,
>>
>> It's odd, but for some reason your question never came through via
>> met_help. So I went ahead and created a new ticket for your
question.
>>
>> Yes, those error messages from NetCDF are very frustrating! When
the
>> MET code tries to read an attribute or variable that doesn't exist
in
>> the NetCDF file, the NetCDF code errors out with that very
>> un-useful message. We've discussed writing a wrapper for the
NetCDF
>> calls so that we could provide some more useful error messages.
>>
>> I took a look at your file and found the culprit. The short answer
is,
>> add a global attribute named "MET_version" and set it to "V3.0".
I've
>> attached a file that includes this change and it now runs
>> through Grid-Stat.
>>
>> The longer answer is that we were trying to make our support for
NetCDF
>> files backwards compatible. We wanted METv3.0 to be able to read
the
>> NetCDF output from the METv2.0 PCP-Combine tool. The way
>> we specified grids changed from METv2.0 to METv3.0. So we needed
some
>> way to figure out whether we should parse the grid definition
>> information in the METv2.0 way or the METv3.0 way. We chose to
>> look at the "MET_version" attribute - which we added for METv3.0.
If it
>> exists and is set to "V3.0", we parse the grid information in the
new
>> way. But if it doesn't exist, we parse the data in the
>> old way. Since that attribute didn't exist in your file, the code
was
>> parsing the grid information in the old way rather than the new way
>> which is what you're using.
>>
>> That should fix the problem.
>>
>> Thanks,
>> John
>>
>> On 11/03/2010 08:38 AM, RAL HelpDesk {for John Halley Gotway}
wrote:
>>> Wed Nov 03 08:38:50 2010: Request 41895 was acted upon.
>>> Transaction: Ticket created by johnhg
>>> Queue: met_help
>>> Subject: Trouble with netcdf file attribute using METv3.0
>>> Owner: johnhg
>>> Requestors: kyoko at ucar.edu
>>> Status: new
>>> Ticket<URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=41895>
>>>
>>>
>>> Hi John,
>>>
>>> I apologize for sending you this email this week as I imagine
that
>>> everyone at DTC are busy with the workshop.
>>> I sent this email to met_help earlier, but I'm forwarding you the
email
>>> because you might be able to understand the problem I've run into
with
>>> the released version of METv3.0. You gave me the beta version of
>>> METv3.0 and cdf files I prepared for it doesn't work for the
released
>>> version of METv3.0. The error message of grid_stat.exe basically
says
>>> "netcdf attribute not found", but won't tell me which attribute is
>>> missing. I've already changed some attributes according to some
sample
>>> tutorial cdf file. If you have time, could you please look at my
cdf
>>> file (chill_sample.cdf) and let me know which attribute is
missing?
>>>
>>> Thank you.
>>>
>>> Kyoko
>
>
------------------------------------------------
More information about the Met_help
mailing list