Array visualizer problems

Array visualizer problems

I am using the latest version of Array Visualizer with CVF 6.6 on Windows 2000. The program is using AV to make contour plots of temperature, dissolved oxygen, etc. for a reservoir water quality simulation that are updated periodically (generally every day) through the simulation. I am having several problems and was wondering if anyone else has run into them.

First, I encounter random occurences of illegal memory access when initializing the array viewer screen output. The workaround has been to shut down the simulation and start all over. The problem does not occur when updating the array in the contour plot - only during initialization.

Second, data values in the array viewer sometimes take on completely different values than are plotted in the contour plot. For example, temperature values will be > 50 deg C in the data pane, but the contour plot will show that the highest temperature is 25 deg C.

Third, sometimes the contour plot values will display completely erroneous values, such as temperature being verticaly stratified one day, 15 deg C everywhere the next day, and the following day go back to showing vertically stratified conditions. This also appears to be random. I have verified that the isothermal contour plot is erroneous by comparing to hardcopy output from the program.

Last, the updates of the contour plots are extremely jerky. The computational grid that is being displayed changes shape (gets very "blocky" - I don't know how to explain it better) when being updated and a second later takes on the correct shape with appropriate values.

I think the last problem may be related to very slow updates. For example, updating 3 contour plots in the AV once a day can easily double the runtime of the simulation over 300 days. Since AV is using openGL to plot the arrays, I am puzzled by the poor performance. After a lot of poking around in the documentation and the CVF newsletter on AV, I thought that putting in

!DEC$ATTRIBUTE array_visualizer :: CONC

where CONC is the concentration/temperature array being updated, might help with the performance problem, but it doesn't appear to make any difference. I have also enabled the hardware acceleration option with no discernable difference in the update speed.

Anyway, has anyone else run into any of these problems, and, if so, is there a quick solution to any of them? Any help is greatly appreciated.

Thanks. The more I delve into this, the more I think the problems I am experiencing are due to my inexperience with F90/F95 and the way arrays are efficiently passed. I am going to post the code here in hopes that this example may help others to get a feel for how to efficiently handle arrays, if what I suspect is true.

What this code does is pass a port
ion of a previously allocated array C2 that represents the x,z values of a constituent (e.g., temperature, salinity, etc.) to the array C in the routines GRAPH_OPEN and GRAPH_UPDATE. The call to ARRAY_INITIALIZE sets a mask for values outside of the computational grid so that the computational grid "stands out" from the PALMIN value (areas outside the domain of the computational grid take on a negative value that is not allow

The 'blocky' problem seems to come from a property of the graphic control that allows it to automatically adjust the resolution whenever it thinks it needs to. I found something in the sample programs that seems to do the trick: