DESCRIPTION |
DOWNLOAD |
SOURCE CODE |
EXAMPLE |
DEPENDENCIES |
DISCLAIMER
| subroutine | coastline | ( mxm,maxnodes,xmax,ymax,value,specialvalue,corner, clockwise,remove,two,xbounds,ybounds,goodcorner, nodeno,lake,xcoastal,ycoastal ) |
| mxm | (i) | - |
the declared dimension of the model
(see also the note for 'value[,]' below). |
|||||||||||||||||||||||||||||||||||||||||||||
| maxnodes | (i) | - | the declared dimension of the output vectors 'xcoastal[]' and ycoastal[]; i.e., the maximum no. of coastal nodes which can be stored by calling "coastline". | |||||||||||||||||||||||||||||||||||||||||||||
| xmax, ymax | (i) | - | the actual dimensions of the model. | |||||||||||||||||||||||||||||||||||||||||||||
| value | (RR) | - |
array containing an output field from the model.
Note: a border (of width 1) must be added around the (maximum) model domain. |
|||||||||||||||||||||||||||||||||||||||||||||
| specialvalue | (r) | - | it is assumed that dry nodes (i,j) are characterized by 'value[i,j]' >= 'specialvalue' | |||||||||||||||||||||||||||||||||||||||||||||
| corner | (i) | - |
denotes the corner from which search for a coastline is started. It is
assumed that the corner is a dry node (on the continent for which the
coastline will be determined). The corners are numbered according to
the stecil:
|
|||||||||||||||||||||||||||||||||||||||||||||
| clockwise | (l) | - |
.true. if "coastline" is to search for a coastline in a clockwise manner;
.false. if an anticlockwise search will be performed.
Below, dry nodes are black, and the previously encountered coastal node is white. If 'clokwise' is .true., the next coastal node will be red; if 'clockwise' is .false., the next coastal node will be green.
|
|||||||||||||||||||||||||||||||||||||||||||||
| remove | (l) | - |
If 'remove' is .false., the output coastline will consist of every node which
is recognized as a coastal node. Note: this may result in the same node being
entered twice in the output coastline.
If 'remove' is .true., some nodes may be eliminated from the coastline (see 'two' below). See the example below for a sample domain and resulting coastlines. |
|||||||||||||||||||||||||||||||||||||||||||||
| two | (l) | - |
has no effect if 'remove' is .false.
Otherwise, if 'two' is .false., and there are coastal nodes which are encountered more than once, the intermediate entries in 'xcoastal[]' and 'ycoastal[]' are removed along with the duplicate. If 'two' is .true. (and 'remove' is also .true'), when a new coastal (oceanic) node is found, only the first and the last neighbouring coastal nodes will be accepted. Intermediate entries are removed. See the example below for a sample domain and resulting coastlines. |
|||||||||||||||||||||||||||||||||||||||||||||
| xbounds, ybounds | (I) | - |
the bounds outside which the search for a coastline will be terminated.
(xbound[1],ybound[1]) and (xbound[2],ybound[2]) are the lower, left corner and the upper right corner, respectively, of the (sub-)domain of interest. (If xbound[1] = ybound[1] = 1 and xbound[2] = 'xmax' and ybound[2] = 'ymax', the entire domain will be considered). |
| goodcorner | (l) | - | will be .true. if the values of 'corner' and 'clockwise' lead to a successful search of the coastline; otherwise, the output value of 'goodcorner' will be .false. |
| nodeno | (i) | - | the number of coastal nodes which were detected. |
| lake | (l) | - | will be .true. if a closed coastline is been detected; otherwise .false. |
| xcoastal, ycoastal | (I) | - | the (x,y) nodal locations of the 'nodeno' coastal nodes. |
| land (dry) | |
| ocean (wet), never part of coastline | |
| ocean (wet), always part of coastline | |
| ocean (wet), part of coastline when 'remove' is .true. and two is .false. | |
| ocean (wet), part of coastline when 'remove' is .false. |
Output coastline:
| 'remove'=.false. | |||
| 'remove'=.true., 'two'=.false. | |||
| 'remove'=.true., 'two'=.true. |
ALTHOUGH THE PROVIDED SOFTWARE HAS BEEN USED IN A NUMBER OF APPLICATIONS, I CAN TAKE NO RESPONSIBILITY OF ERRORS THAT MAY ARISE WHEN USING THIS TOOL.
... however, if a problem occurs, please do not hesitate to inform
me, and I'll do my best to help you out!