<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8">

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head><body style="word-wrap: break-word; -webkit-nbsp-mode:
    space; -webkit-line-break: after-white-space;" text="#000000" bgcolor="#FFFFFF" class="">
    Dear List,
    <div class=""><br class="">
    </div>
    <div class="">I downloaded 20 files from MODIS satellite for NPP (MOD17A3).
      I’d like to read the hdf files and merge it in 4x5 to get the NPP
      value for pan-European domain. I've been written the fallowing
      script for my aim. Unfortunately, I get the files merged in 1x20
      (i.e. merged along latitude and not lonxlat direction).<br class="">
      Can please anyone help me to read the npp from the 20 files and
      enlarge it in LonxLat direction.<br class="">
      <br class="">
      Thank you very much in advance<br class="">
      Abu<br class="">
      <br class="">
      Script:<br class="">
      <br class="">
      <br class="">
    </div>
    <div class=""><font color="#ff0000" class=""><br class="">
      </font></div>
    <div class=""><font color="#ff0000" class="">load
        "$NCARG_ROOT/share/ncarg/nclscripts/csm/gsn_code.ncl"<br class="">
        load "$NCARG_ROOT/share/ncarg/nclscripts/csm/gsn_csm.ncl"<br class="">
        load "$NCARG_ROOT/share/ncarg/nclscripts/csm/contributed.ncl"<br class="">
        load "$NCARG_ROOT/share/ncarg/nclscripts/csm/shea_util.ncl"<br class="">
        <br class="">
        begin<br class="">
        <br class="">
        ; 1km annual npp MOD17A3 on 1200x1200 tiles<br class="">
        <br class="">
        files = systemfunc("ls *.hdfeos")<br class="">
        <br class="">
        f = addfiles(files,"r")<br class="">
        ;print(f)<br class="">
        ;ListSetType (f, "cat") ;concatenate files<br class="">
        <br class="">
        lat2d=f[:]-&gt;GridLat_MOD_Grid_MOD17A3<br class="">
        lon2d=f[:]-&gt;GridLon_MOD_Grid_MOD17A3<br class="">
        <br class="">
        npp=short2flt(f[:]-&gt;Npp_1km_MOD_Grid_MOD17A3)<br class="">
        <br class="">
        lat2d!0="nlat"<br class="">
        lat2d!1="nlon"<br class="">
        lon2d!0="nlat"<br class="">
        lon2d!1="nlon"<br class="">
        <br class="">
        ;printVarSummary(lon2d)<br class="">
        <br class="">
        npp!0="lat2d"<br class="">
        npp!1="lon2d"<br class="">
        npp&amp;lat2d=lat2d<br class="">
        npp&amp;lon2d=lon2d<br class="">
        npp@coordinates="lat2d,lon2d"<br class="">
        npp@projection="sinusoidal"<br class="">
        <br class="">
        printVarSummary(npp)<br class="">
        <br class="">
        system("rm test.nc")<br class="">
        out=addfile("test.nc","c")<br class="">
        out-&gt;npp=npp<br class="">
        out-&gt;lat2d=lat2d<br class="">
        out-&gt;lon2d=lon2d<br class="">
        <br class="">
        end<br class="">
      </font></div>
    <div class=""><br class="">
    </div>
    <div class=""><i class=""><small class="">print summary is<br class="">
          <br class="">
          Variable: npp<br class="">
          Type: short<br class="">
          Total Size: 57600000 bytes<br class="">
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28800000 values<br class="">
          Number of Dimensions: 2<br class="">
          Dimensions and sizes:&nbsp;&nbsp;&nbsp; [YDim_MOD_Grid_MOD17A3 | 24000] x
          [XDim_MOD_Grid_MOD17A3 | 1200]<br class="">
          Coordinates: <br class="">
          Number Of Attributes: 6<br class="">
          &nbsp; lon2d :&nbsp;&nbsp;&nbsp; &lt;ARRAY of 28800000 elements&gt;<br class="">
          &nbsp; lat2d :&nbsp;&nbsp;&nbsp; &lt;ARRAY of 28800000 elements&gt;<br class="">
          &nbsp; coordinates :&nbsp;&nbsp;&nbsp; lat2d,lon2d<br class="">
          &nbsp; hdfeos_name :&nbsp;&nbsp;&nbsp; Npp_1km<br class="">
          &nbsp; projection :&nbsp;&nbsp;&nbsp; sinusoidal<br class="">
          &nbsp; unsigned :&nbsp;&nbsp;&nbsp; True<br class="">
        </small></i><br class="">
    </div>
    <div class=""><br class="">
      <div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div apple-content-edited="true" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font color="#aaaaaa" class="">---------------------------------------------------------------------------<br class="">Asst. Prof. Abdulla Sakalli<br class=""><br class=""></font><font color="#aaaaaa" class="">Iskenderun Technical University</font></div><div class=""><font color="#aaaaaa" class="">Faculty of Marine Sciences &amp; Technology<br class="">Dept. Water Resources Management and Organization<br class="">Meydan Mah. 512 Sk<br class="">Iskenderun-Hatay-Turkey<br class=""></font></div><div class=""><a href="http://www.abdulla-sakalli.com" class="">as@abdulla-sakalli.com</a></div><div class=""><a href="mailto:asakalli@mku.edu.tr" class="">asakalli@istek.edu.tr</a><font color="#aaaaaa" class=""><br class="">+90 326 614 1693 (330)<br class="">+90 536 506 9191</font></div><div class=""><font color="#aaaaaa" class=""><br class=""></font></div></div></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>

      <br class="">
    </div>
  

</body></html>