[Thread Prev][Thread Next][Index]

[ferret_users] combination of file and variable check crashes Ferret



Hello,

When I first check the existence of a file, open it if positive, and
then check the existence of a variable (isReady), Ferret crashes:

yes? let isFile = `test_opendap("a.nc")`
 !-> DEFINE VARIABLE isFile = 0
yes? if `isFile eq 0` then
 !-> if 1 then
yes?   use b.nc
yes?   say `aa[d=b.nc],return=isReady`
At line 89 of file depend_stat_var_sub.F
Fortran runtime error: Array reference out of bounds for array 'uvar_text', lower bound of dimension 1 exceeded (0 < 1)

yes? use b.nc 
yes? say `aa[d=b.nc],return=isReady`
 !-> MESSAGE/CONTINUE 0
0

Without checking the existence of the file, Ferret continues:

yes? use b.nc 
yes? say `aa[d=b.nc],return=isReady`
 !-> MESSAGE/CONTINUE 0
0

An alternative with using a symbol instead of a variable results in a
crash as well:

yes? def symbol isFile = `test_opendap("a.nc")`
 !-> def symbol isFile = 0
yes? if `($isFile) eq 0` then
 !-> if 1 then
yes?   use b.nc
yes?   say `aa[d=b.nc],return=isReady`
At line 89 of file depend_stat_var_sub.F
Fortran runtime error: Array reference out of bounds for array 'uvar_text', lower bound of dimension 1 exceeded (0 < 1)

I don't understand this behaviour at all.

Marco


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement