RE: [ncl-talk] Plotting land in oceanic plot

From: Asher, Vinit Narendra <vinit.asher_at_nyahnyahspammersnyahnyah>
Date: Tue, 24 Feb 2009 01:37:29 +0000

Hi Mary,

Thanks a lot for taking time to read my code. Sorry for all the errors in the code which you encountered. They were a result of me trying from the past 3 days to color the land black! and as a result was a lot of redundant code.

My plot plots the lat vs the dept of the MOC data. Hence the strange grid. You can see in the output file itself the significance of the plot orientation.

Attached is the output which I got most recently. I have cleaned up the code.

Let me know if you could help. I really appreciate your help.

Best Regards,

Vinit Asher
vinit.asher_at_mavs.uta.edu
817-201-2396

P.S. My new email id is vinit.asher_at_mavs.uta.edu and the old email id vnasher_at_uta.edu is no longer active.
________________________________________
From: Mary Haley [haley_at_ucar.edu]
Sent: Friday, February 20, 2009 4:57 PM
To: Asher, Vinit Narendra
Subject: Re: Plotting land in oceanic plot

On Feb 20, 2009, at 12:33 PM, Asher, Vinit Narendra wrote:

> Hi Mary
>
> I have sent the files. The script is named moc_iso_lines2.ncl and
> the data is named eofc2240.01.pop.h.TVTS.0950_cat_0999.nc
>
> Kindly have a look. Thanks a lot.
>
> Best Regards,
>

Hi Vinit,

I'm afraid you have so many errors in the script, that I'm not sure
where to start.

  - You are applying map resources to a contour plot. I think you
want to use gsn_csm_contour_map. But, if you are going to draw
contours over a map, they need to be in lat/lon space. Your contours
are in lat/lev space.

  - You are setting both the foreground and background color to
black. This doesn't make sense because all your titles, text, etc,
are going to be drawn in the foreground color, and if you set the
background to the same color, you won't be able to see any text.

  - gsnMaximise is not the correct spelling. It should be
gsnMaximize. But, you already have gsnMaximize set somewhere else.

  - You are drawing one plot and then paneling it, which doesn't make
sense. You usually want gsn_panel if you have multiple plots to put
on a page.

  - You are setting several resources twice, which can lead to
confusion.

  - You are setting cnLevels, but you can only do this if
cnLevelSelectionMode is set to "ExplicitLevels". You have this
resource set twice, but once to "ManualLevels", and once to
"AutomaticLevels".

  - You are setting:

plot_mn(0) = plot_mn0

     which doesn't make sense. It's like saying "x = x".

I can't help you with the map stuff unless you have data that is lat
x lon, and not lev x lat.

--Mary

> Vinit Asher
> vinit.asher_at_mavs.uta.edu
> 817-201-2396
>
> P.S. My new email id is vinit.asher_at_mavs.uta.edu and the old email
> id vnasher_at_uta.edu is no longer active.
> ________________________________________
> From: Mary Haley [haley_at_ucar.edu]
> Sent: Thursday, February 19, 2009 5:45 PM
> To: Asher, Vinit Narendra
> Cc: ncl-talk_at_ucar.edu
> Subject: Re: Plotting land in oceanic plot
>
> Vinit,
>
> Can you send me your script and data?
>
> ftp ftp.cgd.ucar.edu
> [login as anonymous]
> [Use your email address for the password]
> cd incoming
> put ...
> put ...
> quit
>
> Let me know the names of the files, and I'll take a look.
>
> Thanks,
>
> --Mary
>
> On Thu, 19 Feb 2009, Asher, Vinit Narendra wrote:
>
>> Hi Mary,
>>
>> I am using the gsn_csm_contour_contour_function().
>>
>> I am actually doing an black and white isobars plot of a variable
>> of oceanic data. I need to color the land black. As of now its
>> coming white.
>>
>> If I insert a colormap into the plot and put cnFillOn to True then
>> I can see the land as white and the colored parts as the ocean but
>> that defeats the purpose of the black and white plot with isobars.
>>
>> Best Regards,
>>
>> Vinit Asher
>> vinit.asher_at_mavs.uta.edu
>> 817-201-2396
>>
>> -----------------------------
>>
>> Message: 3
>> Date: Thu, 19 Feb 2009 10:58:18 -0700
>> From: Mary Haley <haley_at_ucar.edu>
>> Subject: Re: Plotting land in oceanic plot
>> To: Vinit Asher <vinit.asher_at_mavs.uta.edu>
>> Cc: ncl-talk_at_ucar.edu
>> Message-ID: <207E96BF-1B93-4C78-B24F-290734A399B8_at_ucar.edu>
>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>>
>> If you are using one of the gsn_csm_xxx_map functions, you can try
>> setting:
>>
>> res_at_mpFillOn = True ; probably already the case
>> res_at_mpLandFillColor = "black"
>> res_at_mpOceanFillColor = "transparent" ; if you don't want ocean
>> fill
>> res_at_mpFillDrawOrder = "PostDraw" ; May already be the case
>>
>> --Mary
>>
>> On Feb 19, 2009, at 10:39 AM, Vinit Asher wrote:
>>
>>> Hi,
>>>
>>> Is there a way to plot the land in a file of oceanic data in
>>> which the
>>> cnFillOn option is turned off because I was making a isolines plot.
>>>
>>> It does not plot the land in such a way. I want the land to be
>>> displayed as
>>> black.
>>>
>>> Kindly help,
>>> Vinit Asher
>>> MS in CS.
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>> End of ncl-talk Digest, Vol 63, Issue 27
>> ****************************************
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>

Received on Mon Feb 23 2009 - 18:37:29 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 05 2009 - 15:48:48 MST