[gdal-dev] gdal translate/warp goes16

Zachary Flamig zac at weatherwary.com
Tue Mar 20 23:34:26 PDT 2018


Hi Steven,

So the issue here is that gdal_translate doesn’t properly store the +sweep=x in the geotiff.

See http://geotiff.maptools.narkive.com/3CqwNeMd/geos-projection-sweep-parameter <http://geotiff.maptools.narkive.com/3CqwNeMd/geos-projection-sweep-parameter> for some relevant discussion. I believe the best solution right now is to specify the s_srs in the gdalwarp command like -s_srs "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  +sweep=x"

This is a bit of a mess, sorry about that.

Zac

> On Mar 20, 2018, at 9:37 PM, Steven Beale <steven.beale at woodplc.com> wrote:
> 
> Hi gdalers, 
> 
> I'm a little out of my field here, usually I work with weather/climate data,
> but I need to warp some goes16 satellite data. (source is aws s3:
> https://noaa-goes16.s3.amazonaws.com/ABI-L2-CMIPF/2018/079/12/OR_ABI-L2-CMIPF-M3C01_G16_s20180791200447_e20180791211214_c20180791211280.nc
> - the link should work for a few months then it will be glaciered and
> unavailable) 
> 
> source data is netcdf, I'm using nco tools & gdal for the processing. 
> 
> My work flow is: 
> 1. clip the data to the region of interest (north atlantic): 
> ncks -d x,5424,8678 -d y,0,2170 <raw.nc> step1.nc 
> 2. deflate & unscale 
> gdal_translate -ot float32 -unscale -CO COMPRESS=deflate NETCDF:step1.nc:CMI
> step2.tiff 
> 3. warp (in this case data is 1km resolution : ~0.009 degrees) 
> gdalwarp -t_srs EPSG:4326 -dstnodata -999.0 -tr 0.009 0.009 -te 290 40 320
> 65  -r near step2.tiff step3.tiff 
> 4. convert back to nc 
> gdal_translate -ot float32 -of NETCDF step3.tiff output.nc 
> 
> The problem i have is that the output has the longitude shifted to the west
> by about 10 degrees. 
> The issue seems related to the ncks clipping, if I exclude the x clip,
> everything works out fine, but takes significantly longer. 
> Here's an example once it's loaded into an erddap server; 
> <http://osgeo-org.1560.x6.nabble.com/file/t382897/GOES16_L2CMIPF_M3C01_201803201200.png> 
> You can see greenland to the west of it's map underlay. 
> 
> I'm using gdal v2.3.0, netcdf v4.4.1.1, nco v4.7.3 & proj4 v5.0.0 
> 
> 
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> 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/20180321/766a35cc/attachment.html>


More information about the gdal-dev mailing list