# Downloading data on 2 PVU level using CDS API

**URL:** <https://forum.ecmwf.int/t/downloading-data-on-2-pvu-level-using-cds-api/13085>\
**Category:** API\
**Tags:** era5\
**Created:** [15 May 2025 14:35 UTC](https://forum.ecmwf.int/t/downloading-data-on-2-pvu-level-using-cds-api/13085 "2025-05-15T14:35:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Troy\_Zaremba](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@Troy\_Zaremba](https://forum.ecmwf.int/u/Troy_Zaremba)\
**Post date:** [15 May 2025 14:35 UTC](https://forum.ecmwf.int/t/downloading-data-on-2-pvu-level-using-cds-api/13085/1 "2025-05-15T14:35:20Z")

</div>

Hello,

I am currently trying to download ERA5 potential temperature, pressure, geopotential, u, v on a 2 PVU level. I am trying to use the CDS API and Python. Here was my code:

c = cdsapi.Client()  
c.retrieve(‘reanalysis-era5-complete’, {  
‘class’: ‘ea’,  
‘year’: ‘2025’,  
‘month’: ‘02’,  
‘day’: ‘12/13/14/15/16/17/18’,  
‘expver’: ‘1’,  
‘levelist’: ‘2000’,  
‘levtype’: ‘pv’,  
‘param’: ‘3.128/54.128/129.128/131.128/132.128’, # Theta, pressure, geopotential, u, v  
‘stream’: ‘oper’,  
‘time’: ‘00:00:00/06:00:00/12:00:00/18:00:00’,  
‘type’: ‘an’,  
‘format’: ‘netcdf’, # Supported format: grib and netcdf. Default: grib  
‘area’: [65, -170, 20, -50], # North, West, South, East. Default: global  
‘grid’: [0.25, 0.25], # Latitude/longitude grid. Default: 0.25 x 0.25  
}, outfile)

I keep getting 400 errors. Any help or guidance on how to get this data would be much appreciated!

Best,  
Troy

---

<div class="post-metadata">

**Author:** ![Troy\_Zaremba](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/t/e79b87/32.png) [@Troy\_Zaremba](https://forum.ecmwf.int/u/Troy_Zaremba)\
**Post date:** [15 May 2025 17:31 UTC](https://forum.ecmwf.int/t/downloading-data-on-2-pvu-level-using-cds-api/13085/2 "2025-05-15T17:31:46Z")

</div>

Here is the fix:

c = cdsapi.Client()  
c.retrieve(“reanalysis-era5-complete”, {  
“class”: “ea”,  
“date”:“2025-02-12/to/2025-02-18”,  
“expver”: “1”,  
“levelist”: “2000”,  
“levtype”: “pv”,  
“param”: “3.128/54.128/129.128/131.128/132.128/133.128/203.128”,  
“stream”: “oper”,  
“grid”:“0.25/0.25”,  
“area”:“65/-170/20/50”,  
“format”:“netcdf”,  
“time”: “00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00”,  
“type”: “an”  
}, “output.nc”)
