Use argo_vars()
to extract variable information fromm an Argo NetCDF file
in the form of one row per variable.
argo_read_vars(file, vars = NULL, quiet = FALSE)
A previously downloaded Argo NetCDF file
(e.g., using argo_download()
).
A vector of variable names to include. Explicitly specifying
vars
can lead to much faster read times when reading many files.
Use FALSE
to stop for malformed files, NA
to
silently warn for malformed files, or TRUE
to silently ignore
read errors when possible.
A tibble::tibble()
with one row per variable and columns name
,
size
, dim
, and att_*
for variable attributes.
prof_file <- system.file(
"cache-test/dac/csio/2900313/profiles/D2900313_000.nc",
package = "argodata"
)
argo_read_vars(prof_file)
#> # A tibble: 64 × 15
#> name dim size att_long_name att_conventions att__FillValue
#> <chr> <list> <lis> <chr> <chr> <list>
#> 1 DATA_TYPE <chr … <dbl… Data type Argo reference… <chr [1]>
#> 2 FORMAT_VERSION <chr … <dbl… File format … NA <chr [1]>
#> 3 HANDBOOK_VERSION <chr … <dbl… Data handboo… NA <chr [1]>
#> 4 REFERENCE_DATE_TIME <chr … <dbl… Date of refe… YYYYMMDDHHMISS <chr [1]>
#> 5 DATE_CREATION <chr … <dbl… Date of file… YYYYMMDDHHMISS <chr [1]>
#> 6 DATE_UPDATE <chr … <dbl… Date of upda… YYYYMMDDHHMISS <chr [1]>
#> 7 PLATFORM_NUMBER <chr … <dbl… Float unique… WMO float iden… <chr [1]>
#> 8 PLATFORM_TYPE <chr … <dbl… Type of float Argo reference… <chr [1]>
#> 9 PROJECT_NAME <chr … <dbl… Name of the … NA <chr [1]>
#> 10 PI_NAME <chr … <dbl… Name of the … NA <chr [1]>
#> # … with 54 more rows, and 9 more variables: att_standard_name <chr>,
#> # att_units <chr>, att_resolution <list>, att_axis <chr>,
#> # att_valid_min <dbl>, att_valid_max <dbl>, att_C_format <chr>,
#> # att_FORTRAN_format <chr>, att_comment <chr>