Description Usage Arguments Value Note Author(s) References See Also Examples
This function remaps and interpolates (bilinear) to desired projection and geographic extent the high resolution Digital Elevation Model (DEM) data. Moreover it creates a Skin surface Temperature (SKT) correction data which is derived as a difference between high resolution DEM and DEM provided by the NWP model (geopotential height at surface) multiply by the constant lapse rate of 0.6K/100m. This data is further used by the skt_prepare
to improve the temperature estimates over the mountainous regions. The remapped DEM data is used by the PCM function together with the SKT data. If the SKT data are not available the DEM data are not needed.
1 | dem_prepare(NWP.dem.file = NWP.dem.file, dem.file = dem.file, out.dir = out.dir, out.proj = out.proj, out.extent = out.extent, out.dim = out.dim, NWP.dem.proj = NWP.dem.proj, NWP.dem.extent = NWP.dem.extent, dem.proj = dem.proj, dem.extent = dem.extent, NWP.dem.half.cell = NWP.dem.half.cell, dem.half.cell = dem.half.cell, NWP.dem.scale = NWP.dem.scale, NWP.dem.offset = NWP.dem.offset, dem.scale = dem.scale, dem.offset = dem.offset, NWP.dem.band = NWP.dem.band)
|
NWP.dem.file |
Required! String with an absolute path to Numerical Weather Prediction DEM which is usually defined as geopotential height at surface. The file can be in the .grib version 1 or 2 format but it has to be readable by |
dem.file |
Required! String with an absolute path to a single band "high" resolution DEM (preferably 1x1 km) file which is readable by |
out.dir |
Required! Output directory where the dem.tif and NWP_correction.tif files will be stored. |
out.proj |
Required! String with the Proj4 library coordinate system definition for the output file. To retrieve it type gdalinfo -proj4 your_file in the command line. |
out.extent |
Required! Numeric vector with the coordinates of the CENTRE of upper-left pixel and the CENTRE of lower-right pixel in a form c(ULX,YLY,LRX,LRY). |
out.dim |
Required! Numeric vector with the output dimensions in the form c(ncols,nrows). |
NWP.dem.proj |
Optional. String with the Proj4 library coordinate system definition for the NWP.dem.file. This overwrites the information which is retrieved by the |
NWP.dem.extent |
Optional. Numeric vector with the coordinates of the CENTRE of upper-left pixel and the CENTRE of lower-right pixel in a form c(ULX,YLY,LRX,LRY) for the NWP.dem file. This overwrites the information which is retrieved by the |
dem.proj |
Optional. String with the Proj4 library coordinate system definition for the dem.file. This overwrites the information which is retrieved by the |
dem.extent |
Optional. Numeric vector with the coordinates of the CENTRE of upper-left pixel and the CENTRE of lower-right pixel in a form c(ULX,YLY,LRX,LRY) for the NWP.dem file. This overwrites the information which is retrieved by the |
NWP.dem.half.cell |
Optional. Numeric vector with the tie point of upper-left pixel in the NWP.dem.file. By default c(0,1). For further details see |
dem.half.cell |
Optional. Numeric vector with the tie point of upper-left pixel in the dem.file. By default c(0,1). For further details see |
NWP.dem.scale |
Optional. Numeric value with a scale factor which is applied to NWP.dem data. |
NWP.dem.offset |
Optional. Numeric value with an offset which is applied to NWP.dem data. |
dem.scale |
Optional. Numeric value with a scale factor which is applied to dem data. |
dem.offset |
Optional. Numeric value with an offset which is applied to dem data. |
NWP.dem.band |
Optional. The number of the DEM layer in the multiband NWP.dem.file. By default 1. |
0 on success or 1 on failure. Success indicates that the output dem.tif and NWP_correction.tif files in the GeoTiff format were written to out.dir.
If you find one of the provided functions of this package useful please cite!
Jan Musial
Musial, J., Probabilistic approach to cloud and snow detection on AVHHR imagery, Atmos. Chem. Phys (in prep.)
1 2 3 4 5 6 7 8 9 10 | ## Not run:
dem_prepare(NWP.dem.file='/path/to/NWP_dem.grib',
dem.file='/path/to/DEM.tif',
out.dir='/path/to/outdir/',
out.proj="+proj=laea +a=6370997.0 +b=6370997.0 +lat_0=50.0 +lon_0=20.0",
out.extent=c(-2521000.0,2401000.0,980000.0,-2000000.0),
out.dim=c(3500,4400),
NWP.dem.scale=0.1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.