[ncl-talk] Sub: ncl_convert2nc...
David Brown
dbrown at ucar.edu
Mon Jul 6 17:40:37 MDT 2015
What version of NCL are you using? I have no problem accessing this
file with either ncl_filedump or ncl_convert2nc.
Here's ncl_filedump output of the grib file:
ncl_filedump mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs
path: mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib
file global attributes:
dimensions:
initial_time0_hours = 27
forecast_time0 = 3
lat_0 = 81
lon_0 = 141
variables:
float 2t_P1_L103_GLL0 ( initial_time0_hours, forecast_time0,
lat_0, lon_0 )
center : US National Weather Service - NCEP (WMC)
production_status : TIGGE Operational products
long_name : surface air temperature
units : K
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological products,
Temperature
parameter_template_discipline_category_number : ( 1, 0, 0, 0 )
level_type : Specified height level above ground (m)
level : 2
double initial_time0_hours ( initial_time0_hours )
long_name : initial time
units : hours since 1800-01-01 00:00
double initial_time0_encoded ( initial_time0_hours )
long_name : initial time encoded as double
units : yyyymmddhh.hh_frac
float lat_0 ( lat_0 )
long_name : latitude
grid_type : Latitude/Longitude
units : degrees_north
Dj : 0.5
Di : 0.5
Lo2 : 300
La2 : 30
Lo1 : 230
La1 : 70
float lon_0 ( lon_0 )
long_name : longitude
grid_type : Latitude/Longitude
units : degrees_east
Dj : 0.5
Di : 0.5
Lo2 : 300
La2 : 30
Lo1 : 230
La1 : 70
integer forecast_time0 ( forecast_time0 )
long_name : Forecast offset from initial time
units : hours
string initial_time0 ( initial_time0_hours )
long_name : Initial time of first record
units : mm/dd/yyyy (hh:mm)
You do get a warning message when converting to NetCDF. That is
because the file as read by NCL contains a string variable
and NetCDF (classic model) does not support strings. But this is
normal. The string variable is converted to a character array and no
information is lost:
ncl_convert2nc mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib
Processing file: mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib...
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Classic model NetCDF does not support string types, converting
initial_time0 to a character array
Dimension 'ncl_strlen_0' will be added
Here is the output of the NetCDF file produced by ncl_convert2nc:
ncl_filedump mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.nc
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: f
Type: file
filename: mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs
path: mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.nc
file global attributes:
creation_date : Mon Jul 6 17:23:06 MDT 2015
NCL_Version : 6.3.1
system : Darwin cisl-garrison 13.4.0 Darwin Kernel Version
13.4.0: Wed Mar 18 16:20:14 PDT 2015;
root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64
Conventions : None
grib_source : mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib
title : NCL: convert-GRIB-to-netCDF
dimensions:
initial_time0_hours = 27
forecast_time0 = 3
lat_0 = 81
lon_0 = 141
ncl_strlen_0 = 18
variables:
float 2t_P1_L103_GLL0 ( initial_time0_hours, forecast_time0,
lat_0, lon_0 )
level : 2
level_type : Specified height level above ground (m)
parameter_template_discipline_category_number : ( 1, 0, 0, 0 )
parameter_discipline_and_category : Meteorological products,
Temperature
grid_type : Latitude/longitude
_FillValue : 1e+20
units : K
long_name : surface air temperature
production_status : TIGGE Operational products
center : US National Weather Service - NCEP (WMC)
double initial_time0_hours ( initial_time0_hours )
units : hours since 1800-01-01 00:00
long_name : initial time
double initial_time0_encoded ( initial_time0_hours )
units : yyyymmddhh.hh_frac
long_name : initial time encoded as double
float lat_0 ( lat_0 )
La1 : 70
Lo1 : 230
La2 : 30
Lo2 : 300
Di : 0.5
Dj : 0.5
units : degrees_north
grid_type : Latitude/Longitude
long_name : latitude
float lon_0 ( lon_0 )
La1 : 70
Lo1 : 230
La2 : 30
Lo2 : 300
Di : 0.5
Dj : 0.5
units : degrees_east
grid_type : Latitude/Longitude
long_name : longitude
integer forecast_time0 ( forecast_time0 )
units : hours
long_name : Forecast offset from initial time
character initial_time0 ( initial_time0_hours, ncl_strlen_0 )
NCL_converted_from_type : string
units : mm/dd/yyyy (hh:mm)
long_name : Initial time of first record
-dave
On Mon, Jul 6, 2015 at 2:57 PM, Adv <advita6 at gmail.com> wrote:
> Hi,
> Thanks for your reply. Here is the file.
>
> On Mon, Jul 6, 2015 at 3:32 PM, David Brown <dbrown at ucar.edu> wrote:
>>
>> Can you upload the file to the ftp site using the directions at
>> http://www.ncl.ucar.edu/report_bug.shtml?
>> There's no way to help without access to the file.
>> -dave
>>
>> On Mon, Jul 6, 2015 at 2:27 PM, Adv <advita6 at gmail.com> wrote:
>> > Hi,
>> > Could someone help me to convert this grib file netcdf? This is the
>> > error i
>> > get.
>> >
>> >
>> > mars-atls00-a562cefde8a29a7288fa0b8b7f9413f7-_V1ZVs.grib contains no
>> > variables readable by NCL: converting global attributes only
>> >
>> > Thank you,
>> > Adv
>> >
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > ncl-talk at ucar.edu
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> >
>
>
More information about the ncl-talk
mailing list