climatol2rclimdex {climatol}R Documentation

Convert DAILY data from Climatol to RClimDex input format

Description

This function can be useful to apply the RClimDex program to daily data homogenized with Climatol.

Usage

climatol2rclimdex(varRR, varTX, varTN, yiRR, yfRR, yiTX=yiRR, yfTX=yfRR,
  yiTN=yiRR, yfTN=yfRR, prefix='hoclm', dir=NA, na='-99.9', nm=NA, dah=NA,
  nei=NA, est.c=NA)

Arguments

varRR, varTX, varTN

Name of the variables in the Climatol destination files. If some variable is not available, name it as ”.

yiRR, yfRR

Initial and final years for the RR variable.

yiTX, yfTX, yiTN, yfTN

Initial and final years for the TX and TN variables. (By default they are the same for the three variables; otherwise, the output file will contain data for the common period only.)

prefix

Prefix to apply to the names of the RClimDex destination files. ('hoclm' by default.)

dir

Directory where to save the RClimDex destination files. (If not set, they will be saved into the R working directory.)

na

Missing data code to use in the ouput files. ('-99.9' by default.)

nm, dah, nei, est.c

Objects to be read from the Climatol homogenization output. (The user does not need to care about them.)

Details

After homogenizing daily series with Climatol, the user may be interested in applying the RClimDex program to the homogenized series. This function automatizes the conversion of file formats between both programs.

Value

This function does not return any value.

See Also

homogen

Examples

#Set a temporal working directory and generate input files:
wd <- tempdir()
wd0 <- setwd(wd)
data(tmax)
write.table(est.c,'Tmax_2001-2003.est',row.names=FALSE,col.names=FALSE)
write(dat,'Tmax_2001-2003.dat')
homogen('Tmax',2001,2003,snht1=30)
#Now run the example:
climatol2rclimdex('','Tmax','',2001,2003)
#Return to user's working directory:
setwd(wd0)
#Input and output files can be found in directory:
print(wd)
#(RR and TX columns are filled with missing data codes, because we do not have
#provided Climatol homogenization results for those variables.)

[Package climatol version 3.1.2 Index]