Re: ncl

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 21 2011 - 07:45:49 MDT

You need to subscript XLAT and XLONG the same way you are subscripting your data arrays, with "::2".

    lat2d = a->XLAT(0,::2,::2) ; if XLAT is 3D

or

  lat2d = a->XLAT(::2,::2) ; if XLAT is 2D
You may also need to set:

  vcres@gsnAddCyclic = False
. . .

  cnres@gsnAddCyclic = False

--Mary

On Sep 20, 2011, at 7:52 PM, cnl88 wrote:

> <截图1.png>
> <截图2.png>
> I receive your advice and change the scripts.but it did not put out the pressure contour !Above was the error; Idid not know why .hope for your help!
>
>
> At 2011-09-20 23:23:53,"Mary Haley" <haley@ucar.edu> wrote:
> You haven't provided any coordinate arrays to tell NCL where on the map to put your vectors.
>
> Since you are dealing with WRF data, you have to read the XLAT, XLONG variables off the file:
>
> lat2d = a->XLAT
> lon2d = a->XLONG
>
>
> If XLAT and XLONG are 3D, then read only the first timestep:
>
> lat2d = a->XLAT(0,:,:)
> lon2d = a->XLONG(0:,:)
>
> Then, you need to set two special resources that take these arrays as values:
>
> vcres@vfXArray = lon2d
> vcres@vfYArray = lat2d
>
> You will likely need to do a similar thing for your contour plot:
>
>
> cnres@sfXArray = lon2d
> cnres@sfYArray = lat2d
>
> --Mary
>
> On Sep 20, 2011, at 9:17 AM, cnl88 wrote:
>
>> I want to draw the wind and pressure;
>> plot=gsn_csm_vector_map(wks,u(::2,::2),v(::2,::2),res)
>> contour = gsn_csm_contour(wks,x(::2,::2),cnres)
>>
>> ;---Overlay contours on vector/map plot
>> overlay(plot,contour)
>> but the drawing only has the wind .I do not know why .hope for your help! thank you
>> below was the errors
>> <截图1.png>
>>
>>
>> <2011041418nudge.ncl>
>
>
>
> <2011041418nudge.ncl>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 21 09:45:55 2011

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2011 - 17:12:44 MDT