ESCOMP / CISM

Community Ice Sheet Model
GNU Lesser General Public License v3.0
6 stars 11 forks source link

Encapsulate module-level data in derived types, for parallel module and maybe others #33

Closed billsacks closed 2 years ago

billsacks commented 3 years ago

To support multiple ice sheet instances (e.g., Greenland & Antarctica in a single simulation), we can't have module-level data; instead, data need to be encapsulated in instances of a derived type. This is mostly already the case. The main – and possibly only – exception is the parallel module (own_ewn, own_nsn, and many others).

In April, 2015, @whlipscomb said:

The only modules I can think of (besides parallel) that contain free-floating variables (i.e., not part of a derived type) are glimmer_paramets and glimmer_physcon. Assuming that rhoi and similar variables have the same values everywhere, I don’t think this will be a problem. But if we wanted different values of rhoi (say) for different ice sheets, we could make it part of the glide_paramets derived type.

@whlipscomb has agreed to take this on.

billsacks commented 2 years ago

Based on the fact that a multiple ice sheet case seems to be working now, this seems to be done. Thanks, @whlipscomb !