convert2CPTFormat: Conversion to CPT data format.

View source: R/cdtCPTconversion_Procs.R

convert2CPTFormatR Documentation

Conversion to CPT data format.

Description

Function to correct station data or netCDF files to CPT data format.

Usage

convert2CPTFormat(
  data.type = "cdtstation",
  station.data = list(file = "", sep = ",", na.strings = "-99"),
  netcdf.data = list(dir = "", format = "onset_%Y%M%D.nc", varid = "onset", ilon = 1,
    ilat = 2),
  cpt.varinfo = list(name = "onset", units = "days since", missval = "-9999"),
  output.file = "",
  GUI = FALSE
)

Arguments

data.type

character, the type of the data. Available options: "cdtstation" or "cdtnetcdf".

station.data

named list, providing the station data to convert in CDT format.

  • file: character, full path to the file containing the stations data

  • sep: character, column separator of the data

  • na.strings: character, missing values flag

netcdf.data

named list, providing the input netCDF dataset to convert.

  • dir: character, full path to the directory containing the netCDF files.

  • format: character, format of the netCDF file names.
    Replace the year, month, dekad, pentad or day by Year: %Y; Month: %M; Dekad: %T; Pentad: %P; Day: %D.
    Example:
    outTS_1981-07_1982-06.nc => outTS_%Y-%M_%Y-%M.nc
    onset_19830901.nc => onset_%Y%M%D.nc

  • varid: character, name of the variable to read from the netCDF data

  • ilon: integer, order for the longitude dimension of the variable. Example: if the variable "precip" has the dimension order [Lat, Lon] then ilon must be 2

  • ilat: integer, order for the latitude dimension of the variable.

cpt.varinfo

named list, information about the field of the output CPT file.

  • name: character, the field name

  • units: character, the units

  • missval: character, missing values flag

output.file

character, full path to the file to save the CPT data format.

GUI

logical, indicating whether or not the output message should be displayed on CDT GUI. If TRUE, CDT GUI must be open.


rijaf-iri/CDT documentation built on July 3, 2024, 2:54 a.m.