<div dir="ltr"><div><div><br><br>On Tue, Nov 7, 2017 at 9:45 PM, Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com" target="_blank">markus.metz.giswork@gmail.com</a><wbr>> wrote:<br>><br>><br>><br>> On Mon, Nov 6, 2017 at 2:05 PM, Helmut Kudrnovsky <<a href="mailto:hellik@web.de" target="_blank">hellik@web.de</a>> wrote:<br>> ><br>> > Pietro Zambelli wrote<br>> > > Dear Helmut,<br>> > ><br>> > > On 06/11/17 08:22, Helmut Kudrnovsky wrote:<br>> > >> not really an answer, but the data documentation says:<br>> > >><br>> > >> "Output format:      GRIB 1, rotated spherical"<br>> > >><br>> > >> a quick web search shows some hints to handle such data.<br>> > ><br>> > > Looking at the reference model manual:<br>> > ><br>> > > <a href="http://www.cosmo-model.org/content/model/documentation/core/cosmoDyncsNumcs.pdf" target="_blank">http://www.cosmo-model.org/<wbr>content/model/documentation/<wbr>core/cosmoDyncsNumcs.pdf</a><br>> > ><br>> > > at page 25, there are some equation to transform the rotated spherical<br>> > > coordinates back and forward, see the attached image.<br>> > ><br>> > > Are these the hints that you mentioned in your previous reply?<br>> > ><br>> > > Should I convert the raster in to a x_s, y_s, z list of points and write<br>> > > a function to convert the spherical coordinates (x_s, y_s) values<br>> > > defining my own python script to apply the transformation function and<br>> > > generate the lat, lon, z triplet of values, to be imported into a WGS84<br>> > > location?<br>> > > Any better approach/idea?<br>> > ><br>> > > Thank you for the support.<br>> ><br>> > never used such kind of data for myself; maybe it would be worth to ask on<br>> > the GDAL ML how to used this kind of data.<br>><br>> GDAL and GRASS use proj4 for reprojection, but proj4 does not support these rotated spheres where the latitude origin for a longlat projection is not 0. The easiest solution is to use a different data source. Otherwise you would have to write a reprojection routine for such rotated spheres. The source code of gdalwarp or r.proj could be used as a template.<br><br></div>The cdo tool [0] can apparently reproject GRIB data from rotated sphere to regular longlat, e.g. with<br><br>cdo remapcon,outgrid.txt T_2M.2D.201501.grb T_2M.2D.201501.ll.grb<br><br></div>where the contents of outgrid.txt are defining the output projection and grid geometry (computational region) with something like<br>--><br>gridtype = lonlat<br>xsize = 1319<br>ysize = 610<br>xfirst = -44.75<br>yfirst = 21.8333333333333<br>xinc = 0.0833333333333333<br>yinc = 0.0833333333333333<br><div><--</div><div><br></div><div>with<br></div><div>xsize: number of columns<br></div><div>ysize: number of rows</div><div>xfirst, yfirst: lower left corner coordinates</div><div>xinc, yinc: resolution<br></div><div><br></div><div>Markus M<br></div><div><br>[0] <a href="https://code.mpimet.mpg.de/projects/cdo/" target="_blank">https://code.mpimet.mpg.de/<wbr>projects/cdo/</a><br><div>><br>> Markus M<br>> ><br>> > some other things I've found in the web, e.g.<br>> ><br>> > <a href="https://gis.stackexchange.com/questions/10808/manually-transforming-rotated-lat-lon-to-regular-lat-lon" target="_blank">https://gis.stackexchange.com/<wbr>questions/10808/manually-<wbr>transforming-rotated-lat-lon-<wbr>to-regular-lat-lon</a><br>> > <a href="https://gis.stackexchange.com/questions/64210/transforming-regular-lat-lon-to-rotated-lat-lon" target="_blank">https://gis.stackexchange.com/<wbr>questions/64210/transforming-<wbr>regular-lat-lon-to-rotated-<wbr>lat-lon</a><br>> > <a href="http://jgrib.sourceforge.net/docs/rotLatLon.pdf" target="_blank">http://jgrib.sourceforge.net/<wbr>docs/rotLatLon.pdf</a><br>> > [...]<br>> ><br>> > they looks similar you've found.<br>> ><br>> ><br>> ><br>> ><br>> > -----<br>> > best regards<br>> > Helmut<br>> > --<br>> > Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/Grass-Users-<wbr>f3884509.html</a><br>> > ______________________________<wbr>_________________<br>> > grass-user mailing list<br>> > <a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>> > <a href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>><br></div></div></div>