Re: characters/strings

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 25 Apr 2006 15:20:08 -0600 (MDT)

>If I want to write these city names to an nc file
>and call it site(0:2), is this is best way?
>Unfortunately, it saves the names as
>2d, site(city #, letter #).
>
>Mike
>
>
>begin
>city=(/"Madison","Albany","New Orleans"/)
>site=stringtochar(city)
>out=addfile("city.nc","c")
>out->site=site
>end
>_______________________________________________

NCL allows string variables.
Unfortunately, netCDF3 does not.

Hence, they must be written as character variables.
The above is the correct approach.

Note: AFAIK, netCDF4 will allow a string data type

  http://www.unidata.ucar.edu/software/netcdf/netcdf-4/
  
regards
D

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 25 2006 - 15:20:08 MDT

This archive was generated by hypermail 2.2.0 : Wed Apr 26 2006 - 17:00:19 MDT