1

I am very new with netcdf file. And currently have to extract the data from such netcdf which looks like below:

8 variables (excluding dimension variables):
        double time_bnds[bnds,time]      
        int rotated_latitude_longitude[]   
                grid_mapping_name: rotated_latitude_longitude
                grid_north_pole_latitude: 39.25
                grid_north_pole_longitude: -162
                north_pole_grid_longitude: 0
            float lat[rlon,rlat]   
                standard_name: latitude
                long_name: latitude coordinate
                units: degrees_north
                bounds: lat_vertices
            float lon[rlon,rlat]   
                standard_name: longitude
                long_name: longitude coordinate
                units: degrees_east
                bounds: lon_vertices
            float lat_vertices[vertices,rlon,rlat]   
                units: degrees_north
            float lon_vertices[vertices,rlon,rlat]   
                units: degrees_east
            double height[]   
                units: m
                axis: Z
                positive: up
                long_name: height
                standard_name: height
            float tasmax[rlon,rlat,time]   
                standard_name: air_temperature
                long_name: Daily Maximum Near-Surface Air Temperature
                comment: daily-maximum near-surface (usually, 2 meter) air temperature.
                units: K
                cell_methods: time: maximum
                history: 2015-05-06T15:11:26Z altered by CMOR: Treated scalar dimension: 'height'. 2015-05-06T15:11:26Z altered by CMOR: replaced missing value flag (-1e+20) with standard missing value (1e+20).
                coordinates: height lat lon
                missing_value: 1.00000002004088e+20
                _FillValue: 1.00000002004088e+20
                associated_files: gridspecFile: gridspec_atmos_fx_MPI-CSC-REMO2009_rcp45_r0i0p0.nc
                grid_mapping: rotated_latitude_longitude

5 dimensions:
        time  Size:1825   *** is unlimited ***
            bounds: time_bnds
            units: days since 1949-12-01T00:00:00Z
            calendar: proleptic_gregorian
            axis: T
            long_name: time
            standard_name: time
        rlat  Size:103
            units: degrees
            axis: Y
            long_name: latitude in rotated pole grid
            standard_name: grid_latitude
        rlon  Size:106
            units: degrees
            axis: X
            long_name: longitude in rotated pole grid
            standard_name: grid_longitude
        bnds  Size:2
        vertices  Size:4

Although, there are many explanation of different netcdf files but I found my situation is a bit complicated in terms of number of variables and dimensions. Here I am confused with float lat[rlon,rlat]; why rlon and rlat is here with normal latitude? Similarly with the case of float lon[rlon,rlat]. And why rlon and rlat separately present in dimensions also?

Eventually I need to extract the temperature with geographical coordinates (latitude North and longitude East).

  • Which software are you using? It's too broad your question – aldo_tapia Mar 6 '18 at 14:27
  • I am using R package ncdf4. Yes its too broad, because I am unable to understand this complex data. Every previous post has simple data explanation. – kashiff007 Mar 6 '18 at 15:51
  • Use library(raster); library(ncdf); raster('path/to/file.nc', varname='tasmax') – aldo_tapia Mar 6 '18 at 18:07