db.upscale {RGeostats} | R Documentation |
Upscale a variable from a Grid Db into another Grid Db
db.upscale(dbgin, dbgout, orient = 1, verbose=FALSE, radix = "Upscale", modify.target = db.locmod())
dbgin |
The |
dbgout |
The |
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 |
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:
a calculation starting with the harmonic mean in the flow direction and followed by the arithmetic mean in orthogonal direction(s)
a calculation starting with the arithmetic mean in the orthogonal direction(s) followed by the harmonic mean in the flow direction.
We finally consider the geometric mean of the two previous results.