I'm currently using CMEPs to couple CICE6, MOM6, and the UM and I noticed some unexpected behaviour while using CMEPS.
When ungridded dimensions are present, behaviour of med_methods_FB_init seems to depend on the internal field ordering of the input state. med_methods_FB_init removes cpl_scalars from the field name list lfieldNameList, but then accesses the fields from the input state by index when determining the ungridded dimensions. Unless cpl_scalars is the last field in the input state, this causes the wrong fields to be used when determining the ungridded dimensions of the output fields.
The following small change fixed this for my use case. Changing
Hi there,
I'm currently using CMEPs to couple CICE6, MOM6, and the UM and I noticed some unexpected behaviour while using CMEPS.
When ungridded dimensions are present, behaviour of
med_methods_FB_init
seems to depend on the internal field ordering of the input state.med_methods_FB_init
removescpl_scalars
from the field name listlfieldNameList
, but then accesses the fields from the input state by index when determining the ungridded dimensions. Unlesscpl_scalars
is the last field in the input state, this causes the wrong fields to be used when determining the ungridded dimensions of the output fields.The following small change fixed this for my use case. Changing
https://github.com/ESCOMP/CMEPS/blob/d2a08f0edc84b30b91891d96d3dd0040a595db5e/mediator/med_methods_mod.F90#L399-L403
to
Happy to submit a PR from my fork https://github.com/kieranricardo/CMEPS/tree/bugfix-FB-init-dim-mismatch if appropriate :)