meteo_forcing_nc: Create NetCDF file of Meteorological forcings

Description Usage Arguments Examples

View source: R/meteo-forcings.R

Description

Create NetCDF file of Meteorological forcings

Usage

1
2
3
4
5
6
7
meteo_forcing_nc(
  forc_tbl,
  ccoords,
  file_nc = "inst/extdata/74_input.nc",
  na = -9999,
  force_v4 = TRUE
)

Arguments

forc_tbl

tibble with time series of meteorological forcings.

ccoords

a tibble with columns lon and lat.

file_nc

character, path to NetCDF file

na

scalar numeric, Default: -9999

force_v4

If TRUE, then the created output file will always be in netcdf-4 format (which supports more features, but cannot be read by version 3 of the netcdf library). If FALSE, then the file is created in netcdf version 3 format UNLESS the user has requested features that require version 4. Deafult is FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if(FALSE){
 # arquivo de saĆ­da
 forcings_nc <- "inst/extdata/posto74_input.nc"
 # exporta dados para netcdf
 meteo_forcing_nc(
   forc_tbl = forcdata74,
   ccoords = centroids(poly_station = poly74),
   file_nc = forcings_nc
 )
 file.exists(forcings_nc)
}

lhmet-ped/fuse.prep documentation built on Dec. 7, 2020, 3:08 p.m.