Skip to content

Commit

Permalink
Edits and adds some comments to provide clarity and TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
singhbalwinder committed Aug 17, 2024
1 parent 4fa577e commit 87ea43c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ void update_gas_aerosols_using_constituents(

// Create a policy to loop over columns annd number of constituents
// to update
// FIXME: TODO:We don't need a team for "nconstituents", so we can make the
// kookos_for
// simple by using just ncols
const auto policy = ekat::ExeSpaceUtils<MAMConstituentFluxes::KT::ExeSpace>::
get_default_team_policy(ncol, nconstituents);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ void MAMConstituentFluxes::run_impl(const double dt) {
// -------------------------------------------------------------------
// (LONG) NOTE: The following code is an adaptation of cflx.F90 code in
// E3SM. In EAMxx, all constituents are considered "wet" (or have wet
// mixing ratios), so we are *not* doing any wet to dry conversions in the
// "preprocess" . We are simply updating the MAM4xx tracers using the
// "constituent fluxes".
// mixing ratios), we are *not* doing any wet to dry conversions in the
// "preprocess" for this process. We are simply updating the MAM4xx
// tracers using the "constituent fluxes".
// We are converting wet atm to dry atm. Since we do not use or update
// any of the water constituents (qc, qv, qi etc.), we should be okay
// to do this conversion. We need to do this conversion as our function
// are build following HAERO data structures.
// are built following HAERO data structures.
// -------------------------------------------------------------------

// preprocess input -- needs a scan for the calculation of dry_atm_, wet_aero_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MAMConstituentFluxes final : public scream::AtmosphereProcess {
mam_coupling::DryAtmosphere dry_atm_;

// aerosol state variables
mam_coupling::AerosolState wet_aero_; //, dry_aero_;
mam_coupling::AerosolState wet_aero_;

// buffer for sotring temporary variables
mam_coupling::Buffer buffer_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ void MAMSrfOnlineEmiss::set_grids(
// Surface emissions remapping file
auto srf_map_file = m_params.get<std::string>("srf_remap_file", "");

// FIXME: We can extract the following info about each species
// in a separate hpp file
//--------------------------------------------------------------------
// Init dms srf emiss data structures
//--------------------------------------------------------------------
Expand Down Expand Up @@ -221,7 +223,7 @@ void MAMSrfOnlineEmiss::initialize_impl(const RunType run_type) {
// RUN_IMPL
// ================================================================
void MAMSrfOnlineEmiss::run_impl(const double dt) {
// Zero output
// Zero-out output
Kokkos::deep_copy(preprocess_.constituent_fluxes_pre_, 0);

// Gather time and state information for interpolation
Expand Down
2 changes: 2 additions & 0 deletions components/eamxx/src/physics/mam/srf_emission_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ srfEmissFunctions<S, D>::create_horiz_remapper(

const int ncols_model = model_grid->get_num_global_dofs();
std::shared_ptr<AbstractRemapper> remapper;
// if the file's grid is same as model's native grid, we identity remapper
// (i.e., no interpolation)
if(ncols_data == ncols_model) {
remapper = std::make_shared<IdentityRemapper>(
horiz_interp_tgt_grid, IdentityRemapper::SrcAliasTgt);
Expand Down

0 comments on commit 87ea43c

Please sign in to comment.