<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Amit,<br>
    <br>
    the addfile call is wrong instead of<br>
    <br>
    <font color="#3333ff"><tt> 
        a = addfile("filename =
        "/home/amit/Desktop/Diff_2130_1700_SST.nc","r")</tt></font><br>
    <br>
    it should be<br>
    <br>
    <tt><font color="#3333ff">  filename =
        "/home/amit/Desktop/Diff_2130_1700_SST.nc"<br>
      </font></tt><span style="color: rgb(189, 19, 152);"><font
        color="#000000"><tt><font color="#3333ff">  a =
            addfile(filename,"r")<br>
          </font></tt></font><font color="#000000"><br>
        By the way, NCL points to that problem in the error message.<br>
        <br>
        Bye,<br>
        Karin</font></span><br>
    <br>
    <div class="moz-cite-prefix">Am 16.05.17 um 11:29 schrieb Amit
      Kumar:<br>
    </div>
    <blockquote
cite="mid:MA1PR01MB0859EB1A4EDD3CA0106F7C80A7E60@MA1PR01MB0859.INDPRD01.PROD.OUTLOOK.COM"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper"
style="font-size:10pt;color:#2672EC;font-family:Arial,Helvetica,sans-serif;"
        dir="ltr">
        <div>Hi all,<br>
          <br>
          I'm trying to run a script but I'm getting following error in
          the addfile function itself. This is occuring to me first
          time, all other scripts having the same syntax are running
          fine. I don't know what is causing the syntax error.<br>
          <br>
*************************************************************************************************************************************<br>
          <span style="color: rgb(189, 19, 152);">the scipt is attached
            below:</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">load
            "/usr/share/ncarg/nclscripts/csm/gsn_code.ncl"</span><br>
          <span style="color: rgb(189, 19, 152);">load
            "/usr/share/ncarg/nclscripts/csm/gsn_csm.ncl"</span><br>
          <span style="color: rgb(189, 19, 152);">load
            "/usr/share/ncarg/nclscripts/csm/contributed.ncl"</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">begin</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);"> a = addfile("filename
            = "/home/amit/Desktop/Diff_2130_1700_SST.nc","r")</span></div>
        <div><span style="color: rgb(189, 19, 152);"> ;filename =
            "/media/amit/E/India_shapefile/Districtbound(Satmet).shp"</span><br>
          <span style="color: rgb(189, 19, 152);"> ;filename =
            "/media/amit/E/India_shapefile/State_bound(Satmet).shp"</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">  var     =
            doubletofloat(a-&gt;SST(:,:))</span><br>
          <span style="color: rgb(189, 19, 152);">  lat     = 
            a-&gt;Latitude</span><br>
          <span style="color: rgb(189, 19, 152);">  lon     = 
            a-&gt;Longitude</span><br>
          <span style="color: rgb(189, 19, 152);">printVarSummary(var)</span><br>
          <span style="color: rgb(189, 19, 152);">printVarSummary(lat)</span><br>
          <span style="color: rgb(189, 19, 152);">printVarSummary(lon)</span><br>
          <span style="color: rgb(189, 19, 152);">if
            (any(ismissing(ndtooned(lon)))) then</span><br>
          <span style="color: rgb(189, 19, 152);">  print("Missing
            longitude coordinates detected")</span><br>
          <span style="color: rgb(189, 19, 152);">end if</span><br>
          <span style="color: rgb(189, 19, 152);">if
            (any(ismissing(ndtooned(lat)))) then</span><br>
          <span style="color: rgb(189, 19, 152);">  print("Missing
            longitude coordinates detected")</span><br>
          <span style="color: rgb(189, 19, 152);">end if</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">wks =
            gsn_open_wks("png","14MAY_2130_1700_Diff")                ;
            send graphics to PNG file</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);"> 
            res                      = True                  ; plot mods
            desired</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@gsnDraw              = False</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@gsnFrame             = False</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@gsnAddCyclic         = False</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@gsnStringFontHeightF = 0.015</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnFillOn             = True                  ; turn on
            color fill</span><br>
          <span style="color: rgb(189, 19, 152);">  res@cnFillMode =
            "RasterFill"</span><br>
          <span style="color: rgb(189, 19, 152);">  res@trGridType =
            "TriangularMesh"</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnRasterSmoothingOn = False </span>
          <br>
          <span style="color: rgb(189, 19, 152);"> 
            res@gsnMaximize          = True     ; maximize plot in frame</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpOutlineOn   =
            True   ; Use outlines from shapefile</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpFillOn      =
            False</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnLinesOn         = False    ; turn off contour lines</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnLineLabelsOn    = False    ; turn off line labels</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnLevelSelectionMode = "ExplicitLevels"</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnLevels             =
            (/-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8/) ;   14 contour values</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@cnFillPalette        =
(/"Grey100","BlueViolet","Blue4","Blue2","Cornflowerblue","darkslategray1","Cyan"\</span><br>
          <span style="color: rgb(189, 19, 152);">              
             ,"chartreuse","darkgreen","Yellow"\                     ;
            15 contour colors</span><br>
          <span style="color: rgb(189, 19, 152);">                             
            ,"Orange","darkorange4", "palevioletred1","orangered"    \</span><br>
          <span style="color: rgb(189, 19, 152);">                             
            ,"Red3" /)        </span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">  res@lbLabelBarOn   
             = True</span><br>
          <span style="color: rgb(189, 19, 152);">  res@lbOrientation  
            = "Vertical"</span><br>
          <span style="color: rgb(189, 19, 152);">  res@sfXArray   
                     = lon</span><br>
          <span style="color: rgb(189, 19, 152);">  res@sfYArray      
             =  lat</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpMinLonF     =
            45.0</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpMaxLonF     =
            91.0</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpMinLatF     =
            8.0</span><br>
          <span style="color: rgb(189, 19, 152);">  res@mpMaxLatF     =
            26.0</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@pmTickMarkDisplayMode     = "Always"</span><br>
          <span style="color: rgb(189, 19, 152);">  ;res@tiXAxisString  
                     = "Longitude"</span><br>
          <span style="color: rgb(189, 19, 152);">  ;res@tiYAxisString  
                     = "Lattitude"</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@tiXAxisFontHeightF     = 0.02</span><br>
          <span style="color: rgb(189, 19, 152);"> 
            res@tiYAxisFontHeightF     = 0.02 </span>
          <br>
          <span style="color: rgb(189, 19, 152);">plot =
            gsn_csm_contour_map(wks,var, res)        ; create plot</span><br>
          <br>
          <span style="color: rgb(189, 19, 152);">;---Resource list for
            shapefile outlines</span><br>
          <span style="color: rgb(189, 19, 152);">; plres  
                              = True</span><br>
          <span style="color: rgb(189, 19, 152);">;
            plres@gsLineColor       = "black"</span><br>
          <span style="color: rgb(189, 19, 152);">;
            plres@gsLineThicknessF  = "1.0"</span><br>
          <span style="color: rgb(189, 19, 152);">; dumstr             
              = unique_string("poly")</span><br>
          <span style="color: rgb(189, 19, 152);">; id =
            gsn_add_shapefile_polylines(wks,plot,filename,plres)</span><br>
          <span style="color: rgb(189, 19, 152);"> draw(plot)</span><br>
          <span style="color: rgb(189, 19, 152);"> frame(wks)</span><br>
          <span style="color: rgb(189, 19, 152);">end</span></div>
******************************************************************************************************************************************
        <p><span style="color: rgb(255, 0, 0);"><br>
          </span></p>
        <p><span style="color: rgb(255, 0, 0);">The error is </span><br>
        </p>
        <p><br>
        </p>
        <div><span style="color: rgb(255, 0, 0);">amit@amit:~/Desktop$
            ncl sst_diff.ncl </span>
          <br>
          <span style="color: rgb(255, 0, 0);"> Copyright (C) 1995-2015
            - All Rights Reserved</span><br>
          <span style="color: rgb(255, 0, 0);"> University Corporation
            for Atmospheric Research</span><br>
          <span style="color: rgb(255, 0, 0);"> NCAR Command Language
            Version 6.3.0</span><br>
          <span style="color: rgb(255, 0, 0);"> The use of this software
            is governed by a License Agreement.</span><br>
          <span style="color: rgb(255, 0, 0);"> See
            <a class="moz-txt-link-freetext" href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</span><br>
          <span style="color: rgb(255, 0, 0);">fatal:syntax error: line
            7 in file sst_diff.ncl before or near .
          </span><br>
          <span style="color: rgb(255, 0, 0);"> a = addfile("filename =
            "/home/amit/Desktop/Diff_2130_1700_SST.</span><br>
          <span style="color: rgb(255, 0, 0);">---------------------------------------------------------------^</span><br>
          <br>
          <span style="color: rgb(255, 0, 0);">fatal:Syntax Error in
            block, block not executed</span><br>
          <span style="color: rgb(255, 0, 0);">fatal:error at line 70 in
            file sst_diff.ncl</span><br>
        </div>
        <br>
        <p>###################################################################################################<br>
        </p>
        <p><span style="color: rgb(75, 165, 36);">The information
            regarding </span><span style="color: rgb(75, 165, 36);">data
            from ncl_filedump
          </span><span style="color: rgb(75, 165, 36);">is attached
            here:</span></p>
        <div><span style="color: rgb(75, 165, 36);">dimensions:</span><br>
          <span style="color: rgb(75, 165, 36);">    x    = 1022</span><br>
          <span style="color: rgb(75, 165, 36);">    y    = 391</span><br>
          <span style="color: rgb(75, 165, 36);">    time    = 1 //
            unlimited</span><br>
          <br>
          <span style="color: rgb(75, 165, 36);">chunk dimensions:</span><br>
          <span style="color: rgb(75, 165, 36);">    x    = 1022</span><br>
          <br>
          <span style="color: rgb(75, 165, 36);">variables:</span><br>
          <span style="color: rgb(75, 165, 36);">    Variable: Longitude</span><br>
          <span style="color: rgb(75, 165, 36);">    Type: double</span><br>
          <span style="color: rgb(75, 165, 36);">    Total Size: 399602
            values</span><br>
          <span style="color: rgb(75, 165, 36);">                3196816
            bytes</span><br>
          <span style="color: rgb(75, 165, 36);">    Number of
            Dimensions: 2</span><br>
          <span style="color: rgb(75, 165, 36);">    Dimensions and
            sizes:    [ 391 &lt;y&gt; x 1022 &lt;x&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Coordinates:</span><br>
          <span style="color: rgb(75, 165, 36);">        Number of
            Attributes:        4</span><br>
          <span style="color: rgb(75, 165, 36);">           
            standard_name    :     longitude</span><br>
          <span style="color: rgb(75, 165, 36);">            long_name  
             :     longitude</span><br>
          <span style="color: rgb(75, 165, 36);">            units    :
                degrees_east</span><br>
          <span style="color: rgb(75, 165, 36);">           
            _CoordinateAxisType    :     Lon</span><br>
          <br>
          <span style="color: rgb(75, 165, 36);">    Variable: Latitude</span><br>
          <span style="color: rgb(75, 165, 36);">    Type: double</span><br>
          <span style="color: rgb(75, 165, 36);">    Total Size: 399602
            values</span><br>
          <span style="color: rgb(75, 165, 36);">                3196816
            bytes</span><br>
          <span style="color: rgb(75, 165, 36);">    Number of
            Dimensions: 2</span><br>
          <span style="color: rgb(75, 165, 36);">    Dimensions and
            sizes:    [ 391 &lt;y&gt; x 1022 &lt;x&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Coordinates:</span><br>
          <span style="color: rgb(75, 165, 36);">        Number of
            Attributes:        4</span><br>
          <span style="color: rgb(75, 165, 36);">           
            standard_name    :     latitude</span><br>
          <span style="color: rgb(75, 165, 36);">            long_name  
             :     latitude</span><br>
          <span style="color: rgb(75, 165, 36);">            units    :
                degrees_north</span><br>
          <span style="color: rgb(75, 165, 36);">           
            _CoordinateAxisType    :     Lat</span><br>
          <br>
          <span style="color: rgb(75, 165, 36);">    Variable: time</span><br>
          <span style="color: rgb(75, 165, 36);">    Type: double</span><br>
          <span style="color: rgb(75, 165, 36);">    Total Size: 1
            values</span><br>
          <span style="color: rgb(75, 165, 36);">                8 bytes</span><br>
          <span style="color: rgb(75, 165, 36);">    Number of
            Dimensions: 1</span><br>
          <span style="color: rgb(75, 165, 36);">    Dimensions and
            sizes:    [ 1 &lt;time | unlimited&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Chunking Info:    [
            524288 &lt;time | unlimited&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Coordinates:</span><br>
          <span style="color: rgb(75, 165, 36);">                time:
            [9135210..9135210]</span><br>
          <span style="color: rgb(75, 165, 36);">        Number of
            Attributes:        4</span><br>
          <span style="color: rgb(75, 165, 36);">           
            standard_name    :     time</span><br>
          <span style="color: rgb(75, 165, 36);">            units    :
                minutes since 2000-1-1 00:00:00</span><br>
          <span style="color: rgb(75, 165, 36);">            calendar  
             :     standard</span><br>
          <span style="color: rgb(75, 165, 36);">            axis    :
                T</span><br>
          <br>
          <span style="color: rgb(75, 165, 36);">    Variable: SST</span><br>
          <span style="color: rgb(75, 165, 36);">    Type: float</span><br>
          <span style="color: rgb(75, 165, 36);">    Total Size: 399602
            values</span><br>
          <span style="color: rgb(75, 165, 36);">                1598408
            bytes</span><br>
          <span style="color: rgb(75, 165, 36);">    Number of
            Dimensions: 3</span><br>
          <span style="color: rgb(75, 165, 36);">    Dimensions and
            sizes:    [ 1 &lt;time | unlimited&gt; x 391 &lt;y&gt; x
            1022 &lt;x&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Chunking Info:    [
            1 &lt;time | unlimited&gt; x 1 &lt;y&gt; x 1022 &lt;x&gt; ]</span><br>
          <span style="color: rgb(75, 165, 36);">    Coordinates:</span><br>
          <span style="color: rgb(75, 165, 36);">                time:
            [9135210..9135210]</span><br>
          <span style="color: rgb(75, 165, 36);">        Number of
            Attributes:        6</span><br>
          <span style="color: rgb(75, 165, 36);">           
            standard_name    :     Sea Surface Temperature</span><br>
          <span style="color: rgb(75, 165, 36);">            long_name  
             :     Sea Surface Temperature</span><br>
          <span style="color: rgb(75, 165, 36);">            units    :
                K</span><br>
          <span style="color: rgb(75, 165, 36);">           
            coordinates    :     Latitude Longitude</span><br>
          <span style="color: rgb(75, 165, 36);">           
            _FillValue    :     -999</span><br>
          <span style="color: rgb(75, 165, 36);">           
            missing_value    :     -999</span><br>
        </div>
        <br>
        <p>###################################################################################################</p>
        <p><br>
        </p>
        <p>my environment variable are <br>
        </p>
        <p><br>
        </p>
        <p><span style="color: rgb(208, 92, 18);">in my .bacshrc file</span><br>
        </p>
        <p><br>
        </p>
        <div><span style="color: rgb(208, 92, 18);">export
            NCARG_ROOT=/usr/local</span><br>
          <span style="color: rgb(208, 92, 18);">export
            PATH=$NCARG_ROOT/bin:$PATH</span><br>
        </div>
        <p><br>
        </p>
        <div><span style="color: rgb(208, 92, 18);">amit@amit:~/Desktop$
            ncl -V</span><br>
          <span style="color: rgb(208, 92, 18);">6.3.0</span><br>
          <span style="color: rgb(208, 92, 18);">amit@amit:~/Desktop$
            which ncl</span><br>
          <span style="color: rgb(208, 92, 18);">/usr/bin/ncl</span><br>
          <span style="color: rgb(208, 92, 18);">amit@amit:~/Desktop$
            env | grep NCARG</span><br>
          <span style="color: rgb(208, 92, 18);">NCARG_ROOT=/usr/local</span><br>
          <span style="color: rgb(208, 92, 18);">amit@amit:~/Desktop$
            echo $NCARG_ROOT </span>
          <br>
          <span style="color: rgb(208, 92, 18);">/usr/local</span><br>
        </div>
        <p>******************************************************************************************************************************************</p>
        <p><br>
        </p>
        <p>will be waiting for a reply.....</p>
        <p><br>
        </p>
        <p>Regards</p>
        <p>Amit<br>
        </p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>