Re: missing_value problem about GODAS monthly data

From: moon <nightmoon35_at_nyahnyahspammersnyahnyah>
Date: Tue Apr 27 2010 - 20:34:19 MDT

Dear Dennis,

    Thanks, _fillvalue worked. But there is anonther problem about panel
common bar.
    Still using this ncl script, I want to draw a panel figure using a
common bar. So I add the command

    res@lbLabelBarOn = False ; turn off individual cb

    and creat the panel,but the common label bar didn't appear. Is there
any problem?
__________________________________________________________________________________________
  do nt=0,3
     plot(nt%2,nt/2)=gsn_csm_vector_scalar_map_ce(wks,u(nt,{minLat:maxLat},{minLon:maxLon})
\
                                          ,v(nt,{minLat:maxLat},{minLon:maxLon})
\
                                          ,dzdt(nt,{minLat:maxLat},{minLon:maxLon})
, res)
  end do
;************************************************
; create panel
;************************************************
   resP = True ; modify the panel plot
; resP@gsnFrame = False ; don't advance panel
plot
   resP@gsnPanelLabelBar = True ; add common colorbar
   resP@lbLabelStride = 2 ; automatically choose
best stride
   resP@gsnSpreadColors = True ; use full range of color
map
   resP@gsnMaximize = True ; fill up the page
   plotone=ndtooned(plot)
   gsn_panel(wks,plotone,(/2,2/),resP) ; now draw as one plot
___________________________________________________________________________________

Thanks

moon

在 Wed, 28 Apr 2010 00:27:38 +0800,Dennis Shea <shea@ucar.edu> 写道:

> I see the issue. This is a good example of the "golden rule of
> data processing" .... Look at your data before processing.
>
> Consider:
>
> b = addfile(diri + f2, "r")
> us = b->ucur(:,{5},:,:) ; us is type short
> printVarSummary(us)
>
> Variable: us
> Type: short <=============================
> Total Size: 3611520 bytes
> 1805760 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 12] x [lat | 418] x [lon | 360]
> Coordinates:
> time: [35429..35763]
> lat: [-74..64.999]
> lon: [ 1..360]
> Number Of Attributes: 20
> level : 5
> missing_value : 32767 <=============================
> [snip]
> _FillValue : 32766 <=============================
> [snip]
> add_offset : 0
> scale_factor : 0.000122074
> valid_range : ( -2, 2 )
> actual_range : ( -1.51604, 1.53069 )
>
> ---
> Note the the missing_value and _FillValue attribute are different.
> If you do a
>
> %> ncdump -v ucur ucur.1998.nc | less
>
> you will see many 32767 [land] and no 32766.
>
> NCL only recognizes (_FillValue) as recommended by Unidata
> and the Climate and Forecast Convention.
>
> In this case, it is the user responsibility to 'manually'
> make the change. For this dataset
>
> us@_FillValue = us@missing_value ; Force over write
> u = short2flt(us) ; convert to float
> delete(us) ; no longer needed
>
> The attached script shows the complete "fix"
>
> Good luck
>
> On 04/27/2010 01:10 AM, moon wrote:
>> Dear NCL users,
>>
>> I download GODAS monthly data from the website
>> "http://www.esrl.noaa.gov/psd/data/gridded/data.godas.html".
>> Draw the sea surface current over the dzdt, but the value over the land
>> can't be masked.
>> I think it's the problem of the missing value, delete the
>> "missing_value", but it still doesn't work.
>> Do you have any solution?
>>
>> Thank you very much.
>>
>> Regards
>> moon
>
> [SNIP]

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/


_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Tue Apr 27 20:34:33 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT