Learn R Programming

geotopbricks (version 1.4)

listFromOutputSoil3DTensor: Extracts a list of files pointing to an output 3D Tensor or 2D map respectively

Description

Extracts a list of files pointing to an output 3D Tensor or 2D map respectively

Usage

listFromOutputSoil3DTensor(x, when, layers = "SoilLayerThicknesses",
  one.layer = FALSE, suffix = "L%04dN%04d.asc", wpath = NULL,
  tz = "A", start_date_key = "InitDateDDMMYYYYhhmm",
  end_date_key = "EndDateDDMMYYYYhhmm", timestep = "OutputSoilMaps",
  use.read.raster.from.url = FALSE, crs = NULL, projfile = "geotop.proj",
  start.from.zero = FALSE, secondary.suffix = NULL, ...)

Arguments

x

string. GEOtop keyword reletated to the 3D or 2D variable to be imported in R.

when

POSIXlt-class for date and time on which the variable x is requested.

layers

number of soil layer or geotop keyword for soil layer (e.g. SoilLayerThicknesses or SoilFile). Default is SoilLayerThicknesses.

one.layer

logical value. If TRUE a RasterLayer-class object is imported, otherwise a RasterBrick-classobject is returened. Default for brickFromOutputSoil3DTensor is FALSE

suffix

charachter string containing the decimal formatter used by GEOtop in the output file names. Default is "L%04dN%04.asc". A simple user is recommended not to modify the value of this argument and use the default value.

wpath, tz, use.read.raster.from.url
start_date_key, end_date_key

initial and final detes and times of the GEOtop simulation or alternatively the respective keywords of *.inpts file (Default)

timestep

time step expressed in seconds every which the raster file has been created. It can be a string corresponding to the geotop keyword in the inpts file. Default value is "OutputSoilMaps".

crs, start.from.zero

see brick.decimal.formatter. If crs is not NULL (Default) , projfile is ignored.

projfile

name of the *.proj file containing CRS information. See get.geotop.inpts.keyword.value. Default is "geotop.proj". If is NULL or NA or this file does not exist, it is not searched and read.. In case use.read.raster.from.url is TRUE and no NULL or NA values are assinged, the *.proj file is searched.

secondary.suffix

String secondary suffix which can be added at the end of the Map file name (optional). Default is NULL and no secondary suffix is added.

Details

This function is experimental and documentation partially exhaustive. These functions brickFromOutputSoil3DTensor and rasterFromOutput2DMap return 3D or 2D Raster-class objects respectively. rasterFromOutput2DMap is a wrapper function of brickFromOutputSoil3DTensor with the option one.layer==TRUE. The functionswork with the following output keywords:

"SoilTempTensorFile",

"SoilAveragedTempTensorFile",

"SoilLiqContentTensorFile",

"SoilAveragedLiqContentTensorFile",

"SoilIceContentTensorFile",

"SoilAveragedIceContentTensorFile",

"SoilLiqWaterPressTensorFile",

"SoilTotWaterPressTensorFile" for brickFromOutputSoil3DTensor;

"FirstSoilLayerTempMapFile",

"FirstSoilLayerAveragedTempMapFile",

"FirstSoilLayerLiqContentMapFile",

"FirstSoilLayerIceContentMapFile",

"LandSurfaceWaterDepthMapFile",

"ChannelSurfaceWaterDepthMapFile",

"NetRadiationMapFile",

"InLongwaveRadiationMapFile",

"NetLongwaveRadiationMapFile",

"NetShortwaveRadiationMapFile",

"InShortwaveRadiationMapFile",

"DirectInShortwaveRadiationMapFile",

"ShadowFractionTimeMapFile",

"SurfaceHeatFluxMapFile",

"SurfaceSensibleHeatFluxMapFile",

"SurfaceLatentHeatFluxMapFile",

"SurfaceTempMapFile",

"PrecipitationMapFile",

"CanopyInterceptedWaterMapFile",

"SnowDepthMapFile",

"GlacierDepthMapFile",

"SnowMeltedMapFile",

"SnowSublMapFile",

"GlacierMeltedMapFile",

"GlacierSublimatedMapFile",

"AirTempMapFile",

"WindSpeedMapFile",

"WindDirMapFile",

"RelHumMapFile",

"SWEMapFile",

"GlacierWaterEqMapFile"

"SnowDurationMapFile",

"ThawedSoilDepthMapFile",

"ThawedSoilDepthFromAboveMapFile",

"WaterTableDepthMapFile",

"WaterTableDepthFromAboveMapFile",

"NetPrecipitationMapFile",

"EvapotranspirationFromSoilMapFile" for rasterFromOutput2DMap.

See Also

get.geotop.inpts.keyword.value,brick.decimal.formatter,brickFromOutputSoil3DTensor

Examples

Run this code
# NOT RUN {

tz <-  "Etc/GMT+1"
start <- as.POSIXct("2002-03-22",tz=tz)
end <- as.POSIXct("2002-03-25",tz=tz)
day <- 3600*24
when <- seq(from=start,to=end,by=day)
#' # The data containing in the link are only for educational use
wpath <- "http://www.rendena100.eu/public/geotopbricks/simulations/idroclim_test1"
x <- "SoilLiqContentTensorFile"
when <- as.POSIXct("2002-03-22 UTC",tz="A")

# Not Run because it elapses too long time!!! 
# Please Uncomment the following lines to run by yourself!!!


# wpath <- '/Users/ecor/attivita/2013/fem-idroclima/Trentino_500_dstr_GEOtop_1_225_9_002'

#kpsi <- "SoilLiqWaterPressTensorFile" ## soil water pressure head 

out <-listFromOutputSoil3DTensor(x,when=when,wpath=wpath,tz=tz,use.read.raster.from.url=FALSE)
# }

Run the code above in your browser using DataLab