The zarr utils command line interface#

This section introduces the usage of the freva-client zarr-utils sub command. Please see the Installation and configuration section on how to install and configure the command line interface.

After successful installation you can use the freva-client zarr-utils sub command

freva-client zarr-utils --help

Converting your data files#

You can convert any data files on the data center to zarr stores and serve them via http(s). To do so use the convert sub-command:

freva-client zarr-utils convert --help

Results

                                                                                
 Usage: freva-client zarr-utils convert [OPTIONS] PATHS...                      
                                                                                
 Convert different data sets (files) to a http ready zarr store.                
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    paths      PATHS...  Paths to data files that should be aggregated.     โ”‚
โ”‚                           [required]                                         โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --public                                              Make any zarr url      โ”‚
โ”‚                                                       public                 โ”‚
โ”‚ --ttl-seconds                   FLOAT                 Set the expiry time of โ”‚
โ”‚                                                       any public zarr urls   โ”‚
โ”‚                                                       [default: 86400.0]     โ”‚
โ”‚ --aggregate                     [auto|merge|concat]   How aggregation should โ”‚
โ”‚                                                       be realised (if any)   โ”‚
โ”‚ --join                          [outer|inner|exact|l  How different indexes  โ”‚
โ”‚                                 eft|right]            should be combined for โ”‚
โ”‚                                                       aggregation.           โ”‚
โ”‚ --compat                        [no_conflicts|equals  How to compare         โ”‚
โ”‚                                 |override]            non-concatenated       โ”‚
โ”‚                                                       variables for          โ”‚
โ”‚                                                       aggregation.           โ”‚
โ”‚ --data-vars                     [minimal|different|a  How to combine data    โ”‚
โ”‚                                 ll]                   variables for          โ”‚
โ”‚                                                       aggregation.           โ”‚
โ”‚ --coords                        [minimal|different|a  How to combine coords  โ”‚
โ”‚                                 ll]                   for aggregation.       โ”‚
โ”‚ --dim                           TEXT                  Name of the dimension  โ”‚
โ”‚                                                       to concatenate along   โ”‚
โ”‚                                                       for aggregation.       โ”‚
โ”‚ --group-by                      TEXT                  If set, forces         โ”‚
โ”‚                                                       grouping by a          โ”‚
โ”‚                                                       signature key for      โ”‚
โ”‚                                                       aggregation.           โ”‚
โ”‚ --access-pattern                [map|time_series]     Optimise the chunk     โ”‚
โ”‚                                                       sizes for those access โ”‚
โ”‚                                                       pattern.               โ”‚
โ”‚                                                       [default: map]         โ”‚
โ”‚ --map-primary-chunksโ€ฆ           INTEGER               Chunk sizes of the     โ”‚
โ”‚                                                       primary dimension.     โ”‚
โ”‚                                                       [default: 1]           โ”‚
โ”‚ --chunk-size                    FLOAT                 Set the target chunk   โ”‚
โ”‚                                                       size in megabytes.     โ”‚
โ”‚                                                       [default: 16.0]        โ”‚
โ”‚ --reload-zarr                                         Trigger a zarr         โ”‚
โ”‚                                                       data-store reload.     โ”‚
โ”‚ --token-file           -tf      PATH                  Instead of             โ”‚
โ”‚                                                       authenticating via     โ”‚
โ”‚                                                       code based             โ”‚
โ”‚                                                       authentication flow    โ”‚
โ”‚                                                       you can set the path   โ”‚
โ”‚                                                       to the json file that  โ”‚
โ”‚                                                       contains a `refresh    โ”‚
โ”‚                                                       token` containing a    โ”‚
โ”‚                                                       refresh_token key.     โ”‚
โ”‚ --json                 -j                             Parse output in json   โ”‚
โ”‚                                                       format.                โ”‚
โ”‚ --host                          TEXT                  Set the hostname of    โ”‚
โ”‚                                                       the databrowser, if    โ”‚
โ”‚                                                       not set (default) the  โ”‚
โ”‚                                                       hostname is read from  โ”‚
โ”‚                                                       a config file          โ”‚
โ”‚                        -v       INTEGER               Increase verbosity     โ”‚
โ”‚                                                       [default: 0]           โ”‚
โ”‚ --version              -V                             Show version an exit   โ”‚
โ”‚ --help                                                Show this message and  โ”‚
โ”‚                                                       exit.                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ


The --public flag lets you create zarr stores that can be anonymously acceesed. The aggregation flags can be used to aggregate multiple source file into one common zarr store.

Warning

Anyone with this link will be able to access the data. For security reasons any public zarr store link has an expiration date after which access isnโ€™t possible anymore.

Checking the conversion status#

If client tools, like xarray, that access the zarr stores file you can use the status sub-command to get more information about the loading process and potential issues.

freva-client zarr-utils status --help

Results

                                                                                
 Usage: freva-client zarr-utils status [OPTIONS] URL                            
                                                                                
 Get the status of a pre signed zarr store                                      
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    url      TEXT  Url of the zarr store to check. [required]               โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --token-file  -tf      PATH     Instead of authenticating via code based     โ”‚
โ”‚                                 authentication flow you can set the path to  โ”‚
โ”‚                                 the json file that contains a `refresh       โ”‚
โ”‚                                 token` containing a refresh_token key.       โ”‚
โ”‚ --host                 TEXT     Set the hostname of the databrowser, if not  โ”‚
โ”‚                                 set (default) the hostname is read from a    โ”‚
โ”‚                                 config file                                  โ”‚
โ”‚               -v       INTEGER  Increase verbosity [default: 0]              โ”‚
โ”‚ --version     -V                Show version an exit                         โ”‚
โ”‚ --help                          Show this message and exit.                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ