ecmwf-ifs / field_api

Apache License 2.0
3 stars 8 forks source link

Pull back data to legacy structures on device #49

Closed pmarguinaud closed 4 months ago

pmarguinaud commented 4 months ago

ARPEGE/IFS field data are now encapsulated with Field API structures in the grid-point calculations; however, in the spectral calculations, these data are still represented by old GMV and GFL arrays.

This implies that we need to implement a fast mean of moving GFL/GMV back and forth between new Field API data structures and GMV/GFL arrays allocated on the device.

This PR implements such a mechanism, which is designed to be flexible enough to be compatible with a traversal of large data structures such as YDVARS.

The test case test_legacy.F90 illustrates this mechanism.