palm_ncdf_berlin_old: Funktion die mit $new aufgerufen wird! Title

palm_ncdf_berlin_oldR Documentation

Funktion die mit $new aufgerufen wird! Title

Description

Funktion die mit $new aufgerufen wird! Title

Funktion die mit $new aufgerufen wird! Title

Methods

Public methods


Method new()

Usage
palm_ncdf_berlin_old$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)
Title


Method importfiles()

Usage
palm_ncdf_berlin_old$importfiles(lengthx, lengthy, dx)
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
berlin_example$importfiles(lengthx = 100,
                           lengthy = 100,
                           dx = 10)
Title

Exports a static driver with the data present in the class


Method exportncdf()

Usage
palm_ncdf_berlin_old$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
berlin_example$exportncdf(Path = "Path/to/be/saved"
                          EPSGCode = "EPSG:25833")
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_old$plot_area(xleft, yleft, xl = 40, yl = 40)
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
berlin_example$plot_area(1,1,200,200)

Method createofficebuilding()

Usage
palm_ncdf_berlin_old$createofficebuilding(
  start,
  size,
  height,
  ignorestreets = TRUE,
  notnew = c()
)

Method createresidentialbuilding()

Usage
palm_ncdf_berlin_old$createresidentialbuilding(
  start,
  size,
  height,
  ignorestreets = TRUE,
  notnew = c()
)

Method createlod1area()

Usage
palm_ncdf_berlin_old$createlod1area(start, array2d)

Method createbuilding3D()

Usage
palm_ncdf_berlin_old$createbuilding3D(force = FALSE, orogrphy3d = FALSE)

Method quickplot()

Usage
palm_ncdf_berlin_old$quickplot(variable)

Method correct_surface_fraction()

Usage
palm_ncdf_berlin_old$correct_surface_fraction()

Method fill_areal()

Usage
palm_ncdf_berlin_old$fill_areal(
  variabletofill,
  startx,
  starty,
  fillvalue,
  valuetobefilled = NULL,
  boundaryarea = NULL,
  overwrite = TRUE
)

Method generate_lai_array()

Usage
palm_ncdf_berlin_old$generate_lai_array(
  dz,
  fixed_tree_height = NULL,
  alpha = 5,
  beta = 3,
  startx = NULL,
  starty = NULL,
  lengthx = NULL,
  lengthy = NULL,
  additional_array = NULL
)

Method import_data()

Usage
palm_ncdf_berlin_old$import_data(v.file, palmtype, typeid, street = FALSE)

Method SortOverlayingdata()

Usage
palm_ncdf_berlin_old$SortOverlayingdata(inorderof = "BPWV")

Method countemptyfields()

Usage
palm_ncdf_berlin_old$countemptyfields()

Method addsoilandsurfacefraction()

Usage
palm_ncdf_berlin_old$addsoilandsurfacefraction(type_soil = 1)

Method add_lod2_variable()

Usage
palm_ncdf_berlin_old$add_lod2_variable(name, v.data = NULL)

Method print()

Usage
palm_ncdf_berlin_old$print(...)

Method downscale_resolution()

Usage
palm_ncdf_berlin_old$downscale_resolution(factor)

Method cutout_static()

Usage
palm_ncdf_berlin_old$cutout_static(startp, endp, sure = FALSE)

Method add_any2D_variable()

Usage
palm_ncdf_berlin_old$add_any2D_variable(
  variablename,
  variable_list,
  print_template = FALSE
)

Method clone()

The objects of this class are cloneable with this method.

Usage
palm_ncdf_berlin_old$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## Method `palm_ncdf_berlin_old$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)
Title


## ------------------------------------------------
## Method `palm_ncdf_berlin_old$importfiles`
## ------------------------------------------------

berlin_example$importfiles(lengthx = 100,
                           lengthy = 100,
                           dx = 10)
Title

Exports a static driver with the data present in the class


## ------------------------------------------------
## Method `palm_ncdf_berlin_old$exportncdf`
## ------------------------------------------------

berlin_example$exportncdf(Path = "Path/to/be/saved"
                          EPSGCode = "EPSG:25833")
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_old$plot_area`
## ------------------------------------------------

berlin_example$plot_area(1,1,200,200)

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