Use argo_vars() to extract variable information from a vector of Argo NetCDF files in the form of one row per variable. Use argo_read_vars() for lower-level output from a single NetCDF file.

argo_vars(path, download = NULL, quiet = NA)

Arguments

path

A path relative to the root directory of argo_mirror() or argo_cache_dir(). This value can also be a data.frame with a file column (e.g., a global index as returned by argo_global_meta() and others).

download

A logical vector indicating whether or not a file should be downloaded. Defaults to the value of argo_should_download(), which is TRUE for files that do not exist in the cache.

quiet

Use FALSE to show which files are downloaded and for more verbose error messages.

Value

A tibble::tibble() with one row per variable and columns file, name,size, dim, and att_* for variable attributes.

Examples

with_argo_example_cache({
  argo_vars("dac/csio/2900313/profiles/D2900313_000.nc")
})
#> Extracting from 1 file
#> # A tibble: 64 × 16
#>    file      name    dim   size  att_long_name   att_conventions  att__FillValue
#>    <chr>     <chr>   <lis> <lis> <chr>           <chr>            <list>        
#>  1 csio/290… DATA_T… <chr<dbl… Data type       Argo reference … <chr [1]>     
#>  2 csio/290… FORMAT… <chr<dbl… File format ve… NA               <chr [1]>     
#>  3 csio/290… HANDBO… <chr<dbl… Data handbook … NA               <chr [1]>     
#>  4 csio/290… REFERE… <chr<dbl… Date of refere… YYYYMMDDHHMISS   <chr [1]>     
#>  5 csio/290… DATE_C… <chr<dbl… Date of file c… YYYYMMDDHHMISS   <chr [1]>     
#>  6 csio/290… DATE_U… <chr<dbl… Date of update… YYYYMMDDHHMISS   <chr [1]>     
#>  7 csio/290… PLATFO… <chr<dbl… Float unique i… WMO float ident… <chr [1]>     
#>  8 csio/290… PLATFO… <chr<dbl… Type of float   Argo reference … <chr [1]>     
#>  9 csio/290… PROJEC… <chr<dbl… Name of the pr… NA               <chr [1]>     
#> 10 csio/290… PI_NAME <chr<dbl… Name of the pr… 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>