Use argo_traj_*() functions to extract information from Argo trajectory NetCDF files. Use argo_read_traj_*() to extract information from a single previously-downloaded NetCDF file.

argo_traj_measurement(path, vars = NULL, download = NULL, quiet = NA)

argo_traj_cycle(path, vars = NULL, download = NULL, quiet = NA)

argo_traj_param(path, vars = NULL, download = NULL, quiet = NA)

argo_traj_history(path, vars = NULL, 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).

vars

A vector of variable names to include. Explicitly specifying vars can lead to much faster read times when reading many files.

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

  • argo_traj_measurement(): one row per file per measurement.

  • argo_traj_cycle(): one row per file per cycle.

  • argo_traj_param(): one row per file per parameter.

  • argo_traj_history(): one row per file per history entry.

Examples

with_argo_example_cache({
  argo_traj_measurement("dac/csio/2900313/2900313_Rtraj.nc")
})
#> Extracting from 1 file
#> # A tibble: 61 × 34
#>    file                          n_measurement date                date_status
#>    <chr>                                 <int> <dttm>              <dttm>     
#>  1 csio/2900313/2900313_Rtraj.nc             1 2003-08-04 01:40:00 NA         
#>  2 csio/2900313/2900313_Rtraj.nc             2 2003-08-04 01:40:00 NA         
#>  3 csio/2900313/2900313_Rtraj.nc             3 2003-08-13 08:52:56 NA         
#>  4 csio/2900313/2900313_Rtraj.nc             4 2003-08-13 12:09:46 NA         
#>  5 csio/2900313/2900313_Rtraj.nc             5 2003-08-13 13:47:15 NA         
#>  6 csio/2900313/2900313_Rtraj.nc             6 2003-08-13 16:59:59 NA         
#>  7 csio/2900313/2900313_Rtraj.nc             7 2003-08-13 18:41:17 NA         
#>  8 csio/2900313/2900313_Rtraj.nc             8 2003-08-13 18:46:50 NA         
#>  9 csio/2900313/2900313_Rtraj.nc             9 2003-08-23 08:15:49 NA         
#> 10 csio/2900313/2900313_Rtraj.nc            10 2003-08-23 08:19:09 NA         
#> # … with 51 more rows, and 30 more variables: date_qc <dttm>,
#> #   date_adjusted <dttm>, date_adjusted_status <dttm>, date_adjusted_qc <dttm>,
#> #   latitude <dbl>, longitude <dbl>, position_accuracy <chr>,
#> #   position_qc <chr>, cycle_number <dbl>, cycle_number_adjusted <dbl>,
#> #   measurement_code <dbl>, pres <dbl>, pres_qc <chr>, pres_adjusted <dbl>,
#> #   pres_adjusted_qc <chr>, pres_adjusted_error <dbl>, temp <dbl>,
#> #   temp_qc <chr>, temp_adjusted <dbl>, temp_adjusted_qc <chr>, …

with_argo_example_cache({
  argo_traj_cycle("dac/csio/2900313/2900313_Rtraj.nc")
})
#> Extracting from 1 file
#> # A tibble: 8 × 42
#>   file      n_cycle date_descent_start  date_descent_start_… date_first_stabili…
#>   <chr>       <int> <dttm>              <dttm>               <dttm>             
#> 1 csio/290…       1 2003-08-04 04:34:33 NA                   NA                 
#> 2 csio/290…       2 2003-08-22 04:49:08 NA                   NA                 
#> 3 csio/290…       3 2003-09-01 04:52:03 NA                   NA                 
#> 4 csio/290…       4 2003-09-11 05:09:28 NA                   NA                 
#> 5 csio/290…       5 2003-09-21 09:53:54 NA                   NA                 
#> 6 csio/290…       6 2003-10-01 05:15:36 NA                   NA                 
#> 7 csio/290…       7 2003-10-11 04:04:28 NA                   NA                 
#> 8 csio/290…       8 2003-10-21 23:39:28 NA                   NA                 
#> # … with 37 more variables: date_first_stabilization_status <dttm>,
#> #   date_descent_end <dttm>, date_descent_end_status <dttm>,
#> #   date_park_start <dttm>, date_park_start_status <dttm>,
#> #   date_park_end <dttm>, date_park_end_status <dttm>,
#> #   date_deep_descent_end <dttm>, date_deep_descent_end_status <dttm>,
#> #   date_deep_park_start <dttm>, date_deep_park_start_status <dttm>,
#> #   date_ascent_start <dttm>, date_ascent_start_status <dttm>, …

with_argo_example_cache({
  argo_traj_param("dac/csio/2900313/2900313_Rtraj.nc")
})
#> Extracting from 1 file
#> # A tibble: 3 × 3
#>   file                          n_param trajectory_parameters
#>   <chr>                           <int> <chr>                
#> 1 csio/2900313/2900313_Rtraj.nc       1 PRES                 
#> 2 csio/2900313/2900313_Rtraj.nc       2 TEMP                 
#> 3 csio/2900313/2900313_Rtraj.nc       3 PSAL                 

with_argo_example_cache({
  argo_traj_history("dac/csio/2900313/2900313_Rtraj.nc")
})
#> Extracting from 1 file
#> # A tibble: 1 × 15
#>   file                 n_history history_institut… history_step history_software
#>   <chr>                    <int> <chr>             <chr>        <chr>           
#> 1 csio/2900313/290031…         1 ""                ""           ""              
#> # … with 10 more variables: history_software_release <chr>,
#> #   history_reference <chr>, history_date <chr>, history_action <chr>,
#> #   history_parameter <chr>, history_previous_value <dbl>,
#> #   history_index_dimension <chr>, history_start_index <dbl>,
#> #   history_stop_index <dbl>, history_qctest <chr>