<div dir="ltr">You are attempting to plot data on a curvilinear grid, and thus you should attach your lat / lon array as attributes to your data array. Dennis' script will definitely work for your situation so that's a good place to start. <div><br></div><div>Also, as Dennis noted, please take a look at the NCL User's Guide. (Click on Support at the top of the NCL website, then Manuals, then click on NCL User Guide, V1.1. </div><div><a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf">http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_Legal.pdf</a>  (legal paper)</div><div><a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_A4.pdf">http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/NCL_User_Guide_v1.1_A4.pdf</a> (A4)<br></div><div><br></div><div>On page 126 of the manual curvilinear grids and the required settings are discussed (see section 8.14 Curvilinear Grids), and coincidentally the first example reads in tos from a file and plots it. </div><div><br></div><div>Good luck,</div><div>Adam</div><div><br></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 1:27 PM, sjd.marjani <span dir="ltr"><<a href="mailto:sjd.marjani@ut.ac.ir" target="_blank">sjd.marjani@ut.ac.ir</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>On 2017-10-25 21:53, Dennis Shea wrote:</p>
<blockquote type="cite" style="padding:0 0.4em;border-left:#1010ff 2px solid;margin:0">
<div dir="ltr">
<div>I think you should provide what you have done. <br><br></div>
<div>If you are learning NCL, please look at the excellent tutorial by DKRZ at:<br><br>     <a href="http://www.ncl.ucar.edu/Document/Manuals/" target="_blank">http://www.ncl.ucar.edu/<wbr>Document/Manuals/</a><br><br></div>
<div>The User Guide has many examples. <br><br></div>
<div>To learn any language you must invest the time to learn</div>
<div> </div>
<div> </div>
<div>---</div>
<div>We do not have any tos file available. The following is an untested guess. ANy errors you must fix.</div>
<div><br>---</div>
<div>  diri = "./"     ; input directory</div>
<div>  fili   = "tso ...nc"                     ; your file</div>
<div>  pthi = diri+fili</div>
<div>  f     = addfile( pthi, "r")<br><br></div>
<div>  x    = f->tos                        <wbr>   ; (time,nlat,mlon)</div>
<div>  lat2d = f->lat                         ; (nlat,mlon)</div>
<div>  lon2d =f->lon<br><br>  printVarSummary(x)<br>
<div>  printMinMax(x, 0)</div>
  print("---")
<div>  printVarSummary(lat2d)</div>
<div>  printMinMax(lat2d, 0)</div>
  print("---")<br>
<div>  printVarSummary(lon2d)</div>
<div>  printMinMax(lon2d, 0)</div>
  print("---")<br><span style="font-family:arial,helvetica,sans-serif"><br></span>
<pre><span style="font-family:arial,helvetica,sans-serif">  wks  = gsn_open_wks("png","marjani")            ; open a ps file
  gsn_define_colormap(wks,"<wbr>BlAqGrYeOrRe")         ; choose colormap


  res                      = True
  res@cnFillOn             = True                 ; turn on color
  res@cnFillMode        = "RasterFill"         ; turn on raster mode  ... optional
  res@cnLinesOn        = False                ; turn off contour lines<br>  res@cnLineLabelsOn    = False<br>  res@cnFillPalette      = </span><span style="font-family:arial,helvetica,sans-serif">"BlAqGrYeOrRe"   ; your choice<br></span></pre>
<pre><span style="font-family:arial,helvetica,sans-serif">  x@lat2d = lat2d<br>  x@lon2d = lon2d <br></span></pre>
<pre><span style="font-family:arial,helvetica,sans-serif">   nt = 0
   plot = gsn_csm_contour_map_ce(wks,x(<wbr>nt,:,:),res)</span></pre>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Oct 24, 2017 at 11:37 PM, sjd.marjani <span><<a href="mailto:sjd.marjani@ut.ac.ir" target="_blank">sjd.marjani@ut.ac.ir</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:10pt;font-family:Tahoma,Arial,Helvetica,sans-serif">
<p>Hello . I have problem with CMIP5 sea surface temperature(tos).</p>
<p>I dont know how to read it in ncl and how to plot it (the shape of data is not regular),</p>
<p>its more than 1week I'm working on it .</p>
<p>could YOU please help me ,send me an example script or something like this ???</p>
<p>thank you</p>
<p>best regaurd</p>
<p>Sajede,MS student  </p>
<p><br></p>
<p><br></p>
</div>
<br>______________________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br><br></blockquote>
</div>
</div>
</blockquote>
<p>my problem is with this kind of data,,which are not regular.and i didn't find any suitable example in ncl examples.</p>
<p>I dont know how to plot this kind of data with lat and lon vertices</p>
<p>and I cant understand how shoul I read latititude and longitude</p>
<p>******************************<wbr>******************************<wbr>******************************<wbr>***</p>
<p>netcdf tos_Omon_CCSM4_historical_<wbr>r1i1p1_185001-200512 {<br>dimensions:<br>        time = UNLIMITED ; // (1872 currently)<br>        j = 384 ;<br>        i = 320 ;<br>        bnds = 2 ;<br>        vertices = 4 ;<br>variables:<br>        double time(time) ;<br>                time:bounds = "time_bnds" ;<br>                time:units = "days since 0000-01-01 00:00:00" ;<br>                time:calendar = "noleap" ;<br>                time:axis = "T" ;<br>                time:long_name = "time" ;<br>                time:standard_name = "time" ;<br>        double time_bnds(time, bnds) ;<br>        int j(j) ;<br>                j:units = "1" ;<br>                j:long_name = "cell index along second dimension" ;<br>        int i(i) ;<br>                i:units = "1" ;<br>                i:long_name = "cell index along first dimension" ;<br>        float lat(j, i) ;<br>                lat:standard_name = "latitude" ;<br>                lat:long_name = "latitude coordinate" ;<br>                lat:units = "degrees_north" ;<br>                lat:bounds = "lat_vertices" ;<br>        float lon(j, i) ;<br>                lon:standard_name = "longitude" ;<br>                lon:long_name = "longitude coordinate" ;<br>                lon:units = "degrees_east" ;<br>                lon:bounds = "lon_vertices" ;<br>        float lat_vertices(j, i, vertices) ;<br>                lat_vertices:units = "degrees_north" ;<br>        float lon_vertices(j, i, vertices) ;<br>                lon_vertices:units = "degrees_east" ;<br>        float tos(time, j, i) ;<br>                tos:standard_name = "sea_surface_temperature" ;<br>                tos:long_name = "Sea Surface Temperature" ;<br>                tos:comment = "TEMP at topmost level, units from C to K\r, CMIP5_table_comment: \"this may differ from \"\"surface temperature\"\" in regions of sea ice.\"" ;<br>                tos:units = "K" ;<br>                tos:original_name = "TEMP" </p>
<p> tos:original_units = "degC" ;<br>                tos:history = "2012-02-06T03:00:10Z altered by CMOR: Converted units from \'degC\' to \'K\'. 2012-02-06T03:00:10Z altered by CMOR: replaced missing value flag (9.96921e+36) with standard missing value (1e+20)." ;<br>                tos:cell_methods = "time: mean (interval: 30 days)" ;<br>                tos:cell_measures = "area: areacello" ;<br>                tos:missing_value = 1.e+20f ;<br>                tos:_FillValue = 1.e+20f ;<br>                tos:associated_files = "baseURL: <a href="http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation" target="_blank">http://cmip-pcmdi.llnl.gov/<wbr>CMIP5/dataLocation</a> gridspecFile: gridspec_ocean_fx_CCSM4_<wbr><a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a> areacello: areacello_fx_CCSM4_historical_<wbr><a href="http://r0i0p0.nc">r0i0p0.nc</a>" ;<br>                tos:coordinates = "lat lon" ;</p>
<p>// global attributes:<br>                :institution = "NCAR (National Center for Atmospheric Research) Boulder, CO, USA" ;<br>                :institute_id = "NCAR" ;<br>                :experiment_id = "historical" ;<br>                :source = "CCSM4" ;<br>                :model_id = "CCSM4" ;<br>                :forcing = "Sl GHG Vl SS Ds SD BC MD OC Oz AA LU" ;<br>                :parent_experiment_id = "piControl" ;<br>                :parent_experiment_rip = "r1i1p1" ;<br>                :branch_time = 937. ;<br>                :contact = "<a href="mailto:cesm_data@ucar.edu" target="_blank">cesm_data@ucar.edu</a>" ;<br>                :references = "Gent P. R., <a href="http://et.al" target="_blank">et.al</a>. 2011: The Community Climate System Model version 4. J. Climate, doi: 10.1175/2011JCLI4083.1" ;<br>                :initialization_method = 1 ;<br>                :physics_version = 1 ;<br>                :tracking_id = "422cd5f0-a259-4e97-bc7a-<wbr>54200741a241" ;<br>                :acknowledgements = "The CESM project is supported by the National Science Foundation and the Office of Science (BER) of the U.S. Department of Energy. NCAR is sponsored by the National Science Foundation. Computing resources were provided by the Climate Simulation Laboratory at the NCAR Computational and Information Systems Laboratory (CISL), sponsored by the National Science Foundation and other agencies." ;<br>                :cesm_casename = "b40.20th.track1.1deg.008" ;<br>                :cesm_repotag = "ccsm4_0_beta43" ;<br>                :cesm_compset = "B20TRCN" ;<br>                :resolution = "f09_g16 (0.9x1.25_gx1v6)" ;<br>                :forcing_note = "Additional information on the external forcings used in this experiment can be found at <a href="http://www.cesm.ucar.edu/CMIP5/forcing_information" target="_blank">http://www.cesm.ucar.edu/<wbr>CMIP5/forcing_information</a>" ;<br>                :processed_by = "strandwg on <a href="http://silver.cgd.ucar.edu" target="_blank">silver.cgd.ucar.edu</a> at 20120205  -200010.598" ;<br>                :processing_code_information = "Last Changed Rev: 526 Last Changed Date: 2012-02-05 16:49:28 -0700 (Sun, 05 Feb 2012) Repository UUID: d2181dbe-5796-6825-dc7f-<wbr>cbd98591f93d" ;<br>                :product = "output" ;<br>                :experiment = "historical" ;</p>
<p> :frequency = "mon" ;<br>                :creation_date = "2012-02-06T03:00:22Z" ;<br>                :history = "2012-02-06T03:00:22Z CMOR rewrote data to comply with CF standards and CMIP5 requirements." ;<br>                :Conventions = "CF-1.4" ;<br>                :project_id = "CMIP5" ;<br>                :table_id = "Table Omon (12 January 2012) 980e0aeb02de4233251f100571014e<wbr>41" ;<br>                :title = "CCSM4 model output prepared for CMIP5 historical" ;<br>                :parent_experiment = "pre-industrial control" ;<br>                :modeling_realm = "ocean" ;<br>                :realization = 1 ;<br>                :cmor_version = "2.7.1" ;</p>
<p>;*****************************<wbr>******************************<wbr>******************************<wbr>******************************<wbr>******************************<wbr>************</p>
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>
<p><br></p>

</div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</div>