Error with ACM2 pbl

Post Reply
neel14
Posts: 96
Joined: Fri Mar 15, 2019 6:52 am

Error with ACM2 pbl

Post by neel14 » Tue Aug 25, 2020 3:12 am

Hi,
I am getting this error with ACM2 pbl scheme.
ERROR: CHEM_INIT: num_vert_mix > ndepvel

I am not finding solutions anywhere. I had successful runs with MYNN3 with the same setup but when trying out ACM2 this error occurs.
Kindly guide me in resolving the issue.
Thanks.

jordanschnell
Posts: 141
Joined: Thu Feb 27, 2020 10:58 pm

Re: Error with ACM2 pbl

Post by jordanschnell » Wed Aug 26, 2020 3:28 pm

Hi,

Your error is coming from this block of code in chemics_init.F

! Set the num_vert_mix variable if using ACM
num_vert_mix = 0
IF ( config_flags%bl_pbl_physics == ACMPBLSCHEME ) THEN
mix_select: SELECT CASE(config_flags%chem_opt)
CASE (RADM2SORG_AQ, RADM2SORG_AQCHEM, RACMSORG_AQ, RACMSORG_AQCHEM_KPP, CBMZ_MOSAIC_4BIN_AQ, CBMZ_MOSAIC_8BIN_AQ, CBMZSORG_AQ, &
CBMZ_MOSAIC_DMS_4BIN, CBMZ_MOSAIC_DMS_8BIN, CBMZ_MOSAIC_DMS_4BIN_AQ, CBMZ_MOSAIC_DMS_8BIN_AQ, &
CRI_MOSAIC_8BIN_AQ_KPP, CRI_MOSAIC_4BIN_AQ_KPP)
num_vert_mix = numgas
CASE DEFAULT
num_vert_mix = num_chem
END SELECT mix_select
if(num_vert_mix .gt. config_flags%ndepvel) then
write(message_txt,'(A30,2(I8,2x))') 'chem_init: num_vert_mix and ndepvel ',num_vert_mix,config_flags%ndepvel
call wrf_message( trim(message_txt) )
call wrf_error_fatal(" ERROR: CHEM_INIT: num_vert_mix > ndepvel ")

ENDIF

The variable "num_vert_mix" is determined by your chemical mechanism, and ndepvel set by the chem namelist, and has a default value of 140 (Registry/registry.chem). So it seems you need to increase the ndepvel value to numgas or num_chem, depending on which mechanism you are using. It looks like ndepvel is used to set up and loop over arrays in dry_dep_driver.F.

Jordan

neel14
Posts: 96
Joined: Fri Mar 15, 2019 6:52 am

Re: Error with ACM2 pbl

Post by neel14 » Thu Aug 27, 2020 2:57 am

Thanks for the reply. I will try it out.
If I may ask, what does "ndepvel" mean? It isn't defined in the registry.

jordanschnell
Posts: 141
Joined: Thu Feb 27, 2020 10:58 pm

Re: Error with ACM2 pbl

Post by jordanschnell » Thu Aug 27, 2020 4:06 pm

Hi,

ndepvel looks to be an integer that describes how many (n) species deposition velocities (depvel) will be calculated for. I don't quite understand the reason for the error/catch of ndepvel vs. num_vert_mix. My advice would be once you find out what number you need for ndepvel (either numgas or numchem), try a value that's much larger than what you need to see if your results change.

Jordan

neel14
Posts: 96
Joined: Fri Mar 15, 2019 6:52 am

Re: Error with ACM2 pbl

Post by neel14 » Fri Aug 28, 2020 5:19 pm

jordanschnell wrote:
Thu Aug 27, 2020 4:06 pm
ndepvel looks to be an integer that describes how many (n) species deposition velocities (depvel) will be calculated for. I don't quite understand the reason for the error/catch of ndepvel vs. num_vert_mix. My advice would be once you find out what number you need for ndepvel (either numgas or numchem), try a value that's much larger than what you need to see if your results change.

Jordan
Will try out, thanks for the suggestion.
I agree with you, and this particular error is only related with the ACM scheme, I wonder why. What makes this scheme different.

mriganka
Posts: 2
Joined: Wed Sep 23, 2020 4:04 am

Re: Error with ACM2 pbl

Post by mriganka » Thu Dec 17, 2020 4:51 am

I am getting the same error with chemistry option 201 (MOZART Chemistry with MOSAIC using KPP library). I am using CAM-CHEM for creating input and bc files. I have read the solution mentioned but not able to understand it completely. Can you please help?

jordanschnell
Posts: 141
Joined: Thu Feb 27, 2020 10:58 pm

Re: Error with ACM2 pbl

Post by jordanschnell » Fri Dec 18, 2020 7:32 pm

Hi @mriganka and @neel14,

@neel14 - to answer your previous question - the difference between the ACM scheme and others is that vertical mixing of chemical species (and deposition) is done inside the ACM pbl scheme. For other pbl schemes, vertical mixing is done in the dry deposition driver by using exchange coefficients diagnosed in the PBL scheme used. num_vert_mix is set to num_chem so the ACM scheme knows how many species to loop over. If num_vert_mix is anything except for zero, mixing and deposition is not performed in the dry_dep_driver.F (that way it's not done twice).

@mriganka - The 201 chemistry option is a very big package, with what looks to have 208 species. Because ndepvel has a default value of 140, the error occurs in chemics_init.F. To remedy, you need to set ndepvel = num_chem in the &chem namelist, which should be 208.

Jordan

neel14
Posts: 96
Joined: Fri Mar 15, 2019 6:52 am

Re: Error with ACM2 pbl

Post by neel14 » Mon Dec 21, 2020 4:51 am

jordanschnell wrote:
Fri Dec 18, 2020 7:32 pm
Hi @mriganka and @neel14,

@neel14 - to answer your previous question - the difference between the ACM scheme and others is that vertical mixing of chemical species (and deposition) is done inside the ACM pbl scheme. For other pbl schemes, vertical mixing is done in the dry deposition driver by using exchange coefficients diagnosed in the PBL scheme used. num_vert_mix is set to num_chem so the ACM scheme knows how many species to loop over. If num_vert_mix is anything except for zero, mixing and deposition is not performed in the dry_dep_driver.F (that way it's not done twice).

@mriganka - The 201 chemistry option is a very big package, with what looks to have 208 species. Because ndepvel has a default value of 140, the error occurs in chemics_init.F. To remedy, you need to set ndepvel = num_chem in the &chem namelist, which should be 208.

Jordan
Thanks Jordan.

Post Reply

Return to “Chemistry-meteorology Interactions”