<div dir="ltr"><div><div>Thanks a lot for your help. But I am stuck at some point. I have MODATML2 modis data swaths, from December 21 to December 31. The data I have downloaded contains 6-9 files per day. So when I do "cat" it is making problem. What to do? Could you please tell me?<br></div>I am quoting my sample ncl code below.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br>  ;::::::::::::::::::::::::::::::::::<br>  diri = "./"<br>  fils=systemfunc("cd "+diri+"; ls MODATML2.A2011*.hdf")<br>  print(fils)<br>  print("---")<br>  nfils = dimsizes(fils)<br><br>  varName = "Cloud_Top_Pressure"              ; hdf<br>  ;varName = "Cloud_Water_Path_1621"        ; he2<br>  <br>  pltType = "png"<br>  pltName = "bin_modis_cwp_355"<br>  pltDir  = "./"<br><br>  ;:::::::::::::::::::::::::::::::::::::::::::<br>ctp&TIME= ispan(21,31,1)<br><br><br>;:::::::::::::::::::::::::::::::::::::::::::::<br><br>  wks=gsn_open_wks(pltType, pltDir+pltName)         <br>  <br> <br> res=True                                     ; plot mods desired<br> ;res@gsnMaximize = True                       ; make plot large<br>  res@gsnFrame    = False                      ; don't advance frame<br>  res@gsnDraw = False<br> restick= True<br>restick@ttmFormat= "%D/%c/%Y"<br>time_axis_labels(cl&TIME,res,restick)<br><br><br>  ;::::::ZOOM:::::::::::;<br>;  res@mpMinLatF = 26.50<br>;  res@mpMaxLatF = 26.52<br>;  res@mpMinLonF = 80.22<br>;  res@mpMaxLonF = 80.24<br><br>;cld=dim_avg_n_Wrap(cl,(/26.51,80.23/)<br>  <br>  ;:::::::::::::Title&Plotting::::::::::::::::<br>  res@tiMainString=varName                      ; create title<br><br>  plot1=gsn_csm_xy(wks,ctp&TIME,ctp(:,:),res) <br><br>  res@cnLinesOn         =False                 ; turn off contour lines<br> ;res@cnLineLabelsOn    =True                  ; default; turn off contour line labels<br> ;res@gsnSpreadColors   =True                  ; default; use the entire color spectrum<br>  res@cnFillOn          =True                  ; enable contour fill<br>  res@cnMissingValFillPattern = 0<br>  res@cnFillMode        ="RasterFill"<br>  res@cnLevelSelectionMode = "ManualLevels"<br>  res@cnMinLevelValF       = 10             ; min level<br>  res@cnMaxLevelValF       = 10000            ; max level<br>  res@cnLevelSpacingF      = 1000             ; contour interval<br>  res@pmLabelBarOrthogonalPosF = 0.075<br>  res@tiMainOn = False<br>  res@gsnLeftString = ""<br>  res@gsnRightString = ""<br>  res@lbLabelFontHeightF = 0.012<br>  plot2 = new(nfils,graphic)<br>  <br>  do nf=0,nfils-1<br>     print("")<br>     print("***********************")<br>     print("===> "+ fils(nf) + "<===")<br>     print("***********************")<br>     print("")<br><br>     f   = addfile(diri+fils(nf),"r")<br>    ;f   = addfile(diri+fils(nf)+".he2","r")<br>     ListSetType(f,"cat")<br>     cl = f[:]->$varName$ <br>     printVarSummary(cl)                        ; Look at variable<br>     printMinMax(cl,0)<br>     print("-----")<br>                                                ; each swath has different lat/lon <br>     lat2d = f->Latitude                        ; hdf<br>     lon2d = f->Longitude<br>    ;lat2d = f->Latitude_mod06                  ; he2<br>    ;lon2d = f->Longitude_mod06<br><br>     printVarSummary(lat2d)                     ; Look at variable<br>     printMinMax(lat2d,0)<br>     print("-----")<br>     printVarSummary(lon2d)                     ; Look at variable<br>     printMinMax(lon2d,0)<br>     print("-----")<br><br>     cl@lat2d = lat2d                           ; attach for plot<br>     cl@lon2d = lon2d<br>  <br>     ctp =  cl(0,{26.51},{80.23})<br><br>  <br>  end do    ; end file loop<br>  draw(plot)<br>  frame(wks)             ; advance frame <br></div></blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 27, 2018 at 10:11 AM, Guido Cioni <span dir="ltr"><<a href="mailto:guidocioni@gmail.com" target="_blank">guidocioni@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">The question is general and involve different steps. There are a lot of examples on the NCL website, you should first try following those.<div><br></div><div>Specifically,</div><div><br></div><div>[1] reading HDF data (<a href="https://www.ncl.ucar.edu/Applications/HDF.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/HDF.shtml</a>) possibly concatenating them (<a href="https://www.ncl.ucar.edu/Applications/addfiles.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/addfiles.shtml</a>) so you already have all the timesteps. Otherwise you'd have to loop over the file and then concatenate the variable afterwards (<a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/array_append_record.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/<wbr>Contributed/array_append_<wbr>record.shtml</a>).</div><div><br></div><div>[2] extract a lat-lon point from the variable that you're reading. var_point=var({lat_point},{<wbr>lon_point}) assuming that the variable has coordinate variables attached (<a href="https://www.ncl.ucar.edu/Document/Language/subscript_coord.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Language/subscript_<wbr>coord.shtml</a>), otherwise you have to find the cell index by yourself (some hint <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/Built-in/<wbr>ind.shtml</a>). You should also develop an if-condition that checks whether the point is included in the swath: I believe that your satellite data is sparse so maybe the point that you're looking at is not always included in the swath... I  would suggest to assign a _FillValue to the variable if this point is not found so that you can plot the timeseries easily. </div><div><br></div><div>[3] Do a timeseries with gsm_csm_xy, mabye format the x-axis using time_axis_labels (<a href="https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml" target="_blank">https://www.ncl.ucar.edu/<wbr>Document/Functions/User_<wbr>contributed/time_axis_labels.<wbr>shtml</a>).</div><div><br></div><div>I believe you have enough to start working now. </div><div><br></div><div>Cheers </div><div><br></div><div><br></div><div><br><div><br><blockquote type="cite"><div><div class="h5"><div>On 26. Feb 2018, at 15:51, Krishnakumar AP <<a href="mailto:krishnaap7@gmail.com" target="_blank">krishnaap7@gmail.com</a>> wrote:</div><br class="m_5891891265810226607Apple-interchange-newline"></div></div><div><div><div class="h5"><div dir="ltr"><div>Hello NCL Community,<br></div> I want to make a time series plot from HDF satellite swaths of multiple days, how to do that? I want to take time series values of Cloud water path from a specific lat and long and make into a time series plot. Could you please guide me? Thanks in advance<br clear="all"><div><div><div><br>-- <br><div class="m_5891891265810226607m_-4016235376563004661gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Thankfully<br>Krishnakumar.AP<br>   </div></div></div></div></div>
</div></div></div></div></div></div>
______________________________<wbr>_________________<br>ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><span class="HOEnZb"><font color="#888888"><br></font></span></div></blockquote></div><span class="HOEnZb"><font color="#888888"><br><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br class="m_5891891265810226607Apple-interchange-newline">Guido Cioni</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://guidocioni.altervista" target="_blank">http://guidocioni.altervista</a>.<wbr>org</div>

</div>
<br></font></span></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div><div>Best regards<br>Krishnakumar.AP<br>   </div></div></div></div></div>
</div>