Re: Assignment type mismatch with clmMonTLL

From: Sho Kawazoe <shomtm62_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 04 2010 - 11:08:21 MDT

Hi Paulo,

 Using clmMonTLL will require you to first convert your sst variable into
type float or double (
http://www.ncl.ucar.edu/Document/Functions/Contributed/clmMonTLL.shtml).

You can covert to type float using the command short2flt
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml

Hope this helps!
Sho Kawazoe

On Thu, Nov 4, 2010 at 12:02 PM, Paulo Santiago <paulohsm@gmail.com> wrote:

> Hi NCL Community,
>
> I'm a newbie in NCL. I would like to compute sea surface temperature
> monthly climatology from monthly means stored in a NetCDF file. I'm
> following the examples given in the page
> http://www.ncl.ucar.edu/Applications/climo.shtml.
>
> I'm trying:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> begin
>
> f = addfile("/home/santiago/Modelagem/ersst_v3/sst.mnmean.nc","r")
> sst = f->sst(0:1859,:,:)
> lon = f->lon
> lat = f->lat
> dat = f->time
>
> printVarSummary(sst)
>
> sst_clim(:,:,:) = clmMonTLL(sst)
> sst_stdv(:,:,:) = stdMonTLL(sst)
>
> end
>
> But I always get the error messages below:
>
> fatal:Assignment type mismatch, right hand side can't be coerced to type of
> left hand side
>
> fatal:Execute: Error occurred at or near line 2490 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
>
> fatal:Execute: Error occurred at or near line 2689 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
>
> fatal:Execute: Error occurred at or near line 15 in file ersst_clim.ncl
>
>
> My printVarSummary(sst) gives
>
> Variable: sst
> Type: short
> Total Size: 59594400 bytes
> 29797200 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 1860] x [lat | 89] x [lon | 180]
> Coordinates:
> time: [19723..76305]
> lat: [88..-88]
> lon: [ 0..358]
> Number Of Attributes: 15
> long_name : Monthly Means of Sea Surface Temperature
> valid_range : ( -5, 40 )
> actual_range : ( -1.8, 34.24 )
> units : degC
> add_offset : 0
> scale_factor : 0.01
> missing_value : 32767
> precision : 2
> least_significant_digit : 1
> var_desc : Sea Surface Temperature
> dataset : NOAA Extended Reconstructed SST V3
> level_desc : Surface
> statistic : Mean
> parent_stat : Mean
> _FillValue : 32767
>
> I believe it's a really simple issue, but i can't see what I'm doing wrong.
> Could anyone give some help, please?
>
> Cheers,
> Paulo Santiago
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-- 
Sho Kawazoe
Graduate Student Meteorology
3019 Agronomy
Ames, IA 50010
Iowa State University
shomtm62@iastate.edu

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 4 11:08:33 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 08 2010 - 08:08:50 MST