You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current MAPL arithmetic parser can perform element-wise operations on any combination of supported fields on the obviously same grid ( including layout, otherwise this wouldn't make sense!) given character expression involving the names of the fields.
Right now this is limited to 2D or 3D 32 bit fields on ESMF_Grids with the ability to broadcast (to borrow from numpy) 2D fields into 3D fields when doing an operation involving a pair of fields that have the same grid but one is 2D, other 3D with a single ungridded dimension.
Assuming the that +-/*^ are overloaded for fields on any GEOM/rank/type, as well as current supported Fortran intrinsic or single argument functions I see no reason why this should not be very easy to generalize the code to work on fields regardless of rank like @darianboggs has been going for other things.
Besides History, the arithmetic expression parser is an integral part of my ExtData/History testing framework to fill fields from a "menu" of available fields to the user. Indeed, without it my testing framework would not work. I was updating ExtDataDriver.x to be able to run on a "tile" grid to use as a tester when I update ExtData to handle tiled fields, but the one stumbling block is that it will fall flat when using the expression parser since the fields on tiles are 1D (but still on a grid remember, NOT a locstream), with some number of undistributed dimensions
I've just made a PR that should allow me to fix this issue.
The text was updated successfully, but these errors were encountered:
The current MAPL arithmetic parser can perform element-wise operations on any combination of supported fields on the obviously same grid ( including layout, otherwise this wouldn't make sense!) given character expression involving the names of the fields.
Right now this is limited to 2D or 3D 32 bit fields on ESMF_Grids with the ability to broadcast (to borrow from numpy) 2D fields into 3D fields when doing an operation involving a pair of fields that have the same grid but one is 2D, other 3D with a single ungridded dimension.
Assuming the that +-/*^ are overloaded for fields on any GEOM/rank/type, as well as current supported Fortran intrinsic or single argument functions I see no reason why this should not be very easy to generalize the code to work on fields regardless of rank like @darianboggs has been going for other things.
Besides History, the arithmetic expression parser is an integral part of my ExtData/History testing framework to fill fields from a "menu" of available fields to the user. Indeed, without it my testing framework would not work. I was updating ExtDataDriver.x to be able to run on a "tile" grid to use as a tester when I update ExtData to handle tiled fields, but the one stumbling block is that it will fall flat when using the expression parser since the fields on tiles are 1D (but still on a grid remember, NOT a locstream), with some number of undistributed dimensions
I've just made a PR that should allow me to fix this issue.
The text was updated successfully, but these errors were encountered: