Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

adding new aerosol types

Noah Zhao

Noah Zhao
New Member
Hi everyone,

I'm an undergrad student looking to add new aerosol types to CESM for solar geoengineering studies, specifically those that don’t already exist within the model.

I’ve been exploring the files under cam/src/chemistry/modal_aero and I’m considering modifying the MAM to incorporate new species and aerosol characteristics.



Is modifying the MAM a common approach for introducing new aerosol types?

Also, are there any tutorials or documentation that walk through this process?

If anyone has any suggestions, experiences, or alternative methods for adding non-standard aerosols in CESM, I’d appreciate any help!

Many thanks in advance,
Noah
 

Paul F

Paul Farron
New Member
Hi Noah,

I am also now trying to add a new aerosol type in CESM2 by modifying MAM4. Did you successfully manage to do it ? Do you have any tutorial to recommend to do so ?

Thanks in advance for your help !
Paul
 

Danny Leung

New Member
That might be something that CAM-Chem people want to gather and put inside their documentation.
Do you mean you want to add a new aerosol tracer in MAM?
I may be able to gather some resources soon, as I just implemented two aerosol tracers in MAM4...
 

Paul F

Paul Farron
New Member
Hi Danny,

Thanks for taking the time to look at this !

I've been looking around and found this github issue and ended up trying to add a new tracer and a new mode by looking at this github repo. I haven't finished yet. What approach did you take ?

Best regards,
Paul
 

Danny Leung

New Member
Hi Paul-
I haven't tried to add a new mode, although I know someone recently did. I added new aerosol tracers with some new chemistry, so the main files to edit, I guess, are modal_aero_data.F90, constituents.F90, and a few more files if you cared about deposition and optics.
Do you have access to Derecho? I can give you the path to the case and source code so you can trace how the edits were done.
Danny
 

Paul F

Paul Farron
New Member
Hi Danny,

I believe that adding a new tracer should work as well for my case. I'll have a look at the files, thanks !
I'm based in Zürich so I do not have access to Derecho.

Best,
Paul
 

Danny Leung

New Member
Hi Paul-
Oh, I actually meant rad_constituents.F90, not constituents.F90. Also remember to add your new aerosol tracers to the chemical mechanism file (chem_mech.in) and point it to your CAM_CONFIG_OPTS so that the solver knows the molecular weight for tracer transport.
But yes! Feel free to post questions here and I will see if I can try to help.
Danny
 

Paul F

Paul Farron
New Member
Hi Danny,

Thanks for the help. Am I right to think that I also need to change some files in the pp_trop_mam4 (or pp_trop_mam4_vbs) folder like mo_sim_dat.F90 ?
Also, I was wondering if you eventually had a github repo I could take a look at to track the changes ?

Best,
Paul
 

Danny Leung

New Member
Hi Paul-
No, please don't change anything inside pp_trop_mam4_vbs. You should only edit chem_mech.in, and when you edit chem_mech.in don't edit it inside the pp_trop_mam4_vbs directory; copy it elsewhere and edit it there.
Say, you follow all occurrences in dst_a1 for instance (~2-3 occasions) when you edit chem_mech.in. You see things like
dst_a1 -> AlSiO5,
So when you add an aerosol tracer called abc_a1, you follow what dst_a1 does so you edit in chem_mech.in
abc_a1 -> A1B2C3,
The main thing here is to correctly specify the chemical formula of abc_a1 so the chemical solver knows the molecular weight of abc_a1 for doing tracer advection.

Let's say you have a case for FCHIST or FCnudged. After modifying chem_mech.in, you put chem_mech.in somewhere and point its path to CAM_CONFIG_OPTS, like below. Say, when originally you do
./xmlquery CAM_CONFIG_OPTS
which gives
CAM_CONFIG_OPTS: -phys cam6 -chem trop_strat_mam4_vbs -age_of_air_trcs
which is typical for FCHIST or FCnudged, then you point your chem_mech.in to it by
./xmlchange CAM_CONFIG_OPTS="-phys cam6 -chem trop_strat_mam4_vbs -age_of_air_trcs -usr_mech_infile /glade/u/home/dleung/CESM2/mozart_dustchem/aciduptake/v2_c241023/chem_mech.in"
That path is where I store my chem_mech.in. You can put it inside your case dir too, that doesn't matter.

Then you do
./case.setup --reset
./case.build --clean-all
./case.build

So don't modify the .F90 files in pp_trop_mam4_vbs like mo_sim_dat.F90. It's tempting to just add the aerosol tracer names and molecular weight and add all that info there, but that does not work. These files are automatically configured and changed following the changes you made in the chem_mech.in. After CAM_CONFIG_OPTS gets your new chem_mech.in and you reset and rebuild the case, you will find the modified mo_sim_dat.F90 in your case directory. In your case directory, go to
Buildconf/camconf/
to check your updated chem_mech.in and chem_mech.doc. Go to
Buildconf/camconf/chem_proc/
to check the updated mo_sim_dat.F90 following the changes in chem_mech.in.

Thanks to Francis Vitt for all the above info -- Let me know if you have more questions! Actually it is a nice idea to add a github repo. Maybe I will do this when I have time later.
Danny
 
Top