palm_ncdf_berlin: Funktion die mit $new aufgerufen wird!

palm_ncdf_berlinR Documentation

Funktion die mit $new aufgerufen wird!

Description

Funktion die mit $new aufgerufen wird!

Funktion die mit $new aufgerufen wird!

Methods

Public methods


Method new()

Usage
palm_ncdf_berlin$new(filename, headclass, pathtofiles, oldversion = FALSE)
Arguments
filename

Filename

headclass

Variable of the global Class

pathtofiles

Path to the Berlin data provided by the PALM4U Project

oldversion

Leave at FALSE, only set to TRUE if you want to use a PALM version ~ < r2800

Returns

Creates an R6 Class

Examples
#berlin_headm <- palm_global$new(title = "GIT Example",
#author = "sest",
#institute = "IBP",
#location = "Hoki",
#x0 = 0,   # only important for visualization on a map later on
#y0 = 0,   # only important for visualization on a map later on
#z0 = 0,
#t0 = "2018-06-21 12:00:00 +00", # Character with Date in this format,
# might be important to have correct in later releases of PALM!
#lat = 52.502302,   # important for solar radiation
#lon = 13.364862,   # important for solar radiation
#dx = 5)

berlin_example <- palm_ncdf_berlin$new(filename = "berlin_static.nc",
                   headclass = "berlin_head",
                   pathtofiles = "Path/to/Berlin/data",
                   oldversion = FALSE)


Method importfiles()

Usage
palm_ncdf_berlin$importfiles(lengthx, lengthy, dx, clear_overlap = FALSE)
Arguments
lengthx

Gridpoints in x direction

lengthy

Gridpoints in y direction

dx

Grid spacing

Returns

Imports data into PALM class for relevant PALM-4U data.

Examples
Exports a static driver with the data present in the class


Method exportncdf()

Usage
palm_ncdf_berlin$exportncdf(Path = self$path, EPSGCode = "EPSG:25833")
Arguments
Path

Path where the driver is to be saved

EPSGCode

Necessary for correct display on maps. Currently only usable for few coordinate systems

Returns

Exports a static driver

Examples
Calls ggplot to plot available data in a 2D plot. Contains simple color
coding for pavement, water, buildings and a distinction for small vegetation
and trees. Can display the whole domain or small subareas.
Missing Data is displayed as white and will be marked by the legend.


Method plot_area()

Usage
palm_ncdf_berlin$plot_area(xleft = NULL, yleft = NULL, xl = NULL, yl = NULL)
Arguments
xleft

Distance to lower left corner in x direction. 1 is coordinate origin

yleft

Distance to lower left corner in y direction. 1 is coordinate origin

xl

Length of plot in x direction. Cannot exceed overall dimensions of domain

yl

Length of plot in y direction. Cannot exceed overall dimensions of domain

Returns

Simple visualization of the simulation domain

Examples
Title


Method createbuilding3D()

Usage
palm_ncdf_berlin$createbuilding3D(force = FALSE, orogrphy3d = FALSE)
Arguments
orogrphy3d
Returns
Examples
Title


Method quickplot()

Usage
palm_ncdf_berlin$quickplot(variable)
Arguments
variable
Returns
Examples
Title


Method correct_surface_fraction()

Usage
palm_ncdf_berlin$correct_surface_fraction()
Returns
Examples
Title


Method fill_areal()

Usage
palm_ncdf_berlin$fill_areal(
  variabletofill,
  startx,
  starty,
  fillvalue,
  valuetobefilled = NULL,
  boundaryarea = NULL,
  overwrite = TRUE
)
Arguments
overwrite
Returns
Examples
Title


Method generate_lai_array()

Usage
palm_ncdf_berlin$generate_lai_array(
  dz,
  fixed_tree_height = NULL,
  alpha = 5,
  beta = 3,
  startx = NULL,
  starty = NULL,
  lengthx = NULL,
  lengthy = NULL,
  additional_array = NULL
)
Arguments
additional_array
Returns
Examples
Title


Method import_data()

Usage
palm_ncdf_berlin$import_data(v.file, palmtype, typeid, street = FALSE)
Arguments
street
Returns
Examples
Title


Method SortOverlayingdata()

Usage
palm_ncdf_berlin$SortOverlayingdata(inorderof = "BPWV")
Arguments
inorderof
Returns
Examples
Title


Method countemptyfields()

Usage
palm_ncdf_berlin$countemptyfields()
Returns
Examples
Title


Method addsoilandsurfacefraction()

Usage
palm_ncdf_berlin$addsoilandsurfacefraction(type_soil = 1)
Arguments
type_soil
Returns
Examples
Title


Method add_lod2_variable()

Usage
palm_ncdf_berlin$add_lod2_variable(name, v.data = NULL)
Arguments
v.data
Returns
Examples
Title


Method print()

Usage
palm_ncdf_berlin$print(...)
Arguments
...
Returns
Examples
Title


Method downscale_resolution()

Usage
palm_ncdf_berlin$downscale_resolution(factor)
Arguments
factor
Returns
Examples
Title


Method cutout_static()

Usage
palm_ncdf_berlin$cutout_static(startp, endp, sure = FALSE)
Arguments
sure
Returns
Examples
Title


Method add_any2D_variable()

Usage
palm_ncdf_berlin$add_any2D_variable(
  variablename,
  variable_list,
  print_template = FALSE
)
Arguments
print_template
Returns
Examples
Title


Method add_R6_data()

Usage
palm_ncdf_berlin$add_R6_data(data_class)
Arguments
data_class
Returns
Examples
Title


Method add_R6_dim()

Usage
palm_ncdf_berlin$add_R6_dim(dim_class)
Arguments
dim_class
Returns
Examples
Title


Method add_soil()

Usage
palm_ncdf_berlin$add_soil(type_soil = 1)
Arguments
type_soil
Returns
Examples
Title


Method add_simple_surfacefraction()

Usage
palm_ncdf_berlin$add_simple_surfacefraction()
Returns
Examples
Title


Method generate_lad_single_trees()

Usage
palm_ncdf_berlin$generate_lad_single_trees(
  ext_tree_type = NULL,
  ext_tree_height = NULL,
  ext_crown_diameter = NULL,
  ext_tree_shape = NULL,
  ext_lai = NULL,
  overwrite_single_trees = TRUE,
  overwrite_existing_lad = FALSE,
  ...
)
Arguments
...
Returns
Examples
Title


Method generate_patches_beta()

Usage
palm_ncdf_berlin$generate_patches_beta(
  tree_array = NULL,
  lai,
  alpha = 5,
  beta = 3,
  overwrite_existing_lad = FALSE
)
Arguments
overwrite_existing_lad
Returns
Examples
Title


Method create_paraview_buildings()

Usage
palm_ncdf_berlin$create_paraview_buildings()
Returns
Examples
Title


Method create_paraview_lad()

Usage
palm_ncdf_berlin$create_paraview_lad()
Returns
Examples
Title


Method set_crs_from_epsg()

Usage
palm_ncdf_berlin$set_crs_from_epsg(epsg_code)
Arguments
epsg_code
Returns
Examples
Title


Method dim()

Usage
palm_ncdf_berlin$dim(...)
Arguments
...
Returns

Method clone()

The objects of this class are cloneable with this method.

Usage
palm_ncdf_berlin$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `palm_ncdf_berlin$new`
## ------------------------------------------------

#berlin_headm <- palm_global$new(title = "GIT Example",
#author = "sest",
#institute = "IBP",
#location = "Hoki",
#x0 = 0,   # only important for visualization on a map later on
#y0 = 0,   # only important for visualization on a map later on
#z0 = 0,
#t0 = "2018-06-21 12:00:00 +00", # Character with Date in this format,
# might be important to have correct in later releases of PALM!
#lat = 52.502302,   # important for solar radiation
#lon = 13.364862,   # important for solar radiation
#dx = 5)

berlin_example <- palm_ncdf_berlin$new(filename = "berlin_static.nc",
                   headclass = "berlin_head",
                   pathtofiles = "Path/to/Berlin/data",
                   oldversion = FALSE)


## ------------------------------------------------
## Method `palm_ncdf_berlin$importfiles`
## ------------------------------------------------


Exports a static driver with the data present in the class


## ------------------------------------------------
## Method `palm_ncdf_berlin$exportncdf`
## ------------------------------------------------

Calls ggplot to plot available data in a 2D plot. Contains simple color
coding for pavement, water, buildings and a distinction for small vegetation
and trees. Can display the whole domain or small subareas.
Missing Data is displayed as white and will be marked by the legend.


## ------------------------------------------------
## Method `palm_ncdf_berlin$plot_area`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$createbuilding3D`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$quickplot`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$correct_surface_fraction`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$fill_areal`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$generate_lai_array`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$import_data`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$SortOverlayingdata`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$countemptyfields`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$addsoilandsurfacefraction`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_lod2_variable`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$print`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$downscale_resolution`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$cutout_static`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_any2D_variable`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_R6_data`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_R6_dim`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_soil`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$add_simple_surfacefraction`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$generate_lad_single_trees`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$generate_patches_beta`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$create_paraview_buildings`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$create_paraview_lad`
## ------------------------------------------------

Title


## ------------------------------------------------
## Method `palm_ncdf_berlin$set_crs_from_epsg`
## ------------------------------------------------

Title


SebaStad/rPALM documentation built on June 4, 2024, noon