This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
# NetCDF rewrite - Data downloaded from CDS had some funny dimensions | |
# CDO did not like it. So rewriting | |
# usage: rewrite_netcdf input.nc output.nc | |
library(ncdf4) | |
# processin arguments #### | |
args <- commandArgs(trailingOnly = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import io | |
import os, sys | |
os.rename(sys.argv[1],'tempfile.sql') | |
saida = open(sys.argv[1], "w") | |
with io.open("tempfile.sql", encoding="utf-8", errors='ignore') as f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# balanco hídrico | |
# Baseado em: | |
# Pereira, Antonio Roberto. (2005). Simplificado o balanço hídrico de Thornthwaite-Mather. | |
# Bragantia, 64(2), 311-313. https://dx.doi.org/10.1590/S0006-87052005000200019 | |
# Posse, GO | |
# https://edisciplinas.usp.br/pluginfile.php/3433083/mod_resource/content/1/Meteoro_aula11-Balanco_Hidrico.pdf | |
dados <- data.frame(p = c(271, 215, 230, 119, 20, 9, 5, 12, 30, 123, 223, 280), | |
etp = c(116, 97, 104, 88, 78, 63, 62, 90, 94, 109, 106, 106)) | |
# campina Grande |