[an error occurred while processing this directive]


Grid Viewer

A great utility to parse your ascii grid outputs as both columns and flat grids. Animate the file sequences to recreate your simulation then generate another grid of the average cell values.

You can use export ascii grid flat-files from your Grid windows either automatically through your Preferences or manually using the controls on your Grid windows.

You can load your sequence of exported files into this Grid Viewer and recreate your simulation by animating the sequence, calculate and export a grid of average values for each cell across the sequence, calculate and export file and daily averages, use the Grid Viewer as a conversion utility to re-export any of your grid files when they are loaded into the Grid Display, in grid flat-file format or as co-ordinate columns and resample a square/rectangular selection of cells from your grids.


The Grid Viewer window is organized into top and bottom sections.
The top section is dominated by the Grid Display and the File List alongside it. Resize them with the red splitter.

Above them are the File menu, Browse button, File Mask and File Extension boxes. To the right of the File List are the file selector controls.

In the bottom section are controls to manage the format of both your grid file sequence and any files that you export from the Grid Viewer. Display, Resampling and Export options plus the Amplifier give you complete control over your grid input and output. Export options include output format and statistical summary.

Finally, the Animation Controls at the bottom of the window allow you to play through your grid file sequence, produce a grid of average values and export the current contents of the Grid Display.

Grid Sequence

First thing to do is set the entry in the File Mask box to match the naming of the files in your grid file sequence.
It's probably a good idea to keep all your grid files for each particular sequence separate from other sequences, i.e., keep them in their own folder.

You can get the modelling software to make a new subfolder within your Root Output Folder for your Grid output at the start of your simulation for each Grid when you have set up exports of bitmap images or ascii grids as grid flat-files or column co-ordinates. You do all this through your Preferences.

Your Grid ouptut files will automatically be named using your plot variable choice, your chosen format for your grid output and the sequence number of your file, something like,

(Perennial Grass 1 Biomass)(GRID)(1824).txt

So to load this sequence into the Grid Viewer you will need (GRID)(#) as a grid mask, where # is a positive file number. The default file extension is .txt, but you can change this in the File Extension box.

Specify the format of your grid sequence files. Your Preferences allow you to request output from your Grids as ascii grid flat-files and column co-ordinates, but you can only load one of these types into the Grid Viewer at any one time. Select either Grid or Columns using thr Format switch below the Grid Display.

It's also a good idea to look at one of your files in a text editor like Notepad to check the header structure and missing data flag. You can specify how many lines of header to ignore in the Header: Ignore # line box and the missing data flag in the Missing data flag box, both found in the Format options panel.

Once you have correctly set the file mask, file extension and file format use the File > Open... menu or the Browse button to open the standard dialog
and navigate to your folder with your grid sequence. Your selection of folder will appear in the current folder panel.

The files found matching your file mask will be listed in the File List box and the total number will be reported in the panel above it
  • Click on a file in the File List to display it in the Grid Display.
  • Check that the number of columns and rows in your ascii grid file is correctly reported in the current file structure panel. The range of your data is also reported there.
  • If your grid file is only partially displayed use the Amplifier to apply a boost to the file signal (this actually using an internal scalar that does not effect your data values) so that it becomes visible.
  • Click through your grid file sequence using the up and down file selector buttons.
  • Edit your grid file sequence by deleting file names from your File List box using the File Delete button. This does not delete the actual file and you can restore the original sequence using the Folder Reload button.


You can manipulate the display of your grid files in the Grid Display using the options on the Display options panel,
  • Show and hide the grid lines.
  • Scale the colour intensity used in the plot in terms of the maximum value in each file rather than the maximum value in all files in your grid file sequence.
  • Loop your grid file sequence during play back.
  • Show and hide zero values
  • Show and hide resampling area limits
  • Show and hide your Site Area Mask
  • Show and hide labels for each cell in the Grid Display. These labels can be either the cell co-ordinates or the actual cell value.


Scan through your grid file sequence using the up and down file selector buttons and delete any file names that you don't want included using the File Delete button. This does not delete the actual file and you can restore the original sequence using the Folder Reload button.

Animate your grid file sequence using the Animation Controls
which are from left-to-right for rewinding to the first file in your grid file sequence, rewinding to the previous file, play, moving to the next file and moving to the last file. The graduated slider controls the delay between files when animating.

This is the animation for the example grid file sequence which is provided for you to play with as part of Example 3 where you have installed the modelling software.


When you press the Mean button the Grid Viewer analyzes each of your files in your grid files sequence, simply summing the values for each grid cell and displaying it's progress in a progress bar just above the Format options panel. The totals for each cells are then divided through by the total file count to give the cell averages. This is then plotted in the Grid Display.

The mean plot in the Grid Display is also automatically exported to your Export destination set in the export options panel. The file is named after the folder containing your grid sequence files plus .Means.Distribution.GRID.txt

You can request two other files of summary statistics to be output to the same export destination using the File Means and Daily Means options. The File Means option records the mean value for each file analyzed in a column against a column of the corresponding file names. The Daily Means file sums across days assuming that your grid file sequence is sorted by day.


As mentioned, you can export the current contents of the Grid Display, including the mean values grid after you have pressed the mean button (see above), by pressing the Export button and specifying a destination using the standard dialog


You can use the Grid Viewer to convert between ascii grid flat-file format and ascii co-ordinate column format. Simply load your gis file sequence into the Grid Viewer, select the file and switch the Format options to the desired export format. Now press the Export button and save your file.

You can also use the Grid Viewer to strip the headers off your files (or indeed introduce them) by loading your grid file sequence into te Grid Viewer, select the file and change the Export: Headers option on the Export options panel. Now press the Export button and save your file.

Please note that exported files will not maintain the missing data flag. Any missing data flag identified in the Missing data flag box on the Format options panel will be substituted with a zero. If you want to keep your missing data flags, simply change this box to something meaningless.


You can use the Grid Viewer to focus in on a particular range of cells within your grid file sequence by specifying the range in the Limits boxes for X1 (left), Y1 (top), X2 (right) and Y2 (bottom). You can only define square and rectangular resample areas in this way.

Your resample area will appear in red in the Grid Display and any of the analysis and processing of your grid file sequence described above will only relate to the cells within your resample area.