E3SM-Project / ACME-ECP

E3SM MMF for DoE ECP project
Other
9 stars 1 forks source link

Fix for CRM orientation in MAML and SP_ORIENT_RAND #126

Closed crjones-amath closed 4 years ago

crjones-amath commented 4 years ago

This PR allows MAML to use CRMs that are not oriented East-West.

This PR also fixes an issue in the SP_ORIENT_RAND configuration wherein crm_angle was uninitialized prior to use and did not persist between CRM calls.

Behavior prior to this PR: The model would crash during the first few days when using use_MAML with CRMs oriented North-South (SP_DIR_NS). The hypothesis is that cam_out%[uv]bot were being populated with crm_[uv], which could set up unrealistic surface forcings depending on how it's handled by the surface models (e.g., taux could be calculated with v instead of u).

Solution: Use crm_angle to appropriately transform crm_[uv] back to the GCM frame of reference. This is done by adding crm_angle to pbuf so it can both persist between CRM calls (for SP_ORIENT_RAND) and also be used in the cam_export subroutine with MAML.

This appears to have addressed the MAML/North-South instability based on short-simulations (fingers crossed). Regardless, this fix should be incorporated because the old behavior was inconsistent.

[BFB] for ECP test suite (tested on Cori), but note these tests do not directly test this functionality.