alphaparrot / ExoPlaSim

Exoplanet Planet Simulator (PlaSim extended for different planet types (including tidally-locked) and evolution on geological timescales--glaciers and carbon cycle)
GNU General Public License v2.0
53 stars 13 forks source link

Dev #4

Closed maureenjcohen closed 1 year ago

maureenjcohen commented 1 year ago

This is the working and tested aerosol code. Main added or modified scripts:

aerocore.f90 - the transport and settling routine based on tpcore aeromod.f90 - aerosol constants and main function that runs aerocore each timestep (aero_main) radmod.f90 - haze absorption and scattering added after cloud section plasimmod.f90 - arrays and logicals for aerosol module added plasim.f90 - call to aero_main outmod.f90 - added aerosol mass mixing ratio to outputs aero_namelist - contains aerosol constants and logicals make_plasim - added new module

hazeconstants/ - directory containing some precomputed haze constants that can be read by readdat function stellarspectra/ - directory with a few stellar spectra matching the haze constants

init.py - logicals/constants controlling aerosol modules added to configure() and written to aero_namelist pyburn.py - added aerosol mass mixing ratio to dictionary example.nl - added code for aerosol mmr

Non-essential: There are some scripts in exoplasim_testers that I used to validate various functions before putting them into the model. I fixed some bugs in various places (maybe you've already fixed them in the master version) and changed some of the default configure settings. Never done a pull request before, so let me know if I should redo/change this in any way!

alphaparrot commented 1 year ago

Looked pretty good! There were a few merge conflicts to work out, and a few bugs from the transition from a development package to release-ready package. I think I caught them all; it now runs fine for me both with and without aerosols. Very nice work! I also added docstrings for the aerosol options in Model.configure, but you may want to check those to make sure I understood everything correctly. Additionally, I adjusted the defaults so the aerosol module is not used by default (to avoid changing behaviour of preexisting models), and also edited the configuration file export to 1) account for changes from the main branch, and 2) make sure all aeromod options were present and accounted for. It is also now possible to simply give the name of one of the files in exoplasim/hazeconstants/ to aerofile, and if it's in the folder, it will find and copy it into the working directory, without needing to specify a full path.