Skip to content

Commit

Permalink
chore: renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed May 27, 2024
1 parent 7423cef commit 54c42d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions libs/observers/sdmmonitor/monitor_condensation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ void MonitorCondensation::reset_monitor() const {
*
* Add totmass_condensed to current value for mass condensed since d_data was last reset.
*
* _Note:_ conversion of mass condensed at one timestep from double precision (8 bytes double) to
* single precision (4 bytes float) in output.
* _Note:_ possible conversion of mass condensed at one timestep from double precision
* (8 bytes double) to single precision (4 bytes float) in output depending on datatype alias.
*
* @param team_member Kokkkos team member in TeamPolicy parallel loop over gridboxes
* @param totmass_condensed Mass condensed in one gridbox during one microphysical timestep
Expand Down
13 changes: 6 additions & 7 deletions libs/observers/sdmmonitor/monitor_condensation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ struct MonitorCondensation {
*
* Add totmass_condensed to current value for mass condensed since d_data was last reset.
*
* _Note:_ conversion of mass condensed at one timestep from double precision (8 bytes double) to
* single precision (4 bytes float) in output.
* _Note:_ possible conversion of mass condensed at one timestep from double precision
* (8 bytes double) to single precision (4 bytes float) in output depending on datatype alias.
*
* @param team_member Kokkkos team member in TeamPolicy parallel loop over gridboxes
* @param totmass_condensed Mass condensed in one gridbox during one microphysical timestep
Expand Down Expand Up @@ -79,17 +79,16 @@ struct MonitorCondensation {
template <typename Store>
inline Observer auto CondensationObserver(const unsigned int interval, Dataset<Store>& dataset,
const size_t maxchunk, const size_t ngbxs) {
using Mo = MonitorCondensation;
const auto name = std::string_view("massdelta_cond");
const auto units = std::string_view("g");
constexpr auto scale_factor = dlc::MASS0grams;
const auto chunkshape = good2Dchunkshape(maxchunk, ngbxs);
const auto dimnames = std::vector<std::string>{"time", "gbxindex"};
const auto xzarr_ptr = std::make_shared<XarrayZarrArray<Store, MonitorCondensation::datatype>>(
dataset.template create_array<MonitorCondensation::datatype>(name, units, scale_factor,
chunkshape, dimnames));
const auto xzarr_ptr = std::make_shared<XarrayZarrArray<Store, Mo::datatype>>(
dataset.template create_array<Mo::datatype>(name, units, scale_factor, chunkshape, dimnames));

const auto do_obs = DoSDMMonitorObs<Store, MonitorCondensation, MonitorCondensation::datatype>(
dataset, xzarr_ptr, MonitorCondensation(ngbxs));
const auto do_obs = DoSDMMonitorObs<Store, Mo, Mo::datatype>(dataset, xzarr_ptr, Mo(ngbxs));
return ConstTstepObserver(interval, do_obs);
}

Expand Down

0 comments on commit 54c42d9

Please sign in to comment.