[ncl-talk] reading in ERA-20C grib file with data on model/hybrid levels

De Vries Andries andries.devries at env.ethz.ch
Tue Mar 12 05:29:32 MDT 2019


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


More information about the ncl-talk mailing list