[ncl-talk] Unable to get right side Y-axis labels

Vennam, Lakshmi Pradeepa lakshmi at live.unc.edu
Wed Mar 9 12:18:57 MST 2016


Hello Patrick,

Thank you for your response. 
I did try without quotations, passing a numerical array to resL at tmYRValues and still it did not work.

Regards,
Pradeepa.

________________________________________
From: ncl-talk-bounces at ucar.edu <ncl-talk-bounces at ucar.edu> on behalf of Duran, Patrick T <pduran at albany.edu>
Sent: Wednesday, March 09, 2016 2:07 PM
To: ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Unable to get right side Y-axis labels

Pradeepa:

You've set your resL at tmYRValues resource to an array of strings.
Try using a numerical array instead (remove the quotations.)

Cheers,
Patrick

________________________________________
From: ncl-talk-bounces at ucar.edu <ncl-talk-bounces at ucar.edu> on behalf of ncl-talk-request at ucar.edu <ncl-talk-request at ucar.edu>
Sent: Wednesday, March 9, 2016 2:00 PM
To: ncl-talk at ucar.edu
Subject: ncl-talk Digest, Vol 148, Issue 15

Send ncl-talk mailing list submissions to
        ncl-talk at ucar.edu

To subscribe or unsubscribe via the World Wide Web, visit
        http://mailman.ucar.edu/mailman/listinfo/ncl-talk
or, via email, send a message with subject or body 'help' to
        ncl-talk-request at ucar.edu

You can reach the person managing the list at
        ncl-talk-owner at ucar.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of ncl-talk digest..."


Today's Topics:

   1. Anaconda packages for NCL and PyNGL available for testing
      (Kevin Hallock)
   2. Re: Coordinate variables must be the same dimension as their
      dimension (Amadou Coulibaly)
   3. Unable to get right side Y-axis labels (Vennam, Lakshmi Pradeepa)


----------------------------------------------------------------------

Message: 1
Date: Tue, 8 Mar 2016 14:44:26 -0700
From: Kevin Hallock <hallock at ucar.edu>
Subject: [ncl-talk] Anaconda packages for NCL and PyNGL available for
        testing
To: ncl-talk at ucar.edu
Message-ID: <A48FB2B0-EDE6-4408-A001-23D88291B41B at ucar.edu>
Content-Type: text/plain; charset="utf-8"

The NCL team is pleased to announce that Anaconda packages of NCL and PyNGL for Linux and Mac OS X (64-bit only for both platforms) are now available for testing, and we would like to enlist the help of end users to test the installation process using Anaconda. See the following link for more information about Anaconda: https://docs.continuum.io/anaconda/index <https://docs.continuum.io/anaconda/index>

(Please note that we are unable to support 32-bit Linux, 32-bit Mac OS X, or Windows at this time.)

We began using Anaconda as a distribution channel for PyNIO last year, and have recently begun the process of adding NCL and PyNGL packages to Anaconda as well. These NCL and PyNGL packages have been tested internally and are ready for more widespread testing.

We would like to reiterate that these packages contain development snapshots of NCL and PyNGL that may still have pending bug fixes prior to the next official release. As such, we recommend that these packages should not be used for production or publication. Also, any potential beta testers should:

a) be comfortable configuring a Unix shell environment
b) be prepared to potentially help debug NCL/PyNGL errors that may occur at runtime
c) have a basic working knowledge of Anaconda or other package managers (optional, but recommended)

However, any user is welcome to participate if they are interested.

Please send an email to hallock at ucar.edu <mailto:hallock at ucar.edu?subject=NCL/PyNGL%20Anaconda%20test> with the subject ?NCL/PyNGL Anaconda test? if you are interested in participating in this test.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160308/a693d81d/attachment-0001.html

------------------------------

Message: 2
Date: Tue, 8 Mar 2016 23:33:46 +0100
From: Amadou Coulibaly <mpapin24 at gmail.com>
Subject: Re: [ncl-talk] Coordinate variables must be the same
        dimension as their dimension
To: Mary Haley <haley at ucar.edu>
Cc: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Message-ID:
        <CAFAUDHvnRmzmk8aJ0qA-MRM6tN_VtC6HaipFSsSuraVOnxq32w at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello Mary,

Thank you so much. It has worked.

Best

On 7 March 2016 at 19:00, Mary Haley <haley at ucar.edu> wrote:

> You are reading lat and lon off *all* files, which I don't think is what
> you want.
>
> If your lat/lon are the same across all files, then instead of doing this:
>
>         lat = f[:]->lat
>         lon = f[:]->lon
>
> Try this:
>
>         lat = f[0]->lat
>         lon = f[0]->lon
>
> This will read lat/lon off the first file in the list.
>
> Really, though, since you are reading u and v, and since they have lat/lon
> coordinate arrays attached to them, you can just use those, instead of
> reading lat/lon separately. For example:
>
>         wind_dir&lat = u&lat
>         wind_dir&lon = u&lon
>
> --Mary
>
>
> On Fri, Mar 4, 2016 at 4:00 PM, Amadou Coulibaly <mpapin24 at gmail.com>
> wrote:
>
>> Dear NCL users,
>>
>> I am getting some errors messages that I don't understand them. I am
>> using wind speed/direction from CFSR data to do a plot, but below are
>> errors occurring:
>>
>> fatal:Coordinate variables must be the same dimension as their dimension
>> fatal:No coordinate variable exists for dimension (lat) in variable
>> (wind_dir)
>> fatal:["Execute.c":8578]:Execute: Error occurred at or near line 59 in
>> file monthly_lsb_test2.ncl
>>
>> So I tried to print out lat/lon and u:
>> Variable: lon
>> Type: float
>> Total Size: 15840 bytes
>>             3960 values
>> Number of Dimensions: 1
>> Dimensions and sizes:    [lon | 3960]
>> Coordinates:
>>             lon: [-5.. 5]
>> Number Of Attributes: 4
>>   name :    lon
>>   long_name :    longitude
>>   units :    degree_east
>>   valid_range :    ( -5,  5 )
>>
>> Variable: lat
>> Type: float
>> Total Size: 9120 bytes
>>             2280 values
>> Number of Dimensions: 1
>> Dimensions and sizes:    [lat | 2280]
>> Coordinates:
>>             lat: [8.8985..3.2784]
>> Number Of Attributes: 4
>>   name :    lat
>>   long_name :    latitude
>>   units :    degree_north
>>   valid_range :    ( 3.2784, 8.8985 )
>>
>> Variable: u
>> Type: float
>> Total Size: 36636864 bytes
>>             9159216 values
>> Number of Dimensions: 3
>> Dimensions and sizes:    [time | 14608] x [lat | 19] x [lon | 33]
>> Coordinates:
>>             time: [ 1..87643]
>>             lat: [8.8985..3.2784]
>>             lon: [-5.. 5]
>> Number Of Attributes: 5
>>   standard_name :    eastward_wind
>>   product_description :    1-hour Forecast
>>   units :    m s-1
>>   level :    Specified height above ground - value: 10 m
>>   _FillValue :    3.4e+38
>>
>> I realized that the dimension sizes of lat/lon are different in u. I have [lat
>> | 2280], [lon | 3960], but in u I have [time | 14608] x [lat | 19] x
>> [lon | 33].
>>
>> What is wrong with my code? Please find attached my script
>>
>> Best
>>
>> --
>> * COULIBALY   AMADOU   *
>> PhD  Student  on  West  African  Climate  System (WACS)
>> FUTA - Federal  University  of  Technology of Akure, Nigeria
>>
>> *Visiting Student - *
>> *University of Cologne, Germany**Institute of Geophysics and Meteorology*
>> Pohligstr. 3 / Office 3.102
>> D-50969 K?ln
>>
>> *Project*: WASCAL (West African Science Service Centre on Climate Change
>> and Adapted Land Use)
>> Phone:(+234) 812 965 3659 /(+223) 90 08 26 71 /(+226) 64 57 37 27 /+49
>> 15218352574
>>
>> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>>
>> "*The time is always right to do right": Nelson Mandela*
>>
>> *"Character is like a tree and reputation like a shadow.  The shadow is
>> what we think of it; the tree is the real thing" : Abraham Lincoln*
>>
>> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>


--
* COULIBALY   AMADOU   *
PhD  Student  on  West  African  Climate  System (WACS)
FUTA - Federal  University  of  Technology of Akure, Nigeria

*Visiting Student - *
*University of Cologne, Germany**Institute of Geophysics and Meteorology*
Pohligstr. 3 / Office 3.102
D-50969 K?ln

*Project*: WASCAL (West African Science Service Centre on Climate Change
and Adapted Land Use)
Phone:(+234) 812 965 3659 /(+223) 90 08 26 71 /(+226) 64 57 37 27 /+49
15218352574

E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com

"*The time is always right to do right": Nelson Mandela*

*"Character is like a tree and reputation like a shadow.  The shadow is
what we think of it; the tree is the real thing" : Abraham Lincoln*

*"Do what you can, with what you have, where you are" Theodore Roosevelt*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160308/70ebbb2e/attachment-0001.html

------------------------------

Message: 3
Date: Wed, 9 Mar 2016 04:24:14 +0000
From: "Vennam, Lakshmi Pradeepa" <lakshmi at live.unc.edu>
Subject: [ncl-talk] Unable to get right side Y-axis labels
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Message-ID:
        <BY2PR03MB11299A5540B1DB6B441593F99B30 at BY2PR03MB112.namprd03.prod.outlook.com>

Content-Type: text/plain; charset="iso-8859-1"

Hello,


I am trying to give explicit right side Y-axis labels but for some reason unable to get them on the plot.  Can someone please let me know if I am missing anything?


Code :


  resL                 = True            ; plot mods desired
  resL at gsnDraw         = False           ; don't draw
  resL at gsnFrame        = False           ; don't advance frame

  resL at tiYAxisString = ""
  resL at tiXAxisString = ""

  resL at xyLineColor = "Red"

  resL at tmYROn     = True              ; turn on the YR tickmarks
  resL at tmYUseLeft = False
  resL at tmYRLabelsOn = True              ; turn the YR labels on
  resL at tmYRMode = "Explicit"  ; explicitly set Y-axis labels
  resL at tmYRValues = (/"640","2200","6700","10000","12500","14100"/)
  resL at tmYRLabels = (/"640","2200","6700","10000","12500","14100"/)

  plot1(0) = gsn_csm_xy(wks1,lat_avg,theta_P1(0,:,:),resL)
  plot1(1) = gsn_csm_xy(wks1,lat_avg,theta_P2(0,:,:),resL)
  plot1(2) = gsn_csm_xy(wks1,lat_avg,theta_P3(0,:,:),resL)
  plot1(3) = gsn_csm_xy(wks1,lat_avg,theta_P4(0,:,:),resL)

 resP                  = True                   ; modify the panel plot
 resP at gsnFrame         = False                  ; don't advance panel plot
 resP at gsnPanelLabelBar = True
 resP at gsnPanelFigureStrings= (/"JFM","AMJ","JAS","OND"/) ; add strings to panel
 resP at amJust   = "TopLeft"
gsn_panel(wks1,plot1,(/2,2/),resP)  ;draw panel plot

 txresP               = True
 txresP at txAngleF      = 90.          ; Rotate string clockwise
 txresP at txFontHeightF = 0.02
 gsn_text_ndc(wks1,"Potential Temperature(theta)",0.085,0.5,txresP) ; add the common left y-axis
 gsn_text_ndc(wks1,"Latitude (degree)",0.5,0.095,txresP); add the common bottom x-axis label

 frame(wks1)


Thanks in advance,
Pradeepa.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160309/ec7f0982/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: theta_latitude.pdf
Type: application/pdf
Size: 220743 bytes
Desc: theta_latitude.pdf
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160309/ec7f0982/attachment-0001.pdf

------------------------------

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


End of ncl-talk Digest, Vol 148, Issue 15
*****************************************
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk


More information about the ncl-talk mailing list