SCRIPTING CARTOGRAPHIC METHODS OF GMT FOR MAPPING THE NEW BRITAIN AND SAN CRISTOBAL TRENCHES, SOLOMON SEA, PAPUA NEW GUINEA MÉTODOS CARTOGRÁFICOS DE SCRIPT DE GMT PARA MAPEAR AS TRINCHEIRAS DA NOVA GRÃ-BRETANHA E SAN CRISTOBAL, MAR DE SALOMÃO, PAPUA-NOVA GUINÉ

The study present a case study of the Generic Mapping Tools (GMT) applied for cartographic modelling, mapping and comparative analysis of the deep-sea trenches located in southwest Pacific Ocean: the New Britain Trench (NBT) and the San Cristobal Trench (SCT). The aim was to evaluate their geomorphic variation using scripting cartographic approach of GMT. The data was processed using a sequence of the GMT modules with the main module 'grdtrack' used to visualize crosssection profiles along the trenches for their geomorphological modelling. The main grid used for topographic mapping is the SRTM DEM with 15-arc second resolution. The statistical analysis shown variability in depths of both trenches by samples in two transects. The cartographic analysis demonstrated following results. The SCT is generally deeper reaching -9,000 m, while the median for the NBT less then 7,000 m. The gradient slope of SCT is more symmetric with accurate 'V' form. In a cross-section graph, the NBT landward slope is markedly asymmetric U-shaped form and has a crescent form in the east. The NBT slope dips westwards with 35° eastward, and 41° westward, while the SCT slope has 33° oceanwards and 33,69° landwards. The difference between the geomorphology of the trenches is explained by the effects of the geotectonic evolution and actual sedimentary processes affected their formation and sculptured their structure. The marine free-air gravity anomaly illustrated density anomalies at the bathymetry in the region of NBT and SCT with range <-60.0 mGal. The geoid values are 56-66 mGal. The study contributed to the submarine geomorphic mapping and presents technical application of the cartographic functionality of GMT used for geomorphological modelling.


INTRODUCTION
Selecting the best cartographic GIS software is a topic that attracts attention and gaining importance nowadays with a wide variety of existing GIS. The functionality of GIS software for cartographic plotting, mapping and graphical visualization in a geospatial research can affect the workflow and result in different map layouts. The available GIS presents a wide variety of geoinformation software, which can be listed to mention a few of the most well-known ones: ArcGIS, QGIS, ENVI GIS, GRASS GIS, Erdas Imagine, SAGA GIS, Idrisi GIS, MapInfo, GeoMedia. In view of this, there is a need to know the advantages and functionality of the possible GIS software and tools that can be applied for the research and mapping.
The Generic Mapping Tools (GMT) stands apart from the traditional GIS due to its highly specific functionality consisting of a console and a scripting approach, without Graphical User Interface (GUI) with a menu. The basis for mapping workflow in GMT is writing a script consisting form several lines of code taken together as a script for plotting maps. This can be achieved by a console and traditional scripting development environment (e.g. Xcode, Atom). The functionality of GMT enables its excellent operating of the cartographic commands which results in a high flexibility of writing a code and executing a script stepwise with a full control on the cartographic output. Many studies on mapping and spatial analysis are based on testing different GIS applied for various research questions, in which a large number of articles reported either the cartographic workflow and techniques of visualization (ČESNULEVIČIUS et al. 2019;KESKIN et al. 2019;LÓPEZ & BALBOA 2008;WOOD, 1993;visualization (e.g. OSTROWSKI et al. 2019;MESENBUR, 2004;KEATES, 1996) or focused on the technical GIS applications (MACEACHREN, 1995;SLOCUM et al. 1993;ROBINSON et al. 1995). GOMARASCA (2009) points that cartographic visualization and mapping are of fundamental importance for the geospatial data.
Indeed, the effectively plotted and precise maps can serve as excellent tools for indicating the relationship between the geographic phenomena of the Earth, help to focus on the correlations between the geological and geophysical processes, to elements of the geological structures and highlight the complexity of the geospatial systems. The study conducted by DENT (1999) showed a high level of importance concerning the mapping workflow which includes the map projections, map design, and map production, since the quality of the layout maps impacts the quality of the data analysis. In various research papers on cartography (YOELI, 1983;TYNER, 1992;TOBLER, 1974), the methodology approaches in spatial analysis and mapping workflow are highlighted as important cartographic issues.
This study presents a GMT as a main cartographic toolset for modelling geomorphological profile of the two deep-se tranches, and visualization the geological and geophysical settings as indication of impact of the tectonic development on the actual landform of the seafloor. Not all the GIS are equally functional and enable to perform a complex cartographic analysis based on the machine learning. In contrast with traditional GIS, the majority of which use GUI, the GMT uses scripting, which presents a high degree of automatization and repeatability in the cartographic workflow. For example, the GMT based cartographic techniques used in this research, included the following major steps: visualization of the image using the 'grdimage' module; plotting the isolines using the 'grdcontour'; inserting the global small map for identification of the study area location in a topographic map; annotating the texts and inserting legend; adding cartographic elements by 'psbasemap' module; automatic digitizing of the cross-section profiles for a spatial geomorphological analysis; calculation of the data frequency in histogram of depths distribution by the 'pshistogram' module; modelling the curvature trends for geomorphological analysis of steepness of the slopes by 'trend1d' module; as well as visualizing various raster grids (EGM2008, SRTM) within the investigated area.
The aim of this study was to present the results of the application of GMT for geophysical and geological data visualization and geomorphological modelling in one of the marginal seas of the Pacific Ocean: the Solomon Sea with the two deep-sea trenches, the New Britain Trench and the San Cristobal Trench. The study objective is to contribute to the knowledge on deep-sea trench geomorphology in the Pacific Ocean region, perform cartographic visualization of the geophysical and geological settings around the New Guinea and northern Australia region and present modelling of hadal geomorphology using GMT.

Study area
The study area is focused on the New Britain and San Cristobal hadal trenches located eastwards off Papua New Guinea as northern borders of the Solomon Sea, Pacific Ocean (Fig. 1). The region is one of the world's active subduction zones at the triple junction of the Pacific Plate, Indo-Australian Plate and Solomon Sea Plate. Additionally, the Woodlark Basin subducts beneath the Solomon Islands arc region, forming a double-sided subduction zone (YONESHIMA et al., 2005).
Because the region is situated within the complex zone of the convergence at the tectonic plates boundary, it is trapped between the converging Ontong Java Plateau and Australian continent.
Geologically, the study area belongs to one of the most prospective for intrusion-related mineral deposits (HOLM et al., 2019). The New Britain Trench (a.k.a. Bougainville Trench) is defined by the 6,000 m isoline. It is a narrow, 50-75 km wide trench extending northeasterly from the eastern end of the Huon Gulf along the south coast of New Britain (MAMMERICKX et al., 1971). Its name is derived from the homonymous New Britain Island from the New Britain arc (Fig. 2). Its western extension are the north-dipping Ramu-Markham fault zone and the West Bismarck arc (ABBOT et al., 1994). The northern part is characterized by the Bismark Sea back-arc basin (Fig. 2)   The active volcanic arc that can be seen along the north coast of New Britain Island (Fig. 2 structure, formation and development of the trench: slabs and tectonics plates, bathymetry, geographic location, geologic structure of the underlying basement and sediment thickness (LEMENKOVA, 2018a).
Further detailed explanation on structure and these factors can be found in existing literature FINLAYSON;CULL, 1973;TREGONING, et al., 1998;JOHNSON, 1976;LINDLEY, 1988;RIPPER, 1970;HONZA, et al., 1987) describing bathymetry, geomorphology, sedimentation, submarine canyons and terraces of the New Britain Trench. However, these works are mainly restricted to the western part of the Solomon Sea and are based on the existing data at that time. Current study proposes a comparative analysis of the New Britain Trench with its contiguous San Cristobal Trench.
Moreover, this study is supported by modern datasets (SRTM 15 sec DEM, gravity and geoid grids) using fine cartographic toolset GMT.

MATERIALS AND METHODS
The methodology of the current work is completely based on using the Generic Mapping Tools (GMT) developed by WESSEL and SMITH (1998) and maintained up to date by the group of developers (WESSEL et al. 2013). The used version of the GMT is 5.4.5. Technically, the GMT based mapping and modelling is done using following major GMT modules: grdimage (this module visualizes raster image on the computer display, i.e. makes a physical appearance of map). The coastline contours and polygons of continents were added using existing geographic dataset in GMT (WESSEL;SMITH, 1996) by option 'pscoast'.
Other GMT modules were used for plotting diverse cartographic elements, e.g. colour palettes (makecpt), adding scale (psscale) and data conversion to TIFF/JPG (psconvert), plotting isolines and contour lines (grdcontour), mapping basic map elements (psbasemap), adding GMT logo (logo), addition map annotations and text elements (pstext), plotting various vector elements, such as lines, points and polygons (psxy), selecting study area (grdcut), modelling cross-section profiles (grdtrack and convert). Besides native GMT modules, several Unix programs were used for auxiliary operating with files and texting on the maps: echo, rm, cat.

Data and materials: SRTM DEM
The accuracy of digital bathymetric data is essential for modelling and cartographic mapping, because input data finally determines the output results (Smith, 1993). Therefore, the data used as a main base grid in this work is a high-resolution raster Shuttle Radar Topographic Mission (SRTM) DEM, (BECKER, et al. 2009;GESCH et al., 2006b control (GESCH, et al., 2006a). The data are available through the USGS EROS Data Center Earth Resources Observation and Science (EROS) Center. The comprehensive quality of the DEMs derived by SRTM is well evaluated (e.g. Zhang, K. et al. 2019). There are multiple applications of SRTM in geosciences due to the high quality of the grids (KOCH et al., 2002;KULP;STRAUSS, 2018;PHAM et al., 2018). The gridded topographic data of the Solomon Sea obtained from the SRTM with a resolution of roughly 15 sec highlights the bathymetry (Fig. 1) through selected 'geo' colour palette. It shows complex bathymetric patterns southwest off the San Cristobal Trench (Fig. 5).
The map resulting from this sequence of GMT codes in 10 steps is presented on Fig. 4. The accuracy of the marine gravity measurements is crucial for the data modelling (WESSEL; WATTS, 1988). Therefore, modelling free-air gravity model was done using data from high quality grids for gravity anomaly model from the Scripps Institute of Oceanography from CryoSat-2 and Jason-1 (SANDWELL et al., 2014). The fundamental approach of the marine gravity field modelling is described by SMITH and SANDWELL (1995). The free-air gravity map (Fig. 4) illustrates values (mGal) of the density anomalies at bathymetry, sediments, crust and mantle in the region of the trenches. The free-air anomaly is dominated by the short wavelength variations which reflect the density contrast at the seafloor.

Digitizing cross-section profiles for relief modelling
Cartographic digitizing process differ for various GIS. In manual digitizing normal steps include map referencing, manual digitizing, node snapping, topology building, labelling of the resulting object.
However, the methodology, in in general tedious and laborious. To make the process of digitizing easier and more precise, attempts in automatization and machine learning algorithms were introduced (SCHENKE; LEMENKOVA, 2008). The GMT proposed further advances in batch processing through scripting approach with a case of hill elevations (WESSEL and SMITH, 2018), used and adapted in this study.
Here, the inverse research task has been solved, that is, modelling hadal trench illustrated on  The map resulting from this sequence of GMT codes in 6 steps is presented on Fig. 5. A case is given for San Cristobal segment (red). The geometrical characteristics of both trench segments were determined with respect to bathymetry: since the San Cristobal Trench is longer, the comparative transect located closer to the New Britain Trench was selected for modelling. The selected positions of the starting and ending points of the segments are indicated on Fig. 5 shows the trench axises in a direction perpendicular to the transect. The bathymetric modeled data is SRTM DEMs. 14 profiles were cross-sectioned for the New Britain Trench and 12 profiles for the San Cristobal Trench. The comparative analysis of the two trenches was done through modelling their relief at crosssections (Fig. 6), followed by statistical calculations of the depths and visualizing their histograms (Fig.   7) and then plotting approximating curves of the gradient slopes for two trenches, respectively (Fig. 8). http://uvanet.br/rcgs. ISSN 2316-8056 © 1999, Universidade Estadual Vale do Acaraú.
The New Britain Trench is shallower compared to the San Cristobal Trench: it has median values not exceeding -7,000m (vs -8,000 m median value for the San Cristobal). The New Britain Trench has more asymmetrical U-shaped cross-section dipping westwards with 35° eastward slope, and 41° westward slope (Fig. 6 A). The San Cristobal Trench has 33° slope oceanwards while 33,69° landwards increasing in relief more direct on the oceanward side. The increase in depth by New Britain Trench is more gentle: in 50km segment it reaches 2000 m depths (from -7,000 to -5,000) while the increase for the San Cristobal Trench is more abrupt: for the same distance (50 km) the depths rise from -8,000 to -5,200 m (that is, almost 3000 m), Fig. 6. Associated to the oceanward side of the San Cristobal Trench, several separated minor canyons and furrows has been defined (Fig. 6, A), while New Britain Trench has gentle slope on the Solomon Sea side. In the cross-section graph, the New Britain Trench is markedly asymmetric in the landward slope and has an arc form in the east (Fig. 6, B). The San Cristobal Trench is more symmetric having accurate 'V' form for the segment of -50 to -50 km on the graph (Fig. 6, A) deeper in a segment of -50 to 0 m in cross-section, decreasing from -3,000 to -7,000 in WE direction, with maximum depths reaching -7,000 m. For the same transect (segment of -50 to 0 m in a crosssection) for the San Cristobal Trench, the depth to the bottom becomes deeper decreasing from -3,000 to -8,000 in WE direction, that is, the gradient slope is steeper. The differences between the two trenches are explained by the context of the historic and actual geomorphic and sedimentary processes that finally affected their formation and structure.

RESULTS
The main resulting modeled graphs of the profiles of the two deep-sea trenches are visualized in Fig. 6. The statistical comparison of the two trenches (Fig. 7) shows that the San Cristobal is generally deeper with bathymetric data reaching -9,000 meters while New Britain Trench has only 1 sample point below -8,000 m.  -5,000 to -5,200 m (272) gradually followed by ranges -5,200 to -5,000, -5,000 to -4,800 and -4,800 to -4,600 m (number of samples recorded: 204, 189, 157). That is, the histogram for the New Britain Trench has a slightly more   Mathematic approximation of the gradient slopes for both trenches is shown on Fig. 8 with applied 3 types of the Fourier functions modelling the general trend of the profile curves (median) and residuals plotted for both trenches. The free-air gravity anomalies (Fig. 4) derived from the satellite altimeter measured sea surface height (SSH) have an anomaly range from -60.0 mGal and lower over the hadal trenches (deep purple colour). The geoid shows density of the topographic structures and the upper mantle lithosphere, the geoid anomaly or height can be high irrespective of the real topography.
Therefore, as can be seen (Fig. 3)

CONCLUSION
Understanding structure of the trench geomorphology is crucial for modelling Earth's seafloor, as trench may be located on the place of junction of several tectonic plates (LEMENKOVA, 2020f). The global plate tectonics movements shaping the seafloor bathymetry is one of the most challenging issues of solid Earth science. Broadly-speaking, the shape and present form of the hadal trenches are dominated by variations in set of geophysical and geological factors. Amongst them, the most fundamental is subducting slab morphologies in the deep mantle inducing trench formation (LEMENKOVA, P. 2018c).
Due to the rapidly developing computer technologies, precise modelling of the Earth became possible through data analysis and modelling. There are various approaches trying to find best and effective solutions in data processing and visualization in geoscience. Multiple examples of using statistical libraries and packages of R or Python languages exist for data analysis in Earth and general sciences (CHAMBERS, 2008;LEMENKOVA, 2019c;SARKAR, 2008;SKØIEN et al., 2014;BIVAND et al., 2013;LEMENKOVA, 2020b;HOFER;PAPRITZ, 2011;LEMENKOVA, 2020b). A vast variety of the examples of the geospatial mapping is supported by using traditional GIS (e.g., KLAUČO, et al. 2017;LEMENKOVA et al. 2012;KLAUČO et al., 2014). The examples of the bathymetric mapping, seafloor cartographic modelling and marine research (SUETOVA et al., 2005a;KUHN et al., 2006;SUETOVA et al., 2005b, LEMENKOVA, 2011 mostly use ArcGIS as a main tool for data analysis or its combination with CARIS HIPS and GMT (GAUGER et al. 2007).
Comparing to the vast variety of approaches in data analysis, briefly mentioned above, with the methodology and results demonstrated in this paper, what seems to be advantageous in using GMT?
There are several answers to this question. First, the high cartographic level of the GMT functionality, as demonstrated on the maps presented in this paper: high quality cartographic solutions, colour palettes, projections, layout, data visualization. Second, the flexibility of the GMT coding and shell scripting.
Third, the compatibility of the GMT with UNIX environment. Fourth, the flexibility of GMT that enables to do all kind of data analysis and visualization: cartographic mapping, graphical modelling, http://uvanet.br/rcgs. ISSN 2316-8056 © 1999, Universidade Estadual Vale do Acaraú.
Todos os direitos reservados. data queries and logical questions, statistical analysis, data import/export, processing of both vector layers and raster grids. Fifth and last (but not least): the open source nature of the free-of-charge GMT over commercial GIS software is an evident advantage for students, researchers and general public.

CONFLICTS OF INTEREST
No conflicts of interest.

ACKNOWLEDGEMENT
The author would like to express the gratitude to the anonymous reviewers for the comments, corrections and remarks which improved the manuscript. This research was implemented into the framework of the project No. 0144-2019-0011, Schmidt Institute of Physics of the Earth, Russian Academy of Sciences.