@@ -176,10 +176,10 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
176
176
// These methods allow the AD to figure out what each process needs, with very fine
177
177
// grain detail. See field_request.hpp for more info on what FieldRequest and GroupRequest
178
178
// are, and field_group.hpp for what groups of fields are.
179
- const std::set <FieldRequest>& get_required_field_requests () const { return m_required_field_requests; }
180
- const std::set <FieldRequest>& get_computed_field_requests () const { return m_computed_field_requests; }
181
- const std::set <GroupRequest>& get_required_group_requests () const { return m_required_group_requests; }
182
- const std::set <GroupRequest>& get_computed_group_requests () const { return m_computed_group_requests; }
179
+ const std::list <FieldRequest>& get_required_field_requests () const { return m_required_field_requests; }
180
+ const std::list <FieldRequest>& get_computed_field_requests () const { return m_computed_field_requests; }
181
+ const std::list <GroupRequest>& get_required_group_requests () const { return m_required_group_requests; }
182
+ const std::list <GroupRequest>& get_computed_group_requests () const { return m_computed_group_requests; }
183
183
184
184
// These sets allow to get all the actual in/out fields stored by the atm proc
185
185
// Note: if an atm proc requires a group, then all the fields in the group, as well as
@@ -356,12 +356,14 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
356
356
void add_tracer (const std::string& name, std::shared_ptr<const AbstractGrid> grid,
357
357
const ekat::units::Units& u,
358
358
const int ps = 1 ,
359
- const TracerAdvection tracer_advection = TracerAdvection::DynamicsAndTurbulence )
359
+ const TracerAdvection tracer_advection = TracerAdvection::NoPreference )
360
360
{
361
361
std::list<std::string> tracer_groups;
362
362
tracer_groups.push_back (" tracers" );
363
363
if (tracer_advection==TracerAdvection::DynamicsAndTurbulence) {
364
364
tracer_groups.push_back (" turbulence_advected_tracers" );
365
+ } else if (tracer_advection==TracerAdvection::DynamicsOnly) {
366
+ tracer_groups.push_back (" non_turbulence_advected_tracers" );
365
367
}
366
368
367
369
FieldIdentifier fid (name, grid->get_3d_scalar_layout (true ), u, grid->name ());
@@ -391,14 +393,14 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
391
393
392
394
switch (RT) {
393
395
case Required:
394
- m_required_field_requests.emplace (req);
396
+ m_required_field_requests.push_back (req);
395
397
break ;
396
398
case Computed:
397
- m_computed_field_requests.emplace (req);
399
+ m_computed_field_requests.push_back (req);
398
400
break ;
399
401
case Updated:
400
- m_required_field_requests.emplace (req);
401
- m_computed_field_requests.emplace (req);
402
+ m_required_field_requests.push_back (req);
403
+ m_computed_field_requests.push_back (req);
402
404
break ;
403
405
}
404
406
}
@@ -411,14 +413,14 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
411
413
" Error! Invalid request type in call to add_group.\n " );
412
414
switch (RT) {
413
415
case Required:
414
- m_required_group_requests.emplace (req);
416
+ m_required_group_requests.push_back (req);
415
417
break ;
416
418
case Computed:
417
- m_computed_group_requests.emplace (req);
419
+ m_computed_group_requests.push_back (req);
418
420
break ;
419
421
case Updated:
420
- m_required_group_requests.emplace (req);
421
- m_computed_group_requests.emplace (req);
422
+ m_required_group_requests.push_back (req);
423
+ m_computed_group_requests.push_back (req);
422
424
break ;
423
425
}
424
426
}
@@ -558,12 +560,6 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
558
560
strmap_t <strmap_t <Field*>> m_fields_out_pointers;
559
561
strmap_t <strmap_t <Field*>> m_internal_fields_pointers;
560
562
561
- // The list of in/out field/group requests.
562
- std::set<FieldRequest> m_required_field_requests;
563
- std::set<FieldRequest> m_computed_field_requests;
564
- std::set<GroupRequest> m_required_group_requests;
565
- std::set<GroupRequest> m_computed_group_requests;
566
-
567
563
// List of property checks for fields
568
564
std::list<std::pair<CheckFailHandling,prop_check_ptr>> m_precondition_checks;
569
565
std::list<std::pair<CheckFailHandling,prop_check_ptr>> m_postcondition_checks;
@@ -608,6 +604,12 @@ class AtmosphereProcess : public ekat::enable_shared_from_this<AtmosphereProcess
608
604
609
605
// IOP object
610
606
iop_data_ptr m_iop_data_manager;
607
+
608
+ // The list of in/out field/group requests.
609
+ std::list<FieldRequest> m_required_field_requests;
610
+ std::list<FieldRequest> m_computed_field_requests;
611
+ std::list<GroupRequest> m_required_group_requests;
612
+ std::list<GroupRequest> m_computed_group_requests;
611
613
};
612
614
613
615
// ================= IMPLEMENTATION ================== //
0 commit comments