MOZBC using ensemble model results

199 views
Skip to first unread message

Liz Coleman

unread,
Aug 27, 2019, 6:15:00 AM8/27/19
to wrf-chem-mozbc
HI, I'm hoping someone can help me. 
I wish to employ mozbc to prepare BCs from Copernicus Ensemble model results. I have extracted just one variable and tried mozbc to run with following simplified namelist for testing:


&control

do_bc     = .true.
do_ic     = .true.
domain    = 1
dir_wrf   = '../WRFV3/run/'
dir_moz = '../cams/'
fn_moz  = 'no2_ren001.nc'
moz_var_suffix =''
def_missing_var = .true.
spc_map = 'no2 -> NO2'


MOZBC finds the file and opens it, yet it can't find the variable, but no2 is definitely in the file. the output of first part of ncdump is below. Any idea of why this might be happening?





netcdf no2_ren001 {
dimensions:
        time = UNLIMITED ; // (41 currently)
        lon = 900 ;
        lat = 451 ;
        level = 25 ;
variables:
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:units = "hours since 1900-01-01 00:00:00.0" ;
                time:calendar = "gregorian" ;
                time:axis = "T" ;
        double level(level) ;
                level:standard_name = "air_pressure" ;
                level:long_name = "pressure_level" ;
                level:units = "millibars" ;
                level:positive = "down" ;
                level:axis = "Z" ;
        double no2(time, level, lat, lon) ;
                no2:long_name = "Nitrogen dioxide" ;
                no2:units = "kg kg**-1" ;
                no2:_FillValue = 9.96920996838687e+36 ;
                no2:missing_value = 9.96920996838687e+36 ;
        float lon(lon) ;
                lon:standard_name = "longitude" ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
                lon:axis = "X" ;
        float lat(lat) ;
                lat:standard_name = "latitude" ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
                lat:axis = "Y" ;

Stacy Walters

unread,
Aug 27, 2019, 8:00:54 AM8/27/19
to Liz Coleman, wrf-chem-mozbc
Liz,

Your spc_map definition:

no2 -> NO2

will cause the mozbc utility to look for the variable NO2 in the file:


Clearly the variable NO2 is not in no2_ren001.nc.

If you want the mapping:

spc_map = 'no2 -> no2'

Then mozbc will map the incoming no2 from file no2_ren001.nc
to the output no2 in your wrfinput_d01 and wrfbdy_d01 files.

Stacy

Stacy Walters

unread,
Aug 27, 2019, 8:19:39 AM8/27/19
to Liz Coleman, wrf-chem-mozbc
Liz,

Looking over your header dump of file no2_ren001.nc I noticed
that the variable no2 has mass mixing ratio units( kg/kg ).
The mozbc utility assumes that the input gas phase concentrations
are in volume mixing ratio units.  Thus you need to either convert
all incoming concentrations to volume mixing ratio or use an appropriate
coefficient in the spc_map namelist input.

As an example, you could map the source no2 to the output via the
spc_map setting of:

spc_map = 'no2 -> .63*no2'

where .63 = mbar/m(no2) = 29./46.

(mbar = mean mass of the atmosphere in amu)

Stacy


On Tue, Aug 27, 2019 at 6:15 AM Liz Coleman <eilisc...@gmail.com> wrote:

Liz Coleman

unread,
Aug 27, 2019, 9:00:59 AM8/27/19
to Stacy Walters, wrf-chem-mozbc
Thanks Stacy, 

I still can't get mozbc to recognise the variable in my  no2_ren001.nc file: I'm wondering if it could be to do with how the data is arranged in the netcdf file. mozbc opens the file, and creates no2 variable in the wrfbdy and wrfinput files, but the fields are filled to missing value.

 Is there some metadata that's required by mozbc that I may need to include? I had an issue before whereby using cdo to concatenate files left out some data regarding the hybrd coords which meant mozbc couldn't find the variabe, but when i concatenated with ncrcat, mozbc worked fine. 

If you could shed any light, I'd be very grateful. Thanks. 
--
Liz Coleman

Liz Coleman

unread,
Sep 6, 2019, 7:24:07 AM9/6/19
to wrf-chem-mozbc
Hi Stacy, 

With information from your previous message, I succesfully ran mozbc to create wrfinput file, but the NO2 values are crazy, with negative values in some areas so i think the interpolation went wrong. I presume it's to do with the vertical interpolation as there's very little difference between the different levels. COuld i have the PS in wrong units? or issue with hyam, hybm? 

I'm sending the metadata from the created netcdf file as well as screenshot of the wrfinput file created by mozbc (field no2) 

netcdf test_no2_001 {
dimensions:
        lat = 451 ;
        lon = 900 ;
        time = UNLIMITED ; // (1 currently)
        lev = 137 ;
variables:
        float lat(lat) ;
        float lon(lon) ;
        float hyam(lev) ;
        float hybm(lev) ;
        int date(time) ;
        int datesec(time) ;
        float PS(time, lat, lon) ;
                PS:units = "Pa" ;
        float no2(time, lev, lat, lon) ;
                no2:units = "mol/mol" ;
                no2:mixing_ratio = "dry" ;



On Tuesday, 27 August 2019 11:15:00 UTC+1, Liz Coleman wrote:
HI, I'm hoping someone can help me. 
I wish to employ mozbc to prepare BCs from Copernicus Ensemble model results. I have extracted just one variable and tried mozbc to run with following simplified namelist for testing:


&control

do_bc     = .true.
do_ic     = .true.
domain    = 1
dir_wrf   = '../WRFV3/run/'
dir_moz = '../cams/'
fn_moz  = 'no2_ren001.nc'
moz_var_suffix =''
def_missing_var = .true.
spc_map = 'no2 -> NO2'




Thanks in advance, Liz 

Stacy Walters

unread,
Sep 6, 2019, 8:39:52 AM9/6/19
to Liz Coleman, wrf-chem-mozbc
Liz,

Normally aberrant output is a result of corrupt or improper input.
Can you make the test_no2_001 file available for downloading?






catalina poraicu

unread,
Jun 3, 2021, 11:19:50 AM6/3/21
to wrf-chem-mozbc, eilisc...@gmail.com
Hello Liz,
I was wondering if you could help me out and let me know how you managed to run mozbc with the files from CAMS? I my files have the same set up as yours, but I still get the "fail to process netCDF file..." error message when running mozbc. I've even tried copying all of the CAMS fields in a file with the exact same format as CAM-Chem, which I was using before and worked fine. But the error persists.
I would appreciate any help, thanks.

Catalina

Liz Coleman

unread,
Jun 3, 2021, 11:34:17 AM6/3/21
to catalina poraicu, wrf-chem-mozbc
Hi catalina... Can you elaborate on the error? Or find the place in the code that it fails? 
Reply all
Reply to author
Forward
0 new messages