GEOS-ESM / MAPL

MAPL is a foundation layer of the GEOS architecture, whose original purpose is to supplement the Earth System Modeling Framework (ESMF)
https://geos-esm.github.io/MAPL/
Apache License 2.0
26 stars 17 forks source link

History3G, create output bundle for CollectionGridComp, simple case #2758

Closed bena-nasa closed 5 months ago

bena-nasa commented 5 months ago

Each HistoryCollectionGridComp will need a ESMF_FieldBundle that contains the output fields with the correct names, i.e. not the short name but the alias the user specified.

We obviously don't want to make a whole new copy. Rather we want to make a new field, but share the pointer with the import field and we want to copy the ESMF_Info as well to the new field.

So we need a procedure to do this in the initialize method after the fields have been allocated.

For this first round, let's not support the case if the output field is the result of an expression. This requires creating new field that is not pointed sharing, this is much more complicated for reasons that will be spelled out in another issue.

tclune commented 5 months ago

This partly comes down to how you handle the names. FieldAlias might work in the easier cases. But be careful that you don't alter the original field.