[Met_help] [rt.rap.ucar.edu #90277] History for Not a valid data file
John Halley Gotway via RT
met_help at ucar.edu
Wed May 29 09:46:42 MDT 2019
----------------------------------------------------------------
Initial Request
----------------------------------------------------------------
Hello,
Once I got plot_data_plane working on the test file I tried it against a netcdf file I create and got the following:
(NPL) bcash at cheyenne5:~/UFSCOMP/postproc> plot_data_plane tmp_test.nc test.ps 'name="tmp"; level="P1";' -v 10
DEBUG 1: Opening data file: tmp_test.nc
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new Met2dDataFile object of type "FileType_None".
ERROR :
ERROR : plot_data_plane -> file "tmp_test.nc" not a valid data file
ERROR :
My guess is the issue is CF compliance but without being sure exactly what MET is looking for I uploaded the file following the directions here<https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk>.
All the best,
Ben
============================
Benjamin A. Cash
Center for Ocean-Land-Atmosphere Studies
287 Research Hall, Mail Stop 6C5
George Mason University
4400 University Drive
Fairfax, VA 22030 USA
Phone: 703-993-5744
Fax: 703-993-5770
Email: bcash at gmu.edu
----------------------------------------------------------------
Complete Ticket History
----------------------------------------------------------------
Subject: Not a valid data file
From: John Halley Gotway
Time: Fri May 24 11:16:53 2019
Ben,
It looks like we dropped the ball on this one. I see that you have a
question from a few days ago about making a NetCDF file follow the
CF-conventions.
Looks like you're very, very close. In fact, if you explicitly tell
MET to
interpret this as being CF-compliant it works as-is:
*plot_data_plane tmp_test.nc <http://tmp_test.nc> tmp_test.ps
<http://tmp_test.ps> 'name="tmp"; level="(0,0,*,*)";
file_type=NETCDF_NCCF;'*
In order to avoid having to state "*file_type=NETCDF_NCCF;*" each time
you
run it, just add a conventions global attribute:
:Conventions = "CF-1.7" ;
Here's the ncatted command I ran to try this:
* ncatted -a Conventions,global,a,c,"CF-1.7" tmp_test.nc
<http://tmp_test.nc> tmp_test_mod.nc <http://tmp_test_mod.nc>*
And now I can run plot_data_plane without specifying the file_type:
*plot_data_plane tmp_test_mod.nc <http://tmp_test_mod.nc>
tmp_test.ps
<http://tmp_test.ps> 'name="tmp"; level="(0,0,*,*)";'*
And I've attached a png version of the resulting image (tmp_test.png).
So the takeaways from this are:
(1) MET reads the global "Conventions" attribute and interprets
anything
starting with "CF-" as being CF-compliant.
(2) MET will try to determine the file type using it's own logic. If
you
ever want to manually override that, you can do so using the
"file_type ="
config option. The supported file types are listed in ConfigConstants:
// File types
GRIB1 = 1;
GRIB2 = 2;
NETCDF_MET = 3;
NETCDF_PINT = 4;
NETCDF_NCCF = 5;
PYTHON_NUMPY = 6;
PYTHON_XARRAY = 7;
(3) When setting the "level" for data from a NetCDF file, you need to
specify a comma-separated list of values for each dimension. For the
lat/lon dimensions use a star (*). For others, use an integer. For
your
example, I used "(0,0,*,*)" to request the first time step and first
pressure level.
Hope that helps.
Thanks,
John Halley Gotway
On Mon, May 20, 2019 at 2:58 PM Benjamin A Cash via RT
<met_help at ucar.edu>
wrote:
>
> Mon May 20 14:58:15 2019: Request 90277 was acted upon.
> Transaction: Ticket created by bcash at gmu.edu
> Queue: met_help
> Subject: Not a valid data file
> Owner: Nobody
> Requestors: bcash at gmu.edu
> Status: new
> Ticket <URL:
https://rt.rap.ucar.edu/rt/Ticket/Display.html?id=90277 >
>
>
> Hello,
>
> Once I got plot_data_plane working on the test file I tried it
against a
> netcdf file I create and got the following:
> (NPL) bcash at cheyenne5:~/UFSCOMP/postproc> plot_data_plane
tmp_test.nc
> test.ps 'name="tmp"; level="P1";' -v 10
> DEBUG 1: Opening data file: tmp_test.nc
> DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
> Met2dDataFile object of type "FileType_None".
> ERROR :
> ERROR : plot_data_plane -> file "tmp_test.nc" not a valid data file
> ERROR :
>
> My guess is the issue is CF compliance but without being sure
exactly what
> MET is looking for I uploaded the file following the directions
here<
> https://dtcenter.org/community-code/model-evaluation-tools-met/met-
help-desk
> >.
>
> All the best,
> Ben
> ============================
> Benjamin A. Cash
> Center for Ocean-Land-Atmosphere Studies
> 287 Research Hall, Mail Stop 6C5
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030 USA
> Phone: 703-993-5744
> Fax: 703-993-5770
> Email: bcash at gmu.edu
>
>
------------------------------------------------
Subject: Not a valid data file
From: Benjamin A Cash
Time: Fri May 24 12:36:03 2019
Hi John,
Thanks! I added the Conventions attribute into my script and it worked
perfectly.
All the best,
Ben
============================
Benjamin A. Cash
Center for Ocean-Land-Atmosphere Studies
287 Research Hall, Mail Stop 6C5
George Mason University
4400 University Drive
Fairfax, VA 22030 USA
Phone: 703-993-5744
Fax: 703-993-5770
Email: bcash at gmu.edu
On May 24, 2019, 1:17 PM -0400, John Halley Gotway via RT
<met_help at ucar.edu>, wrote:
Ben,
It looks like we dropped the ball on this one. I see that you have a
question from a few days ago about making a NetCDF file follow the
CF-conventions.
Looks like you're very, very close. In fact, if you explicitly tell
MET to
interpret this as being CF-compliant it works as-is:
*plot_data_plane tmp_test.nc <http://secure-
web.cisco.com/1zxN4ixZFKSCFL6SuK-EcDGIfwTJ-
43nkR2AI1Dau2YJ32ieho2hel6vhsL082E-
idSiuaeECQVc4eq_HX6PALU5Csi0qor2dGljaakEqlMM1MpyPuKygevs06GLGDi6mK_9ZwntyXN3ELeqp84hFQjQXLIkjJ0CmWdZ5YU3rJM6cqpzw33ST3pDLxNqBuMMnIJZnEFH5kDu-
byjRj0xxnayHZiFWbOUGTuPAOG6I9MSM4OYZNZsN0IEpskBl4I7qtFqjcWW0Dt5OkXG8Gx4OIPlI9AT0chXdWl0sVuaOQ_YanPjepQJl5BulTnklj8t21YK_wDYKVjDTOgUkfJN-
CMkrDVHO49kbRnorjC7BwyGwDZI7yqYBTtUaPN6G3ZN-
YnQptG40pVmLJlvl0NEqh58dZr4VzQh45by1KU0YWKo/http%3A%2F%2Ftmp_test.nc>
tmp_test.ps
<http://secure-web.cisco.com/1GLAsdYKW9pjrFOc--
CrmmTE9hgMS1Z9KSM6d8kHEWpipuI0Rbhu0oNnc6X7QqpUnT-
6L6YqVwDdJZITauvfd53qQOLWAE3XFQHvaVJh6d1leIRtY7JrI1hDFygDCOHR4cCD4Ydt09pDP2n8xA_V8-
wlYz7nl0OM_QykzrrQY_luPSR_kJBoUqUj478bLBmYB1YO2csGf6YAsKV2mdnpo1cOUIArZLAzgZXsUxdEN8sPCQvcjHIe6Kp6mfWAKsJ23YBQfuiMYe3N5Kr2iI0JL7iKRnAz8DPOGnQWRjWuZBiVegTBFOFevuCbU-
Rf0X8it6_4sLnS4bmHiM9KBTeAKwOvyVhJ5HvPzdLiBu5Yt1kXYLNpDpi2E7iwgt8B3OXpvW70r5VTBFGUY4_VIaVXKCDmk38YACAdtDA2Lt_9QuAU/http%3A%2F%2Ftmp_test.ps>
'name="tmp"; level="(0,0,*,*)";
file_type=NETCDF_NCCF;'*
In order to avoid having to state "*file_type=NETCDF_NCCF;*" each time
you
run it, just add a conventions global attribute:
:Conventions = "CF-1.7" ;
Here's the ncatted command I ran to try this:
* ncatted -a Conventions,global,a,c,"CF-1.7" tmp_test.nc
<http://secure-web.cisco.com/1zxN4ixZFKSCFL6SuK-EcDGIfwTJ-
43nkR2AI1Dau2YJ32ieho2hel6vhsL082E-
idSiuaeECQVc4eq_HX6PALU5Csi0qor2dGljaakEqlMM1MpyPuKygevs06GLGDi6mK_9ZwntyXN3ELeqp84hFQjQXLIkjJ0CmWdZ5YU3rJM6cqpzw33ST3pDLxNqBuMMnIJZnEFH5kDu-
byjRj0xxnayHZiFWbOUGTuPAOG6I9MSM4OYZNZsN0IEpskBl4I7qtFqjcWW0Dt5OkXG8Gx4OIPlI9AT0chXdWl0sVuaOQ_YanPjepQJl5BulTnklj8t21YK_wDYKVjDTOgUkfJN-
CMkrDVHO49kbRnorjC7BwyGwDZI7yqYBTtUaPN6G3ZN-
YnQptG40pVmLJlvl0NEqh58dZr4VzQh45by1KU0YWKo/http%3A%2F%2Ftmp_test.nc>
tmp_test_mod.nc <http://secure-
web.cisco.com/1Z9faJcaL_fSovpgBpIxa1tjfNxEi-
pg02PcUiG0XknVTZfyr0Psaua8Qp94YPTW0Cbut3d40z_ZLSSlbfaPuJCQFya0H_tfwetcnKWLTOpDpXDZSrIe4UiH_z-
8HHf4iRmzUvaxRRvbvmcmum7w6TbBrPVpCovO9Hz-
ccQjrQWB1u2vTqRVdRaHZoGUwzqnXOhIP4W7kWMYGLJk--
iVGdNF5nGc1xeSDZFYJFSjFdAxrRdDphESRjgqILrkTQ0LozNsRn8GUhOD1s_-
1MnkL7iVt7wEzMvnPXJQmHFRhEY9iaGkmqZ0EORttphTo4FE8vAOGvynbfujf6TDRtsFlA4YMieMUOhnOiNChAcbZ8MJ8pnuo2gQutQhbwC8xZ3Ftj2D4O2Uqc0iT_2K6YKDZHwqyLNvHnN_hwcA2MLWrLi8/http%3A%2F%2Ftmp_test_mod.nc>*
And now I can run plot_data_plane without specifying the file_type:
*plot_data_plane tmp_test_mod.nc <http://secure-
web.cisco.com/1Z9faJcaL_fSovpgBpIxa1tjfNxEi-
pg02PcUiG0XknVTZfyr0Psaua8Qp94YPTW0Cbut3d40z_ZLSSlbfaPuJCQFya0H_tfwetcnKWLTOpDpXDZSrIe4UiH_z-
8HHf4iRmzUvaxRRvbvmcmum7w6TbBrPVpCovO9Hz-
ccQjrQWB1u2vTqRVdRaHZoGUwzqnXOhIP4W7kWMYGLJk--
iVGdNF5nGc1xeSDZFYJFSjFdAxrRdDphESRjgqILrkTQ0LozNsRn8GUhOD1s_-
1MnkL7iVt7wEzMvnPXJQmHFRhEY9iaGkmqZ0EORttphTo4FE8vAOGvynbfujf6TDRtsFlA4YMieMUOhnOiNChAcbZ8MJ8pnuo2gQutQhbwC8xZ3Ftj2D4O2Uqc0iT_2K6YKDZHwqyLNvHnN_hwcA2MLWrLi8/http%3A%2F%2Ftmp_test_mod.nc>
tmp_test.ps
<http://secure-web.cisco.com/1GLAsdYKW9pjrFOc--
CrmmTE9hgMS1Z9KSM6d8kHEWpipuI0Rbhu0oNnc6X7QqpUnT-
6L6YqVwDdJZITauvfd53qQOLWAE3XFQHvaVJh6d1leIRtY7JrI1hDFygDCOHR4cCD4Ydt09pDP2n8xA_V8-
wlYz7nl0OM_QykzrrQY_luPSR_kJBoUqUj478bLBmYB1YO2csGf6YAsKV2mdnpo1cOUIArZLAzgZXsUxdEN8sPCQvcjHIe6Kp6mfWAKsJ23YBQfuiMYe3N5Kr2iI0JL7iKRnAz8DPOGnQWRjWuZBiVegTBFOFevuCbU-
Rf0X8it6_4sLnS4bmHiM9KBTeAKwOvyVhJ5HvPzdLiBu5Yt1kXYLNpDpi2E7iwgt8B3OXpvW70r5VTBFGUY4_VIaVXKCDmk38YACAdtDA2Lt_9QuAU/http%3A%2F%2Ftmp_test.ps>
'name="tmp"; level="(0,0,*,*)";'*
And I've attached a png version of the resulting image (tmp_test.png).
So the takeaways from this are:
(1) MET reads the global "Conventions" attribute and interprets
anything
starting with "CF-" as being CF-compliant.
(2) MET will try to determine the file type using it's own logic. If
you
ever want to manually override that, you can do so using the
"file_type ="
config option. The supported file types are listed in ConfigConstants:
// File types
GRIB1 = 1;
GRIB2 = 2;
NETCDF_MET = 3;
NETCDF_PINT = 4;
NETCDF_NCCF = 5;
PYTHON_NUMPY = 6;
PYTHON_XARRAY = 7;
(3) When setting the "level" for data from a NetCDF file, you need to
specify a comma-separated list of values for each dimension. For the
lat/lon dimensions use a star (*). For others, use an integer. For
your
example, I used "(0,0,*,*)" to request the first time step and first
pressure level.
Hope that helps.
Thanks,
John Halley Gotway
On Mon, May 20, 2019 at 2:58 PM Benjamin A Cash via RT
<met_help at ucar.edu>
wrote:
Mon May 20 14:58:15 2019: Request 90277 was acted upon.
Transaction: Ticket created by bcash at gmu.edu
Queue: met_help
Subject: Not a valid data file
Owner: Nobody
Requestors: bcash at gmu.edu
Status: new
Ticket <URL: https://secure-web.cisco.com/1jdbAtUNYGrtfy8DuU-
AAyWYah7z4arp4-pZIDnJTbqTa8D4Oft583e6KEL93SuAzz-
UvwSKcFsWeNfA5EDF9pgYgR-
phwPNKgtIt1JaQBJzTAX9WATQ7La6wkpzwWkCfVbRHcx66dQBtdhHNaxNHGIBNxixRTkQHERA0021lLcIFcWoEFXBi-
rqCcmm9L5fYwxFvstBEiG_BRktfsw83rG9C00mjrgMPeae-
p0uqTSie0GF6k7N7cjATlQBhmNnJlNFozzVS72HPDHg97HlIbcOOWOech9SGBcUjxMTa-
3Wi0m_MqofNFr-4OIgStA42FoUrP3XEGVd5e4zJioKDYPWrrL-
XregoZ3nCSE20QPMzIB9B38KLU2zlsXjylUvFudQrB5qvVFzvzQL9zWSvDv-
GyBP2RVzI3R6TFfDImOmrMrLvcBUHM4QGpIVt-
gyq/https%3A%2F%2Frt.rap.ucar.edu%2Frt%2FTicket%2FDisplay.html%3Fid%3D90277
>
Hello,
Once I got plot_data_plane working on the test file I tried it against
a
netcdf file I create and got the following:
(NPL) bcash at cheyenne5:~/UFSCOMP/postproc> plot_data_plane tmp_test.nc
test.ps 'name="tmp"; level="P1";' -v 10
DEBUG 1: Opening data file: tmp_test.nc
DEBUG 4: Met2dDataFileFactory::new_met_2d_data_file() -> created new
Met2dDataFile object of type "FileType_None".
ERROR :
ERROR : plot_data_plane -> file "tmp_test.nc" not a valid data file
ERROR :
My guess is the issue is CF compliance but without being sure exactly
what
MET is looking for I uploaded the file following the directions here<
https://secure-
web.cisco.com/1EQSDnYcskM5kBXNHgwTz_ewyEMuomhCZVAHVoJ7yTDNIgknj0AbEdH1NOqH-
SL48gfyF-
ZgULG0ZRJDIispnyj4iADE2Znsh80R92izdo1BZiwpf9DexDZOMnRB9ZYbqn3GePwhSgvVlHDkO8xlufqTuR2JWPN4d2eoYRkmEkxaLjbxH1pzCfvTA9q3I17u-
W9smv3sX8Y9Q2eThTB_8EJRJIMkRwXkIkUUMkIicMbo1qjIXoBJ06t7Ca7hHna-
FapTW8BOH7XS_xcNDIcMLfK3_ATxjadHKxcA1tw29wISOG-
e3UIlUsuUpwnTQ8l0okOM6d9WO-
2d9ZKVNRvAF45lR_z_WaZDlyXLFfRC95OU10ANJ0SGJjFY-
fo7aeyyAWefD8SEsCACvPm3I8MQIHEIJnAJIyEfYDcVnqgN2fpOiLf1QFTZG_60S7viruPN6/https%3A%2F%2Fdtcenter.org%2Fcommunity-
code%2Fmodel-evaluation-tools-met%2Fmet-help-desk
.
All the best,
Ben
============================
Benjamin A. Cash
Center for Ocean-Land-Atmosphere Studies
287 Research Hall, Mail Stop 6C5
George Mason University
4400 University Drive
Fairfax, VA 22030 USA
Phone: 703-993-5744
Fax: 703-993-5770
Email: bcash at gmu.edu
<tmp_test.png>
------------------------------------------------
More information about the Met_help
mailing list