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

Home » Public Forums » archive » how to search if a variable exists in a file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: how to search if a variable exists in a file [message #92004 is a reply to message #92002] Tue, 29 September 2015 08:27 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 09/28/15 18:25, Xiaohua Pan wrote:
> Hi all,
> I am dealing with a set of stations which unfortunately contain
> different variables (netcdf formate). For example, Some stations have
> the variables, say 'temperature' and 'pressure', while some stations
> only have 'temperature'. When I read data with DO loop the stations, I
> would like to search the variable first, so I can skip those variables
> not existing to avoid the crash of program. I found a function of
> file_search(), but can't find a similar function for a variable. Is
> there anyone know how to do it? Thanks.
>
> DO i_station = 0, n-1 do begin
> DO i_var = 0, 1 do begin
> ; How to skip the variable if it doesn't exit ????
> ENDFOR
> ENDFOR

See:
http://www.exelisvis.com/docs/NCDF_VARID.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PLOT and LEGEND Function Graphic
Next Topic: Job Posting: Computer Research Specialist / Research Software Engineer / University of Florida

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

Current Time: Fri Oct 10 21:44:16 PDT 2025

Total time taken to generate the page: 0.24062 seconds