Use argo_read_traj_*()
functions to extract trajectory information from a
previously-downloaded Argo NetCDF file.
argo_read_traj_measurement(file, vars = NULL, quiet = FALSE)
argo_read_traj_cycle(file, vars = NULL, quiet = FALSE)
argo_read_traj_param(file, vars = NULL, quiet = FALSE)
argo_read_traj_history(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
argo_read_traj_measurement()
: one per measurement.
argo_read_traj_cycle()
: one per cycle.
argo_read_traj_param()
: one per parameter.
argo_read_traj_history()
: one row per history entry.
traj_file <- system.file(
"cache-test/dac/csio/2900313/2900313_Rtraj.nc",
package = "argodata"
)
argo_read_traj_measurement(traj_file)
#> # A tibble: 61 × 33
#> N_MEASUREMENT JULD JULD_STATUS JULD_QC JULD_ADJUSTED JULD_ADJUSTED_STATUS
#> * <int> <dbl> <chr> <chr> <dbl> <chr>
#> 1 1 19573. 0 0 NA " "
#> 2 2 19573. 4 1 NA " "
#> 3 3 19582. 4 1 NA " "
#> 4 4 19583. 4 1 NA " "
#> 5 5 19583. 4 1 NA " "
#> 6 6 19583. 4 1 NA " "
#> 7 7 19583. 4 1 NA " "
#> 8 8 19583. 4 1 NA " "
#> 9 9 19592. 4 1 NA " "
#> 10 10 19592. 4 1 NA " "
#> # … with 51 more rows, and 27 more variables: JULD_ADJUSTED_QC <chr>,
#> # 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>,
#> # TEMP_ADJUSTED_ERROR <dbl>, PSAL <dbl>, PSAL_QC <chr>, …
argo_read_traj_cycle(traj_file)
#> # A tibble: 8 × 41
#> N_CYCLE JULD_DESCENT_START JULD_DESCENT_STA… JULD_FIRST_STAB… JULD_FIRST_STAB…
#> * <int> <dbl> <chr> <dbl> <chr>
#> 1 1 19573. 2 NA 9
#> 2 2 19591. 2 NA 9
#> 3 3 19601. 2 NA 9
#> 4 4 19611. 2 NA 9
#> 5 5 19621. 2 NA 9
#> 6 6 19631. 2 NA 9
#> 7 7 19641. 2 NA 9
#> 8 8 19652. 0 NA 9
#> # … with 36 more variables: JULD_DESCENT_END <dbl>,
#> # JULD_DESCENT_END_STATUS <chr>, JULD_PARK_START <dbl>,
#> # JULD_PARK_START_STATUS <chr>, JULD_PARK_END <dbl>,
#> # JULD_PARK_END_STATUS <chr>, JULD_DEEP_DESCENT_END <dbl>,
#> # JULD_DEEP_DESCENT_END_STATUS <chr>, JULD_DEEP_PARK_START <dbl>,
#> # JULD_DEEP_PARK_START_STATUS <chr>, JULD_ASCENT_START <dbl>,
#> # JULD_ASCENT_START_STATUS <chr>, JULD_DEEP_ASCENT_START <dbl>, …
argo_read_traj_param(traj_file)
#> # A tibble: 3 × 2
#> N_PARAM TRAJECTORY_PARAMETERS
#> * <int> <chr>
#> 1 1 "PRES "
#> 2 2 "TEMP "
#> 3 3 "PSAL "
argo_read_traj_history(traj_file)
#> # A tibble: 1 × 14
#> N_HISTORY HISTORY_INSTITUTION HISTORY_STEP HISTORY_SOFTWARE HISTORY_SOFTWARE_…
#> * <int> <chr> <chr> <chr> <chr>
#> 1 1 " " " " " " " "
#> # … with 9 more variables: 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>