Re: fill value

From: Dennis Shea (shea AT cgd.ucar.edu)
Date: Fri May 06 2005 - 09:26:29 MDT

  • Next message: Dennis Shea: "Re: fill value"

    >I have a simple question. How do I copy the FillValue from
    >one variable to another, in addition to the coordinate variables?
    >I usually use copy_VarCoords. Does that also copy the FillValue?

    No. _FillValue is an attribute not a coordinate.

        y@_FillValue = x@_FillValue
        

    ---
    That said there are a couple of approaches to copying
    attributes and coordinate variables
    

    Let's say "tf" is the new variable and "tc" is the current variable

    tf = tc ; tf is an exact copy of tc ; including meta data .. _FillVallue tf = 1.8*tc +32 ; tf has new calculated values and ; retains all meta data tf@units = "Farenheit" ; update specific attributes to ; reflect new information --- TC = 1.8*tc +32 ; TC is a new variable with the same ; shape/size as tc but has no meta data ; *except* _FillValue which is copied/ copy_VarCoords (tc, TF) ; explicitly copy coordinate variab;es TC@long_name = tc@long_name TC@units = "deg F" ---

    D

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



    This archive was generated by hypermail 2b29 : Fri May 06 2005 - 09:39:48 MDT