[ncl-talk] Contour plot with rotated grid shifted to the west

Guido Cioni guidocioni at gmail.com
Mon Nov 30 11:45:36 MST 2015


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..

Yes I tried commenting the centers.

m300382 at mlogin103% ncl_filedump complete.nc
Copyright (C) 1995-2015 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.3.0
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.

Variable: f
Type: file
filename:       complete
path:   complete.nc
   file global attributes:
      CDI : Climate Data Interface version 1.4.7 (
http://code.zmaw.de/projects/cdi)
      Conventions : CF-1.0
      history : Fri Nov 27 13:33:35 2015: cdo -f nc copy
2014011700_000.grib2 2014011700_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
      CDO : Climate Data Operators version 1.4.7 (
http://code.zmaw.de/projects/cdo)
   dimensions:
      ncl_scalar = 1
      rlon = 706
      rlat = 434
      lev = 20
      time = 73  // unlimited
   variables:
      double rlon ( rlon )
         long_name :    longitude in rotated pole grid
         units :        degrees
         standard_name :        grid_longitude
         axis : X

      double rlat ( rlat )
         long_name :    latitude in rotated pole grid
         units :        degrees
         standard_name :        grid_latitude
         axis : Y

      character rotated_pole ( ncl_scalar )
         grid_mapping_name :    rotated_latitude_longitude
         grid_north_pole_latitude :     44.999996
         grid_north_pole_longitude :     144

      double lev ( lev )
         long_name :    pressure
         units :        Pa
         axis : Z

      double time ( time )
         units :        hours since 2014-01-17 00:00:00
         calendar :     proleptic_gregorian

      float gh ( time, lev, rlat, rlon )
         long_name :    Geopotential Height
         units :        gpm
         code : 5
         grid_mapping : rotated_pole

      float t ( time, lev, rlat, rlon )
         long_name :    Temperature
         units :        K
         grid_mapping : rotated_pole

      float u ( time, lev, rlat, rlon )
         long_name :    U velocity
         units :        m s**-1
         code : 2
         grid_mapping : rotated_pole

      float v ( time, lev, rlat, rlon )
         long_name :    V velocity
         units :        m s**-1
         code : 3
         grid_mapping : rotated_pole

      float w ( time, lev, rlat, rlon )
         long_name :    Vertical velocity
         units :        Pa s**-1
         code : 8
         grid_mapping : rotated_pole

      float pv ( time, lev, rlat, rlon )
         long_name :    Potential vorticity
         units :        K m**2 kg**-1 s**-1
         code : 14
         grid_mapping : rotated_pole

      float mterh ( time, rlat, rlon )
         long_name :    Model terrain height
         units :        m
         code : 7
         grid_mapping : rotated_pole
Il 30 nov 2015 6:28 PM, "Mary Haley" <haley at ucar.edu> ha scritto:

> Guido,
>
> I'm hoping Dave will weigh in here, but it would help if we could at least
> see the output from:
>
> ncl_filedump pv.nc
>
> Sometimes the global attributes of the file will give some valuable
> information about the correct map projection parameters.
>
> Did you actually try commenting out the mpCenterLatF and mpCenterLonF
> settings?  In the script you included, these two resources are still being
> set.
>
> It's possible that the data has already been rotated for you.
>
> --Mary
>
>
>
>
> On Mon, Nov 30, 2015 at 1:33 AM, Guido Cioni <guidocioni at gmail.com> wrote:
>
>> Hi all,
>> I’m trying to produce a contour plot with data on a rotated grid. The
>> original data look like that
>>
>>
>> Since I have the rotated north pole latitude (*44.999996*) and longitude
>> (*144.0*) in my data file I used the second example of the support page
>> on rotated grid.
>>
>>  Res1 at tfDoNDCOverlay=True
>>  Res1 at mpLimitMode = "Corners"
>>  Res1 at mpLeftCornerLatF = lat(0)
>>  Res1 at mpLeftCornerLonF = lon(0)
>>  Res1 at mpRightCornerLatF = lat(nlat-1)
>>  Res1 at mpRightCornerLonF = lon(nlon-1)
>>  Res1 at mpCenterLatF           = 90 - north_pole_lat
>>  Res1 at mpCenterLonF           = 180 + north_pole_lon
>>
>> However I get this result ( I believe this is Australia):
>>
>>
>> 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. :
>>
>>  Res1 at tfDoNDCOverlay=True
>>  Res1 at mpLimitMode = "Corners"
>>  Res1 at mpLeftCornerLatF = 30.35458
>>  Res1 at mpLeftCornerLonF = -75.14440
>>  Res1 at mpRightCornerLatF = 65.1125
>>  Res1 at mpRightCornerLonF = 13.87071
>>
>> But the contour plot is still slightly shifted to the west as you can see
>> in this image:
>>
>>
>> I know that in the data file my coordinates span from rlon={340,392.875}
>> and rlat={-9.962499,22.512501}.
>>
>> What am I missing?
>> Is there any additional documentation on rotated grid?
>>
>> Attached is my NCL script (data are too big).
>>
>>
>>
>> Guido Cioni
>> http://guidocioni.altervista.org
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151130/320d1efd/attachment.html 


More information about the ncl-talk mailing list