<div dir="ltr"><div class="gmail_default" style="font-size:small">Guido,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I looked at your script further, and I think the issue is with the map corners you've selected. You are using the 1D rotated coordinate arrays to choose the corners, but this is likely not correct. What you really need are the original 2D lat/lon values, as the two examples illustrated, but I don't see that you have this information on the file.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Did you try plotting the data using the coordinate arrays? I've created a script for you to try, although it's untested because I don't have your data file.<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 30, 2015 at 11:45 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"><p dir="ltr">Sure, here it is. I think that the problem is that ncl is expecting 2-D latitudes and longitudes while I have 1-D rlon and rlat.. </p>
<p dir="ltr">Yes I tried commenting the centers. </p>
<p dir="ltr">m300382@mlogin103% ncl_filedump <a href="http://complete.nc" target="_blank">complete.nc</a><br>
Copyright (C) 1995-2015 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.3.0<br>
The use of this software is governed by a License Agreement.<br>
See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</p>
<p dir="ltr">Variable: f<br>
Type: file<br>
filename: complete<br>
path: <a href="http://complete.nc" target="_blank">complete.nc</a><br>
file global attributes:<br>
CDI : Climate Data Interface version 1.4.7 (<a href="http://code.zmaw.de/projects/cdi" target="_blank">http://code.zmaw.de/projects/cdi</a>)<br>
Conventions : CF-1.0<br>
history : Fri Nov 27 13:33:35 2015: cdo -f nc copy <a href="tel:2014011700" value="+12014011700" target="_blank">2014011700</a>_000.grib2 <a href="tel:2014011700" value="+12014011700" target="_blank">2014011700</a>_001.grib2 2014011700_002.grib2 2014011700_003.grib2 2014011700_004.grib2 2014011700_005.grib2 2014011700_006.grib2 2014011700_007.grib2 2014011700_008.grib2 2014011700_009.grib2 2014011700_010.grib2 2014011700_011.grib2 2014011700_012.grib2 2014011700_013.grib2 2014011700_014.grib2 2014011700_015.grib2 2014011700_016.grib2 2014011700_017.grib2 2014011700_018.grib2 2014011700_019.grib2 2014011700_020.grib2 2014011700_021.grib2 2014011700_022.grib2 2014011700_023.grib2 2014011700_024.grib2 2014011700_025.grib2 2014011700_026.grib2 2014011700_027.grib2 2014011700_028.grib2 2014011700_029.grib2 2014011700_030.grib2 2014011700_031.grib2 2014011700_032.grib2 2014011700_033.grib2 2014011700_034.grib2 2014011700_035.grib2 2014011700_036.grib2 2014011700_037.grib2 2014011700_038.grib2 2014011700_039.grib2 2014011700_040.grib2 2014011700_041.grib2 2014011700_042.grib2 2014011700_043.grib2 2014011700_044.grib2 2014011700_045.grib2 2014011700_046.grib2 2014011700_047.grib2<br>
CDO : Climate Data Operators version 1.4.7 (<a href="http://code.zmaw.de/projects/cdo" target="_blank">http://code.zmaw.de/projects/cdo</a>)<br>
dimensions:<br>
ncl_scalar = 1<br>
rlon = 706<br>
rlat = 434<br>
lev = 20<br>
time = 73 // unlimited<br>
variables:<br>
double rlon ( rlon )<br>
long_name : longitude in rotated pole grid<br>
units : degrees<br>
standard_name : grid_longitude<br>
axis : X</p>
<p dir="ltr"> double rlat ( rlat )<br>
long_name : latitude in rotated pole grid<br>
units : degrees<br>
standard_name : grid_latitude<br>
axis : Y</p>
<p dir="ltr"> character rotated_pole ( ncl_scalar )<br>
grid_mapping_name : rotated_latitude_longitude<br>
grid_north_pole_latitude : 44.999996<br>
grid_north_pole_longitude : 144</p>
<p dir="ltr"> double lev ( lev )<br>
long_name : pressure<br>
units : Pa<br>
axis : Z</p>
<p dir="ltr"> double time ( time )<br>
units : hours since 2014-01-17 00:00:00<br>
calendar : proleptic_gregorian</p>
<p dir="ltr"> float gh ( time, lev, rlat, rlon )<br>
long_name : Geopotential Height<br>
units : gpm<br>
code : 5<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float t ( time, lev, rlat, rlon )<br>
long_name : Temperature<br>
units : K<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float u ( time, lev, rlat, rlon )<br>
long_name : U velocity<br>
units : m s**-1<br>
code : 2<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float v ( time, lev, rlat, rlon )<br>
long_name : V velocity<br>
units : m s**-1<br>
code : 3<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float w ( time, lev, rlat, rlon )<br>
long_name : Vertical velocity<br>
units : Pa s**-1<br>
code : 8<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float pv ( time, lev, rlat, rlon )<br>
long_name : Potential vorticity<br>
units : K m**2 kg**-1 s**-1<br>
code : 14<br>
grid_mapping : rotated_pole</p>
<p dir="ltr"> float mterh ( time, rlat, rlon )<br>
long_name : Model terrain height<br>
units : m<br>
code : 7<br>
grid_mapping : rotated_pole</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">Il 30 nov 2015 6:28 PM, "Mary Haley" <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Guido,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm hoping Dave will weigh in here, but it would help if we could at least see the output from:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">ncl_filedump <a href="http://pv.nc" target="_blank">pv.nc</a></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Sometimes the global attributes of the file will give some valuable information about the correct map projection parameters.</div><div class="gmail_default" style="font-size:small"><br>Did you actually try commenting out the mpCenterLatF and mpCenterLonF settings? In the script you included, these two resources are still being set.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It's possible that the data has already been rotated for you.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div>
</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 30, 2015 at 1:33 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">Hi all,<div>I’m trying to produce a contour plot with data on a rotated grid. The original data look like that</div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div><div>Since I have the rotated north pole latitude (<b>44.999996</b>) and longitude (<b>144.0</b>) in my data file I used the second example of the support page on rotated grid. </div><div><div> </div><div><font face="Menlo"> Res1@tfDoNDCOverlay=True</font></div><div><font face="Menlo"> Res1@mpLimitMode = "Corners" </font></div></div><div><font face="Menlo"> Res1@mpLeftCornerLatF = lat(0)</font></div><div><font face="Menlo"> Res1@mpLeftCornerLonF = lon(0)</font></div><div><font face="Menlo"> Res1@mpRightCornerLatF = lat(nlat-1)</font></div><div><font face="Menlo"> Res1@mpRightCornerLonF = lon(nlon-1)</font></div><div><font face="Menlo"> Res1@mpCenterLatF = 90 - north_pole_lat </font></div><div><font face="Menlo"> Res1@mpCenterLonF = 180 + north_pole_lon </font></div><div><br></div><div>However I get this result ( I believe this is Australia):</div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div><div>After several attempts I was able to plot the data using as bounds the “real” coordinates of the rotated projection, without specifying the center, e.g. :</div><div><font face="Menlo"><br></font></div><div><div><font face="Menlo"> Res1@tfDoNDCOverlay=True</font></div><div><font face="Menlo"> Res1@mpLimitMode = "Corners" </font></div><div><font face="Menlo"> Res1@mpLeftCornerLatF = 30.35458 </font></div><div><font face="Menlo"> Res1@mpLeftCornerLonF = -75.14440</font></div><div><font face="Menlo"> Res1@mpRightCornerLatF = 65.1125</font></div><div><font face="Menlo"> Res1@mpRightCornerLonF = 13.87071</font></div></div><div><br></div><div>But the contour plot is still slightly shifted to the west as you can see in this image:</div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div><div>I know that in the data file my coordinates span from rlon={340,392.875} and rlat={-9.962499,22.512501}. </div><div><br></div><div>What am I missing?<br><div><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div>Is there any additional documentation on rotated grid? </div><div><br></div><div>Attached is my NCL script (data are too big). </div><div><br></div><div></div></div></div></div></div></div></div><br><div style="word-wrap:break-word"><div><div><div><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div></div><div><br>Guido Cioni</div><div><a href="http://guidocioni.altervista.org" target="_blank">http://guidocioni.altervista.org</a> </div><div><br></div></div><br style="color:rgb(0,0,0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div>
</div>
<br></div></div></div><br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>