pressure_conversion_netcdf: Daily surface and mean sea level pressure conversion for a...

View source: R/cdtClimate_pressure_msl_conversion.R

pressure_conversion_netcdfR Documentation

Daily surface and mean sea level pressure conversion for a netCDF dataset.

Description

Function to convert surface and mean sea level pressure in both way.

Usage

pressure_conversion_netcdf(
  convert = "sfc2msl",
  start.date = "1991-01-01",
  end.date = "2020-12-31",
  pres.data = list(dir = "", format = "pres_%s%s%s.nc", varid = "pres", ilon = 1, ilat
    = 2),
  temp.from = "minmax",
  tmax.data = list(dir = "", format = "tmax_%s%s%s.nc", varid = "tmax", ilon = 1, ilat
    = 2),
  tmin.data = list(dir = "", format = "tmin_%s%s%s.nc", varid = "tmin", ilon = 1, ilat
    = 2),
  tmean.data = list(dir = "", format = "tmean_%s%s%s.nc", varid = "tmean", ilon = 1,
    ilat = 2),
  elev.data = list(file = "", varid = "z", ilon = 1, ilat = 2),
  output = list(dir = "", format = "prmsl_%S.nc")
)

Arguments

convert

character, the direction of conversion. Valid options: "sfc2msl" and "msl2sfc".

  • "sfc2msl": conversion from surface to mean sea level pressure.

  • "msl2sfc": conversion from mean sea level to surface pressure.

start.date

character, the start date of the data to be converted in the form YYYY-MM-DD.

end.date

character, the end date of the data to be converted in the form YYYY-MM-DD.

pres.data

named list, providing the pressure netCDF dataset. Units: hPa. Surface pressure or mean sea level pressure, depending on convert.

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

  • format: character, format of the netCDF file names

  • 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 "pres" has the dimension order [Lat, Lon] then ilon must be 2

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

temp.from

character, source of temperature data. Valid options: "minmax" and "mean".

  • "minmax": the mean temperature is computed from tme minimum and maximum temperature.

  • "mean": the temperature data is from a mean temperature data.

tmax.data

named list, if temp.from is equal to "minmax", providing the maximum temperature netCDF dataset. Units: degree Celsius. See pres.data for the elements of the list.

tmin.data

named list, if temp.from is equal to "minmax", providing the minimum temperature netCDF dataset. Units: degree Celsius. See pres.data for the elements of the list.

tmean.data

named list, if temp.from is equal to "mean", providing the mean temperature netCDF dataset. Units: degree Celsius. See pres.data for the elements of the list.

elev.data

named list, providing the Digital Elevation Model in netCDF format. Units: meters.

  • file: character, full path to the netCDF file containing the elevation data.

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

  • ilon: integer, order for the longitude dimension of the variable.

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

output

named list, the elements of the list are

  • dir: character, full path to the directory to save the converted pressure

  • format: character, format of the output netCDF file names, the dates are represented by %S


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