[gdal-dev] Convert to temperature in degrees C in MODIS Ocean Color?

Etienne Tourigny etourigny.dev at gmail.com
Thu Jul 19 06:49:07 PDT 2012


You can try gdal_calc.py, although that requires python support

svn.osgeo.org/gdal/trunk/gdal/swig/python/scripts/gdal_calc.py

On Thu, Jul 19, 2012 at 12:46 AM, sigologo <dlopezaspe at gmail.com> wrote:
> Hello Everyone
>
>
> I'm trying import A20030012003008.L3m_8D_NSST_4, with gdal with this script:
>
> for file in A*L3m_8D_NSST_4 ; do
>   echo "map: $file"
>
>   gdal_translate -a_srs "+init=epsg:4326" -a_nodata 65535 \
>     -a_ullr -180 90 180 -90 -co "COMPRESS=PACKBITS" \
>     HDF4_SDS:UNKNOWN:"$file":0  ${file}_out.tif
>
> done
>
> all good, but the data not be in degree C............. I find for it another
> script but no found in gdal...
>
> for map in `g.mlist rast pat=A*L3m_8D_NSST_4` ; do
>   echo "$map"
>   g.region rast=$map
>   #r.info -r $map
>   Slope=0.000717185
>   Intercept=-2
>   r.mapcalc "${map}.degC = ($Slope * $map) + $Intercept"
>   r.support "${map}.degC" units="deg-C"
>   #r.colors "${map}.degC" color=bcyr  # fairly nice
> done
>
>
> I hope someone can help me with this!!!!!!!!!!!!
> Best Regards.
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Convert-to-temperature-in-degrees-C-in-MODIS-Ocean-Color-tp4989237.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> 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