Netcdf output with non-numeric datatyep

From: Liang Guo (Gmail) <liang.guo.81_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 07 2014 - 08:18:03 MDT

Dear NCL,

I have a variable named *allmode(mode,time)*. For the dimension *mode*, I'd like to assign string value (/"Original value","Component 1","Component 2","Component 3","Component 4"/) instead of numeric value (/0,1,2,3,4/). Then, I try to write this variable into a Netcdf file. I wrote:
> fout = "out.nc"
> system("/bin/rm -f "+fout)
> setfileoption( "nc", "format", "netcdf4" )
> ncdf = addfile(fout,"c")
> ncdf->mode = allmode

However, file can not be created successfully, with error information as:
warning:FileReadVarAtt: _FillValue attribute type differs from variable (mode) type in file (out), forcing type conversion; may result in overflow and/or loss of precision
ncclose: ncid 393216: NetCDF: Can't open HDF5 attribute

Does any has ideas how to write this file out?

Regards,
Liang

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 07 08:18:20 2014

This archive was generated by hypermail 2.1.8 : Tue Apr 15 2014 - 10:45:19 MDT