ACCESSING MULTIPLE SOFTWARE PACKAGES FROM ARCGIS 8.X WITH MARICOM TO EASE MARINE DATA DISPLAY

Helge Prestrud Astad,

Institute of Geography, University of Bergen (NO)

Introduction
In the marine or coastal environment, the data are available from diverse sources in a wide range of formats and structures. Some data are images, some are points and others are continuous lines. Marine data samples the ocean in all dimensions, 2D, 3D and time series. The quantity of data available from satellites continues to increase rapidly while other data sources and historical data can be too sparse to provide meaningful information on their own. In many cases it is necessary to combine several data sources to get a full understanding of the oceanic environment.

The technology and software used to process and display the different kinds of data is often domain specific, each with their own terminology and approach to the data. The different types of data can be extremely difficult to compare. The result of this is that a user can spend more time learning the software and preparing the data than actually examining and using the data gathered during a cruise or through other means. Without the proper softwareskills, planners or others involved in coastal management may miss important data sources for decision making or they may inadvertently introduce uncertainty or possible errors displaying and analyzing marine data. This paper shows how to ease the learning threshold by reducing the number of software packages seen on the screen and by reducing the number of operations one need to display a type of data. The result is not only an easier procedure; the time it takes to perform certain simple tasks is also reduced.

This paper describes MariCOM as it is at the moment (August 2003). Changes will happen, since it will be in further development for some time. The program is a part of my master thesis from University of Bergen, Institute of Geography which is scheduled to finish this Christmas. It deals with comparison of in situ cruise data and AVHRR SST images (Astad, in prep.).

Background
When students are introduced to the wonderful world of marine GIS applications, they get a short glimpse of the endless possibilities of data gathering, data enhancement, data processing, and sheer amount of data available to a GIS user in this field. The enthusiasm may very well turn into exhaustion after reading endless pages of help-files to learn all the new software. Some students copes with the problem, and others just give up, omitting valuable data sources because of the effort required to learn the appropriate software. In addition, many software packages are domain specific and demand extended knowledge into domains other than the users' own. This can lead to users processing or even displaying data in ways that can degrade or destroy the usefulness of the data. An example can be a user that changes the values in a chlorophyll image to make the colours look nicer. A more correct solution would of course be to change the colour scale, not the actual values.
When observing fellow students, I have observed that after they have gone through the initial learning process on their first GIS software, they tend to stick to this software. If they have to try another software and that does not work, they return to their "origin" software. If an "origin" software does not have the tools necessary to perform the task at hand, the task will not be done or the user finds a new way of doing it that can be erroneous or give a less desirable end product. The "relationship" between a user and her first software can be a problem when she do not want to be "unfaithful" and move to other more specialized software. An example I have witnessed is students who have their "home" with Adobe Illustrator. When trying to turn GPS point elevation data into continuous surfaces, they have great difficulties using Adobe Illustrator for this. I have suggested using a GIS tool with kriging or interpolation for the job, but they do not want to go outside Illustrator.

A possible solution to all this is to combine lots of tools for displaying marine data under one parent software or program. The parent program must be a program that is already known and preferred by many users. That way, the solution will not pose as a threat to the user since she is already "friendly" with the software.

MariCOM is presented here as a solution to the problem. MariCOM is not a standalone program, it only works under ArcGIS 8.x. ArcGIS is a widely used software package from ESRI (www.esri.com) that has VBA (Visual Basic for Applications) embedded for developing extra features. MariCOMs typical user will have some experience with ArcGIS. When using MariCOM under ArcGIS it will not be necessary to leave the preferred software. This can lead to less time being used learning other software. The users that probably will have most need for MariCOM, are students that study marine geography, planners in coastal communities and others that have limited experience working with marine data but still needs to display or do analysis with them. On a personal note, I might add that when I have interacted with marine scientists, it seems that none of them uses GIS or think they need GIS in their work. They all use the first software they got used to, like Matlab or Excel (Astad, In print, Indreiten in Lucas, Astad, Indreiten 2002).

Software
In recent years, GIS-software has become more and more sophisticated, with support for many more datatypes; thus making it easier for everybody to use GIS. To extend usability to standards not included in the original package, it is often possible to extend the software by programming your own personal code.
I have chosen ArcGIS 8.x as a starting point since it is a well known and widely used, and because it has Visual Basic for Applications (VBA) embedded in it. VBA is an object oriented programming language that must run under a Microsoft software application or any application that has VBA embedded in it, like ArcGIS 8.x. VBA is the application version of Visual Basic (VB). VBA offers the same possibilities and libraries as VB, and also offers very close linking with its "parent" software (http://msdn.microsoft.com/vba/prodinfo/qa.asp). Since VBA is a COM (Component Object Model) -compliant programming language, it is possible for ArcGIS to interact with all Microsoft products and all other languages and programs that are COM-compliant (Ungerer and Goodchild, 2002). COM opens for the possibility to add programs and code excerpts in other languages. MariCOM includes code in other languages and from other scientists.

Test data
To prototype MariCOM, data from a cruise in the North Sea undertaken by the research vessel "F/F Johann Hjort" (owned by Institute for Marine Research in Norway (www.imr.no)) between April 27, 2002 and May 9, 2002, is implemented. The main purpose of the cruise was to test different numerical models of the North Sea in connection with the project MonCose. Unlike routine scientific sampling cruises, the ship did not follow any planned route, but did a series of passes over the more or less constant temperature front between the cold Norwegian Coastal Current and the inflow of relatively warm water from the Atlantic Ocean.
The ship carried a variety of tools and profilers, but I have concentrated on a few data samplers: ADCP, CTD, buoys and continuous measurements from the cooling water intake. In addition, time and geographical coordinates where recorded from the ships GPS and navigational system. After the cruise I have downloaded NOAA-16 AVHRR SST images from the NOAA website (http://www.saa.noaa.gov/ ). The images from the selected period and area were first viewed with the website's preview tool to sort out the image that was not too clouded to see any sea surface (Luckily there were some cloudfree days.). The data was downloaded in raw form, and were processed to generate sea surface temperature (SST), using ENVI software (www.rsinc.com/envi/). Chlorophyll-a images from the SeaWiFS sensor were also available, but routines for handling these data will be developed at a later stage in the project.

The Application
MariCOM is a VBA userform that can be loaded into ArcGIS 8.x. The purpose of the userform is to make a user able to display different kinds of marine data from ArcGIS. MariCOM uses different software to achieve this goal, but all user interaction is done in ArcGIS. In addition to use the tools that already exists within ArcGIS, MariCOM utilizes Excel, Matlab and R to reach its goals. To make all of it work, the user need to have ArcGIS and R installed on the local machine. The RCOM (available at http://cran.r-project.org/) interface must also be installed for full access to all functions. MariCOM cannot add its own projections, so this must be done in ArcGIS. MariCOM is at the moment in a beta version. The program is developed under a GNU public license. Anyone that wants to help with the development or have tips on further development can contact the author.
Functionality
To use MariCOM, the user first opens ArcGIS and makes an ArcGIS project. The project stores all the data, so the user can load the data before running MariCOM, or load data from MariCOM. MariCOM is introduced into the ArcGIS project by loading a userform into the project. It may be extended to be an extension in later versions. MariCOM opens with an opening window showed in figure 1. When running, MariCOM loads all the names of all raster layers in the ArcGIS project in a listbox under the "raster" tab. All tables loaded into the ArcGIS project are acessed through another listbox under the "tables" tab.

Figur 1 The opening Page of MariCOM. MariCOM has two pages, one for raster layers and one for tables.

Raster page
The raster page handles all functions that deal with raster images and manipulation of raster datasets. When MariCOM starts, the program loads in all the names of available raster layers already loaded into the ArcGIS project and displays them in the list of raster layers on the left side of the page. The user can click on any of these names, and the properties window will display some of the layers properties. When a raster layer is chosen, the other buttons on the page is enabled for use. The top button is a button that starts the front finding algorithm that in addition to find fronts on AVHRR SST images also records different variables that describe the front.

Front finding
A front finding algorithm developed by Andrew Shaw at Southampton Oceanographic Centre will be made available in MariCOM. The algorithm was originally tracking the Southern Front south of New Zealand. The southern front is a more or less stable temperature front between cold antarctic water and the warmer water from further north. The algorithm works by fitting a hyperbolic tangent function in a moving window over the front. The front is defined as the point between the two water masses where the line of inflection occur. The algorithm must be manually started, so the user must give a startpoint and a directional point to place the window right. The window follows the front and draws a line where the gradient between the two water masses is steepest. Some variables that describe the front is recorded as the front is detected: mean temperature of the two water masses, the width of the front, the direction of the front and other variables describing how the search window finds the front. The algorithm is developed in MatLab, a programming language and environment where a matrix is the ground unit. It has been developed further so it also works in the northern hemisphere. It is now intended to be used for the North Sea, that do not have the same stable fronts as the Southern Front. To ease the front following, some filters are added to make the fronts more clear. VBA does not support the same matrices as MatLab, so it is difficult to translate the algorithm to work under VBA. Instead, since both VBA and MatLab are COM-compliant languages, it is possible to turn the algorithm into a COM object and call it from within VBA. The resulting line that shows where the front is will be included as a new layer in the project. The tables that show the fronts variables is also loaded into the ArcGIS project.

The Front finding button on the raster page launches this algorithm.

Figure 2 The frontfinder algorithm. The black lines are the drawings of the frontfinder, following a front along the danish and norwegian coast. The background image is a AVHRR SST image.

Table Page
The table page of the program provides buttons and tools that handle information stored in tables. All the tables that are already loaded into the ArcGIS project are shown in the table-list to the left on the page. When a user clicks on one of the table names, some information on important properties are displayed in the properties window. The buttons on the page are enabled after the user has chosen one table.

Figure 3 - The table page of MariCOM. Tables are loaded into the window on the left. each button will launch new windows or other software.

Excel
Excel is a widely used, well known spreadsheet program from Microsoft. MariCOM uses Excel to edit tables. Excel is opened as a COM-application. Excel is used to edit values in the tables if they need to be changed to fit the other functions in MariCOM. A typical example is when a column has commas as decimal delimiter, but the program needs them to be periods. Excel can change this fast. It is also easy to do sorting or other altering of the tables. Excel is opened from ArcGIS as a standalone application "owned" by ArcGIS. Data is passed between the two programs in memory, meaning that no temporary files needs to be made. It is possible to do simple editing of tables in ArcGIS too, but by adding Excel it is possible to extend MariCOM with other functionalities that exists only in Excel. Goodchild and Ungerer (2002) adds an areal interpolation function from Excel, showing that the link between Excel and ArcGIS can be useful. (Ungerer and Goodchild, 2002).

ADCP
The ADCP (Acoustic Current Doppler Profiler) is a device mounted under a ship that provides data on the speed and direction of ocean currents. It measures the speed of small particles in the water relative to the ship and, if it is shallow enough, the speed relative to the bottom. An acoustic beam is sent out, and it gets reflected by particles in the water, mostly plankton. By controlling the accoustic beam, the ADCP can find currents at different depths below the ship.
MariCOM gives the user the possibility to display these data. If the data needs to be formatted the user can start Excel from within ArcGIS for data formatting. The program displays the formatted table into a stick-plot layer in ArcGIS showing the currents at a chosen depth. (Pickard & Emery, 1990)

Figure 4 - A stickplot of ADCP data from the Johann Hjort cruise. The stickplot show relative current speed at approximately 20 deep. Notice the bad data quality on the first leg of the cruise from Bergen and southwards; the ADCP did not work correctly the first hours.

CTD
A CTD (Conductivity, Temperature and Depth) profiler is often a large metal structure with different equipment on, and is lowered from the ship and down through the water column. It measures variables in both directions so mean values can be determined. The CTD sonde aboard "Johann Hjort" also had a set of water bottles that were filled at different depths throughout the water column. This makes it possible to compare the instruments measurements with actual water from the water column. There was also mounted a fluorometer on the rig, used for quantifying the organic content of the seawater, i.e. the amount of plankton. Salinity is measured by combining conductivity measurements and temperature with a calibration-routine that is made for the instrument-type onboard.
MariCOM gives the user the possibility to make continuous fields from the CTD measurements. Kriging or other interpolation methods are used, and the result is stored in a new .shp-file. (Figure) If the user wants to compare AVHRR SST images with in situ measurements of surface temperature, MariCOM has built in a method that transforms temperature values from the CTD into surface temperatures. AVHRR images only record SST values in the top millimetre layer of the ocean, while the CTD's first measurement is at ca. 1 meter depth.
The point temperature data can also be compared to SST images, and with RCOM and R it is possible to statistically compare the in situ values with the satellite imagery. R can also add standard statistics like Morans I or find if there is any correlation between for instance SST surfaces and Chlorophyll a surfaces (Rubio 2003).

MariCOM has a button that turns the CTD tables into depth profiles between a chosen set of stations. The user is then able to see a combination of both surface SST values from the AVHRR sensor and how variables like temperature or salinity varies downwards in the water column.
Buoys
During the cruise, buoys with radio transmitters on were deployed in the water. The transmitters sent signals to the French ARGOS satellites, which recorded their positions as they changed. The buoys were equipped with sails under them, about two meters wide and eight meters deep. The sails reduced the effect of wind drifting, and made the buoys movements steered by the local sea currents. The data is on tables with coordinates and time. MariCOM can display these buoy tracks. Excel is used to edit the tables if it is needed. This function works on other tables that has lists of coordinates. This can be useful if for instance one need to show shiptracks and only has point data of the ships track.

R-interaction
R is a programming language and environment based on the S-language. It is a freeware, open source software providing statistical tools and graphics. It gives extended support for spatial statistics (Bivand, 2003). By utilizing the RCOM interface, which is an interface between R and COM developed by Erich Bauer (Baier, 2003), it is possible to let VBA "talk" to R, and send data between the two software packages. RCOM is initially developed for Excel-R interaction, but also works fine with VBA under ArcGIS. R can apply lots of useful statistical features to marine data. One option is to test raster datasets and see if they are randomly distributed or if there are any trends in it. Moran's I can be found using R, and it is possible to look for correlation between AVHRR SST and Seawifs chlorophyll-a images (Rubio 2003).

Combining data
By combining data sources, it is possible to enhance the understanding of the data, and to give the user a way of understanding the entire situation in the data at hand. MariCOM and ArcGIS displays all the data in separate layers that can be shown at the same time. By combining AVHRR SST images with ADCP data and CTD measurements, the user will have access to data in three dimensions. If the in situ data also are interpolated, the user has a "cube" of information on the entire area of interest.

Further development
MariCOM is an open source freeware program, and the code is available to those that want to develop it further. In its current version, there are bugs and code that slows down the program. This can be fixed by the help of other programmers. It is also possible to add more functions. One useful thing would be to add functions for not only AVHRR SST satellite images, but also for images showing Chlorophyll-a. This could lead to a greater understanding of the interaction between sea currents, SST and chlorophyll-a distribution.
It is possible to add 3D display capabilities into the program. ArcGIS has its own 3D environment, and since marine data certainly can be in three or four dimensions, this could also lead to a greater understanding of an entire dataset in a short time.
The R-interaction is also promising, and gives the possibility of adding a whole range of spatial statistics to the data. The R-community is a great one, and new packages is developed almost every day.

Conclusion
MariCOM displays marine data easy and fast. Many other programs does this, but the strength of MariCOM is that since it works under ArcGIS, utilizing many of ArcGIS' tools, it is easy to learn for users already familiar with ArcGIS. MariCOM is open source, with free access to the source code. This opens for further development into a tool that may be useful for large usergroups with interest in and access to marine data. MariCOM is under constant development. To get the source code, send a request to Helge.Astad@student.uib.no.

Acknowledgement
This work has been supported by the EU LIFECO project, contract
number Q5RS-2000-30183.
The author would like to thank Anne E. Lucas at Institute of Geography, University of Bergen for her valuable advices and suggestions. Thanks to Roger Bivand, Tore Indreiten, Astrid Espe, Cecilia and Emma.


References: