Re: fixed axis scale using gsn_csm_pres_hgt

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 07 2011 - 15:17:32 MDT

Hi Samuel,

I don't think I've ever seen this error message before, so I'm not sure if you can ignore it or not.

If you can provide me with your script and data, I might be able to figure out what's causing this.

For a place to put your files, see:

http://www.ncl.ucar.edu/report_bug.shtml

--Mary

On Apr 7, 2011, at 4:50 AM, Leung Samuel wrote:

> Mary,
>
> Thanks, it works on my plot.
>
> I used overlay for the plot with the help of gsn_csm_pres_hgt and gsn_csm_pres_hgt_vector. However, everytime I used gsn_csm_pres_hgt_vector, it returned the following warning upon running
> NGDOTS -- **Warning**
> Log scaling or mirror-imaging have been requested via a SET call;
> NGDOTS accepts only GKS world coordinates.
>
> The above message did not appear if I commented the gsn_csm_pres_hgt_vector part.
>
> Does it mean anything wrong in my script? Can I just ignore it?
>
> Regards,
> Samuel Leung
>
> On Thu, Apr 7, 2011 at 2:48 AM, Mary Haley <haley@ucar.edu> wrote:
> The only way to do this is to make your data array two elements larger in the Y (leftmost) dimension, and create a new Y coordinate array that has extra values at both end of the axis. When you plot this, then, you will get little margins at the top and bottom.
>
>
> This is untested, but something like this:
>
> dims = dimsizes(data)
> nx = dims(1)
> ny = dims(0)
> nyp2 = ny + 2
>
> ycoord = data&$data!0$
>
> ;---Create new arrays
> data_p2 = new((/nyp2,nx/),typeof(data),data@_FillValue)
> ycoord_p2 = new(nyp2,typeof(ycoord))
>
> ;---Copy over data
> data_p2(1:ny,:) = (/data/) ; The rest of data_p2 will be missing
> ycoord_p2(1:ny) = ycoord
> ycoord_p2(0) = ...set to some value < ycoord(0)
> ycoord_p2(ny+1) = ...set to some value > ycoord(ny-1)
>
> ;---Copy dimension names and attach new coordinate arrays
> data_p2!0 = data!0
> data_p2!1 = data!1
> data_p2&$data!0$ = ycoord_p2
> data_p2&$data!1$ = data&$data!1$
>
> copy_VarAtts(data,data_p2) ; Copy rest of attributes
>
>
> On Apr 6, 2011, at 3:26 AM, Leung Samuel wrote:
>
>> Hi,
>>
>> Regarding the same image I attached before, I noticed the wind barbs at max and min levels (100hPa and 1000hPa) on the y-axis are not visible. Is there a way that I can make more space for it to be displayed on the image?
>>
>> Thanks,
>> Samuel Leung
>>
>> On Mon, Apr 4, 2011 at 11:39 AM, Leung Samuel <shwl0608@gmail.com> wrote:
>> Mary,
>>
>> Thanks for your suggestion. After having such setting, the levels are less packed, but they are still not equally spaced. Anyway it is still good.
>>
>> Samuel
>>
>> On Fri, Apr 1, 2011 at 11:22 PM, Mary Haley <haley@ucar.edu> wrote:
>> Hi Samuel,
>>
>> This is a quick guess, but try setting the "trYLog" resource to False. It is being set to True by the gsn_csm_pres_hgt routine, and hopefully this would be all you need.
>>
>> --Mary
>>
>> On Apr 1, 2011, at 3:35 AM, Leung Samuel wrote:
>>
>>> ncl-talk,
>>>
>>> I would like to use the fixed y-axis scale on the press/height vs latitude plot. Please take a look at the attached image. Currently it follows the fixed scale of right y-axis (i.e. the height). The lower levels (those 800~1000hPa) are packed too much.
>>>
>>> Is there a way to arrange the tickmarks of left y-axis instead of right y-axis in equal/customized width? I checked the example "axes_1.ncl" in http://www.ncl.ucar.edu/Applications/axes.shtml but the function gsnYAxisIrregular2Linear did not work in my script.
>>>
>>> My script is also attached for your reference.
>>>
>>> Thanks a lot.
>>>
>>> Regards,
>>> Samuel Leung
>>> <VCRN.png><vcrn.ncl>_______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Apr 7 15:17:38 2011

This archive was generated by hypermail 2.1.8 : Fri Apr 08 2011 - 09:34:26 MDT