HPSCTerrSys / TSMP

Terrestrial Systems Modelling Platform (TSMP or TerrSysMP)
https://www.terrsysmp.org/
Other
23 stars 16 forks source link

Refactor use of `local_dims_obs` array #242

Closed jjokella closed 1 month ago

jjokella commented 1 month ago

move setting of local_dims_obs to dimension-setting-code

local_dims_obs was before set at the end of the global observation initalization routines. However, it is more fitting to set it in the code-part, where the observation dimensions are set, not after the code part, where observation arrays are filled.

deallocate local_dims_obs at the very end of code

Before local_dims_obs was only deallocated directly before allocation.

move allocation and gather of local_dims_obs again

removed unnecessary local array local_dim

local_dim is local clone of local_dims_obs. Therefore, local_dim is removed and its role in setting the array local_dis is now filled by local_dims_obs.

rename local_dis to local_disp_obs and add to mod_assimilation

Disadvantage: No immediate deallocation in local routine, should be ok as local_disp_obs islength of number of PEs.

simplify obs_op_f_pdaf