[gdal-dev] NOAA satellite swath NetCDF file to georeferenced Gtiff?
Marsh, Chris
chris.marsh at usask.ca
Tue Mar 5 11:08:38 PST 2019
You could use xarray to load the netcdf, and then write that data out to geotiff via rasterio. Full automation of this looks like it's still coming, but this ticket response shows how to do it. Might require assigning a crs to it manually, you'll have to play around with it.
https://github.com/pydata/xarray/issues/2042#issuecomment-457584997
Cheers
Chris
On Tue, Mar 5, 2019 at 12:25 PM Stephen Woodbridge <stephenwoodbridge37 at gmail.com<mailto:stephenwoodbridge37 at gmail.com>> wrote:
Hi All,
Can someone please give me a hint on how to convert a NOAA satellite
swath NetCDF file to georeferenced Gtiff?
I found these:
https://trac.osgeo.org/gdal/ticket/4513
https://trac.osgeo.org/gdal/wiki/rfc4_geolocate
which implies it cannot be done directly with gdal yet.
Is there another way to this maybe using Python if gdal can't handle it?
-Steve W
$ gdalinfo --version
GDAL 1.11.3, released 2015/09/16
$ gdalinfo
NETCDF:20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc<http://G-ACSPO_V2.41-v02.0-fv01.0.nc>:sea_surface_temperature
Warning 1: dimension #2 (ni) is not a Longitude/X dimension.
Warning 1: dimension #1 (nj) is not a Latitude/Y dimension.
Driver: netCDF/Network Common Data Format
Files:
20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc<http://20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc>
Size is 409, 7200
Coordinate System is `'
Metadata:
NC_GLOBAL#acknowledgment=Please acknowledge the use of these data
with the following statement: These data were provided by Group for High
Resolution Sea Surface Temperature (GHRSST) and the National Oceanic and
Atmospheric Administration (NOAA).
NC_GLOBAL#cdm_data_type=swath
NC_GLOBAL#comment=none
NC_GLOBAL#Conventions=CF-1.6
NC_GLOBAL#creator_email=Alex.Ignatov at noaa.gov<mailto:Alex.Ignatov at noaa.gov>
NC_GLOBAL#creator_name=Alex Ignatov
NC_GLOBAL#creator_url=http://www.star.nesdis.noaa.gov
NC_GLOBAL#date_created=20190304T214051Z
NC_GLOBAL#easternmost_longitude=180
NC_GLOBAL#file_quality_level=3
NC_GLOBAL#gds_version_id=02.0
NC_GLOBAL#geospatial_bounds=POLYGON(( 3.520 14.209, 176.005
20.284, -156.649 15.860, -23.493 9.963, 3.520 14.209))
NC_GLOBAL#geospatial_first_scanline_first_fov_lat=20.283962
NC_GLOBAL#geospatial_first_scanline_first_fov_lon=176.00494
NC_GLOBAL#geospatial_first_scanline_last_fov_lat=15.859998
NC_GLOBAL#geospatial_first_scanline_last_fov_lon=-156.64908
NC_GLOBAL#geospatial_last_scanline_first_fov_lat=14.20918
NC_GLOBAL#geospatial_last_scanline_first_fov_lon=3.5202866
NC_GLOBAL#geospatial_last_scanline_last_fov_lat=9.9625263
NC_GLOBAL#geospatial_last_scanline_last_fov_lon=-23.492666
NC_GLOBAL#geospatial_lat_resolution=0.0098999999
NC_GLOBAL#geospatial_lat_units=degrees_north
NC_GLOBAL#geospatial_lon_resolution=0.0098999999
NC_GLOBAL#geospatial_lon_units=degrees_east
NC_GLOBAL#history=Created by Advanced Clear-Sky Processor for Oceans
(ACSPO)-AVHRR at NOAA/NESDIS/OSPO.
NC_GLOBAL#id=AVHRR18_G-OSPO-L2P-v2.41
NC_GLOBAL#institution=NOAA/NESDIS/OSPO
NC_GLOBAL#keywords=Oceans > Ocean Temperature > Sea Surface Temperature
NC_GLOBAL#keywords_vocabulary=NASA Global Change Master Directory
(GCMD) Science Keywords
NC_GLOBAL#license=GHRSST protocol describes data use as free and open
NC_GLOBAL#Metadata_Conventions=Unidata Dataset Discovery v1.0
NC_GLOBAL#metadata_link=http://podaac.jpl.nasa.gov/ws/metadata/dataset/?format=iso&shortName=AVHRR18_G-OSPO-L2P-v2.41
NC_GLOBAL#naming_authority=org.ghrsst
NC_GLOBAL#netcdf_version_id=4.3.2 of Sep 24 2015 08:51:38 $
NC_GLOBAL#northernmost_latitude=20.283962
NC_GLOBAL#platform=NOAA-18
NC_GLOBAL#processing_level=L2P
NC_GLOBAL#product_version=2.41
NC_GLOBAL#project=Group for High Resolution Sea Surface Temperature
NC_GLOBAL#publisher_email=ghrsst-po at nceo.ac.uk<mailto:ghrsst-po at nceo.ac.uk>
NC_GLOBAL#publisher_name=The GHRSST Project Office
NC_GLOBAL#publisher_url=http://www.ghrsst.org
NC_GLOBAL#references=Data convention: GHRSST Data Specification (GDS)
v2.0. Algorithms: ACSPO-AVHRR ATBD (NOAA/NESDIS/STAR)
NC_GLOBAL#sensor=AVHRR_GAC
NC_GLOBAL#source=AVHRR_L1b,CMC0.2deg-CMC-L4-GLOB-v2.0,NOAA-NCEP-GFS
NC_GLOBAL#southernmost_latitude=-90
NC_GLOBAL#spatial_resolution=1.1 km at nadir
NC_GLOBAL#standard_name_vocabulary=CF Standard Name Table (v26, 08
November 2013)
NC_GLOBAL#start_time=20190304T200000Z
NC_GLOBAL#stop_time=20190304T205959Z
NC_GLOBAL#summary=Sea surface temperature retrievals produced by
NOAA/NESDIS/OSPO office from AVHRR sensor
NC_GLOBAL#time_coverage_end=20190304T205959Z
NC_GLOBAL#time_coverage_start=20190304T200000Z
NC_GLOBAL#title=AVHRR L2P SST
NC_GLOBAL#uuid=2eaa373c-3ec6-11e9-ac15-f9642917379f
NC_GLOBAL#westernmost_longitude=-180
NETCDF_DIM_EXTRA={time}
NETCDF_DIM_time_DEF={1,4}
NETCDF_DIM_time_VALUES=1204574400
sea_surface_temperature#_FillValue=-32768
sea_surface_temperature#add_offset=273.14999
sea_surface_temperature#comment=SST obtained by regression with buoy
measurements
sea_surface_temperature#coordinates=lon lat
sea_surface_temperature#long_name=sea surface skin temperature
sea_surface_temperature#scale_factor=0.0099999998
sea_surface_temperature#source=NOAA
sea_surface_temperature#standard_name=sea_surface_skin_temperature
sea_surface_temperature#units=kelvin
sea_surface_temperature#valid_max=32767
sea_surface_temperature#valid_min=-32767
time#axis=T
time#calendar=Gregorian
time#comment=seconds since 1981-01-01 00:00:00
time#long_name=reference time of sst file
time#standard_name=time
time#units=seconds since 1981-01-01 00:00:00
Geolocation:
LINE_OFFSET=0
LINE_STEP=1
PIXEL_OFFSET=0
PIXEL_STEP=1
SRS=GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
X_BAND=1
X_DATASET=NETCDF:"20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc<http://20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc>":lon
Y_BAND=1
Y_DATASET=NETCDF:"20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc<http://20190304200000-OSPO-L2P_GHRSST-SSTsubskin-AVHRR18_G-ACSPO_V2.41-v02.0-fv01.0.nc>":lat
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 7200.0)
Upper Right ( 409.0, 0.0)
Lower Right ( 409.0, 7200.0)
Center ( 204.5, 3600.0)
Band 1 Block=409x1024 Type=Int16, ColorInterp=Undefined
NoData Value=-32768
Offset: 273.149993896484, Scale:0.00999999977648258
Metadata:
_FillValue=-32768
add_offset=273.14999
comment=SST obtained by regression with buoy measurements
coordinates=lon lat
long_name=sea surface skin temperature
NETCDF_DIM_time=1204574400
NETCDF_VARNAME=sea_surface_temperature
scale_factor=0.0099999998
source=NOAA
standard_name=sea_surface_skin_temperature
units=kelvin
valid_max=32767
valid_min=-32767
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190305/fbfe2e99/attachment-0001.html>
More information about the gdal-dev
mailing list