WRF2Obs: Converts a WRF netcdf file to obs

View source: R/WRF2obs.R

WRF2ObsR Documentation

Converts a WRF netcdf file to obs

Description

Creates a CRHMr data frame of all values from a WRF netCDF file containing t, RH, p, and wind vectors for a single location.

Usage

WRF2Obs(
  netCDFfile = "",
  obsfile = "",
  startDatetime = "2000-10-01 00:00",
  timezone = "Etc/GMT+7",
  trim = TRUE,
  quiet = TRUE,
  logfile = ""
)

Arguments

netCDFfile

Required. The name of the netCDF file containing the WRF data.

obsfile

Optional. If specified the values are written to the obs file.

startDatetime

Optional. Date and time of first interval. Format is "yyyy-mm-dd hh:mm".

timezone

Optional. The name of the timezone of the data as a character string. This should be the timezone of your data, but omitting daylight savings time. Note that the timezone code is specific to your OS. To avoid problems, you should use a timezone without daylight savings time. You can use Etc/GMT+6 or Etc/GMT+7 for Central Standard and Mountain Standard time. DO NOT use America/Regina as the time zone, as it includes historical changes between standard and daylight savings.

trim

Optional. If TRUE (the default) then the final output will be trimmed to CRHM day boundaries.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns the value TRUE and (optionaly) writes the specified .obs file. If unsuccessful, returns the value FALSE.

Examples

## Not run: w <- WRF2Obs("wrf2d_tquvr.nc")

CentreForHydrology/Reanalysis documentation built on Nov. 23, 2022, 2:57 a.m.