API donwload cams data on lambert grid

I use your CAMS data for my fog forecasting project with the AROME model, integrating the effects of CCN and IFN on the forecast. I previously used the below script for directly downloading aerosols in Lambert grid for my domain. However, with the new ADS, the data is now downloaded only in lat/lon projection, which disrupts the continuity of my work.
Could you please help me resolve this issue?
script :
"import cdsapi
import sys
c = cdsapi.Client()

c.retrieve(
‘cams-global-atmospheric-composition-forecasts’,
{
‘variable’: [
‘dust_aerosol_0.03-0.55um_mixing_ratio’, ‘dust_aerosol_0.55-0.9um_mixing_ratio’, ‘dust_aerosol_0.9-20um_mixing_ratio’,
‘hydrophilic_black_carbon_aerosol_mixing_ratio’, ‘hydrophilic_organic_matter_aerosol_mixing_ratio’, ‘hydrophobic_black_carbon_aerosol_mixing_ratio’,
‘hydrophobic_organic_matter_aerosol_mixing_ratio’, ‘sea_salt_aerosol_0.03-0.5um_mixing_ratio’, ‘sea_salt_aerosol_0.5-5um_mixing_ratio’,
‘sea_salt_aerosol_5-20um_mixing_ratio’, ‘sulphate_aerosol_mixing_ratio’,‘specific_humidity’,‘surface_geopotential’,‘surface_pressure’, ‘temperature’,
‘u_component_of_wind’,‘v_component_of_wind’ ,
],
‘model_level’: [
‘1’, ‘2’, ‘3’,
‘4’, ‘5’, ‘6’,
‘7’, ‘8’, ‘9’,
‘10’, ‘11’, ‘12’,
‘13’, ‘14’, ‘15’,
‘16’, ‘17’, ‘18’,
‘19’, ‘20’, ‘21’,
‘22’, ‘23’, ‘24’,
‘25’, ‘26’, ‘27’,
‘28’, ‘29’, ‘30’,
‘31’, ‘32’, ‘33’,
‘34’, ‘35’, ‘36’,
‘37’, ‘38’, ‘39’,
‘40’, ‘41’, ‘42’,
‘43’, ‘44’, ‘45’,
‘46’, ‘47’, ‘48’,
‘49’, ‘50’, ‘51’,
‘52’, ‘53’, ‘54’,
‘55’, ‘56’, ‘57’,
‘58’, ‘59’, ‘60’,
‘61’, ‘62’, ‘63’,
‘64’, ‘65’, ‘66’,
‘67’, ‘68’, ‘69’,
‘70’, ‘71’, ‘72’,
‘73’, ‘74’, ‘75’,
‘76’, ‘77’, ‘78’,
‘79’, ‘80’, ‘81’,
‘82’, ‘83’, ‘84’,
‘85’, ‘86’, ‘87’,
‘88’, ‘89’, ‘90’,
‘91’, ‘92’, ‘93’,
‘94’, ‘95’, ‘96’,
‘97’, ‘98’, ‘99’,
‘100’, ‘101’, ‘102’,
‘103’, ‘104’, ‘105’,
‘106’, ‘107’, ‘108’,
‘109’, ‘110’, ‘111’,
‘112’, ‘113’, ‘114’,
‘115’, ‘116’, ‘117’,
‘118’, ‘119’, ‘120’,
‘121’, ‘122’, ‘123’,
‘124’, ‘125’, ‘126’,
‘127’, ‘128’, ‘129’,
‘130’, ‘131’, ‘132’,
‘133’, ‘134’, ‘135’,
‘136’, ‘137’,
],
‘date’: sys.argv[1]+‘-’+sys.argv[2]+‘-’+sys.argv[3]+‘/’+sys.argv[4]+‘-’+sys.argv[5]+‘-’+sys.argv[6],
‘leadtime_hour’: int(sys.argv[7]),
‘time’: ‘00:00’,
‘type’: ‘forecast’,
‘area’: [
8.3, -7.7,-7.7,
8.3,
],
‘rotation’: [-56.0 , 3.0,
],
‘grid’:[‘0.8’, ‘0.8’,],
‘format’: ‘grib’,
},
‘aer_’+sys.argv[1]+sys.argv[2]+sys.argv[3]+‘_’+sys.argv[7]+‘.grib’)
"

Please provide a workable snippet, without sys.argv parts.

Here is an example :
#---------------------------
import cdsapi

dataset = “cams-global-atmospheric-composition-forecasts”
request = {
“variable”: [
“sea_salt_aerosol_5-20um_mixing_ratio”,
],
“model_level”: [
“137”
],
“date”: [“2023-12-16/2023-12-16”],
“time”: [“00:00”],
“leadtime_hour”: [
“0”,
],
“type”: [“forecast”],
“data_format”: “grib”,
‘area’: [ 8, -7.7,-7.7, 8.3],
‘rotation’: [-56.0 , 3.0] ,
‘grid’: [‘0.4’/‘0.4’] ,
}
target = “data.grib”
client = cdsapi.Client()
client.retrieve(dataset, request,target).download()
#-----------------------------------------------------

Hi Walid,

I don’t think we ever offered Lambert grids as an option. If you have data on that type of grid I think it must have been the result of some post-processing done after retrieval from the ADS.

I think the request you’re showing there should, if the rotation keyword is passed to our backend archive, result in data on a rotated lat-lon grid, not a Lambert. Although note that use of the rotation keyword is currently unsupported.

Luke.

Hello @Luke_Jones
Yes sorry it was rotated lon lat grid not Lambert.
So you telling me there is no way to download data on this grid directly as it used to be with in the previous request ?
Walid

Hi Walid,

I’ve looked into this and I can see the rotation keyword is being ignored by the system but I’m not sure why yet. I’m going to ask some experts.

Luke.

1 Like

Hi Walid,

We identified the issue and fixed it. You should find the rotation keyword works as expected now.

Luke.

Hi @Luke_Jones ,
That works fine for me Now .
Thanks a lot for your precious assistance !
Walid