# CDS-Beta downloads files in a different format (grib) than original cds (netcdf4)

**URL:** <https://forum.ecmwf.int/t/cds-beta-downloads-files-in-a-different-format-grib-than-original-cds-netcdf4/6080>\
**Category:** API\
**Tags:** efas\
**Created:** [24 September 2024 09:54 UTC](https://forum.ecmwf.int/t/cds-beta-downloads-files-in-a-different-format-grib-than-original-cds-netcdf4/6080 "2024-09-24T09:54:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano\_Piani](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@Stefano\_Piani](https://forum.ecmwf.int/u/Stefano_Piani)\
**Post date:** [24 September 2024 09:54 UTC](https://forum.ecmwf.int/t/cds-beta-downloads-files-in-a-different-format-grib-than-original-cds-netcdf4/6080/1 "2024-09-24T09:54:41Z")

</div>

The following code downloads a zip file containing a grib file if running with CDSBeta.

It download a zip file with a netCDF4 if run with the old credentials.

Is this a bug? Is it related with the chenges on the netCDF converter?  
Thank you

```auto
import cdsapi

NEW = True

if NEW:
    url = 'https://cds-beta.climate.copernicus.eu/api'
    key = XXXXXXXXXXXX
else:
    url = 'https://cds.climate.copernicus.eu/api/v2'
    key = XXXXXXXXXXXX

c = cdsapi.Client(url=url, key=key)

c.retrieve(
    'efas-forecast',
    {
        'format': 'netcdf4.zip',
        'system_version': 'operational',
        'originating_centre': 'ecmwf',
        'product_type': 'high_resolution_forecast',
        'variable': 'river_discharge_in_the_last_6_hours',
        'model_levels': 'surface_level',
        'year': '2024',
        'month': '03',
        'day': [
            '16', '17', '18',
            '19', '20', '21',
            '22', '23', '24',
            '25',
        ],
        'time': '00:00',
        'leadtime_hour': [
            '6', '12', '18',
            '24',
        ],
        'area': [
            48, 6, 35,
            25,
        ],
    },
    f'download_202403_forecast.netcdf4.{"new" if NEW else "old"}.zip')

```

---

<div class="post-metadata">

**Author:** ![Gregory\_Greene](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Gregory\_Greene](https://forum.ecmwf.int/u/Gregory_Greene)\
**Post date:** [25 September 2024 17:12 UTC](https://forum.ecmwf.int/t/cds-beta-downloads-files-in-a-different-format-grib-than-original-cds-netcdf4/6080/2 "2024-09-25T17:12:17Z")

</div>

Have you tried using ‘netcdf.zip’ instead of ‘netcdf4.zip’? It is working fine for me using the former.

I believe these are the options for format: “grib”, “netcdf.zip”, or “netcdf”. The default is grib, which would be output if the format parameter is incorrect.

[EDIT]  
It appears they have changed the format parameters in the Beta version. I am reading two required parameters now: “data\_format” and “download\_format”

To download as a netcdf.zip, the parameters should be formatted in your dictionary as follows:

‘data\_format’: ‘netcdf’,  
‘download\_format’: ‘zip’,

---

<div class="post-metadata">

**Author:** ![Stefano\_Piani](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@Stefano\_Piani](https://forum.ecmwf.int/u/Stefano_Piani)\
**Post date:** [26 September 2024 17:08 UTC](https://forum.ecmwf.int/t/cds-beta-downloads-files-in-a-different-format-grib-than-original-cds-netcdf4/6080/3 "2024-09-26T17:08:16Z")

</div>

Thank you very much for your help! I tried again today, but now I always get the following error, no matter what format or data\_format I specify:

```auto
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://cds.climate.copernicus.eu/api/retrieve/v1/jobs/630be6d8-56f6-4725-9d34-2f0a980ecf92?log=True&request=True
job not found
job 630be6d8-56f6-4725-9d34-2f0a980ecf92 not found

```

I think this is related to the decommission of the old API.
