<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta content="text/html; charset=utf-8">
</head>
<body>
<div>
<div style="font-family:Calibri,sans-serif; font-size:11pt">Thanks alot Mary for the explanation.<br>
<br>
Actually I need to do some area averaging for which I have the lat lon information e.g say, surface temperature averaged over 40-50N and -30:-10E. How to perform this spatial averaging with this temperature(time,depth,y,x) variable?<br>
<br>
Thanks<br>
Sourav<br>
</div>
</div>
<div dir="ltr">
<hr>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">From:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:haley@ucar.edu">Mary Haley</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Sent:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">ý12-ý09-ý2016 23:38</span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">To:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:srvsxc@outlook.com">Sourav Chatterjee</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Cc:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Subject:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">Re: [ncl-talk] Assign lat lon cordinates to polar stereographic coordinate</span><br>
<br>
</div>
<div>
<div dir="ltr">
<div class="gmail_default"><font face="arial, helvetica, sans-serif">Sourav,</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">I'm not sure what you mean by &quot;converting my variable&quot;.</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">Since your latitude and longitude arrays are two-dimensional, you cannot associate them with &quot;temperature&quot; in the same way that &quot;y&quot; and &quot;x&quot; are currently associated with &quot;temperature&quot; as coordinate
 variables. This is a NetCDF limitation that requires that coordinate variables be one-dimensional and the same length as the dimension they represent.</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif">You already have a &quot;coordinates&quot; *attribute* associated with &quot;temperature&quot;, that indicates which variables represent the lat/lon arrays for your data:</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="arial, helvetica, sans-serif"><span style="color:rgb(0,0,0)">&nbsp; &nbsp; &nbsp; &nbsp; temperature:coordinates = &quot;longitude latitude&quot; ;</span><br style="color:rgb(0,0,0)">
</font></div>
<div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br>
</font></span></div>
<div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">This is how we would normally suggest that you &quot;associate&quot; 2D lat/lon arrays with a variable on a NetCDF file, so really, your &quot;temperature&quot; variable looks pretty
 good as it is.</font></span></div>
<div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br>
</font></span></div>
<div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">--Mary</font></span></div>
<div class="gmail_default"><span style="color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br>
</font></span></div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 9, 2016 at 4:19 AM, Sourav Chatterjee <span dir="ltr">
&lt;<a href="mailto:srvsxc@outlook.com" target="_blank">srvsxc@outlook.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi all</p>
<p><br>
</p>
<p>I want convert my variable (temperature) to temperature (time,depth,lat,lon) from temperature(time,depth,x,y)
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>here is how it looks like now.</p>
<p><br>
</p>
<p>Any help!</p>
<p><br>
</p>
<p>Thanks<br>
</p>
<p><br>
</p>
<p><span></span></p>
<div>dimensions:<br>
&nbsp;&nbsp; &nbsp;depth = 12 ;<br>
&nbsp;&nbsp; &nbsp;time = UNLIMITED ; // (288 currently)<br>
&nbsp;&nbsp; &nbsp;x = 428 ;<br>
&nbsp;&nbsp; &nbsp;y = 403 ;<br>
variables:<br>
&nbsp;&nbsp; &nbsp;int stereographic ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:grid_mapping_<wbr>name = &quot;polar_stereographic&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:latitude_of_<wbr>projection_origin = 90. ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:longitude_of_<wbr>projection_origin = -45. ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:scale_factor_<wbr>at_projection_origin = 1. ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:straight_<wbr>vertical_longitude_from_pole = -45. ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:false_easting = 0. ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;stereographic:false_northing = 0. ;<br>
&nbsp;&nbsp; &nbsp;float x(x) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;x:axis = &quot;X&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;x:standard_name = &quot;projection_x_coordinate&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;x:units = &quot;100&nbsp; km&quot; ;<br>
&nbsp;&nbsp; &nbsp;float y(y) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;y:standard_name = &quot;projection_y_coordinate&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;y:axis = &quot;Y&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;y:units = &quot;100&nbsp; km&quot; ;<br>
&nbsp;&nbsp; &nbsp;float depth(depth) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;depth:long_name = &quot;depth&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;depth:units = &quot;m&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;depth:standard_name = &quot;depth&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;depth:positive = &quot;down&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;depth:axis = &quot;Z&quot; ;<br>
&nbsp;&nbsp; &nbsp;double time(time) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;time:units = &quot;hour since 1950-1-1T00:00:00Z&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;time:long_name = &quot;forecast time&quot; ;<br>
&nbsp;&nbsp; &nbsp;float longitude(y, x) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;longitude:standard_name = &quot;longitude&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;longitude:units = &quot;degrees_east&quot; ;<br>
&nbsp;&nbsp; &nbsp;float latitude(y, x) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;latitude:standard_name = &quot;latitude&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;latitude:units = &quot;degrees_north&quot; ;<br>
&nbsp;&nbsp; &nbsp;short temperature(time, depth, y, x) ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:_FillValue = -32767s ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:missing_value = -32767s ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:add_offset = 23.5 ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:scale_factor = 0.000808839239385893 ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:units = &quot;Celsius&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:standard_name = &quot;sea_water_potential_<wbr>temperature&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:grid_mapping = &quot;stereographic&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:coordinates = &quot;longitude latitude&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;temperature:cell_methods = &quot;area: mean&quot; ;<br>
<br>
// global attributes:<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:title = &quot;Arctic Ocean Physics Reanalysis (1991-2014), 12.5km monthly mean (dataset-ran-arc-myoceanv2-be)<wbr>&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:institution = &quot;NERSC, Thormoehlens gate 47, N-5006 Bergen, Norway&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:history = &quot;20160112:Created by program hyc2proj, version V0.3&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:source = &quot;NERSC-HYCOM model fields&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:references = &quot;<a href="http://topaz.nersc.no" target="_blank">http://topaz.nersc.no</a>&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:field_type = &quot;Files based on file type nersc_weekly&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:Conventions = &quot;CF-1.4&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:field_date = &quot;2014-11-15&quot; ;<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;:bulletin_date = &quot;2014-11-15&quot; ;<br>
}<br>
</div>
<br>
<p></p>
</div>
</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>
</div>
</div>
</body>
</html>