dbW_upgrade: Weather database upgrade functions

dbW_upgradeR Documentation

Weather database upgrade functions

Description

Weather database upgrade functions

Usage

dbW_upgrade_to_rSOILWAT2(
  dbWeatherDataFile,
  fbackup = NULL,
  check_all = FALSE,
  with_resume = TRUE,
  clean_cache = TRUE
)

dbW_upgrade_v31to32(dbWeatherDataFile, fbackup = NULL)

dbW_upgrade_v3to31(dbWeatherDataFile, fbackup = NULL, type_new = "gzip")

dbW_upgrade_v2to3(dbWeatherDataFile, fbackup = NULL)

dbW_upgrade_v1to2(
  dbWeatherDataFile,
  fbackup = NULL,
  SWRunInformation = data.frame(site_id = NA_character_, X_WGS84 = NA_real_, Y_WGS84 =
    NA_real_, WeatherFolder = NA_character_, Include_YN = NA, stringsAsFactors =
    FALSE)[0, , drop = FALSE]
)

backup_copy(dbWeatherDataFile, fbackup = NULL)

Arguments

dbWeatherDataFile

A character string. The path to the weather database file.

fbackup

A character string. The path to where the weather database should be backed up. If NULL, then '_copy' is appended to dbWeatherDataFile.

check_all

A logical value. If TRUE, then every record is checked; otherwise, only the first record is checked for the package version.

with_resume

A logical value. If TRUE, then digest of call and progress status are stored in a temporary file on disk on the same path as dbWeatherDataFile. If such a temporary file is present, then upgrade is resumed from where progress status indicates. Otherwise, ignore temporary disk files and attempt to upgrade database records from scratch.

clean_cache

A logical value. If TRUE, then temporary file generated with with_resume set to TRUE, if present, is removed once upgrade completed successfully.

type_new

The type of compression used to compress the weather blobs. See memCompress.

SWRunInformation

A data frame.

Details

dbW_upgrade_to_rSOILWAT2 upgrades a weather database that was created under Rsoilwat31 to the current package version rSOILWAT2

dbW_upgrade_v31to32 upgrades a weather database from version 3.1.z' to '3.2.0'

dbW_upgrade_v3to31 upgrades a weather database from version '3.0.x' to '3.1.0'

dbW_upgrade_v2to3 upgrades a weather database from version '2.x.y' to '3.0.0'

dbW_upgrade_v1to2 upgrades a weather database from version '1.x.y' to '2.0.0'

backup_copy creates a backup copy of a weather database file if not already present


DrylandEcology/rSOILWAT2 documentation built on Jan. 12, 2024, 9:06 p.m.