I am currently trying to download specific humidity and vertical velocity through the next code:
import cdsapi
fecha = “2022”,“2023”,“2024”
nivel = “200”,“500”,“600”,“700”,“850”,“925”,“1000”
meses = “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”,“9”,“10”,“11”,“12”
for j in range(len(nivel)):
for i in range(len(fecha)):
for k in range(len(meses)):
dataset = “reanalysis-era5-pressure-levels”
request = {
“product_type”: [“reanalysis”],
“variable”: [
“specific_humidity”,
“vertical_velocity”
],
“year”: fecha[i],
“month”: [
meses[k]
],
“day”: [
“01”, “02”, “03”,
“04”, “05”, “06”,
“07”, “08”, “09”,
“10”, “11”, “12”,
“13”, “14”, “15”,
“16”, “17”, “18”,
“19”, “20”, “21”,
“22”, “23”, “24”,
“25”, “26”, “27”,
“28”, “29”, “30”,
“31”,
],
“time”: [
“00:00”, “01:00”, “02:00”,
“03:00”, “04:00”, “05:00”,
“06:00”, “07:00”, “08:00”,
“09:00”, “10:00”, “11:00”,
“12:00”, “13:00”, “14:00”,
“15:00”, “16:00”, “17:00”,
“18:00”, “19:00”, “20:00”,
“21:00”, “22:00”, “23:00”,
],
“area”: [
50, -180, -50,
180,
],
“grid”: [
2.0, 2.0,
],
“pressure_level”: [nivel],
“data_format”: “netcdf”,
“download_format”: “unarchived”
}
client = cdsapi.Client()
target = “shum_vvel”+ str(nivel)+“mb_”+str(fecha[i])+“_” + str(meses[k])+“.nc”
client.retrieve(dataset, request,target).download()
However, I never achieved to download the files. Is there an error in my code that causes the error?
Help me please, it is been very frustrating during the last two months