Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aerosol Water Calculation #37

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft

Aerosol Water Calculation #37

wants to merge 39 commits into from

Conversation

samfrederick
Copy link
Collaborator

@samfrederick samfrederick commented Jun 24, 2024

  • TChem_ZSR.cpp (new wrapper script)
    • Hard coded implementation for assigning ZSR calculation attributes to IonPair struct.
    • Loop over range of RH (0, 100%) and call method for calculating aerosol water content.
    • Remove hard coding once parsing of aerosol water sub model attributes in AerosolModelData::initChem is complete.
    • Use TChem state variable instead of a general array data structure for assigning aerosol ICs.
  • TChem_Util.hpp modifications
    • Add IonPairs struct for ZSR calculation attributes (e.g., parameters for calculation using either Jacobson or EQSAM method)
    • Add AeroWater struct (main struct for aerosol water calculations, encapsulates all of the IonPair instances and indicates the parameter name for gas phase water and aerosol water)
    • Potentially add AeroPhase struct for listing the name of species in the aerosol phase?
  • TChem_AerosolModelData.cpp modifications
    • Parse aerosol water sub model attributes for both Jacobson and EQSAM calculation types and assign attributes to IonPair instances
    • Implement AeroWater struct for encapsulating parsed attributes
    • Follow similar routine to SIMPOL for creating a 1-D view, host, and sync device.
  • TChem_AerosolModelData.hpp modifications
    • Add public attributes to AerosolModelData definition
    • Add aerosol water data structures to AerosolModel_ConstData
  • TChem_Impl_SingleParticleAerosolWater.hpp (new header file)
    • Add struct and associated TeamInvoke method for calculating water content
    • Replace manner of molecular weight calculation using lookup table with molecular weights supplied by AerosolModelData attributes.

Frederick added 10 commits June 24, 2024 15:29
…tly IonPair attributes are hard-coded, future updates will move IonPair attribute assignment to AerosolModelData parsing.
…ghts are assigned via hard-coded map in TChem_ZSR.cpp wrapper, future behavior will access molecular weights from AerosolModelData instance attributes
…ementation does not allow accessing sub model attributes outside the scope of the initChem parser yet.
@samfrederick samfrederick linked an issue Jun 26, 2024 that may be closed by this pull request
8 tasks
Frederick added 10 commits July 2, 2024 17:26
…ssign state vector quantities to relevant indices, revise arguments to aerosol water team invoke method.
…molecular weights. Revise the name of the aerosol water type and add a 1-d dual view (tentative).
…out code for adding attributes to the aerosol model constant data subclass
…el data instead of ion_pair objects), compute aerosol water for all ionpair objects that are attributes of the aerowater_model class, remove code using a lookup dictionary for computing molecular weights with values assigned in the parser module.
…e arguments to aerosol_water_single_particle team invoke
…to assign various IonPair attributes with corresponding updated primitive types, add code for assigning a dual 1d view of the aerowater_params
…ew of ionpair objects. Add corresponding attributes under aerosolmodel_constdata
…ode for acessing data with primitive type attributes, use a switch for calculation type (jacobson or eqsam)
@samfrederick samfrederick marked this pull request as draft July 17, 2024 15:29
@samfrederick samfrederick changed the title Aerosol Water Calculation [DRAFT] Aerosol Water Calculation Jul 17, 2024
Copy link
Collaborator

@odiazib odiazib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compiled this branch on my workstation with CUDA and encountered a few warnings (calling a __host__ function from a __host__ __device__ function), which are due to std:: routines. Additionally, I encountered a compilation error that I have fixed. Please rebase your branch with the main branch.

src/core/TChem_AerosolModelData.cpp Show resolved Hide resolved
src/core/TChem_AerosolModelData.cpp Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
src/core/impl/TChem_Impl_SingleParticleAerosolWater.hpp Outdated Show resolved Hide resolved
Frederick and others added 15 commits August 20, 2024 10:33
…onditional statement to determine effective RH
…on (gases + aerosol species per particle), set arguments to team_invoke() to type const beside the state view
… other references to TChem's state variable.
…e_type, change state variable to value type (real type was incorrect)
…water values for each RH to aerowater view, copy from device to host and write values to file for comparison against host output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Water uptake
2 participants