[ncl-talk] reading in ERA-20C grib file with data on model/hybrid levels
Dennis Shea
shea at ucar.edu
Tue Mar 12 06:09:16 MDT 2019
I am using NCL 6.5.0. I have no problem reading the grib file.
*%> ncl NCAR Command Language Version 6.5.0 *
ncl 0> f = addfile("e20c_an_temp_r360x180_ml_199410.*grib*","r")
ncl 1> print(f)
ncl 2> t = f->TMP_P0_L105_GLL0
printVarSummary(t)
ncl 3> printVarSummary(t)
Variable: t
Type: float
Total Size: 2941061760 bytes
735265440 values
Number of Dimensions: 4
Dimensions and sizes: [initial_time0_hours | 124] x [lv_HYBL0 | 91] x
[lat_0 | 181] x [lon_0 | 360]
Coordinates:
initial_time0_hours: [1707120..1707858]
lv_HYBL0: [ 1..91]
lat_0: [90..-90]
lon_0: [ 0..359]
Number Of Attributes: 11
center : European Center for Medium-Range Weather Forecasts
production_status : Operational products
long_name : Temperature
units : K
_FillValue : 1e+20
grid_type : Latitude/longitude
parameter_discipline_and_category : Meteorological products,
Temperature
parameter_template_discipline_category_number : ( 0, 0, 0, 0 )
level_type : Hybrid level
forecast_time : 0
forecast_time_units : hours
ncl 4> printMinMax(t,0)
(0) Temperature (K) : min=170.211 max=313.993
On Tue, Mar 12, 2019 at 5:30 AM De Vries Andries <
andries.devries at env.ethz.ch> wrote:
> Dear NCL Team & Users,
>
> I have an issue with reading in ERA-20C grib files from ECMWF that contain
> data on model levels. No matter if it is data on a regular (1x1 degree
> grid) or a gaussian grid (N80), I can not read the variables within the
> file, see for example the first print statements below.
>
> When I convert the grib file to netcdf format, using the tool cdo {cdo -f
> nc copy {infile} {outfile}}, there is no problem; I can read in the netcdf
> file and variables without any problem, see the second print statement
> below. Ideally, however, I would like to use NCL to read in the grib files
> without converting them first to netcdf format. Any idea how to achieve
> this?
>
> Two side comments (1) I can read in ERA-20C grib files with data on
> pressure levels, surface, or isentropic levels without any problem problem;
> there is no need to convert them to netcdf format, and (2) Also, I can read
> in ERA-Interim grib files with data on model levels without any problems
> that are downloaded in the same manner & format as the ERA-20C data.
>
> @NCL TEAM; I copied an example ERA-20C file in grib and netcdf format with
> temperature on model levels for the year 199410 to ftp.cgd.ucar.edu
>
> Kind regards,
> Andries
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
> READING IN ERA-20C GRIB FILE WITH DATA ON MODEL LEVELS; CANNOT READ
> VARIABLES
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Copyright (C) 1995-2015 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.3.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> ncl 0> a=addfile("e20c_an_temp_r360x180_ml_199410.grib","r")
>
> ncl 1> print(a)
>
> print(a)
>
> Variable: a
> Type: file
> filename: (null)
> path: e20c_an_temp_r360x180_ml_199410.grib
> file global attributes:
> dimensions:
> variables:
>
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
> READING IN ERA-20C NETCDF FILE WITH DATA ON MODEL LEVELS; READS VARIABLES
>
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Copyright (C) 1995-2015 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.3.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> ncl 0> a=addfile("e20c_an_temp_r360x180_ml_199410.nc","r")
>
> ncl 1> print(a)
>
> Variable: a
> Type: file
> filename: e20c_an_temp_r360x180_ml_199410
> path: e20c_an_temp_r360x180_ml_199410.nc
> file global attributes:
> CDI : Climate Data Interface version 1.9.5 (http://mpimet.mpg.de/cdi
> )
> Conventions : CF-1.6
> history : Thu Feb 14 11:02:46 2019: cdo -f nc copy
> /atmosdyn/devriesa/DATA/ERA20C/e20c_an_temp_r360x180_ml_199410.grib
> /atmosdyn/devriesa/DATA/ERA20C-MOD/NC/e20c_an_temp_r360x180_ml_199410.nc
> institution : European Centre for Medium-Range Weather Forecasts
> CDO : Climate Data Operators version 1.9.5 (http://mpimet.mpg.de/cdo
> )
> dimensions:
> time = 124 // unlimited
> lon = 360
> lat = 181
> lev = 91
> nhyi = 92
> nhym = 91
> variables:
> double time ( time )
> standard_name : time
> units : hours since 1994-10-1 00:00:00
> calendar : proleptic_gregorian
> axis : T
>
> double lon ( lon )
> standard_name : longitude
> long_name : longitude
> units : degrees_east
> axis : X
>
> double lat ( lat )
> standard_name : latitude
> long_name : latitude
> units : degrees_north
> axis : Y
>
> double lev ( lev )
> standard_name : hybrid_sigma_pressure
> long_name : hybrid level at layer midpoints
> formula : hyam hybm (mlev=hyam+hybm*aps)
> formula_terms : ap: hyam b: hybm ps: aps
> units : level
> positive : down
>
> double hyai ( nhyi )
> long_name : hybrid A coefficient at layer interfaces
> units : Pa
>
> double hybi ( nhyi )
> long_name : hybrid B coefficient at layer interfaces
> units : 1
>
> double hyam ( nhym )
> long_name : hybrid A coefficient at layer midpoints
> units : Pa
>
> double hybm ( nhym )
> long_name : hybrid B coefficient at layer midpoints
> units : 1
>
> float t ( time, lev, lat, lon )
> standard_name : air_temperature
> long_name : Temperature
> units : K
> param : 0.0.0
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190312/2b08eeff/attachment.html>
More information about the ncl-talk
mailing list