[ncl-talk] Calculate Annual cycle from daily data

Dennis Shea shea at ucar.edu
Tue Jun 13 08:49:20 MDT 2017


Please look at the documentation for clmMonTLL

The clmMonTLL is prototyped as accepting 'float or double' .... not short !

function clmMonTLL (
		x [*][*][*] : float or double
	)

====

Your data is type 'short'. You wrote

SO the e output is:

Type: short

Dimensions and sizes:    [time | 264] x [latitude | 64] x [longitude | 78]
Coordinates:
            time: [693216..885336]
            latitude: [64..32.5]
            longitude: [30..68.5]
Number Of Attributes: 6

  add_offset :    -0.01280028930916859
  scale_factor :    4.884610965422988e-07
  _FillValue :    -32767

=======

*You* must unpack prior to input

   e := short2flt(e)   ; := syntax allows over-write


On Tue, Jun 13, 2017 at 8:23 AM, Sri Nandini <snandini at marum.de> wrote:

> THank you.
>
> The cdo function calculates the monthly values.
>  yrStrt = 1970
>   yrLast = 2000
>
> ; ==============================================================
> ; Open the file: Read only the user specified period first observations
> then model
> ; ==============================================================
> f = addfile("ERAIOBS_monthly.nc", "r") ;
> TIME   = f->time
> YYYY   = cd_calendar(TIME,-1)/100                 ; entire file
> iYYYY  = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)
> e   = f->e(iYYYY,:,:)
> printVarSummary(e)
>
> SO the e output is:
>
> Type: short
> Total Size: 2635776 bytes
>             1317888 values
> Number of Dimensions: 3
> Dimensions and sizes:    [time | 264] x [latitude | 64] x [longitude | 78]
> Coordinates:
>             time: [693216..885336]
>             latitude: [64..32.5]
>             longitude: [30..68.5]
> Number Of Attributes: 6
>   long_name :    Evaporation
>   standard_name :    lwe_thickness_of_water_evaporation_amount
>   units :    m of water equivalent
>   add_offset :    -0.01280028930916859
>   scale_factor :    4.884610965422988e-07
>   _FillValue :    -32767
>
>
> BUT:
>
> ;===================================================
> ; compute desired global annual or monthly climatology
> (12,nlat,mlon)
> ; ==============================================================
>   Tann=clmMonTLL(e)
>    printVarSummary(Tann)
>
> The output is:
>
> fatal:Type Mismatch: The type of missing value could not be converted to
> type of variable (e)
> fatal:Assignment type mismatch, right hand side can't be coerced to type
> of left hand side
>
>
> Is it wrong to do clmMonTLL on the monthly data output from cdo?
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20170613/9be8bfdd/attachment-0001.html 


More information about the ncl-talk mailing list