Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Error with ACM2 pbl

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

neel14

Member
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.
 
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
 
Thanks for the reply. I will try it out.
If I may ask, what does "ndepvel" mean? It isn't defined in the registry.
 
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
 
jordanschnell said:
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.
 
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?
 
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
 
jordanschnell said:
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.
 
Top