grim2nc: Convert GRIM file to netCDF

Description Usage Arguments Details

View source: R/utils-nc.R

Description

Convert GRIM file to netCDF

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
grim2nc(
  filename,
  varid,
  longname = NULL,
  scale_factor = 10^3,
  units = "m",
  lat = NULL,
  lon = NULL,
  FUN = `*`,
  overwrite = TRUE,
  output_filename = NULL
)

Arguments

filename

Filename for the netCDF input (relative or absolute path).

varid

String with the main variable identifier.

longname

String with the output variable's long name.

scale_factor

Numeric value with scale factor (units conversion).

units

String with the output units.

lat

Numeric vector with the latitude values.

lon

Numeric vector with the longitude values.

FUN

Infix function to perform the conversion.

overwrite

Boolean flag to indicate if the output file should be overwritten (if it exists).

output_filename

Output filename.

Details

A GRIM file is a structured ASCII file, that was used for early versions of the CRU TS data-set. This function is particularly useful to parse the elevations file provided here: https://crudata.uea.ac.uk/~timm/grid/CRU_TS_2_0.html


special-uor/codos documentation built on Jan. 7, 2022, 2:32 a.m.