db.upscale {RGeostats}R Documentation

Upscale a variable from a Grid Db into another Grid Db

Description

Upscale a variable from a Grid Db into another Grid Db

Usage

db.upscale(dbgin, dbgout, orient = 1, verbose=FALSE, radix = "Upscale",
           modify.target = db.locmod())

Arguments

dbgin

The db-class structure of the Grid Db where the Input variable is read. Its dimension must lie between 1 and 3.

dbgout

The db-class structure of the Grid Db where the Output variables are written. Its dimension must lie between 1 and 3. It must have the same space dimension as 'dbgin'.

orient

Upscaling orientation: 1 for X, 2 for Y and 3 for Z. Its value must be consistent with the Space Dimension of the Input Grid Db.

verbose

Verbose option

radix

Radix of the name given to the upscaled variable.

modify.target

Decides whether or not the newly created variables will have their locator defined or not. For more information, see db.locmod.

Details

The idea is to identify the subgrid of the Input Db which corresponds to one cell of the output Db: let us denote it as the subgrid. In each space direction, we "regroup" cells two by two: this divides the number of cells in this direction by two. The regroupment is based on an harmonic mean in the flow direction and an arithmetic mean in the orthogonal direction(s). The task consists in iterating these regroupments in all space dimensions, until the number of cells of the subgrid is reduced down to 1.

In order to cope with all the possible paths of the fluid, we perform two calculations in parallel:

We finally consider the geometric mean of the two previous results.


[Package RGeostats version 14.0.10 Index]