ArgoCanada / argodata

Download Argo Ocean Float Data
https://argocanada.github.io/argodata
Other
8 stars 3 forks source link

Alternative meta dimension format for some files? #18

Closed paleolimbot closed 3 years ago

paleolimbot commented 3 years ago
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/aoml/5901338/5901338_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/aoml/5901338/5901338_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/aoml/5904002/5904002_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/aoml/5904002/5904002_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/bodc/3901498/3901498_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/bodc/3901498/3901498_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900327/1900327_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900327/1900327_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900330/1900330_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900330/1900330_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900348/1900348_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900348/1900348_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900380/1900380_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900380/1900380_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900381/1900381_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900381/1900381_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900382/1900382_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900382/1900382_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900464/1900464_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900464/1900464_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900465/1900465_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900465/1900465_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900517/1900517_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900517/1900517_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900518/1900518_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900518/1900518_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1900557/1900557_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1900557/1900557_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1901349/1901349_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1901349/1901349_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1901350/1901350_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1901350/1901350_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/1901351/1901351_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/1901351/1901351_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/3901085/3901085_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/3901085/3901085_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/3901086/3901086_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/3901086/3901086_meta.nc' is missing dimension: 'N_MISSIONS'    
argo_read_meta_missions("/mnt/monolith/argo/argo/dac/coriolis/3901087/3901087_meta.nc", quiet = NA) ::: simpleWarning: '/mnt/monolith/argo/argo/dac/coriolis/3901087/3901087_meta.nc' is missing dimension: 'N_MISSIONS'
paleolimbot commented 3 years ago

Some of the meta variables are accessible via argo_info() that would normally be accessible via trans_system (e.g.), but some aren't:

``` Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/aoml/5901338/5901338_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/aoml/5904002/5904002_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/bodc/3901498/3901498_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900327/1900327_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900330/1900330_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900348/1900348_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900380/1900380_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900381/1900381_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900382/1900382_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900464/1900464_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900465/1900465_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900517/1900517_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900518/1900518_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1900557/1900557_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1901349/1901349_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1901350/1901350_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/1901351/1901351_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/3901085/3901085_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/3901086/3901086_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' Missing 9 variable(s) in '/mnt/monolith/argo/argo/dac/coriolis/3901087/3901087_meta.nc': 'REPETITION_RATE', 'CYCLE_TIME', 'PARKING_TIME', 'DESCENDING_PROFILING_TIME', 'ASCENDING_PROFILING_TIME', 'SURFACE_TIME', 'PARKING_PRESSURE', 'DEEPEST_PRESSURE', 'DEEPEST_PRESSURE_DESCENDING' ```
paleolimbot commented 3 years ago

Ahh! Will need a new function for these (argo_meta_cycles() along N_CYCLES)

paleolimbot commented 3 years ago

Just like in #19, these are all version 2.2 files from several years ago so there probably doesn't need to be a dedicated read function.

library(argodata)
library(dplyr, warn.conflicts = FALSE)
#> Warning: package 'dplyr' was built under R version 4.0.4

files <- c(
  "dac/aoml/5901338/5901338_meta.nc", "dac/aoml/5904002/5904002_meta.nc", 
  "dac/bodc/3901498/3901498_meta.nc", "dac/coriolis/1900327/1900327_meta.nc", 
  "dac/coriolis/1900330/1900330_meta.nc", "dac/coriolis/1900348/1900348_meta.nc", 
  "dac/coriolis/1900380/1900380_meta.nc", "dac/coriolis/1900381/1900381_meta.nc", 
  "dac/coriolis/1900382/1900382_meta.nc", "dac/coriolis/1900464/1900464_meta.nc", 
  "dac/coriolis/1900465/1900465_meta.nc", "dac/coriolis/1900517/1900517_meta.nc", 
  "dac/coriolis/1900518/1900518_meta.nc", "dac/coriolis/1900557/1900557_meta.nc", 
  "dac/coriolis/1901349/1901349_meta.nc", "dac/coriolis/1901350/1901350_meta.nc", 
  "dac/coriolis/1901351/1901351_meta.nc", "dac/coriolis/3901085/3901085_meta.nc", 
  "dac/coriolis/3901086/3901086_meta.nc", "dac/coriolis/3901087/3901087_meta.nc"
)

files %>% 
  argo_info()%>% 
  distinct(format_version)
#> Extracting from 20 files
#> # A tibble: 1 x 1
#>   format_version
#>   <chr>         
#> 1 2.2

files %>% 
  argo_info() %>% 
  pull(launch_date) %>%
  hist(breaks = "year")
#> Extracting from 20 files

Created on 2021-04-13 by the reprex package (v2.0.0)