ESGF / esgf-download

ESGF data transfer and replication tool
https://esgf.github.io/esgf-download/
BSD 3-Clause "New" or "Revised" License
15 stars 2 forks source link

feat(cli): add datasets command (per query) #46

Closed svenrdz closed 1 month ago

svenrdz commented 3 months ago

Changes

Using this example query:

$ esgpull show 3c953f
<3c953f>
└── distrib:       True                                      
    latest:        True                                      
    replica:       None                                      
    retracted:     False                                     
    experiment_id: historical, ssp126, ssp245, ssp370, ssp585
    project:       CMIP6                                     
    source_id:     GFDL-ESM4, MIROC-ES2L                     
    table_id:      Eday, EdayZ                               
    variable_id:   zg                                        
    variant_label: r1i1p1f1, r1i1p1f2                        
    files:         238.9 GiB / 239.4 GiB [925/934]           
$ esgpull datasets 3c953f
                                                                    dataset_id │ done │ total │ complete 
═══════════════════════════════════════════════════════════════════════════════╪══════╪═══════╪══════════
       CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp585.r1i1p1f2.Eday.zg.gn.v20220530 │ 286  │  286  │   True   
       CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp126.r1i1p1f2.Eday.zg.gn.v20220530 │ 286  │  286  │   True   
          CMIP6.CMIP.MIROC.MIROC-ES2L.historical.r1i1p1f2.Eday.zg.gn.v20191129 │ 165  │  165  │   True   
       CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp245.r1i1p1f2.Eday.zg.gn.v20200318 │  86  │  86   │   True   
    CMIP6.CMIP.NOAA-GFDL.GFDL-ESM4.historical.r1i1p1f1.EdayZ.zg.gr1z.v20190726 │  0   │   9   │  False   
       CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp370.r1i1p1f2.Eday.zg.gn.v20200318 │  86  │  86   │   True   
      CMIP6.CMIP.NOAA-GFDL.GFDL-ESM4.historical.r1i1p1f1.Eday.zg.gr1.v20190726 │  9   │   9   │   True   
   CMIP6.ScenarioMIP.NOAA-GFDL.GFDL-ESM4.ssp585.r1i1p1f1.Eday.zg.gr1.v20180701 │  2   │   2   │   True   
 CMIP6.ScenarioMIP.NOAA-GFDL.GFDL-ESM4.ssp585.r1i1p1f1.EdayZ.zg.gr1z.v20180701 │  5   │   5   │   True
$ esgpull datasets 3c953f --json
{
  "CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp585.r1i1p1f2.Eday.zg.gn.v20220530": {
    "done": 286,
    "total": 286,
    "complete": true
  },
  "CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp126.r1i1p1f2.Eday.zg.gn.v20220530": {
    "done": 286,
    "total": 286,
    "complete": true
  },
  "CMIP6.CMIP.MIROC.MIROC-ES2L.historical.r1i1p1f2.Eday.zg.gn.v20191129": {
    "done": 165,
    "total": 165,
    "complete": true
  },
  "CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp245.r1i1p1f2.Eday.zg.gn.v20200318": {
    "done": 86,
    "total": 86,
    "complete": true
  },
  "CMIP6.CMIP.NOAA-GFDL.GFDL-ESM4.historical.r1i1p1f1.EdayZ.zg.gr1z.v20190726": {
    "done": 0,
    "total": 9,
    "complete": false
  },
  "CMIP6.ScenarioMIP.MIROC.MIROC-ES2L.ssp370.r1i1p1f2.Eday.zg.gn.v20200318": {
    "done": 86,
    "total": 86,
    "complete": true
  },
  "CMIP6.CMIP.NOAA-GFDL.GFDL-ESM4.historical.r1i1p1f1.Eday.zg.gr1.v20190726": {
    "done": 9,
    "total": 9,
    "complete": true
  },
  "CMIP6.ScenarioMIP.NOAA-GFDL.GFDL-ESM4.ssp585.r1i1p1f1.Eday.zg.gr1.v20180701": {
    "done": 2,
    "total": 2,
    "complete": true
  },
  "CMIP6.ScenarioMIP.NOAA-GFDL.GFDL-ESM4.ssp585.r1i1p1f1.EdayZ.zg.gr1z.v20180701": {
    "done": 5,
    "total": 5,
    "complete": true
  }
}