Fail to process netCDF file.... in mozbc

334 views
Skip to first unread message

Ailish Graham

unread,
Dec 14, 2021, 1:06:58 PM12/14/21
to wrf-chem-mozbc
Hi there, 

I'm currently trying to read in future chemical BCs from WACCM but I'm getting the error 'Fail to process netCDF...' [mozbc_bc.log attached]. 

The WACCM files were extracted for me based on the species listed in the mozbc.input script which maps the species to MOZART-MOSAIC 4 bin chemistry (also attached [mozbc.inp]) so I have all of the chemical species needed. I checked and they look like they all match (i.e. same case etc). The future chemical BCs are provided as monthly mean values and extend from 20170801 to 20181001 (15 dates) - the test I am running is for 20170901-20170902. 

I have compared my future BC files to the standard present-day WACCM BC files (which I have used successfully in the past [waccm_prev_data.txt]) and I can see that the future files [waccm_curr_data.txt] are missing some (possibly?) key variables that are called in mozbc. 

The key ones that I noticed are missing from the new (future) BC  files are:
- hyam
- hybm 
- hyai
- hybi 
- PS
- P0 

I can't find documentation on what variables are needed in the chemical BC files to check against so I found these from looking through mozbc code. I just wanted to check whether there are any other variables that should be included? 

Thanks in advance for the help! 
Ailish
waccm_prev_data.txt
mozbc_bc.log
waccm_curr_data.txt
mozbc.inp

Gabriele Pfister

unread,
Dec 14, 2021, 1:45:05 PM12/14/21
to Ailish Graham, wrf-chem-mozbc
Dear Ailish

we do not have a listing of the variables needed but you took the correct approach by looking at the source code. The key variables you are listing are needed to calculate the WACCM vertical levels and you should be fine if you add these to your output. 

Gabi
--
================================
Gabriele Pfister, Deputy Director
Atmospheric Chemistry Observations & Modeling
National Center for Atmospheric Research (NCAR)
Email: pfi...@ucar.edu
Temporary Home Office Phone: +1 303 241 1329
Work Phone: +1 303 497 2915
Web: https://staff.ucar.edu/users/pfister

Ailish Graham

unread,
Dec 15, 2021, 12:47:38 PM12/15/21
to wrf-chem-mozbc, pfi...@ucar.edu, wrf-chem-mozbc, Ailish Graham
Hi Gabi,

Thanks for the quick response. I have added in the required WACCM variables (hyam, hybm, PS, P0) but still get the same error. 

Having checked again I can see that the variables listed above (plus lev, lat, lon, time, date and datesec) are read in to mozbc so I guess it's likely one of these variables causing the problem. I have compared the BC files I have previously successfully read in to the ones I'm trying to read in now. The only differences between the files are:
- The WACCM files I have successfully read in in the past have different time variable attributes ['days since 0001-01-01 00:00:00',  'calendar = gregorian'] (and are double type) compared with ['days since 2017-08-16 00:00:00', 'calendar = proleptic gregorian'] (and int64 type) in the new file. This also means that the first time value in the new file is 0. 
- There are fewer levels in the new files (70 vs 88).

Would either of these differences cause problems with mozbc? I wondered if the time interpolation may break if the time values are used instead of date values. I did a diff --side-by-side on the successful and unsuccessful mozbc and can see it fails just before (or at) the time section of mozbc. I've pasted below in case this is helpful. 

Thanks again for your help,
Ailish




checking wrf variable num_a03                                                                   checking wrf variable num_a03
 len num_a2 =            6                                                                                    len num_a2 =            6
 len num_a1 =            6                                                                                    len num_a1 =            6
 len num_a3 =            6                                                                                    len num_a3 =            6
 len num_a2 =            6                                                                                    len num_a2 =            6
 len num_a1 =            6                                                                                    len num_a1 =            6
 len num_a3 =            6                                                                                    len num_a3 =            6
 checking wrf variable num_a04                                                                   checking wrf variable num_a04
 len num_a2 =            6                                                                                    len num_a2 =            6
 len num_a1 =            6                                                                                    len num_a1 =            6
 len num_a3 =            6                                                                                    len num_a3 =            6
 len num_a2 =            6                                                                                    len num_a2 =            6
 len num_a1 =            6                                                                                    len num_a1 =            6
 len num_a3 =            6                                                                                    len num_a3 =            6
 NetCDF: Variable not found                                                               |         finished init_mozart_lib
                                                                                                         >         dt_wrfbdy =    21600.00    
                                                                                                         >         main; doing time     20170901  :            0
                                                                    
 fail to process netCDF file...                                                               |         get_moz_time_ndx; moz_dir,moz_fn = ./moz0000.nc
                                                                                                         >         get_moz_time_ndx; wrf_date,wrf_datesec,ntime_m =     2017090
                                                                                                         >                  89



Stacy Walters

unread,
Dec 15, 2021, 2:03:50 PM12/15/21
to Ailish Graham, wrf-chem-mozbc, pfi...@ucar.edu
Ailish,

Can you make the wrfinput_d01, moz0000.nc, and the *inp file you are using with mozbc available for downloading?

Stacy

Ailish Graham

unread,
Dec 15, 2021, 4:00:26 PM12/15/21
to wrf-chem-mozbc, st...@ucar.edu, wrf-chem-mozbc, pfi...@ucar.edu, Ailish Graham

Hi Stacy,

Sure, I've attached to this message and uploaded the file to: https://leeds365-my.sharepoint.com/:f:/g/personal/earagr_leeds_ac_uk/EluKCCoBOwFChujun4HGTigBxklM_u5ZnQLjAQDMGlWCbw?e=VXLyKf - you should have been emailed a code to access the file.

Thanks,
Ailish
wrfinput_d01
mozbc_outer.inp

Ailish Graham

unread,
Dec 16, 2021, 10:00:55 AM12/16/21
to wrf-chem-mozbc, Ailish Graham, st...@ucar.edu, wrf-chem-mozbc, pfi...@ucar.edu
Hi Stacy, 

If you follow the link does it give you the option to put your email address in to verify your identity? I have made the file accessible by your email address. When you enter your email address it should send you another link. If you still can't access it I can try to make it accessible somewhere else. 

Thanks,
Ailish

Ailish Graham

unread,
Dec 16, 2021, 10:22:57 AM12/16/21
to wrf-chem-mozbc, Ailish Graham, st...@ucar.edu, wrf-chem-mozbc, pfi...@ucar.edu
Hi again Stacy,

I have also uploaded to google drive here: https://drive.google.com/file/d/1qeB4fQpA1PQ5nxoeevYZeb9e5rmpFtBl/view?usp=sharing - I've sent an email but here is the link just in case. 

Thanks,
Ailish

Ailish Graham

unread,
Dec 17, 2021, 12:04:28 PM12/17/21
to wrf-chem-mozbc, Ailish Graham, st...@ucar.edu, wrf-chem-mozbc, Gabriele Pfister

Hi Stacy,


Not sure where is best to respond to your question. I used gzip so it should unzip with gunzip. I have uploaded a standard netcdf version here https://drive.google.com/drive/folders/13TlQoSXmlkHZLdyDZjyfRN8T2yi2aXib?usp=sharing if you still have problems.


Thanks,

Ailish

Ailish Graham

unread,
Dec 20, 2021, 5:12:59 AM12/20/21
to wrf-chem-mozbc, Ailish Graham, st...@ucar.edu, wrf-chem-mozbc, Gabriele Pfister
Hi Stacy,

I have uploaded the first met_em file here and put all of them into the google folder I shared (https://drive.google.com/drive/folders/1wfgsCGffISzsHdKtpJMyYu-AhhEcMCTg?usp=sharing

Thanks,
Ailish

met_em.d01.2017-09-01_00:00:00.nc

Stacy Walters

unread,
Dec 20, 2021, 8:50:00 AM12/20/21
to Ailish Graham, wrf-chem-mozbc, Gabriele Pfister
Ailish,

Using the files you made available I am able to successfully run mozbc.  Since the wrfbdy_d01 file is usually
large I ran with do_bc = .false., only the initial conditions in the file wrfinput_d01 were set.

You should note that your met_em files are of the form:

met_em.d01.<date> where <date> ends with the string:


You need to change your met_em file names to reflect the following ending:

"00:00:00.nc"

For example, the file:

met_em.d01.2017-09-01_00_00_00.nc should be changed to:

met_em.d01.2017-09-01_00:00:00.nc

Stacy
Message has been deleted

­아베다 / 연구원 / 기초과학연구원

unread,
Dec 1, 2025, 11:57:36 PM (2 days ago) Dec 1
to wrf-chem-mozbc, Stacy Walters, wrf-chem-mozbc, Gabriele Pfister, Ailish Graham

Hello.

I am following the same process to include CAMS data to WRF-Chem. I am stuck at the following part:

./mozbc <mozbc.inp> mozbc.out

I get error: STOP in module_mozart_lib …

Checking mozbc.out, the error is: NetCDF: Invalid dimension ID or name
fail to process netCDF file…

I attached the google drive link to my wrfinput variable list, my CAMS dataset variable list, mozbc.inp and mozbc.out. This is the final step before I can run wrf.exe, so please if I can get some help on this, I will be grateful.

https://drive.google.com/drive/u/1/folders/1H8um2-VDDm46os2UUxtHbfUzlNlTrYBP

Thanks.

Abeda Tabassum

Reply all
Reply to author
Forward
0 new messages