[gdal-dev] netCDF Data without subdatasets

Etienne Tourigny etourigny.dev at gmail.com
Tue Aug 6 10:03:23 PDT 2013


The file has no subdatasets, so you can use any of the gdal tools
(gdalwarp, gdal_translate) normally.  If you want a gtiff file you
would use gdal_translate

gdal_translate -of gtiff in.nc out.tif

On Tue, Aug 6, 2013 at 11:38 AM, Gunnar Oehmichen
<oehm8895 at uni-landau.de> wrote:
> Hi,
>
> this is my first time using netcdf data and gdal library on Ubuntu 12.04
>
> I have downloaded a subsetted monthly precipitation dataset from:
>
> http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html
>
> I want to create timelines of a few gridcells (covering germany)
>
> As I understand, before converting bands to raster-images by gdal_translate
> one has to extract information from the subdatasets.
>
> My Problem is:
>
> using
>
> gdalinfo X139.14.20.244.217.3.48.41.nc > gdalinfo.txt
>
> No subdatasets appear. I would have expected something like to the follwing
> to be included in the output of gdalinfo:
>
> SUBDATASET_1_NAME=NETCDF:...
> SUBDATASET_1_DESC=...
> SUBDATASET_2_NAME=...
> SUBDATASET_2_DESC=...
> SUBDATASET_3_NAME=...
> SUBDATASET_3_DESC=...
>
> Instead the output is as following:
>
> Driver: netCDF/Network Common Data Format
> Files: X139.14.20.244.217.3.47.29.nc
> Size is 6, 5
> Coordinate System is `'
> Origin = (2.500000000000000,57.500000000000000)
> Pixel Size = (2.500000000000000,-2.500000000000000)
> Metadata:
>   lat#actual_range={ 56.25, 46.25 }
>   lat#axis=Y
>   lat#long_name=Latitude
>   lat#standard_name=latitude
>   lat#units=degrees_north
>   lon#actual_range={ 3.75, 16.25 }
>   lon#axis=X
>   lon#long_name=Longitude
>   lon#standard_name=longitude
>   lon#units=degrees_east
>   NC_GLOBAL#Conventions=COARDS
>
> NC_GLOBAL#documentation=http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html
>   NC_GLOBAL#history=Tue Aug  6 03:47:30 2013: ncks -O -d
> lat,46.000000,57.000000 -d lon,3.000000,17.000000 -d time,0,2401
> /Datasets/cmap/std/precip.pentad.mean.nc
> /Public/www/X139.14.20.244.217.3.47.29.nc
> Created by CAS 09/2012  using Version 1201
>   NC_GLOBAL#platform=Analyses
>
> NC_GLOBAL#references=http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html
>   NC_GLOBAL#source=ftp ftp.cpc.ncep.noaa.gov precip/cmap/pentad
>   NC_GLOBAL#title=CPC Merged Analysis of Precipitation Pentad data (excludes
> NCEP Reanalysis I)
>   NC_GLOBAL#Version=V1201
>   precip#actual_range={ 0, 25.07 }
>   precip#add_offset=0
>   precip#dataset=CPC Merged Analysis of Precipitation Standard
>   precip#least_significant_digit=2
>   precip#level_desc=Surface
>   precip#long_name=Average Pentad Rate of Precipitation
>   precip#missing_value=-9.96921e+36
>   precip#parent_stat=Mean
>   precip#precision=2
>   precip#scale_factor=1
>   precip#statistic=Pentad Mean
>   precip#units=mm/day
>   precip#valid_range={ 0, 250 }
>   precip#var_desc=Precipitation
>   time#actual_range={ 1569072, 1857384 }
>   time#avg_period=0000-01-00 00:00:00
>   time#axis=T
>   time#delta_t=0000-00-05 00:00:00
>   time#long_name=Time
>   time#standard_name=time
>   time#units=hours since 1800-01-01 00:00:0.0
> Corner Coordinates:
> Upper Left  (   2.5000000,  57.5000000)
> Lower Left  (   2.5000000,  45.0000000)
> Upper Right (  17.5000000,  57.5000000)
> Lower Right (  17.5000000,  45.0000000)
> Center      (  10.0000000,  51.2500000)
> Band 1 Block=6x1 Type=Float32, ColorInterp=Undefined
>   NoData Value=-9.96920996838686905e+36
>   Metadata:
>     actual_range={ 0, 25.07 }
>     add_offset=0
>     dataset=CPC Merged Analysis of Precipitation Standard
>     least_significant_digit=2
>     level_desc=Surface
>     long_name=Average Pentad Rate of Precipitation
>     missing_value=-9.96921e+36
>     NETCDF_DIMENSION_time=1569072
>     NETCDF_time_units=hours since 1800-01-01 00:00:0.0
>     NETCDF_VARNAME=precip
>     parent_stat=Mean
>     precision=2
>     scale_factor=1
>     statistic=Pentad Mean
>     units=mm/day
>     valid_range={ 0, 250 }
>     var_desc=Precipitation
>
> And the next bands following.
> ---
> Here is the metadata:
> ---
>
>
> Metadata for /Public/www/X139.14.20.244.217.3.47.29.nc
> Dimensions:
>
>         time                            2402
>         lat                             5
>         lon                             6
>         precip                          2402 5 6
>
> Variables:
>
>     time
>
>         long_name                       Time
>         avg_period                      0000-01-00 00:00:00
>         axis                            T
>         standard_name                   time
>         delta_t                         0000-00-05 00:00:00
>         actual_range                    1979-01-01 00:00:00 2011-11-22
> 00:00:00
>         units                           hours since 1800-01-01 00:00:0.0
>     lat
>
>         long_name                       Latitude
>         axis                            Y
>         standard_name                   latitude
>         actual_range                    56.25 46.25
>         units                           degrees_north
>     lon
>
>         long_name                       Longitude
>         axis                            X
>         standard_name                   longitude
>         actual_range                    3.75 16.25
>         units                           degrees_east
>     precip
>
>         parent_stat                     Mean
>         long_name                       Average Pentad Rate of Precipitation
>         valid_range                     0 250
>         least_significant_digit         2
>         level_desc                      Surface
>         dataset                         CPC Merged Analysis of Precipitation
> Standard
>         missing_value                   -9.96920996838687e+36
>         statistic                       Pentad Mean
>         actual_range                    0 25.0699996948242
>         var_desc                        Precipitation
>         add_offset                      0
>         precision                       2
>         units                           mm/day
>         scale_factor                    1
>
> Global Attributes:
>
>     source
>         ftp ftp.cpc.ncep.noaa.gov precip/cmap/pentad
>
>     Version
>         V1201
>
>     history
>         Tue Aug 6 03:47:30 2013: ncks -O -d lat,46.000000,57.000000 -d
> lon,3.000000,17.000000 -d time,0,2401
> /Datasets/cmap/std/precip.pentad.mean.nc
> /Public/www/X139.14.20.244.217.3.47.29.nc Created by CAS 09/2012 using
> Version 1201
>
>     references
>         http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html
>
>     documentation
>         http://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html
>
>     platform
>         Analyses
>
>     title
>         CPC Merged Analysis of Precipitation Pentad data (excludes NCEP
> Reanalysis I)
>
>     Conventions
>         COARDS
> ---
>
> Any advise on how to proceed to create rasters and timelines from this would
> be very appreciated. Probably something obvious I do not see.
>
> Thanks,
>
> Gunnar
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list