Re: white line at longitude 0

From: <cluo_at_nyahnyahspammersnyahnyah>
Date: Mon, 24 Sep 2007 13:35:34 -0700 (PDT)

Hi Mary,

It works with lonFlip function.

Thanks much!
Chao

> Chao,
>
> I had a discussion with Adam Phillips about this, and he suggested
> trying the lonFlip function:
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/lonFlip.shtml
>
> You need to load the "contributed.ncl" script to use this function:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> If this doesn't fix things, then, if you are running version 4.3.1 of
> NCL, you can try a new resource that I created, gsnDebugWriteFileName.
>
> Set this resource to some string for just *one* of your plots:
>
> res = True
> ...
> res_at_gsnDebugWriteFileName = "test"
> ...
> plot= gsn_csm_contour_map(wks,...,res)
>
> delete(res_at_gsnDebugWriteFileName)
> ...
>
> What will happen is that the contour data (and any coordinate
> arrays) will be written to a netcdf file called "test.nc",
> and an NCL script with all the resources you are setting
> will be created and called "test.ncl".
>
> You can then send me "test.ncl" and "test.nc", and I can run your
> script here with the same data and plot resources that you are using.
>
> --Mary
>
>
>
> On Mon, 24 Sep 2007 cluo_at_uci.edu wrote:
>
>> Hi,
>>
>> I just try anthoer bw plot. There is same thing with vertical white line
>> at center (a gap is not plotted at the Greenwich Meridian), with the
>> .hluresfile in my home directory and put res_at_gsnAddCyclic function. I
>> don't know what caused this problem. This problem is nothing to do with
>> NCL?
>> Please see my another plot:
>> http://dust.ess.uci.edu/chaoluo/fig7_bw.pdf
>>
>> Thanks,
>> Chao
>>
>>>
>>>
>>> cluo_at_uci.edu wrote:
>>>> Hi all,
>>>>
>>>> I have a troble to make the black and white plot. There is always a
>>>> white
>>>> line at longitude 0, from latitude -90 to +90. I have no idea how to
>>>> do
>>>> it.
>>>> Here's URLs of my plot and ncl script.
>>>> http://dust.ess.uci.edu/chaoluo/fig10_bw.pdf
>>>> http://dust.ess.uci.edu/chaoluo/test_bw.ncl
>>>>
>>>> Thanks in advance for any help or suggestions!
>>>
>>> [1] Are you talking about the horizontal "white line"
>>> at the top and bottom of the plot? If so, then
>>> I speculate your grid does not extend to the poles.
>>> eg: a gaussian grid, or one that spans (say)
>>> -89 to +89.
>>> In these cases there are no data at the poles.
>>>
>>> [2] I think it has been mentioned before, please put the
>>> following .hluresfile in your home directory.
>>> Amongst other things it makes helvetica the default
>>> font.
>>>
>>> http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
>>>
>>> [2] Why are you doing
>>>
>>> do ilev=0,27
>>> do ilat=0,93
>>> do ilon=0,191
>>> deltp(ilev,ilat,ilon)=(hyblev(ilev+1)-hyblev(ilev))*sufp(ilat,ilon)
>>> end do
>>> end do
>>> end do
>>>
>>> There is a function for this:
>>>
>>>
>>> http://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml
>>>
>>> It is fast and you do *not* need to preallocate the array "deltp"
>>>
>>> [3] General rule for programming .... do not hardwire sizes.
>>> In your do loop:
>>>
>>> do ilev=0,klvl-1
>>> do ilat=0,nlat-1
>>> do ilon=0,mlon-1
>>>
>>> [4] Use NCL's array syntax it is much faster and cleaner
>>>
>>> replace
>>>
>>> do ilev=0,27
>>> do ilat=0,93
>>> do ilon=0,191
>>> bcwet_tot(ilat,ilon)=bcwet_tot(ilat,ilon)+bcwet(ilev,ilat,ilon)
>>> end do
>>> end do
>>> end do
>>>
>>> with
>>> do ilev=0,klvl-1
>>> bcwet_tot = bcwet_tot + bcwet(ilev,:,:)
>>> end do
>>>
>>>
>>>
>>>>
>>>> Chao
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk_at_ucar.edu
>>>> 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
>>
>
Received on Mon Sep 24 2007 - 14:35:34 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 26 2007 - 10:02:41 MDT