color shading for specified range

From: BasitAli Khan <BasitAli.Khan_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 26 2014 - 07:48:01 MDT

Hi folks,

I am trying to plot a specified range of vertical velocity in shading from -6 to -1 and 1 to 6. I don't want any shading between -1 and 1. I tried explicit levels with explicit mode but it still plots shading for the unwanted range. I then replaced the unwanted range with missing values as follows:

wa_plane = where((.not.ismissing(wa_plane).and. wa_plane .lt. 1.) .and. (.not.ismissing(wa_plane) .and. wa_plane .gt. -1.),wa_plane@_FillValue,wa_plane)

But then my code crashed with the following error message
fatal:The result of the conditional expression yields a missing value. NCL can not determine branch, see ismissing function

I then tried another workaround as follows:

 dims_wa = dimsizes(wa_plane)

                 do jj= 0, dims_wa(0)-1
                       do ii = 0, dims_wa(1)-1
                              if (.not.ismissing(wa_plane(jj,ii)) .and. (wa_plane(jj,ii) .gt. -1.) .and.(wa_plane(jj,ii) .lt. 1.) ) then
                                   wa_plane(jj,ii)=wa_plane@_FillValue
                             end if
                        end do
                end do

Still no luck. I would greatly appreciate if anyone could help me with some tips on this.

Best regards,
b:)

----
Basit A. Khan, Ph.D.
Postdoctoral Research Fellow
Division of Physical Sciences & Engineering
Office# 3204, Level 3, Building 1,
King Abdullah University of Science & Technology
4700 King Abdullah Blvd, Box 2753, Thuwal 23955 –6900,
Kingdom of Saudi Arabia.
Office: +966(0)2 808 0276,  Mobile: +966(0)5 0860 3617
E-mail: basitali.khan@kaust.edu.sa<mailto:basitali.khan@kaust.edu.sa>
Skype name: basit.a.khan
________________________________
This message and its contents including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 26 07:48:23 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT