[Met_help] [rt.rap.ucar.edu #90526] History for MET input NetCDF file error
John Halley Gotway via RT
met_help at ucar.edu
Mon Jun 10 12:57:44 MDT 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Dear Colleague,
I am trying to use MET’s “grid_stat” tool to evaluate a 2-D model simulation against observation. However I ran into the error below.
DEBUG 1: Default Config File: /usr/local/share/met/config/GridStatConfig_default
DEBUG 1: User Config File: /met/met-8.1/tutorial/MET_Tutorial//config/GridStatConfig_APCP_12
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_None".
ERROR :
ERROR : Trouble reading forecast file "/met/met-8.1/tutorial/MET_Tutorial/input/bao_data/fv3_model_output.nc"
ERROR :
I have attached the 2 NetCDF files here. I ran a NetCDF file checker (http://cfconventions.org/compliance-checker.html) and it appears these 2 files are both CF-compliant.
I wonder if you could please help with this issue?
Thanks,
Shaowu
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: MET input NetCDF file error
From: John Halley Gotway
Time: Mon Jun 10 12:08:32 2019
Shaowu,
I see you're having trouble using some NetCDF files in MET. Whenever
starting with a new gridded dataset, I always recommend running MET's
plot_data_plane tool to make a quick plot of the data. That ensures
that
MET can read the data and interpret the metadata correctly. I get a
similar error from plot_data_plane:
*met-8.1/bin/plot_data_plane fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output.ps
<http://fv3_model_output.ps> 'name="model"; level="(*,*)";'*
*ERROR : plot_data_plane -> file "fv3_model_output.nc
<http://fv3_model_output.nc>" not a valid data file*
Looking in your file, I see that it lacks the global "Conventions"
attribute which MET expects to see in CF-compliant NetCDF files. You
can
tell MET explicitly to interpret this data as being CF-compliant by
setting
"file_type=NETCDF_NCCF;"
*met-8.1/bin/plot_data_plane fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output.ps
<http://fv3_model_output.ps> 'name="model"; level="(*,*)";
file_type=NETCDF_NCCF;'*
Or you could simply add the "Conventions" attribute and you wouldn't
need
to use the "file_type" option.
*ncatted -a Conventions,global,a,c,CF-1.7 fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output_MOD.nc*
*met-8.1/bin/plot_data_plane fv3_model_output_MOD.nc
fv3_model_output_MOD.ps 'name="model";
level="(*,*)";'*
WARNING: NcCfFile::open() -> could not determine the valid time, using
0.
I've attached the resulting image. Does that data look right to you?
As you can see, there is no timing information in these NetCDF files,
so
MET prints a warning about that.
Hope that helps get you going.
Thanks,
John Halley Gotway
On Sun, Jun 9, 2019 at 2:00 PM sbao at coastal.edu via RT
<met_help at ucar.edu>
wrote:
>
> Sun Jun 09 14:00:44 2019: Request 90526 was acted upon.
> Transaction: Ticket created by sbao at coastal.edu
> Queue: met_help
> Subject: MET input NetCDF file error
> Owner: Nobody
> Requestors: sbao at coastal.edu
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=90526 >
>
>
> Dear Colleague,
>
> I am trying to use MET’s “grid_stat” tool to evaluate a 2-D model
> simulation against observation. However I ran into the error below.
>
> DEBUG 1: Default Config File:
> /usr/local/share/met/config/GridStatConfig_default
> DEBUG 1: User Config File:
> /met/met-8.1/tutorial/MET_Tutorial//config/GridStatConfig_APCP_12
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_None".
> ERROR :
> ERROR : Trouble reading forecast file
> "/met/met-
8.1/tutorial/MET_Tutorial/input/bao_data/fv3_model_output.nc"
> ERROR :
>
> I have attached the 2 NetCDF files here. I ran a NetCDF file checker
(
> http://cfconventions.org/compliance-checker.html) and it appears
these 2
> files are both CF-compliant.
> I wonder if you could please help with this issue?
>
> Thanks,
> Shaowu
>
>
>
------------------------------------------------
Subject: Re: [rt.rap.ucar.edu #90526] MET input NetCDF file error
From: sbao at coastal.edu
Time: Mon Jun 10 12:54:09 2019
John,
We followed your suggestion by adding the attribute using ncatted, and
it worked perfectly! Thank you so much for your quick response.
Best,
Shaowu
On 6/10/19, 2:09 PM, "John Halley Gotway via RT" <met_help at ucar.edu>
wrote:
Shaowu,
I see you're having trouble using some NetCDF files in MET.
Whenever
starting with a new gridded dataset, I always recommend running
MET's
plot_data_plane tool to make a quick plot of the data. That
ensures that
MET can read the data and interpret the metadata correctly. I get
a
similar error from plot_data_plane:
*met-8.1/bin/plot_data_plane fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output.ps
<http://fv3_model_output.ps> 'name="model"; level="(*,*)";'*
*ERROR : plot_data_plane -> file "fv3_model_output.nc
<http://fv3_model_output.nc>" not a valid data file*
Looking in your file, I see that it lacks the global "Conventions"
attribute which MET expects to see in CF-compliant NetCDF files.
You can
tell MET explicitly to interpret this data as being CF-compliant
by setting
"file_type=NETCDF_NCCF;"
*met-8.1/bin/plot_data_plane fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output.ps
<http://fv3_model_output.ps> 'name="model"; level="(*,*)";
file_type=NETCDF_NCCF;'*
Or you could simply add the "Conventions" attribute and you
wouldn't need
to use the "file_type" option.
*ncatted -a Conventions,global,a,c,CF-1.7 fv3_model_output.nc
<http://fv3_model_output.nc> fv3_model_output_MOD.nc*
*met-8.1/bin/plot_data_plane fv3_model_output_MOD.nc
fv3_model_output_MOD.ps 'name="model";
level="(*,*)";'*
WARNING: NcCfFile::open() -> could not determine the valid time,
using 0.
I've attached the resulting image. Does that data look right to
you?
As you can see, there is no timing information in these NetCDF
files, so
MET prints a warning about that.
Hope that helps get you going.
Thanks,
John Halley Gotway
On Sun, Jun 9, 2019 at 2:00 PM sbao at coastal.edu via RT
<met_help at ucar.edu>
wrote:
>
> Sun Jun 09 14:00:44 2019: Request 90526 was acted upon.
> Transaction: Ticket created by sbao at coastal.edu
> Queue: met_help
> Subject: MET input NetCDF file error
> Owner: Nobody
> Requestors: sbao at coastal.edu
> Status: new
> Ticket <URL:
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frt.rap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D90526&data=02%7C01%7Csbao%40coastal.edu%7Ca754ac9e946947ad52b408d6edcece05%7Cbf1f856b8ef84e52be9387d3c3622797%7C0%7C1%7C636957869839298714&sdata=XomKoFCpcGFq9i5hS28otiWw%2BUtv6BH78wM7ra1hqEU%3D&reserved=0
>
>
>
> Dear Colleague,
>
> I am trying to use MET’s “grid_stat” tool to evaluate a 2-D
model
> simulation against observation. However I ran into the error
below.
>
> DEBUG 1: Default Config File:
> /usr/local/share/met/config/GridStatConfig_default
> DEBUG 1: User Config File:
> /met/met-
8.1/tutorial/MET_Tutorial//config/GridStatConfig_APCP_12
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> Met2dDataFile object of type "FileType_None".
> ERROR :
> ERROR : Trouble reading forecast file
> "/met/met-
8.1/tutorial/MET_Tutorial/input/bao_data/fv3_model_output.nc"
> ERROR :
>
> I have attached the 2 NetCDF files here. I ran a NetCDF file
checker (
>
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcfconventions.org%2Fcompliance-
checker.html&data=02%7C01%7Csbao%40coastal.edu%7Ca754ac9e946947ad52b408d6edcece05%7Cbf1f856b8ef84e52be9387d3c3622797%7C0%7C1%7C636957869839298714&sdata=nWdeC68thzGad7RYkiKCIsWhIZHROS5z6KaDPG%2FRDyM%3D&reserved=0)
and it appears these 2
> files are both CF-compliant.
> I wonder if you could please help with this issue?
>
> Thanks,
> Shaowu
>
>
>
------------------------------------------------
More information about the Met_help
mailing list