comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How do I get IDL to place a string array into a netdcf file attribute?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How do I get IDL to place a string array into a netdcf file attribute? [message #84435] Fri, 31 May 2013 13:08
Peter Thorne is currently offline  Peter Thorne
Messages: 13
Registered: October 2000
Junior Member
Newbie dipping in after a frustrating afternoon. I tried to search pretty exhaustively and can't find an answer to this on existing (at least cached) threads or anywhere else on the net.

I am crashing my IDL (v8.2 on a mac) in trying to write the following (as an e.g.)

flag_type_vals=[101, 102, 103, 999]
flag_type_descriptors=['Raw','Quality_Controlled_by_originat or','Homogenized_by_originator','Missing/Unknown/Not_Applica ble']

; netcdf commands
NCDF_ATTPUT,wilma,'data_type_flags','flag_values',flag_type_ vals,length=N_ELEMENTS(flag_type_vals),/SHORT
NCDF_ATTPUT,wilma,'data_type_flags','flag_meanings',flag_typ e_descriptors,length=N_ELEMENTS(flag_type_descriptors),/STRI NG

If I use /CHAR instead of string in the last command then the program does not crash my IDL but only writes the first string element of the flag_type_descriptors array.

I have a whole bunch of these that need writing (some are 50 element flag identifiers and descriptors ...!). So, how do I get IDL to write these flag descriptors out either 1. as a string array or 2. as something which a netcdf reader is going to interpret as a string array so that someone can match the descriptors to the flag values?

Thanks

Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The function `CGSFlushWindow' is obsolete
Next Topic: Searching for Nyala in Ethiopia

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:10:58 PDT 2025

Total time taken to generate the page: 0.00572 seconds