<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 "converting my variable".</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 "temperature" in the same way that "y" and "x" are currently associated with "temperature" 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 "coordinates" *attribute* associated with "temperature", 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)"> temperature:coordinates = "longitude latitude" ;</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 "associate" 2D lat/lon arrays with a variable on a NetCDF file, so really, your "temperature" 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">
<<a href="mailto:srvsxc@outlook.com" target="_blank">srvsxc@outlook.com</a>></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>
depth = 12 ;<br>
time = UNLIMITED ; // (288 currently)<br>
x = 428 ;<br>
y = 403 ;<br>
variables:<br>
int stereographic ;<br>
stereographic:grid_mapping_<wbr>name = "polar_stereographic" ;<br>
stereographic:latitude_of_<wbr>projection_origin = 90. ;<br>
stereographic:longitude_of_<wbr>projection_origin = -45. ;<br>
stereographic:scale_factor_<wbr>at_projection_origin = 1. ;<br>
stereographic:straight_<wbr>vertical_longitude_from_pole = -45. ;<br>
stereographic:false_easting = 0. ;<br>
stereographic:false_northing = 0. ;<br>
float x(x) ;<br>
x:axis = "X" ;<br>
x:standard_name = "projection_x_coordinate" ;<br>
x:units = "100 km" ;<br>
float y(y) ;<br>
y:standard_name = "projection_y_coordinate" ;<br>
y:axis = "Y" ;<br>
y:units = "100 km" ;<br>
float depth(depth) ;<br>
depth:long_name = "depth" ;<br>
depth:units = "m" ;<br>
depth:standard_name = "depth" ;<br>
depth:positive = "down" ;<br>
depth:axis = "Z" ;<br>
double time(time) ;<br>
time:units = "hour since 1950-1-1T00:00:00Z" ;<br>
time:long_name = "forecast time" ;<br>
float longitude(y, x) ;<br>
longitude:standard_name = "longitude" ;<br>
longitude:units = "degrees_east" ;<br>
float latitude(y, x) ;<br>
latitude:standard_name = "latitude" ;<br>
latitude:units = "degrees_north" ;<br>
short temperature(time, depth, y, x) ;<br>
temperature:_FillValue = -32767s ;<br>
temperature:missing_value = -32767s ;<br>
temperature:add_offset = 23.5 ;<br>
temperature:scale_factor = 0.000808839239385893 ;<br>
temperature:units = "Celsius" ;<br>
temperature:standard_name = "sea_water_potential_<wbr>temperature" ;<br>
temperature:grid_mapping = "stereographic" ;<br>
temperature:coordinates = "longitude latitude" ;<br>
temperature:cell_methods = "area: mean" ;<br>
<br>
// global attributes:<br>
:title = "Arctic Ocean Physics Reanalysis (1991-2014), 12.5km monthly mean (dataset-ran-arc-myoceanv2-be)<wbr>" ;<br>
:institution = "NERSC, Thormoehlens gate 47, N-5006 Bergen, Norway" ;<br>
:history = "20160112:Created by program hyc2proj, version V0.3" ;<br>
:source = "NERSC-HYCOM model fields" ;<br>
:references = "<a href="http://topaz.nersc.no" target="_blank">http://topaz.nersc.no</a>" ;<br>
:field_type = "Files based on file type nersc_weekly" ;<br>
:Conventions = "CF-1.4" ;<br>
:field_date = "2014-11-15" ;<br>
:bulletin_date = "2014-11-15" ;<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>