[Met_help] [rt.rap.ucar.edu #97682] History for MTD_grid_file_type () error

Julie Prestopnik via RT met_help at ucar.edu
Mon Jan 11 09:02:43 MST 2021


----------------------------------------------------------------
  Initial Request
----------------------------------------------------------------

Hi,

I am trying to run the MTD but I dont know if the observed netcdf is read
properly. I am using GPM 24 hrly accumulated
I attached the config file and the data (fcst and observed).
The error says "grd_file_type() -> file doesnt exist.

Below is the command i used :

mtd -fcst /home/met_tutorial/gener_regridded_bigdomain/
ga6_2012073100_re_new_big.nc -obs
/home/met_tutorial/gpm_gener_2012073100_re_new_big_new/
gpm_gener_2012073100_re_new_big.nc -outdir
/home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
/home/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test -v 2


Thank you.

Alvin

-

 Alvin G. Pura
 Weather Specialist I
 Numerical Modeling Section,
 Research and Development & Training Division,
 Philippine Atmospheric Geophysical and Astronomical
 Services Administration (PAGASA )
 phone: +639668759459
 emails: *alvingpura at pagasa.dost.gov.ph <alvingpura at pagasa.dost.gov.ph>*
             *alvingpura at gmail.com <alvingpura at gmail.com>*


----------------------------------------------------------------
  Complete Ticket History
----------------------------------------------------------------

Subject: MTD_grid_file_type () error
From: Julie Prestopnik
Time: Tue Dec 01 10:10:07 2020

Hi Alvin.

Thank you for sending us your data along with the command that you are
using.  I see that you are having trouble running MTD and that you
suspect
it is due to the observed NetCDF file being read properly.

Whenever working with new gridded data in MET, we always recommend
running
the plot_data_plane utility to have MET plot it. That checks to make
sure
it can read data from your file as well as place it at the correct
place on
Earth.

When I ran plot_data_plane on your input files, I received messages
stating
that they were not valid data files:

>/usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps 'name="twatp";
> level="(*,*)";' -v 9
> DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_None".
> ERROR  :
> ERROR  : plot_data_plane -> file "ga6_2012073100_re_new_big.nc" not
a
> valid data file
> ERROR  :


> /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> gpm.ps 'name="precipitationCal"; level="(*,*)";' -v 9
> DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_None".
> ERROR  :
> ERROR  : plot_data_plane -> file
"gpm_gener_2012073100_re_new_big.nc" not
> a valid data file
> ERROR  :


I tried adding "file_type = NETCDF_NCCF;" to explicitly tell MET to
interpret this file as being CF-compliant. The correct way for this to
be
specified is with a global attribute: Conventions = "CF-1.8"; in the
NetCDF
file, but the "file_type" config option forces that instead.
Unfortunately, there are still problems:

> /usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps
> 'name="twatp"; level="(*,*)"; file_type=NETCDF_NCCF;' -v 9
> DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcCF".
> DEBUG 4: NcCfFile::open() -> parsing units for the time variable
"seconds
> since 1970-01-01"
> DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention time
unit
> string "seconds since 1970-01-01" as a reference time of
19700101_000000
> and 1 second(s) per time step.
> DEBUG 4: NcCfFile::open() -> could not extract init time from the
> "forecast_reference_time" variable.
> DEBUG 4: NcCfFile::open() -> could not extract init time from file
name.
> WARNING:
> WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[hours]
> from [step]
> WARNING:
> WARNING:
> WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units [1]
from
> [surface]
> WARNING:


> /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> gpm.ps 'name="precipitationCal"; level="(*,*)";
file_type=NETCDF_NCCF;'
> -v 9
> DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_NcCF".
> DEBUG 4: NcCfFile::open() -> parsing units for the time variable
"days
> since 2012-07-31 00:00:00"
> DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention time
unit
> string "days since 2012-07-31 00:00:00" as a reference time of
> 20120731_000000 and 86400 second(s) per time step.
> DEBUG 4: NcCfFile::open() -> could not extract init time from the
> "forecast_reference_time" variable.
> DEBUG 4: NcCfFile::open() -> could not extract init time from file
name.
> WARNING:
> WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[days
> since 2012-07-31 00:00:00] from [time]
> WARNING:
> ERROR  :
> ERROR  : NcCfFile::get_grid_from_coordinates() -> Didn't find X
coord
> variable ((nul)) in netCDF file.
> ERROR  :
> ERROR  :
> ERROR  : NcCfFile::read_netcdf_grid() -> Couldn't figure out
projection
> from information in netCDF file.
> ERROR  :


It appears that these files do not follow the  climate-forecast (CF)
convention.

The MET tools support only a few flavors of NetCDF file formats,
including:
- those following the climate-forecast (CF) convention, as defined by:

https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-
conventions.html
   (CF-convention checker: https://cfconventions.org/compliance-
checker.html
)
- output from the WRF model that has been post-processed using the
wrf_interp utility
- NetCDF output created by one of the other MET tools

In addition, MET can read gridded data in GRIB1 or GRIB2 format. And
it can
also be passed as input using python embedding.

The data will need to be in one of those formats in order for MET to
be
able to read it.  I am not sure how you are getting the NetCDF files.
Regarding editing the files, you could just edit whatever script is
creating the to modify the output format.  For testing, you could
use "ncdump" to dump the file to ascii, then edit the ascii file to
add the
necessary information, and then run "ncgen" to regenerate the
modified NetCDF file. One could also use NCO tools (like ncatted,
ncrename,
etc.) to modify the format.

I hope that helps!  Please let us know if you have any questions.

Thanks,
Julie

On Mon, Nov 30, 2020 at 11:12 PM Alvin Pura via RT <met_help at ucar.edu>
wrote:

>
> Mon Nov 30 23:12:21 2020: Request 97682 was acted upon.
> Transaction: Ticket created by alvingpura at gmail.com
>        Queue: met_help
>      Subject: MTD_grid_file_type () error
>        Owner: Nobody
>   Requestors: alvingpura at gmail.com
>       Status: new
>  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=97682 >
>
>
> Hi,
>
> I am trying to run the MTD but I dont know if the observed netcdf is
read
> properly. I am using GPM 24 hrly accumulated
> I attached the config file and the data (fcst and observed).
> The error says "grd_file_type() -> file doesnt exist.
>
> Below is the command i used :
>
> mtd -fcst /home/met_tutorial/gener_regridded_bigdomain/
> ga6_2012073100_re_new_big.nc -obs
> /home/met_tutorial/gpm_gener_2012073100_re_new_big_new/
> gpm_gener_2012073100_re_new_big.nc -outdir
> /home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
> /home/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test -v 2
>
>
> Thank you.
>
> Alvin
>
> -
>
>  Alvin G. Pura
>  Weather Specialist I
>  Numerical Modeling Section,
>  Research and Development & Training Division,
>  Philippine Atmospheric Geophysical and Astronomical
>  Services Administration (PAGASA )
>  phone: +639668759459
>  emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph>*
>              *alvingpura at gmail.com <alvingpura at gmail.com>*
>
>

--
Julie Prestopnik (she/her)
Software Engineer
National Center for Atmospheric Research
Research Applications Laboratory
Email: jpresto at ucar.edu

My working day may not be your working day.  Please do not feel
obliged to
reply to this email outside of your normal working hours.

------------------------------------------------
Subject: MTD_grid_file_type () error
From: Alvin Pura
Time: Mon Dec 07 12:46:21 2020

Hi Julie Thank you for your response.

I tried using ncatted ( see command below and this was from other
ticket ):

ncatted -a Conventions,global,a,c,CF-1.7
gpm_gener_2012073100_re_new_big.nc *gpm_2012073100_mod.nc
<http://gpm_2012073100_mod.nc>*
ncatted -a Conventions,global,a,c,CF-1.7 ga6_2012073100_re_new_big.nc
*ga6_2012073100_mod.nc
<http://ga6_2012073100_mod.nc>*

And then use the plot_data_plane command

plot_data_plane ga6_2012073100_mod.nc ga6_2012073100_mod.ps
'name="twatp";
level="(*,*)";'
DEBUG 1: Opening data file: ga6_2012073100_mod.nc

And got the  error message:









*WARNING: WARNING: NcCfFile::get_grid_from_coordinates() -> unknown
units
[hours] from [step]WARNING: WARNING: WARNING:
NcCfFile::get_grid_from_coordinates() -> unknown units [1] from
[surface]WARNING: terminate called after throwing an instance of
'netCDF::exceptions::NcBadId'  what():  NetCDF: Not a valid IDfile:
ncDim.cpp  line:80*

And when using the mtd

 mtd -fcst *ga6_2012073100_mod.nc <http://ga6_2012073100_mod.nc>* -obs
*gpm_2012073100_mod.nc
<http://gpm_2012073100_mod.nc>* -outdir
/home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
/home/alvin/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test
-v 2

And got the following same error message:










*WARNING: WARNING: NcCfFile::get_grid_from_coordinates() -> unknown
units
[hours] from [step]WARNING: WARNING: WARNING:
NcCfFile::get_grid_from_coordinates() -> unknown units [1] from
[surface]WARNING: terminate called after throwing an instance of
'netCDF::exceptions::NcBadId'  what():  NetCDF: Not a valid IDfile:
ncDim.cpp  line:80Aborted (core dumped)*


*Aborted (core dumped)*

Thanks Julie.




On Wed, Dec 2, 2020 at 1:10 AM Julie Prestopnik via RT
<met_help at ucar.edu>
wrote:

> Hi Alvin.
>
> Thank you for sending us your data along with the command that you
are
> using.  I see that you are having trouble running MTD and that you
suspect
> it is due to the observed NetCDF file being read properly.
>
> Whenever working with new gridded data in MET, we always recommend
running
> the plot_data_plane utility to have MET plot it. That checks to make
sure
> it can read data from your file as well as place it at the correct
place on
> Earth.
>
> When I ran plot_data_plane on your input files, I received messages
stating
> that they were not valid data files:
>
> >/usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps
> 'name="twatp";
> > level="(*,*)";' -v 9
> > DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_None".
> > ERROR  :
> > ERROR  : plot_data_plane -> file "ga6_2012073100_re_new_big.nc"
not a
> > valid data file
> > ERROR  :
>
>
> > /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> > gpm.ps 'name="precipitationCal"; level="(*,*)";' -v 9
> > DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_None".
> > ERROR  :
> > ERROR  : plot_data_plane -> file
"gpm_gener_2012073100_re_new_big.nc"
> not
> > a valid data file
> > ERROR  :
>
>
> I tried adding "file_type = NETCDF_NCCF;" to explicitly tell MET to
> interpret this file as being CF-compliant. The correct way for this
to be
> specified is with a global attribute: Conventions = "CF-1.8"; in the
NetCDF
> file, but the "file_type" config option forces that instead.
> Unfortunately, there are still problems:
>
> > /usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps
> > 'name="twatp"; level="(*,*)"; file_type=NETCDF_NCCF;' -v 9
> > DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcCF".
> > DEBUG 4: NcCfFile::open() -> parsing units for the time variable
"seconds
> > since 1970-01-01"
> > DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention
time unit
> > string "seconds since 1970-01-01" as a reference time of
19700101_000000
> > and 1 second(s) per time step.
> > DEBUG 4: NcCfFile::open() -> could not extract init time from the
> > "forecast_reference_time" variable.
> > DEBUG 4: NcCfFile::open() -> could not extract init time from file
name.
> > WARNING:
> > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[hours]
> > from [step]
> > WARNING:
> > WARNING:
> > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[1] from
> > [surface]
> > WARNING:
>
>
> > /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> > gpm.ps 'name="precipitationCal"; level="(*,*)";
file_type=NETCDF_NCCF;'
> > -v 9
> > DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > Met2dDataFile object of type "FileType_NcCF".
> > DEBUG 4: NcCfFile::open() -> parsing units for the time variable
"days
> > since 2012-07-31 00:00:00"
> > DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention
time unit
> > string "days since 2012-07-31 00:00:00" as a reference time of
> > 20120731_000000 and 86400 second(s) per time step.
> > DEBUG 4: NcCfFile::open() -> could not extract init time from the
> > "forecast_reference_time" variable.
> > DEBUG 4: NcCfFile::open() -> could not extract init time from file
name.
> > WARNING:
> > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[days
> > since 2012-07-31 00:00:00] from [time]
> > WARNING:
> > ERROR  :
> > ERROR  : NcCfFile::get_grid_from_coordinates() -> Didn't find X
coord
> > variable ((nul)) in netCDF file.
> > ERROR  :
> > ERROR  :
> > ERROR  : NcCfFile::read_netcdf_grid() -> Couldn't figure out
projection
> > from information in netCDF file.
> > ERROR  :
>
>
> It appears that these files do not follow the  climate-forecast (CF)
> convention.
>
> The MET tools support only a few flavors of NetCDF file formats,
including:
> - those following the climate-forecast (CF) convention, as defined
by:
>
>
> https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-
conventions.html
>    (CF-convention checker:
> https://cfconventions.org/compliance-checker.html
> )
> - output from the WRF model that has been post-processed using the
> wrf_interp utility
> - NetCDF output created by one of the other MET tools
>
> In addition, MET can read gridded data in GRIB1 or GRIB2 format. And
it can
> also be passed as input using python embedding.
>
> The data will need to be in one of those formats in order for MET to
be
> able to read it.  I am not sure how you are getting the NetCDF
files.
> Regarding editing the files, you could just edit whatever script is
> creating the to modify the output format.  For testing, you could
> use "ncdump" to dump the file to ascii, then edit the ascii file to
add the
> necessary information, and then run "ncgen" to regenerate the
> modified NetCDF file. One could also use NCO tools (like ncatted,
ncrename,
> etc.) to modify the format.
>
> I hope that helps!  Please let us know if you have any questions.
>
> Thanks,
> Julie
>
> On Mon, Nov 30, 2020 at 11:12 PM Alvin Pura via RT
<met_help at ucar.edu>
> wrote:
>
> >
> > Mon Nov 30 23:12:21 2020: Request 97682 was acted upon.
> > Transaction: Ticket created by alvingpura at gmail.com
> >        Queue: met_help
> >      Subject: MTD_grid_file_type () error
> >        Owner: Nobody
> >   Requestors: alvingpura at gmail.com
> >       Status: new
> >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=97682 >
> >
> >
> > Hi,
> >
> > I am trying to run the MTD but I dont know if the observed netcdf
is read
> > properly. I am using GPM 24 hrly accumulated
> > I attached the config file and the data (fcst and observed).
> > The error says "grd_file_type() -> file doesnt exist.
> >
> > Below is the command i used :
> >
> > mtd -fcst /home/met_tutorial/gener_regridded_bigdomain/
> > ga6_2012073100_re_new_big.nc -obs
> > /home/met_tutorial/gpm_gener_2012073100_re_new_big_new/
> > gpm_gener_2012073100_re_new_big.nc -outdir
> > /home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
> > /home/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test -v
2
> >
> >
> > Thank you.
> >
> > Alvin
> >
> > -
> >
> >  Alvin G. Pura
> >  Weather Specialist I
> >  Numerical Modeling Section,
> >  Research and Development & Training Division,
> >  Philippine Atmospheric Geophysical and Astronomical
> >  Services Administration (PAGASA )
> >  phone: +639668759459
> >  emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph>*
> >              *alvingpura at gmail.com <alvingpura at gmail.com>*
> >
> >
>
> --
> Julie Prestopnik (she/her)
> Software Engineer
> National Center for Atmospheric Research
> Research Applications Laboratory
> Email: jpresto at ucar.edu
>
> My working day may not be your working day.  Please do not feel
obliged to
> reply to this email outside of your normal working hours.
>
>

--

 Alvin G. Pura
 Weather Specialist I
 Numerical Modeling Section,
 Research and Development & Training Division,
 Philippine Atmospheric Geophysical and Astronomical
 Services Administration (PAGASA )
 phone: +639668759459
 emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph>*
             *alvingpura at gmail.com <alvingpura at gmail.com>*

------------------------------------------------
Subject: MTD_grid_file_type () error
From: Julie Prestopnik
Time: Mon Dec 07 15:37:38 2020

Hi Alvin. Thank you for attaching your new files.  Those are the same
errors I received when adding "file_type = NETCDF_NCCF;" to explicitly
tell
MET to interpret this file as being CF-compliant.  As I mentioned
before,
there are still other problems with these files and so adding
":Conventions
= "CF-1.7" ;" alone won't make the file CF-compliant.

I am not incredibly familiar with CF-compliant files. I would suggest
reviewing the climate-forecast (CF) convention, as defined by:
https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-
conventions.html
And utilizing the CF-convention checker:
https://cfconventions.org/compliance-checker.html)
to help get the files to be CF-compliant.

My colleague noted one other issue with your file that would need to
be
resolved.  The latitude and longitude coordinate variables are missing
a
"units" attribute (degrees_north and degrees_east), which is the
CF-compliant way of identifying them as being lat/lon (
https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-
conventions.html#latitude-coordinate)
and missing a "coordinates" attribute.  You could start with fixing
that
and then rerun and handle any other issues as they arise.

I hope that helps!

Julie

On Mon, Dec 7, 2020 at 12:47 PM Alvin Pura via RT <met_help at ucar.edu>
wrote:

>
> <URL: https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=97682 >
>
> Hi Julie Thank you for your response.
>
> I tried using ncatted ( see command below and this was from other
ticket ):
>
> ncatted -a Conventions,global,a,c,CF-1.7
> gpm_gener_2012073100_re_new_big.nc *gpm_2012073100_mod.nc
> <http://gpm_2012073100_mod.nc>*
> ncatted -a Conventions,global,a,c,CF-1.7
ga6_2012073100_re_new_big.nc
> *ga6_2012073100_mod.nc
> <http://ga6_2012073100_mod.nc>*
>
> And then use the plot_data_plane command
>
> plot_data_plane ga6_2012073100_mod.nc ga6_2012073100_mod.ps
'name="twatp";
> level="(*,*)";'
> DEBUG 1: Opening data file: ga6_2012073100_mod.nc
>
> And got the  error message:
>
>
>
>
>
>
>
>
>
> *WARNING: WARNING: NcCfFile::get_grid_from_coordinates() -> unknown
units
> [hours] from [step]WARNING: WARNING: WARNING:
> NcCfFile::get_grid_from_coordinates() -> unknown units [1] from
> [surface]WARNING: terminate called after throwing an instance of
> 'netCDF::exceptions::NcBadId'  what():  NetCDF: Not a valid IDfile:
> ncDim.cpp  line:80*
>
> And when using the mtd
>
>  mtd -fcst *ga6_2012073100_mod.nc <http://ga6_2012073100_mod.nc>*
-obs
> *gpm_2012073100_mod.nc
> <http://gpm_2012073100_mod.nc>* -outdir
> /home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
> /home/alvin/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test
-v 2
>
> And got the following same error message:
>
>
>
>
>
>
>
>
>
>
> *WARNING: WARNING: NcCfFile::get_grid_from_coordinates() -> unknown
units
> [hours] from [step]WARNING: WARNING: WARNING:
> NcCfFile::get_grid_from_coordinates() -> unknown units [1] from
> [surface]WARNING: terminate called after throwing an instance of
> 'netCDF::exceptions::NcBadId'  what():  NetCDF: Not a valid IDfile:
> ncDim.cpp  line:80Aborted (core dumped)*
>
>
> *Aborted (core dumped)*
>
> Thanks Julie.
>
>
>
>
> On Wed, Dec 2, 2020 at 1:10 AM Julie Prestopnik via RT
<met_help at ucar.edu>
> wrote:
>
> > Hi Alvin.
> >
> > Thank you for sending us your data along with the command that you
are
> > using.  I see that you are having trouble running MTD and that you
> suspect
> > it is due to the observed NetCDF file being read properly.
> >
> > Whenever working with new gridded data in MET, we always recommend
> running
> > the plot_data_plane utility to have MET plot it. That checks to
make sure
> > it can read data from your file as well as place it at the correct
place
> on
> > Earth.
> >
> > When I ran plot_data_plane on your input files, I received
messages
> stating
> > that they were not valid data files:
> >
> > >/usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps
> > 'name="twatp";
> > > level="(*,*)";' -v 9
> > > DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_None".
> > > ERROR  :
> > > ERROR  : plot_data_plane -> file "ga6_2012073100_re_new_big.nc"
not a
> > > valid data file
> > > ERROR  :
> >
> >
> > > /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> > > gpm.ps 'name="precipitationCal"; level="(*,*)";' -v 9
> > > DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_None".
> > > ERROR  :
> > > ERROR  : plot_data_plane -> file
"gpm_gener_2012073100_re_new_big.nc"
> > not
> > > a valid data file
> > > ERROR  :
> >
> >
> > I tried adding "file_type = NETCDF_NCCF;" to explicitly tell MET
to
> > interpret this file as being CF-compliant. The correct way for
this to be
> > specified is with a global attribute: Conventions = "CF-1.8"; in
the
> NetCDF
> > file, but the "file_type" config option forces that instead.
> > Unfortunately, there are still problems:
> >
> > > /usr/local/met/bin/plot_data_plane ga6_2012073100_re_new_big.nc
ga6.ps
> > > 'name="twatp"; level="(*,*)"; file_type=NETCDF_NCCF;' -v 9
> > > DEBUG 1: Opening data file: ga6_2012073100_re_new_big.nc
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcCF".
> > > DEBUG 4: NcCfFile::open() -> parsing units for the time variable
> "seconds
> > > since 1970-01-01"
> > > DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention
time
> unit
> > > string "seconds since 1970-01-01" as a reference time of
> 19700101_000000
> > > and 1 second(s) per time step.
> > > DEBUG 4: NcCfFile::open() -> could not extract init time from
the
> > > "forecast_reference_time" variable.
> > > DEBUG 4: NcCfFile::open() -> could not extract init time from
file
> name.
> > > WARNING:
> > > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[hours]
> > > from [step]
> > > WARNING:
> > > WARNING:
> > > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[1]
> from
> > > [surface]
> > > WARNING:
> >
> >
> > > /usr/local/met/bin/plot_data_plane
gpm_gener_2012073100_re_new_big.nc
> > > gpm.ps 'name="precipitationCal"; level="(*,*)";
> file_type=NETCDF_NCCF;'
> > > -v 9
> > > DEBUG 1: Opening data file: gpm_gener_2012073100_re_new_big.nc
> > > DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created
new
> > > Met2dDataFile object of type "FileType_NcCF".
> > > DEBUG 4: NcCfFile::open() -> parsing units for the time variable
"days
> > > since 2012-07-31 00:00:00"
> > > DEBUG 4: parse_cf_time_string() -> parsed NetCDF CF convention
time
> unit
> > > string "days since 2012-07-31 00:00:00" as a reference time of
> > > 20120731_000000 and 86400 second(s) per time step.
> > > DEBUG 4: NcCfFile::open() -> could not extract init time from
the
> > > "forecast_reference_time" variable.
> > > DEBUG 4: NcCfFile::open() -> could not extract init time from
file
> name.
> > > WARNING:
> > > WARNING: NcCfFile::get_grid_from_coordinates() -> unknown units
[days
> > > since 2012-07-31 00:00:00] from [time]
> > > WARNING:
> > > ERROR  :
> > > ERROR  : NcCfFile::get_grid_from_coordinates() -> Didn't find X
coord
> > > variable ((nul)) in netCDF file.
> > > ERROR  :
> > > ERROR  :
> > > ERROR  : NcCfFile::read_netcdf_grid() -> Couldn't figure out
projection
> > > from information in netCDF file.
> > > ERROR  :
> >
> >
> > It appears that these files do not follow the  climate-forecast
(CF)
> > convention.
> >
> > The MET tools support only a few flavors of NetCDF file formats,
> including:
> > - those following the climate-forecast (CF) convention, as defined
by:
> >
> >
> >
> https://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-
conventions.html
> >    (CF-convention checker:
> > https://cfconventions.org/compliance-checker.html
> > )
> > - output from the WRF model that has been post-processed using the
> > wrf_interp utility
> > - NetCDF output created by one of the other MET tools
> >
> > In addition, MET can read gridded data in GRIB1 or GRIB2 format.
And it
> can
> > also be passed as input using python embedding.
> >
> > The data will need to be in one of those formats in order for MET
to be
> > able to read it.  I am not sure how you are getting the NetCDF
files.
> > Regarding editing the files, you could just edit whatever script
is
> > creating the to modify the output format.  For testing, you could
> > use "ncdump" to dump the file to ascii, then edit the ascii file
to add
> the
> > necessary information, and then run "ncgen" to regenerate the
> > modified NetCDF file. One could also use NCO tools (like ncatted,
> ncrename,
> > etc.) to modify the format.
> >
> > I hope that helps!  Please let us know if you have any questions.
> >
> > Thanks,
> > Julie
> >
> > On Mon, Nov 30, 2020 at 11:12 PM Alvin Pura via RT
<met_help at ucar.edu>
> > wrote:
> >
> > >
> > > Mon Nov 30 23:12:21 2020: Request 97682 was acted upon.
> > > Transaction: Ticket created by alvingpura at gmail.com
> > >        Queue: met_help
> > >      Subject: MTD_grid_file_type () error
> > >        Owner: Nobody
> > >   Requestors: alvingpura at gmail.com
> > >       Status: new
> > >  Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=97682
> >
> > >
> > >
> > > Hi,
> > >
> > > I am trying to run the MTD but I dont know if the observed
netcdf is
> read
> > > properly. I am using GPM 24 hrly accumulated
> > > I attached the config file and the data (fcst and observed).
> > > The error says "grd_file_type() -> file doesnt exist.
> > >
> > > Below is the command i used :
> > >
> > > mtd -fcst /home/met_tutorial/gener_regridded_bigdomain/
> > > ga6_2012073100_re_new_big.nc -obs
> > > /home/met_tutorial/gpm_gener_2012073100_re_new_big_new/
> > > gpm_gener_2012073100_re_new_big.nc -outdir
> > > /home/alvin/met_tutorial/MET_Tutorial/output/mtd -config
> > > /home/met_tutorial/MET_Tutorial/config/MTDConfig_tutorial_test
-v 2
> > >
> > >
> > > Thank you.
> > >
> > > Alvin
> > >
> > > -
> > >
> > >  Alvin G. Pura
> > >  Weather Specialist I
> > >  Numerical Modeling Section,
> > >  Research and Development & Training Division,
> > >  Philippine Atmospheric Geophysical and Astronomical
> > >  Services Administration (PAGASA )
> > >  phone: +639668759459
> > >  emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph
> >*
> > >              *alvingpura at gmail.com <alvingpura at gmail.com>*
> > >
> > >
> >
> > --
> > Julie Prestopnik (she/her)
> > Software Engineer
> > National Center for Atmospheric Research
> > Research Applications Laboratory
> > Email: jpresto at ucar.edu
> >
> > My working day may not be your working day.  Please do not feel
obliged
> to
> > reply to this email outside of your normal working hours.
> >
> >
>
> --
>
>  Alvin G. Pura
>  Weather Specialist I
>  Numerical Modeling Section,
>  Research and Development & Training Division,
>  Philippine Atmospheric Geophysical and Astronomical
>  Services Administration (PAGASA )
>  phone: +639668759459
>  emails: *alvingpura at pagasa.dost.gov.ph
<alvingpura at pagasa.dost.gov.ph>*
>              *alvingpura at gmail.com <alvingpura at gmail.com>*
>
>

--
Julie Prestopnik (she/her)
Software Engineer
National Center for Atmospheric Research
Research Applications Laboratory
Email: jpresto at ucar.edu

My working day may not be your working day.  Please do not feel
obliged to
reply to this email outside of your normal working hours.

------------------------------------------------


More information about the Met_help mailing list