[gdal-dev] how to convert netCDF image

Gong, Shawn (Contractor) Shawn.Gong at drdc-rddc.gc.ca
Fri Jan 9 09:55:56 EST 2009


hi list,

I have some netCDF images that are in lat/lon. But they are flipped
upside down, and longitude is around 300 deg instead of -60 deg (West).

What gdal function can I use to convert/flip it to lat/lon and into
[-180, 180]? 

thanks,
Shawn

gdalinfo owsofa.nc
Driver: netCDF/Network Common Data Format
Files: owsofa.nc
Size is 512, 512
Coordinate System is `'
Metadata:
  NC_GLOBAL#Title=OWS gridded fields
  NC_GLOBAL#Conventions=CF-1.3
Subdatasets:
  SUBDATASET_1_NAME=NETCDF:"owsofa.nc":SST
  SUBDATASET_1_DESC=[105x189] SST (32-bit floating-point)
  SUBDATASET_2_NAME=NETCDF:"owsofa.nc":SST1
  SUBDATASET_2_DESC=[105x189] SST1 (32-bit floating-point)
  SUBDATASET_3_NAME=NETCDF:"owsofa.nc":T150
  SUBDATASET_3_DESC=[105x189] T150 (32-bit floating-point)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)

gdalinfo NETCDF:"owsofa.nc":SST
Driver: netCDF/Network Common Data Format
Files: none associated
Size is 189, 105
Coordinate System is `'
Origin = (284.875000000000000,60.125000000000000)
Pixel Size = (0.250000000000000,-0.250000000000000)
Metadata:
  NC_GLOBAL#Title=OWS gridded fields
  NC_GLOBAL#Conventions=CF-1.3
  SST#units=degree_C
  SST#long_name=SST
  SST#start_time=2008-DEC-02 0936
  SST#end_time=2008-DEC-05 0936
  SST#grid_mapping=crs
  SST#_FillValue=1.000000e+35
  lon#units=degrees_east
  lon#long_name=longitude
  lon#standard_name=longitude
  lat#units=degrees_north
  lat#long_name=latitude
  lat#standard_name=latitude
  crs#grid_mapping_name=latitude_longitude
  crs#longitude_of_prime_meridian=0
  crs#semi_major_axis=6.37814e+06
  crs#inverse_flattening=298.257
Corner Coordinates:
Upper Left  (     284.875,      60.125)
Lower Left  (     284.875,      33.875)
Upper Right (     332.125,      60.125)
Lower Right (     332.125,      33.875)
Center      (     308.500,      47.000)
Band 1 Block=189x1 Type=Float32, ColorInterp=Undefined
  NoData Value=1.00000004091847876e+35
  Metadata:
    NETCDF_VARNAME=SST



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090109/f5cc9e8e/attachment.html


More information about the gdal-dev mailing list