<div dir="ltr"><div><font color="#484848" face="Consolas, Menlo, Liberation Mono, Courier, monospace"><div><span style="font-size:12px">Hi Michel, list,</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">I've come across a different method - using the CDO tools to remap the rotated pole data set.</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">See thread here: <a href="https://code.mpimet.mpg.de/boards/2/topics/96">https://code.mpimet.mpg.de/boards/2/topics/96</a></span></div><div><span style="font-size:12px">The answer there uses a simple ASCII "mygrid" as the target grid, but the command can be "cdo remapbil,<a href="http://file.nc">file.nc</a> ifile ofile" where "<a href="http://file.nc">file.nc</a>" is a netcdf file that represents the target grid. It has specific format requirements discussed here: <a href="https://earthscience.stackexchange.com/questions/8086/interpolate-gaussian-grids-to-regular-fixed-grids-using-bilinear-interpolation">https://earthscience.stackexchange.com/questions/8086/interpolate-gaussian-grids-to-regular-fixed-grids-using-bilinear-interpolation</a></span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">I'm trying to figure out this CDO method, and having trouble converting my GRASS GIS projection information (and the longitude and latitude coordinates for each grid cell) to the correct NetCDF file... work is in progress.</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">If I can't do it this way I'll hand-code it as you suggested in your reply. I'm not totally clear on your method yet, so I may write and ask for more details.</span></div><div><span style="font-size:12px"><br></span></div><div><span style="font-size:12px">Thanks,</span></div><div><br></div><div>  -k.</div><div style="font-size:12px"><br></div></font></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 12:49 PM, Michel Wortmann <span dir="ltr"><<a href="mailto:wortmann@pik-potsdam.de" target="_blank">wortmann@pik-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    Hi Ken,<br>
    I have had to compare lonlat data with ncdf rotated pole data before
    and also chose to import the centroids of the rotated grid into a
    vector. To fill the cells I actually converted the points to much
    smaller resolution (e.g. you could use the 30m of your other
    dataset) raster cells with an ID and used r.grow.distance to create
    an ID grid. I could then just reclass this ID grid for each
    timestep, meaning no excess data in the grass db. At the time it
    seemed like a bit of a workaround, but reading the thread below
    makes me think this is the way to go.<br>
    <br>
    Regards,<br>
    Michel<div><div class="gmail-h5"><br>
    <br>
    <br>
    <br>
    <div class="gmail-m_-5692177127320398116moz-cite-prefix">On 15.08.2017 14:38, Ken Mankoff wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="gmail-h5">
      <div dir="ltr">It seems that my suggested approach might be the
        right one based on this thread from 2012: <a href="https://lists.osgeo.org/pipermail/grass-dev/2012-March/058179.html" target="_blank">https://lists.osgeo.org/<wbr>pipermail/grass-dev/2012-<wbr>March/058179.html</a>
        <div><br>
        </div>
        <div>  -k.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Aug 15, 2017 at 1:59 PM, Ken
          Mankoff <span dir="ltr"><<a href="mailto:mankoff@gmail.com" target="_blank">mankoff@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi GRASS
            list,<br>
            <br>
            I'm trying to compare two data sets and need to import them
            into the same location. One is a GeoTIFF in WGS84 lon,lat
            coordinates. When I create a new GRASS location using "-c
            file.tif" everything appears to work, and<br>
            <br>
            $ g.region -p<br>
            projection: 99 (unnamed)<br>
            zone:       0<br>
            datum:      wgs84<br>
            ellipsoid:  wgs84<br>
            etc...<br>
            <br>
            And from gdalinfo:<br>
            <br>
            Coordinate System is:<br>
            PROJCS["unnamed",<br>
                GEOGCS["WGS 84",<br>
                    DATUM["WGS_1984",<br>
                        SPHEROID["WGS 84",6378137,298.257223563,<br>
                            AUTHORITY["EPSG","7030"]],<br>
                        AUTHORITY["EPSG","6326"]],<br>
                    PRIMEM["Greenwich",0],<br>
                    UNIT["degree",0.01745329251994<wbr>33],<br>
                    AUTHORITY["EPSG","4326"]],<br>
                PROJECTION["Polar_Stereographi<wbr>c"],<br>
                PARAMETER["latitude_of_origin"<wbr>,70],<br>
                PARAMETER["central_meridian",-<wbr>45],<br>
                PARAMETER["scale_factor",1],<br>
                PARAMETER["false_easting",1],<br>
                PARAMETER["false_northing",1],<br>
                UNIT["metre",1,<br>
                    AUTHORITY["EPSG","9001"]]]<br>
            Origin = (107900.000000000000000,-65555<wbr>0.000000000000000)<br>
            Pixel Size = (30.000000000000000,-30.000000<wbr>000000000)<br>
            <br>
            <br>
            I have a second data set that I would like to co-locate with
            this one. That data comes in a NetCDF file but the
            projection is a custom rotated-pole projection. I have three
            variables in the NetCDF file: lon, lat, and the data.<br>
            <br>
            What is the best method to convert on data set to the other?
            My first approach might be to convert the NetCDF to
            lon,lat,data ASCII file, import as points with m.proj, then
            convert to raster. I'm wondering if this is what the experts
            on this list would do. Note that I have one TIF, and 50,000
            NetCDF time steps, so it may be more efficient to convert
            the TIF to the custom NetCDF projection, but it is not a
            requirement.<br>
            <br>
            Thanks for any advice you may have,<br>
            <br>
              -k.<br>
            <br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="gmail-m_-5692177127320398116mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
grass-user mailing list
<a class="gmail-m_-5692177127320398116moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>
<a class="gmail-m_-5692177127320398116moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></pre>
    </blockquote>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br></blockquote></div><br></div></div>