GEOS-ESM / GEOSldas

Repository for the GEOS Land Data Assimilation Fixture
Apache License 2.0
11 stars 10 forks source link

implement parallel FFT and clean up perturbations subroutines #373

Closed gmao-rreichle closed 3 years ago

gmao-rreichle commented 3 years ago

There are two tasks related to perturbations:

  1. Implement parallel FFT to speed up computation of correlated random fields It's not clear if this will be 0-diff. Probably not.

  2. Clean up (simplify) the perturbations code. Currently, subroutines get_pert() and propagate_pert() exist in two flavors, "GEOSldas" and "LDASsa". The key difference between the "GEOSldas" and "LDASsa" versions is that the latter has an additional array dimension for the ensemble members.
    If I remember correctly, the "GEOSldas" flavor is used for forcing and prognostics perturbations, and the "LDASsa" version is used for perturbing observations.
    Would it be possible to merge the subroutines again into just one version that always includes the ensemble member dimension, and then call this merged subroutine for just one member when the "GEOSldas" flavor is needed? This may require some reshuffling of the array dimensions in the calling subroutines.
    Having just one subroutine for get_pert() and one for propagate_pert() would greatly simplify maintenance of the code.
    This change should be 0-diff.

Perhaps it would be best to start with item 2 and then implement the FFT?

weiyuan-jiang commented 3 years ago

I have a feeling that it is wrong to save the second field for different variables because the initialization is different.

call rf%initialize(rNlon, rNlat, 1., xCorr, yCorr, rdlon, rdlat )

But it is ok for different ensemble members.

gmao-rreichle commented 3 years ago

addressed with #418 and #376