Project

General

Profile

How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data.

Added by jyoti lodha about 6 years ago

command - cdo outputf,%10.3f,2 -mulc,85000.0 -selname,a_bnds temp1.nc

cdo outputf: Started child process "mulc,85000.0 -selname,a_bnds temp1.nc (pipe1.1)".
cdo(2) mulc: Started child process "selname,a_bnds temp1.nc (pipe2.1)".
cdo(3) selname (Warning): Variable name a_bnds not found!

cdo(3) selname (Abort): No variables selected!.

My cdo version
Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo)
Compiler: gcc -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fPIC -fopenmp
version: gcc (Ubuntu 5.3.1-9ubuntu2) 5.3.1 20160220
Features: DATA PTHREADS OpenMP4 HDF5 NC4/HDF5/threadsafe OPeNDAP SZ Z UDUNITS2 PROJ.4 MAGICS CURL FFTW3 SSE2
Libraries: HDF5/1.8.16 proj/4.92 curl/7.47.0
Filetypes: srv ext ieg grb grb2 nc nc2 nc4 nc4c
CDI library version : 1.7.0
GRIB_API library version : 1.14.4
netCDF library version : 4.4.0 of Mar 29 2016 11:41:40 $
HDF5 library version : 1.8.16
SERVICE library version : 1.4.0
EXTRA library version : 1.4.0
IEG library version : 1.4.0
FILE library version : 1.8.2

temp1.nc (48.3 KB) temp1.nc

Replies (6)

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by Karin Meier-Fleischer about 6 years ago

Hi jyoti,

there is no a_bnds variable in your file but lat_bnds and lon_bnds.

ncdump -h temp1.nc

netcdf temp1 {
dimensions:
    lon = 21 ;
    bnds = 2 ;
    lat = 22 ;
    plev = 3 ;
    time = UNLIMITED ; // (8 currently)
variables:
    double lon(lon) ;
        lon:standard_name = "longitude" ;
        lon:long_name = "longitude" ;
        lon:units = "degrees_east" ;
        lon:axis = "X" ;
        lon:bounds = "lon_bnds" ;
    double lon_bnds(lon, bnds) ;
    double lat(lat) ;
        lat:standard_name = "latitude" ;
        lat:long_name = "latitude" ;
        lat:units = "degrees_north" ;
        lat:axis = "Y" ;
        lat:bounds = "lat_bnds" ;
    double lat_bnds(lat, bnds) ;
    double plev(plev) ;
        plev:standard_name = "air_pressure" ;
        plev:long_name = "pressure" ;
        plev:units = "Pa" ;
        plev:positive = "down" ;
        plev:axis = "Z" ;
    double time(time) ;
        time:standard_name = "time" ;
        time:long_name = "time" ;
        time:units = "days since 1850-1-1 00:00:00" ;
        time:calendar = "365_day" ;
        time:axis = "T" ;
    float ta(time, plev, lat, lon) ;
        ta:standard_name = "air_temperature" ;
        ta:long_name = "Air Temperature" ;
        ta:units = "K" ;
        ta:grid_type = "gaussian" ;
        ta:_FillValue = 1.e+20f ;
        ta:missing_value = 1.e+20f ;
        ta:original_name = "T" ;
        ta:history = "2011-10-14T09:35:39Z altered by CMOR: replaced missing value flag (-999) with standard missing value (1e+20). 2011-10-14T09:35:39Z altered by CMOR: Inverted axis: lat." ;
        ta:associated_files = "baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_atmos_fx_MIROC5_historical_r0i0p0.nc areacella: areacella_fx_MIROC5_historical_r0i0p0.nc" ;

// global attributes:
        :CDI = "Climate Data Interface version ?? (http://mpimet.mpg.de/cdi)" ;
        :Conventions = "CF-1.4" ;
        :history = "Tue Apr 17 16:29:02 2018: cdo invertlev india.nc temp1.nc\n",
            "Tue Apr 17 16:24:46 2018: cdo sellonlatbox,68,97.5,7.5,37.5 date.nc india.nc\n",
            "Tue Apr 17 16:22:08 2018: cdo seldate,2005-01-01T00:00:00,2005-01-02T18:00:00 ta_6hrPlev_MIROC5_historical_r1i1p1_2005010100-2005123118.nc date.nc\n",
            "2011-10-14T09:35:39Z CMOR rewrote data to comply with CF standards and CMIP5 requirements." ;
        :source = "MIROC5 2010 atmosphere: MIROC-AGCM6 (T85L40); ocean: COCO (COCO4.5, 256x224 L50); sea ice: COCO (COCO4.5); land: MATSIRO (MATSIRO, L6); aerosols: SPRINTARS (SPRINTARS 5.00, T85L40)" ;
        :institution = "AORI (Atmosphere and Ocean Research Institute, The University of Tokyo, Chiba, Japan), NIES (National Institute for Environmental Studies, Ibaraki, Japan), JAMSTEC (Japan Agency for Marine-Earth Science and Technology, Kanagawa, Japan)" ;
        :institute_id = "MIROC" ;
        :experiment_id = "historical" ;
        :model_id = "MIROC5" ;
        :forcing = "GHG, SA, Oz, LU, Sl, Vl, SS, Ds, BC, MD, OC (GHG includes CO2, N2O, methane, and fluorocarbons; Oz includes OH and H2O2; LU excludes change in lake fraction)" ;
        :parent_experiment_id = "piControl" ;
        :parent_experiment_rip = "r1i1p1" ;
        :branch_time = 150015. ;
        :contact = "Masahiro Watanabe (hiro@aori.u-tokyo.ac.jp), Seita Emori (emori@nies.go.jp), Masayoshi Ishii (ism@jamstec.go.jp), Masahide Kimoto (kimoto@aori.u-tokyo.ac.jp)" ;
        :references = "Watanabe et al., 2010: Improved climate simulation by MIROC5: Mean states, variability, and climate sensitivity. J. Climate, 23, 6312-6335" ;
        :initialization_method = 1 ;
        :physics_version = 1 ;
        :tracking_id = "12c5f287-1f98-44ae-b61c-b1e4dbd7eef0" ;
        :product = "output" ;
        :experiment = "historical" ;
        :frequency = "6hr" ;
        :creation_date = "2011-10-14T09:35:39Z" ;
        :project_id = "CMIP5" ;
        :table_id = "Table 6hrPlev (27 April 2011) 00b465eee32d6d11a7e57f5cc8e067f8" ;
        :title = "MIROC5 model output prepared for CMIP5 historical" ;
        :parent_experiment = "pre-industrial control" ;
        :modeling_realm = "atmos" ;
        :realization = 1 ;
        :cmor_version = "2.7.1" ;
        :CDO = "Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo)" ;
}

-Karin

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by jyoti lodha about 6 years ago

Thanks for reply. I again change the parameters still the same error is coming.

command :
cdo outputf,%10.3f,2 -mulc,850000 -selname,lon_bnds temp1.nc
cdo outputf: Started child process "mulc,850000 -selname,lon_bnds temp1.nc (pipe1.1)".
cdo(2) mulc: Started child process "selname,lon_bnds temp1.nc (pipe2.1)".
cdo(3) selname (Warning): Variable name lon_bnds not found!

cdo(3) selname (Abort): No variables selected!

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by Ralf Mueller about 6 years ago

Hi!

CDO does not offer direct access to coordinate variables. Even
printing coordinate bounds is not provided, sorry ;-(

cheers
ralf


% cdo -h outputkey                                                                                                                                                                    [Wed 2018-04-18|10:43:41]
NAME
    outputtab - Table output

SYNOPSIS
    outputtab,params  infiles outfile

DESCRIPTION
    This operator prints a table of all input datasets to standard output.
    infiles is an arbitrary number of input files. All input files need to have 
    the same structure with the same variables on different timesteps.
    All input fields need to have the same horizontal grid.

    The contents of the table depends on the chosen paramters. The format of each table
    parameter is keyname[:len]. len is the optional length of a table entry.  
    Here is a list of all valid keynames:

     Keyname    & Type    & Description      
     value      & FLOAT   & Value of the variable [len:8]
     name       & STRING  & Name of the variable [len:8]
     param      & STRING  & Parameter ID (GRIB1: code[.tabnum]; GRIB2: num[.cat[.dis]]) [len:11]
     code       & INTEGER & Code number [len:4]
     lon        & FLOAT   & Longitude coordinate [len:6]
     lat        & FLOAT   & Latitude coordinate [len:6]
     lev        & FLOAT   & Vertical level [len:6]
     xind       & INTEGER & Grid x index [len:4]
     yind       & INTEGER & Grid y index [len:4]
     timestep   & INTEGER & Timestep number [len:6]
     date       & STRING  & Date (format YYYY-MM-DD) [len:10]
     time       & STRING  & Time (format hh:mm:ss) [len:8]
     year       & INTEGER & Year [len:5]
     month      & INTEGER & Month [len:2]
     day        & INTEGER & Day [len:2]
     nohead     & INTEGER & Disable output of header line

PARAMETER
    params  STRING   Comma separated list of keynames, one for each column of the table

NCO's ncks seem to have similare funtionality

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by jyoti lodha about 6 years ago

Thanks for the reply. I used NCO for this and run it and able to access the lat and long bnds. Then finally we can access
NCO Command:
ncatted -O -a bounds,,d,, clip_ta

CDO command:
cdo outputf,%10.3f,2 -mulc,850000 -selname,lon_bnds clip_ta

NCO Command:
ncatted -O -a bounds,,d,, clip_ta

jyoti@jyoti-HP-Pavilion-Notebook:~/Documents/MOHC-HadGEM2-ES_historical_r1i1p1_185912-190911/pressure_test$ cdo sinfon clip_ta
Warning (cdfScanVarAttributes) : NetCDF: Variable not found - areacella
File format : netCDF
-1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter name
1 : unknown MIROC5 constant 1 1 256 1 F64 : lat_bnds
2 : unknown MIROC5 constant 1 1 512 2 F64 : lon_bnds
3 : unknown MIROC5 instant 3 2 32768 3 F32 : ta
Grid coordinates :
1 : generic : points=256 (2x128)
lat : -88.9277 to 88.9277 by 1.38903 degrees_north
2 : generic : points=512 (256x2)
lon : 0 to 358.594 by 1.40625 degrees_east
3 : gaussian : points=32768 (256x128) np=64
lon : 0 to 358.594 by 1.40625 degrees_east circular
lat : -88.9277 to 88.9277 degrees_north
Vertical coordinates :
1 : surface : levels=1
2 : pressure : levels=3
plev : 85000 to 25000 Pa
Time coordinate : 91 steps
RefTime = 1850-01-01 00:00:00 Units = days Calendar = 365_day
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by Ralf Mueller about 6 years ago

so your problem is solved not? Sorry if I dont get it right away ;-)

RE: How to access a_bnds and b_bnds of (ta_6hrPlev_MIROC5_historical) CMIP5 data. - Added by jyoti lodha about 6 years ago

Yes,my problem got solved, by using NCO command I split the variables(lon_bnds and lat_bnds) and then used cdo command for further processing the variables.

I am very much thankful to CDO fourms peoples for giving us such a quick response in our solving problem . Thanks again.

    (1-6/6)