[ncl-talk] Fw: Figure is not reproduced.

Dennis Shea shea at ucar.edu
Thu Sep 18 11:34:04 MDT 2014


As noted in the previous response, your contour levels may not be
appropriate for your data.

The NCL example at:

http://www.ncl.ucar.edu/Applications/Scripts/hdf4sds_6.ncl

is plotting layer nl=7 only. It puts as a title (nl+1) which is totally
arbitrary => layer=8

   do nl=7,7   ; 0,nlayer-1
      x1d   = ndtooned( x(:,:,nl) )      ; <==== x(:,:,7)

      res at gsnLeftString = x at long_name
      res at gsnRightString   = "layer="+(nl+1)

      plot = gsn_csm_contour_map_ce(wks,x1d(ii), res)
   end do

In *your* script, you are using layer 8 which is one layer higher than

the NCL example


 data=f->latentHeat(:,:,8)

Hence, you are *not* plotting the same level.

As is often noted on ncl-talk .... look at your data

http://www.ncl.ucar.edu/Document/Functions/Contributed/stat_dispersion.shtml


*opt   = Trueopt at PrintStat = True*
statb = stat_dispersion(data, opt )


Further, your 'data' is for the
     [scan | 3019] x [pixel | 208]

The NCL example if for a very small subspace of this array.
Please look at the example script. It has the following

which extracts data for a small spatial subset!


   lat1d = ndtooned( lat )
   lon1d = ndtooned( lon )
   ii    = ind(lon1d.ge.res at mpMinLonF .and. lon1d.le.res at mpMaxLonF .and. \
               lat1d.ge.res at mpMinLatF)
   res at sfXArray = lon1d(ii)
   res at sfYArray = lat1d(ii)

     :
   plot = gsn_csm_contour_map_ce(wks,x1d(ii), res)
   statb = stat_dispersion(x1d(ii), opt )        ; just the current
layer and spatial subset


Good luck on your research.

I can not answer any more on this issue.




On Thu, Sep 18, 2014 at 9:37 AM, Adam Phillips <asphilli at ucar.edu> wrote:

> Hi Geeta,
> I believe I answered this with my previous reply. It comes down to your
> chosen cnLevels. If you set them appropriately you will see the patterns.
> If you don't, and all the data falls in one contour level category, you
> won't see any patterns.
> Adam
>
> On Wed, Sep 17, 2014 at 11:17 PM, Geeta Geeta <geetag54 at yahoo.com> wrote:
>
>> Thanks Dennis.
>> I started using NCL a few days back only. The question in my mind is that
>> If the same range of contour levels are used, (latent heat 200, 400 etc
>> till 1800), It should be able to reproduce the pattern, may not be in the
>> same COLOR.
>> That's not happening.
>> in the Figure
>> http://www.ncl.ucar.edu/Applications/Images/hdf4sds_6_1_lg.png, there is
>> data of LH in the range of 600-1800.
>> But my Ps file (attached) shows the entire swath to be 200.
>> May be I have missed something in my script which I am not able to figure
>> out.
>> pls let me know where I am going wrong.
>> Geeta.
>>    On Wednesday, 17 September 2014 7:46 PM, Dennis Shea <shea at ucar.edu>
>> wrote:
>>
>>
>> You are "not using the script available on the NCL site"
>> Then you say "I find that there is difference in the figures"
>>
>> The NCL example shows 3 figures. You only show one. I assume the middle
>> one
>> is the one to which you are referring.
>>
>> Yopu do not specify what the "difference" is but  what do you expect?
>>  You used a different colormap, different contour levels, different mp
>> resources.
>>  They should look different.
>> ====
>>
>> Respond only to ncl-talk with no salutation to an individual.
>>
>>
>> On Wed, Sep 17, 2014 at 3:41 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:
>>
>> Hi.
>>
>>
>> I am trying to read HDF V6 data using the script (attached).
>> this script reads the data file from 2A12.100702.71931.6.HDF and plots
>> the latent heat.
>>
>> I am not using the script available on the NCL site.
>> so when I compare the plot available on the website (
>> http://www.ncl.ucar.edu/Applications/Images/hdf4sds_6_1_lg.png) and my
>> own plot (ps file attached), I find that there is difference in the figures.
>>
>> I mean same data but the plots are different.
>>
>> can somebody help me.
>>
>> Geeta
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Adam Phillips
> Associate Scientist,  Climate and Global Dynamics Division, NCAR
> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140918/f0be8ea7/attachment.html 


More information about the ncl-talk mailing list