Skip to content

transect module

aed-modeller edited this page Jul 5, 2023 · 3 revisions

The transect plotting module is used for producing model predictions along a defined polyline, and has options to include observations within certain distance to the polyline. This module is useful especially in study site with significant spatial variations, such as an estuary crossing a freshwater-marine spectrum, or coastal system with shallow to deep water gradients. Users can define time period(s) for the transect, add model prediction ranges and box plots of observations on top of model results.

Summary of transect module configuration

Field name Description Options Comments
start_plot_ID select which variable to start plotting refer to the setting in master.varname
end_plot_ID select which variable to finish plotting refer to the setting in master.varname
plotvalidation option to add field data 1: add field data; 0: no field data
plotmodel option to add model results 1: add model results; 0: no model results
isRange option to add model results percentiles 1: add percentile range; 0: no percentile range; 0 by default
pred_lims define percentile limits for range plotting 5 numbers between 0 -1 [0.05 0.25 0.5 0.75 0.95] by default
alph transparency of range plot 0 - 1 0.5 by default
isFieldRange option to add monthly historical field data range 1: add range; 0: no range 0 by default
isHTML option to add all plots into one HTML page 1: add to HTML; 0: no HTML 0 by default
polygon_file define the line GIS file for transect
outputdirectory define directory to save plots
htmloutput define directory to save HTML files
ncfile.symbol define symbol for model results '-' or '.' user can define multiple model output to be compared in one figure
ncfile.colour define colors for model median value plotting RGB format for color definition
ncfile.col_pal_color define color for range plot of surface model results
istitled option to add title 1: add; 0: not add 1 by default
isylabel option to add y label 1: add; 0: not add 1 by default
islegend option to add legend 1: add; 0: not add 1 by default
isYlim option to define Y axis limits 1: add; 0: not add 0 by default
isGridon option to add grid on 1: add; 0: not add 1 by default
isSurf option to choose surface or bottom layer 1: surface layer; 0: bottom layer 1 by default
isSpherical option to define the coordinate type 1: spherical; 0: Euler 0 by default
add_obs-num option to add number of observations 1: add; 0: not add 0 by default
boxlegend define field data box plot legend location 'southeast' by default
rangelegend define model result legend location 'northwest' by default
dimensions define figure dimensions in centimeters [20 10] by default
pdates.value time period for transect plots can define multiple periods
binfielddata option to include nearby field data 1: include; 0: not include 1 by default
binradius define the radius of bins for field data search number with unit of km 0.5 by default
linedist distance from model polyline to be considered number with unit of m 500 by default
xlim define limits in X axis
xticks define ticks in X axis
xlabel define label on X axis
cAxis.value define limits of Y axis empty [] by default, matlab will automatically adjust the y limit
filetype define figure file type 'png' or 'eps' 'png' to save figures to PNG format only; 'eps' to save figures in both EPS and 300dpi JPG formats

Configuration Example

transect.start_plot_ID = 1;
transect.end_plot_ID = 1;
 
transect.polygon_file = 'E:\database\AED-MARVl-0.1\GIS\Coorong\Transect_Coorong.shp';
% Add field data to figure
transect.plotvalidation = 1; % 1 or 0
transect.plotmodel = 1; % 1 or 0
transect.isRange = 1;
transect.pred_lims = [0.05,0.25,0.5,0.75,0.95];
 
transect.istitled = 1;
transect.isylabel = 1;
transect.islegend = 1;
transect.isYlim = 1;
transect.isHTML = 1;
transect.isSurf = 1; %plot surface (1) or bottom (0)
transect.isSpherical = 0;
%transect.use_matfiles = 0;
transect.add_obs_num = 1;
%config.boxon = 1;
 
% ___
transect.outputdirectory = 'E:\database\AED-MARVL-v0.4\Projects\Coorong\testF/RAW/';
transect.htmloutput = 'E:\database\AED-MARVL-v0.4\Projects\Coorong\testF/HTML/';
 
% plotting configuration
%transect.dimc = [0.9 0.9 0.9]; % dimmest (lightest) color
transect.boxlegend = 'southeast';
transect.rangelegend = 'northwest';
transect.dimensions = [20 10]; % Width & Height in cm
transect.filetype = 'eps';
 
for i=1:20
transect.pdates(i).value = [datenum(2017,7+(i-1)*3,01) datenum(2017,07+i*3,01)-1];
end
transect.binfielddata = 1;
% radius distance to include field data. Used to bin data where number of
% sites is higher, but the frequency of sampling is low. The specified
% value will also make where on the line each polygon will be created. So
% if radius == 5, then there will be a search polygon found at r*2, so 0km, 10km, 20km etc. In windy rivers these polygons may overlap.
transect.binradius = 0.5;% in km;
 
 
%distance from model polyline to be consided.
%Field data further than specified distance won't be included.
%Even if found with search radius. This is to attempt to exclude data
%sampled outside of the domain.
transect.linedist = 1500;%  in m
 
transect.xlim = [0 110];% xlim in KM
transect.xticks = [0:10:110];
transect.xlabel = 'Distance from Goolwa to South Lagoon (km)';
 
transect.cAxis(1).value = [0 200];
 
% ylim
for vvvv=2:size(MARVLs.master.varname,1)
    transect.cAxis(vvvv).value = [ ];
end
transect.ncfile(1).symbol = {'-'};
transect.ncfile(1).translate = 1;
transect.ncfile(1).colour = [166,86,40]./255;% Surface and Bottom
transect.ncfile(1).edge_color = [166,86,40]./255;
transect.ncfile(1).col_pal_color =[[176 190 197]./255;[162 190 197]./255;[150 190 197]./255;[150 190 197]./255];
 
transect.ncfile(2).symbol = {'-'};
transect.ncfile(2).translate = 1;
transect.ncfile(2).colour = [27,158,119]./255;% Surface and Bottom
transect.ncfile(2).edge_color = [8,88,158]./255;
transect.ncfile(2).col_pal_color =[[102,194,164]./255;[162 190 197]./255;[150 190 197]./255;[150 190 197]./255];

Example outputs

Example output of transect module for salinity in the Coorong in Sep 2018 in comparison to the observations.

Example

Clone this wiki locally