Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
excludeContents


The export option "Riemann boundary calculation constants" in the F12 menu is a configuration aid for the Riemann boundary transformation. Given a coarse and a fine grid (both already configured in Grids.xml), and a location set of boundary locations (already configured in LocationSets.xml), FEWS will calculate the constants, such as weights and angles, necessary to perform the Riemann boundary transformation to interpolate a time series from the coarse grid to the given boundary locations. The calculated constants will be exported to several csv CSV files, which can then be used to configure the necessary location attributes for the transformation.

Table of Contents

Running the Calculation

When the option is selected in the F12 menu, a menu in which the input grids and location set can be selected will appear. This menu will contain drop-down menus for the fine grid, coarse grid and boundary location set. Note that only regular, rectangular or quadrilateral grids which are not time-dependent will appear as an option for both the fine grid and the coarse grid. As indicated by their names, cells of the fine grid should be smaller then cells of the coarse grid. In the location set drop-down menu, only location sets which are not time-dependent will appear. Finally, a check-box can be selected if the coarse grid should be considered staggered. In this case the weights for u vectors, v vectors and time series located at the center point of the grid cell are calculated separately to reflect the different positions at which they are located:

 


After confirming the input options, a second menu will appear to select the output directory. Note that this directory should be empty.

...

The following constants are calculated (in the order they appear). 

...

Border

For each boundary location, the fine grid cell containing this boundary location is found. This cell should be on the boundary border of the fine grid. FEWS then checks whether an upper, lower, left and/or right cell are present, to determine the sign to border the cell is on, which will be used in the Riemann boundary transformation. The outputted value will be 1 for the left and lower grid border, or -1 for the right and upper grid borderUP, DOWN, LEFT or RIGHT. Note that the orientation of the grid is interpreted as depicted in the image above, i.e., the cell at row 0 and column 0 is viewed as the bottom left corner of the grid. 

Note that for this the remaining calculation to be successful, each fine grid cell found should always have either an upper or a lower neighboring cell, and either a left or a right neighboring cell. If this is not the case, a warning is logged and the remaining calculation for the boundary location will be skipped.  

...

This csv-file will contain six columns:

  • BOUNDARY_LOCATION_ID
  • SIGNBORDER
  • ANGLE
  • FINE_GRID_CELL: the cell index of the fine grid cell associated with this boundary location. Note that <cellIndex> = <rowIndex> * <totalColumns> + <columnIndex>.
  • CELL_CENTER_X: the x-coordinate of the fine grid cell center, given in the geodatum of the fine grid.
  • CELL_CENTER_Y: the y-coordinate of the fine grid cell center, given in the geodatum of the fine grid. 

...

Code Block
titleConfiguration of Riemann Boundary Transformation LocationSets
	<locationSet id="coarse_grid_locations">
		<description>Locations in the coarse grid needed for the Riemann boundary transformation</description>
		<csvFile>
			<file>coarse_grid_id_LocationSet.csv</file>
			<id>%COARSE_GRID_LOCATION_ID%</id>
			<x>%CELL_CENTER_X%</x>
			<y>%CELL_CENTER_Y%</y>
		</csvFile>
	</locationSet>
	<locationSet id="boundary_locations">
		<description>Boundary locations for the Riemann boundary transformation</description>
		<csvFile>
			<file>locset_id_LocationSet.csv</file>
			<id>%BOUNDARY_LOCATION_ID%</id>
			<x>%CELL_CENTER_X%</x>
			<y>%CELL_CENTER_Y%</y>
			<attribute id="angle">
				<number>%ANGLE%</number>
			</attribute>
			<attribute id="signborder">
				<number>%SIGN%<<text>%BORDER%</number>text>
			</attribute>
			<attributeFile>
				<csvFile>locset_id_AttributeFile_Center.csv</csvFile>
				<id>%BOUNDARY_LOCATION_ID%</id>
				<attribute id="center_coarse_grid_id">
					<text>%COARSE_GRID_LOCATION_ID%</text>
				</attribute>
				<attribute id="center_weight">
					<text>%WEIGHT%<<number>%WEIGHT%</text>number>
				</attribute>
			</attributeFile>
			<attributeFile>
				<csvFile>locset_id_AttributeFile_U.csv</csvFile>
				<id>%BOUNDARY_LOCATION_ID%</id>
				<attribute id="u_coarse_grid_id">
					<text>%COARSE_GRID_LOCATION_ID%</text>
				</attribute>
				<attribute id="u_weight">
					<text>%WEIGHT%<<number>%WEIGHT%</text>number>
				</attribute>
			</attributeFile>
			<attributeFile>
				<csvFile>locset_id_AttributeFile_V.csv</csvFile>
				<id>%BOUNDARY_LOCATION_ID%</id>
				<attribute id="v_coarse_grid_id">
					<text>%COARSE_GRID_LOCATION_ID%</text>
				</attribute>
				<attribute id="v_weight">
					<text>%WEIGHT%<<number>%WEIGHT%</text>number>
				</attribute>
			</attributeFile>
		</csvFile>
	</locationSet>