This is the most minimal example I can think of in which I can
reproduce the error:
yes? let isFile = spawn( "test -e a.nc; echo $?" )
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)
So I invoke bash here: same problem as with the test_opendap() function.
If I use b.nc also in the first line, there is no error.
The goal I have in the end is to add a variable (e.g. with ncks) from
one file to another file, if the first file exists and if the variable
exists.
Marco