NCL Home > Documentation > Language

Variable Assignment

Consider y = x where x is previously defined. If Y is not defined, then it will have the same shape, values, and meta data as x. If y is already defined, then for the assignment to work, y must already have the same shape as x, and be coercible to that type. Any attributes that y possessed will be overwritten.
    Value-only: For variables without metadata, 
    a direct assignment is sufficient:

    a = 5
    b = (/1,2,3/)

    With Meta Data: the NCL syntax (/.../) will 
    strip away the metadata:

    uval = (/U/)