Re: satellite data processing

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat, 28 Mar 2009 08:50:44 -0600

[1] You can manually set the contour levels for both plots:

   res_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
   res_at_cnMinLevelValF = -10. ; set min contour level
   res_at_cnMaxLevelValF = 35. ; set max contour level
   res_at_cnLevelSpacingF = 5. ; set contour spacing

[2] If you do not know the appropriate contour levels, you can draw
     the first image allowing NCL to determine the appropriate
     contour levels:

    plot = gsn_whatever(...., res)

     Then, "get" the values used for this plot using "getvalues"
 
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml

    getvalues plot ; Retrieve some resource values.
      "cnMinLevelValF" : cnMin ; get min contour level
      "cnMaxLevelValF" : cmMax ; get max contour level
      "cnLevelSpacingF": cnSpace ; get contour spacing
    end getvalues

     Then set the resources for the 2nd plot

   res_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
   res_at_cnMinLevelValF = cnMin ; set min contour level
   res_at_cnMaxLevelValF = cnMax ; set max contour level
   res_at_cnLevelSpacingF = cnSpace ; set contour spacing

[3] A third approach is to use "nice_mnmxintvl" before drawing
http://www.ncl.ucar.edu/Document/Functions/Built-in/nice_mnmxintvl.shtml

      minData = min( (/ min(data_1), min(data_2) /) )
      maxData = max( (/ max(data_1), max(data_2) /) )
      mnmxint = nice_mnmxintvl( minData, maxData, True)

Then assign the returned values before plotting either figure

   res_at_cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
   res_at_cnMinLevelValF = mnmxint(0)
   res_at_cnMaxLevelValF = mnmxint(1)
   res_at_cnLevelSpacingF = mnmxint(2)

Good luck

Lin Su wrote:
> Hi Mary,
> The method you mentioned in your last email works for the plot. But I still can't figure out how to set the same color bar for the two satellite swath with different lon&lat, and the large yellow color in the left side looks weird too. I will attach the plot to you in a separate email.
> Thanks a lot!
> -Lin
> ---
> Lin Su
> http://atoc.colorado.edu/~sul/
>
>
> ---- Original message ----
>> Date: Fri, 20 Mar 2009 15:44:02 -0600
>> From: Mary Haley <haley_at_ucar.edu>
>> Subject: Re: satellite data processing
>> To: Lin Su <Lin.Su_at_Colorado.EDU>
>> Cc: ncl-talk_at_ucar.edu
>>
>> test_cn_mary.ncl (5k bytes)
>> ________________
>>
>>
>> Hi Lin,
>>
>> Please see the attached script modified script. Since I don't have
>> your data, I was unable to test it.
>>
>> It looks like you have 1D X, Y, Z data, so you are doing the right thing
>> with regard to setting the sfXArray and sfYArray resources. This is
>> what will help
>> you overlay the data on the map correctly.
>>
>> You need to set these two resources for both sets of plots you
>> create: for the map/contour
>> plot, and then the contour plot which will be overlaid on the map/
>> contour plot.
>>
>> Note that when I created your contour plot, I didn't set any other
>> resources. That's because
>> I'm not sure how you want to draw your second set of contours.
>>
>> -Mary
>>
>> On Mar 20, 2009, at 1:36 PM, Lin Su wrote:
>>
>>> Dear NCL users,
>>> Attached please find the simple NCL code to process the calipso
>>> satellite data. I plan to add the first 3 layers' data together
>>> (total layers are 8) both for Beijing (39.98N, 116.36E) and Osaka
>>> (34.65N,135.59E), then plot the two dataset (Beijing and Osaka) in
>>> the same figure. As you may know that the calipso lidar swath is
>>> pretty narrow (you can get the idea from the plot for variable
>>> "X10"). My question is since the variables (f for Beijing and f2
>>> for Osaka) are associated with different lon&lat (lat&lon and
>>> lat2&lon2), how can I put the two dataset in the same plot?
>>> Thanks a lot!
>>> -Lin
>>> ---
>>> Lin Su
>>> http://atoc.colorado.edu/~sul/
>>> <test_cn.ncl>_______________________________________________
>>> 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
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Mar 28 2009 - 08:50:44 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 06 2009 - 10:23:30 MDT