[ncl-talk] write_matrix error

Dennis Shea shea at ucar.edu
Wed Dec 10 07:03:51 MST 2014


The underlying 'write_matrix' code should be able to handle byte, short,
integer, float or double.
If the original variable is 16-bit integer (NCL type short), then the
format you are passing to 'write_matrix' is not correct.

Change
     write_matrix (msl(it,:,:), "1000f9.3", opt)    <== for float or double
To
    write_matrix (msl(it,:,:), "1000i9", opt)         <== for integer

Note if your original data area type short *and* they have the attributes
'scale_factor' and 'add_offset', it is possible thay you may wish to unpack
the data prior to writing the ascii format. ('short2flt')

==
If the above is not the case then you should include the output from
printVarSummary(...) in any subsequent post to ncl-talk

    u=f->u10(:,:,:)
    printVarSummary(u)

Good luck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141210/04e1b8bd/attachment.html 


More information about the ncl-talk mailing list