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
how to search if a variable exists in a file [message #92002] Mon, 28 September 2015 15:25 Go to previous message
Xiaohua Pan is currently offline  Xiaohua Pan
Messages: 2
Registered: September 2015
Junior Member
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

Thanks.
Xiaohua
[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: Wed Oct 08 13:32:06 PDT 2025

Total time taken to generate the page: 0.00423 seconds