Re: assign value problem

From: Julie Arblaster (jma AT cgd.ucar.edu)
Date: Thu Aug 18 2005 - 01:17:14 MDT

  • Next message: Ufuk Utku Turuncoglu: "older version of ncl or source code"

    Hi Jerry,

    It sounds like the data in T are stored as integers (or, at
    least, not floats) and with your "T1 = T*0.1" you are making
    them floats. Try removing the "T1 = T" line. You can then
    copy the metadata from T -> T1 using the contributed
    function copy_VarMeta.

    Julie

    On Thu, 18 Aug 2005, jerry wrote:

    > hi
    > i have the following code
    >
    > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
    > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
    > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
    > load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
    >
    > begin
    >
    >
    > f = addfile("http://172.16.66.26/cgi-bin/nph-dods/data_online/ncdc/noaa-ersst/NOAA-ERSST_SST_185401_200502_m.nc","r")
    >
    > T = f->sst(0 ,ĄG,ĄG)
    > T1 = T
    > T1 = T * 0.1
    >
    > end
    >
    > I t will have the error message :
    > fatal :Assignment type mismatch , right hand side can't be coerced to type of
    > left hand side
    > fatal : Execute occurred at or near line 18 in file a.ncl
    >
    > any one can help me ?
    > Thank you

    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Thu Aug 18 2005 - 07:53:10 MDT