en este cuaderno se van a detallar datos agroclimatologicos de la zona departamental del Guainia, se haran agunos indices que permitian una interpretacion de los cambios climaticos de la zona estudiada, generando una conexcion buena con el primer informe
library(AOI)
library(climateR)
library(sf)
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
library(raster)
## Warning: package 'raster' was built under R version 4.0.5
## Loading required package: sp
library(rasterVis)
## Warning: package 'rasterVis' was built under R version 4.0.5
## Loading required package: terra
## Warning: package 'terra' was built under R version 4.0.5
## terra version 1.1.4
## Loading required package: lattice
## Loading required package: latticeExtra
## Warning: package 'latticeExtra' was built under R version 4.0.5
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:terra':
##
## collapse, desc, intersect, near, select, union
## The following objects are masked from 'package:raster':
##
## intersect, select, union
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
(Guainia <- st_read("94_GUAINIA/ADMINISTRATIVO/MGN_MPIO_POLITICO.shp"))
## Reading layer `MGN_MPIO_POLITICO' from data source `C:\Users\Juan Narvaez\Documents\geomatica\94_GUAINIA\ADMINISTRATIVO\MGN_MPIO_POLITICO.shp' using driver `ESRI Shapefile'
## Simple feature collection with 9 features and 9 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -70.94249 ymin: 1.165633 xmax: -66.84722 ymax: 4.045026
## geographic CRS: WGS 84
## Simple feature collection with 9 features and 9 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -70.94249 ymin: 1.165633 xmax: -66.84722 ymax: 4.045026
## geographic CRS: WGS 84
## DPTO_CCDGO MPIO_CCDGO MPIO_CNMBR
## 1 94 94001 INÍRIDA
## 2 94 94343 BARRANCO MINA
## 3 94 94663 MAPIRIPANA
## 4 94 94883 SAN FELIPE
## 5 94 94884 PUERTO COLOMBIA
## 6 94 94885 LA GUADALUPE
## 7 94 94886 CACAHUAL
## 8 94 94887 PANÁ-PANÁ (Campo Alegre)
## 9 94 94888 MORICHAL (Morichal Nuevo)
## MPIO_CRSLC MPIO_NAREA
## 1 Decreto 1593 de Agosto 5 de 1974 15970.268
## 2 Resolución 83 del 1 de Febrero de 1988 que aprueba con modi 9467.804
## 3 ACUERDO COMISARIAL 018 DEL 25 DE AGOSTO DE 1990 4927.971
## 4 Resolución 83 2926.365
## 5 Resolución 83 15700.545
## 6 Resolución 83 1178.868
## 7 Resolución 83 2335.323
## 8 Resolución 83 de 1988 10227.139
## 9 1988 8554.996
## MPIO_NANO DPTO_CNMBR Shape_Leng Shape_Area geometry
## 1 2017 GUAINÍA 9.256685 1.2869895 POLYGON ((-67.67638 3.91228...
## 2 2017 GUAINÍA 6.825914 0.7652557 POLYGON ((-68.91332 3.68215...
## 3 2017 GUAINÍA 5.010789 0.3990354 POLYGON ((-70.10453 3.38436...
## 4 2017 GUAINÍA 4.029719 0.2346116 POLYGON ((-67.34976 2.50451...
## 5 2017 GUAINÍA 9.166487 1.2632740 POLYGON ((-67.5385 3.177568...
## 6 2017 GUAINÍA 1.750810 0.0943385 POLYGON ((-66.96243 1.66858...
## 7 2017 GUAINÍA 2.364174 0.1876089 POLYGON ((-67.49529 3.75681...
## 8 2017 GUAINÍA 7.805305 0.8250362 POLYGON ((-68.77132 2.42182...
## 9 2017 GUAINÍA 6.916544 0.6917881 POLYGON ((-69.46493 2.88960...
calcularemos la precipitacion de la zona en dos años, que son el 2010 y el 2016 en el mes de Junio
tc_prcp.guai = getTerraClim(Guainia, param = "prcp", startDate = "2010-06-01")
tc_tmp <- tc_prcp.guai[[1]]
tc_tmp
## class : RasterStack
## dimensions : 71, 99, 7029, 1 (nrow, ncol, ncell, nlayers)
## resolution : 0.04166667, 0.04166667 (x, y)
## extent : -70.95833, -66.83333, 1.125, 4.083333 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## names : X2010.06
## min values : 284.3
## max values : 525.5
tc_prcp.guai.16 = getTerraClim(Guainia, param = "prcp", startDate = "2016-06-01")
tc_tmp.16 <- tc_prcp.guai.16[[1]]
tc_tmp.16
## class : RasterStack
## dimensions : 71, 99, 7029, 1 (nrow, ncol, ncell, nlayers)
## resolution : 0.04166667, 0.04166667 (x, y)
## extent : -70.95833, -66.83333, 1.125, 4.083333 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## names : X2016.06
## min values : 217.3
## max values : 647
Se hara un ploot en el cual nos mostrata la precipitacion e una mapa de Guainia
library(leaflet)
library(RColorBrewer)
pal <- colorNumeric(c("red", "orange", "#fcc000","yellow", "cyan", "blue", "#3240cd"), values(tc_tmp$X2010.06),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(tc_tmp$X2010.06 , colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(tc_tmp$X2010.06),
title = "precipitacion Guainia 2010[mm]")
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
pal <- colorNumeric(c("red", "orange", "#fcc000","yellow", "cyan", "blue", "#3240cd"), values(tc_tmp.16$X2016.06),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(tc_tmp.16$X2016.06 , colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(tc_tmp.16$X2016.06),
title = "Precipitacion Guainia 2016 [mm]")
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
verifiamos si los datos son mm
head(param_meta$terraclim)
## common.name call description units
## 1 aet aet Actual Evapotranspiration mm
## 2 water_deficit def Climatic Water Deficit mm
## 3 palmer PDSI Palmer Drought Severity Index
## 4 pet pet Reference Evapotranspiration mm
## 5 prcp ppt Accumulated Precipitation mm
## 6 q q Runoff mm
índice «para medir la deficiencia de humedad». Se basa en el concepto de demanda-suministro de agua, teniendo en cuenta el déficit entre la precipitación real y la precipitación necesaria para mantener las condiciones de humedad climática o normal. Se medira este indice en los dos años 2010 y 2016 en el mes de Junio
tc_palmer.guainia = getTerraClim(Guainia, param = "palmer", startDate = "2010-06-01")
tc_tmp <- tc_palmer.guainia[[1]]
tc_tmp
## class : RasterStack
## dimensions : 71, 99, 7029, 1 (nrow, ncol, ncell, nlayers)
## resolution : 0.04166667, 0.04166667 (x, y)
## extent : -70.95833, -66.83333, 1.125, 4.083333 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## names : X2010.06
## min values : -3.58
## max values : 3.94
tc_palmer.guainia.16= getTerraClim(Guainia, param = "palmer", startDate = "2016-06-01")
tc_tmp.16 <- tc_palmer.guainia.16[[1]]
tc_tmp.16
## class : RasterStack
## dimensions : 71, 99, 7029, 1 (nrow, ncol, ncell, nlayers)
## resolution : 0.04166667, 0.04166667 (x, y)
## extent : -70.95833, -66.83333, 1.125, 4.083333 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## names : X2016.06
## min values : -2.4
## max values : 2.8
haremos un ploot de la zona par este indice en los dos años
pal <- colorNumeric(c("#fc7300","orange", "yellow","#9acd32", "green"), values(tc_tmp$X2010.06),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(tc_tmp$X2010.06, colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(tc_tmp$X2010.06),
title = "PDSI-JUn.2010")
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in colors(.): Some values were outside the color scale and will be
## treated as NA
pal <- colorNumeric(c("#fc7300","orange", "yellow","#9acd32", "green"), values(tc_tmp.16$X2016.06),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(tc_tmp.16$X2016.06, colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(tc_tmp.16$X2016.06),
title = "PDSI-Jun.2016")
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
wat_def = getTerraClimNormals(Guainia, param = "water_deficit", period = "19812010", month=6)
wat_def
## $terraclim_19812010_water_deficit
## class : RasterStack
## dimensions : 71, 99, 7029, 1 (nrow, ncol, ncell, nlayers)
## resolution : 0.04166667, 0.04166667 (x, y)
## extent : -70.95833, -66.83333, 1.125, 4.083333 (xmin, xmax, ymin, ymax)
## crs : +proj=longlat +datum=WGS84 +no_defs
## names : X06
## min values : 0
## max values : 0
tc_tmp <- wat_def[[1]]
pal <- colorNumeric(c("green", "#9acd32","yellow", "orange",
"#fc7300"), values(tc_tmp$X06),
na.color = "transparent")
leaflet() %>% addTiles() %>%
addRasterImage(tc_tmp$X06, colors = pal, opacity = 0.8) %>%
addLegend(pal = pal, values = values(tc_tmp$X06),
title = "Deficid de agua -JUnio")
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded ellps WGS 84 in Proj4 definition: +proj=merc +a=6378137
## +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null
## +wktext +no_defs +type=crs
## Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj =
## prefer_proj): Discarded datum World Geodetic System 1984 in Proj4 definition
sessionInfo()
## R version 4.0.4 (2021-02-15)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19042)
##
## Matrix products: default
##
## locale:
## [1] LC_COLLATE=Spanish_Colombia.1252 LC_CTYPE=Spanish_Colombia.1252
## [3] LC_MONETARY=Spanish_Colombia.1252 LC_NUMERIC=C
## [5] LC_TIME=Spanish_Colombia.1252
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] RColorBrewer_1.1-2 leaflet_2.0.4.1 dplyr_1.0.5
## [4] rasterVis_0.50.1 latticeExtra_0.6-29 lattice_0.20-41
## [7] terra_1.1-4 raster_3.4-5 sp_1.4-5
## [10] sf_0.9-7 climateR_0.1.0 AOI_0.2.0.9000
##
## loaded via a namespace (and not attached):
## [1] httr_1.4.2 rnaturalearth_0.1.0 sass_0.3.1
## [4] jsonlite_1.7.2 viridisLite_0.3.0 foreach_1.5.1
## [7] bslib_0.2.4 shiny_1.6.0 assertthat_0.2.1
## [10] yaml_2.2.1 pillar_1.5.1 glue_1.4.2
## [13] digest_0.6.27 promises_1.2.0.1 rvest_1.0.0
## [16] colorspace_2.0-0 htmltools_0.5.1.1 httpuv_1.5.5
## [19] pkgconfig_2.0.3 purrr_0.3.4 xtable_1.8-4
## [22] scales_1.1.1 jpeg_0.1-8.1 later_1.1.0.1
## [25] tibble_3.1.0 proxy_0.4-25 leaflet.extras_1.0.0
## [28] generics_0.1.0 farver_2.1.0 ellipsis_0.3.1
## [31] hexbin_1.28.2 magrittr_2.0.1 crayon_1.4.1
## [34] mime_0.10 evaluate_0.14 fansi_0.4.2
## [37] doParallel_1.0.16 xml2_1.3.2 class_7.3-18
## [40] tools_4.0.4 USAboundaries_0.3.1 lifecycle_1.0.0
## [43] stringr_1.4.0 munsell_0.5.0 compiler_4.0.4
## [46] jquerylib_0.1.3 e1071_1.7-5 RNetCDF_2.4-2
## [49] rlang_0.4.10 classInt_0.4-3 units_0.7-0
## [52] grid_4.0.4 iterators_1.0.13 htmlwidgets_1.5.3
## [55] crosstalk_1.1.1 base64enc_0.1-3 rmarkdown_2.7
## [58] codetools_0.2-18 DBI_1.1.1 R6_2.5.0
## [61] zoo_1.8-9 knitr_1.31 rgdal_1.5-23
## [64] fastmap_1.1.0 utf8_1.1.4 KernSmooth_2.23-18
## [67] stringi_1.5.3 parallel_4.0.4 Rcpp_1.0.6
## [70] vctrs_0.3.6 png_0.1-7 tidyselect_1.1.0
## [73] xfun_0.22