CAMS data-mozbc

285 views
Skip to first unread message

Mona Zarghamipour

unread,
Feb 10, 2023, 12:56:39 PM2/10/23
to wrf-chem-mozbc
Hello all,
I am trying to run WRF-Chem, and I want to use cams-global-reanalysis-eac4 data from Copernicus Climate Data Store to create initial and boundary conditions using MOZBC utility. I tried to follow How to run the WRF-Chem model using CAMS data as initial and boundary conditions (BC)? - Copernicus Knowledge Base - ECMWF Confluence Wiki, but I encountered some problems in providing PS data. I can't see any PS data (which contains hyam and hybm variables) in cams-global-reanalysis-eac4 at Copernicus Climate Data Store. Where Can I get this data?
I would appreciate any help.
Thanks in advance.

Aura Lupascu

unread,
Feb 10, 2023, 2:09:43 PM2/10/23
to Mona Zarghamipour, wrf-chem-mozbc
Hi Mona,

PS contains only surface pressure data. It doesn't contain the hyam and hyab variables. You can use this retrieval script to download the data

#!/usr/bin/env python
import cdsapi
import yaml

with open('~/.cdsapirc', 'r') as f:
            credentials = yaml.safe_load(f)

c = cdsapi.Client(url=credentials['url'], key=credentials['key'])
c = cdsapi.Client()



c.retrieve(
    'cams-global-reanalysis-eac4',
    {
        'variable': 'surface_pressure',
        'date': '2018-12-12/2018-12-12',
        'time': [
            '00:00','03:00', '06:00', '09:00', '12:00',
            '15:00','18:00', '21:00',
        ],
        'format': 'grib',
    },
    'downloadpsfc.grib')

If needed, I will create an archive with all the scripts I used to convert the CAMS data to MOZART-MOSAIC-4bins.The latest version I used (not on the ECMWF website) doesn't need the patch mentioned there.  Just let me know,

Aura

--
To unsubscribe from this group and stop receiving emails from it, send an email to wrf-chem-mozb...@ucar.edu.


--
~Aura

"Treptele inteligentei unui om sunt: istet, inteligent, sclipitor, stralucit, genial, simplu." Albert Einstein

Mona Zarghamipour

unread,
Feb 10, 2023, 2:39:58 PM2/10/23
to Aura Lupascu, wrf-chem-mozbc
Thanks a lot! 
I used this ps data, but i got error for the variable hyam and hybm, when running ncl script to change cams data and make it readble to mozbc.
I really appreciate it, if you share the mentioned script that you used to convert the CAMS data to MOZART-MOSAIC-4bins with me!
Thanks in advance.

Aura Lupascu

unread,
Feb 10, 2023, 2:51:47 PM2/10/23
to Mona Zarghamipour, wrf-chem-mozbc
in the download_grib folder you'll find the scripts I used to download the grib files.

The converts.sh converts the grib to netcdf and writes the files in the needed format for mozbc. The cdo command invertlat is used to make the files compatible with mozbc. The moza.eurodelta.inp file is used by mozbc to map the AQMEII* files  (in fact the CAMS data in netcdf format) to WRF-Chem. Also, inside this script the conversion from mass mixing ratio to volume mixing ratio is performed.

Have fun with it and don't hesitate to contact me if you have errors.

Aura

Mona Zarghamipour

unread,
Feb 10, 2023, 2:58:53 PM2/10/23
to Aura Lupascu, wrf-chem-mozbc
This is great, I will try it. Thank you so much! 

Dr.Suvarna Tikle

unread,
Apr 19, 2023, 7:37:18 AM4/19/23
to wrf-chem-mozbc, Mona Zarghamipour, Aura Lupascu
Hi Aura and Mona,
I am running mozbc for chem_opt=112 and got following error. Can you please help to resolve.
NetCDF: Variable not found
fail to process netCDF file... 

ncdump-h of my file is-

netcdf moz0000_year2019 {
dimensions:
       time = UNLIMITED ; // (1460 currently)
       lev = 60 ;
       lat = 241 ;
       lon = 480 ;
       levi = 61 ;
variables:
       float aermr01(time, lev, lat, lon) ;
               aermr01:long_name = "Sea Salt Aerosol (0.03 - 0.5 um) Mixing Ratio" ;
               aermr01:units = "kg kg**-1" ;
               aermr01:cell_methods = "time: mean" ;
       float aermr02(time, lev, lat, lon) ;
               aermr02:long_name = "Sea Salt Aerosol (0.5 - 5 um) Mixing Ratio" ;
               aermr02:units = "kg kg**-1" ;
               aermr02:cell_methods = "time: mean" ;
       float aermr03(time, lev, lat, lon) ;
               aermr03:long_name = "Sea Salt Aerosol (5 - 20 um) Mixing Ratio" ;
               aermr03:units = "kg kg**-1" ;
               aermr03:cell_methods = "time: mean" ;
       float aermr04(time, lev, lat, lon) ;
               aermr04:long_name = "Dust Aerosol (0.03 - 0.55 um) Mixing Ratio" ;
               aermr04:units = "kg kg**-1" ;
               aermr04:cell_methods = "time: mean" ;
       float aermr05(time, lev, lat, lon) ;
               aermr05:long_name = "Dust Aerosol (0.55 - 0.9 um) Mixing Ratio" ;
               aermr05:units = "kg kg**-1" ;
               aermr05:cell_methods = "time: mean" ;
       float aermr06(time, lev, lat, lon) ;
               aermr06:long_name = "Dust Aerosol (0.9 - 20 um) Mixing Ratio" ;
etc....
Best,
Suvarna                             

Suvarna Tikle

unread,
Apr 19, 2023, 7:46:49 AM4/19/23
to wrf-chem-mozbc, Mona Zarghamipour, Aura Lupascu
And my mazart.inp file details are as below
&control

do_bc     = .true.
do_ic     = .true.
domain    = 1
dir_wrf   = './'
dir_moz   = '/work/CAMS/'
moz_var_suffix = ''
def_missing_var = .true.
fn_moz  = 'moz0000_year2019.nc'

spc_map = 'o3 -> O3', 'co -> CO', 'no -> NO','no2 -> NO2'
/
~                                                                                      

Reply all
Reply to author
Forward
0 new messages