Skip to contents

return the expected name for the NetCDF footprint

Usage

obs_footname(
  time = NULL,
  year,
  month,
  day,
  hour,
  minute,
  lat,
  lon,
  alt,
  fullpath = FALSE,
  out,
  ...
)

Arguments

time

POSIXct time to extract time variblaes

year

numeric number

month

numeric number

day

numeric number

hour

numeric number

minute

numeric number

lat

numeric number

lon

numeric number

alt

numeric number

fullpath

Logical, to add or not YYYY/MO/hysplit to id

out

outfile path.

...

data.table::fwrite arguments.

Note

source https://stackoverflow.com/a/47015304/2418532

# IMPORTANT!!! # This function will generate the expected NetCDF file name. # It assumes that the name was generated under the following considerations: # time variables (year, month, day, etc) have a format of two digits, eg "0.1" # latitude and longitude have been round with 4 decimals # The format for latitude is 2 integers, a point and 4 decimals # The format for longitude is 3 integers, a point and 4 decimals

# In other words, it is similar to `obs_format`, but `obs_footname`, generates the expected name.

Examples

{
obs_footname(year = 2020,
             month = 12,
             day = 30,
             hour = 9,
             minute = 54,
             lat = 3.2133,
             lon = 30.9131,
             alt = 497,
             fullpath = TRUE)
obs_footname(year = 2020,
             month = 12,
             day = 30,
             hour = 9,
             minute = 54,
             lat = 1,
             lon = -130.9131,
             alt = 497,
             fullpath = TRUE)
}
#> [1] "2020/12/hysplit2020x12x30x09x54x01.0000Nx130.9131Wx00497.nc"