Masking added to ESMF regridding for samplers incompatible with external code #3280
Labels
0 Diff
The changes in this pull request have verified to be zero-diff with the target branch.
❗ High Priority
This is a high priority PR
❓ Question
Further information is requested
A while ago for @metdyn sampler work we added made use of the masking capability in ESMF regridding to handle the geostationary sampler. When creating a grid, we added a mask, anywhere the satellite sees is set to a constant
MAPL_MASK_IN
and everywhere elseMAPL_MASK_OUT
, via enumerators so assuming these are 0 and 1. Then when creating theESMF_RouteHandle
we say set anywhere that isMAPL_MASK_OUT
toMAPL_UNDF
if a mask is present in the destination grid.Turns out this is problem for UFS. Remember here the grid is passed in from outside and they have a land/ocean mask which are 0 and 1 so the it says, oh the grid has a mask, I'll mask, but in this case we do not want to be masking based on this for the emissions since this is for GOCART.
I'm not sure best solution. Clearly this is dangerous. Dusan suggested, making our mask or there's just different values from 0/1 but that's just relying on coincidence so seems not the ideal solution
How about this, what if in our own grid factory when the mask is set, we also set an attribute on the grid, saying the values to mask out. So in the MAPL/ESMF regridding layer the grid just have BOTH a mask and an attribute saying what values to mask. So if the UFS grid doesn't set this, even if there is a mask, it won't be applied to the
ESMF_RouteHandle
unless this attribute is set.The text was updated successfully, but these errors were encountered: