Problem when points in mask do not match fields
Open
Problem when points in mask do not match fields
Created by: katavouta
When use copernicus fields (CMEMS-GLOBAL_ANALYSIS_FORECAST_PHY_001_024) I noticed that the downloaded mask wet points do not match exactly the wet points in the fields (particularly for U and V). I solved this problem by generating my own masks based on the fields, however, I thought that I should probably flag this issue with pynemo and mismatches in fields-masks:
When using pynemo with these masks (that do not match exactly with the wet points in the fields) I get high negative values, for example value of -20.0103 in U and V fields in near these mismatch points, but also some negative values that gradually become less negative close to these mismatch points. This makes me believe that pynemo may use a fillValue to fill these points that they seem wet in the mask and then use this unrealistic fillValue in the interpolation. It may worth to check if this is the case and a general issue with mismatches in masks-fields.
Created by: jdha
Is there a wet mask for each individual grid? I guess one way around it would to be generate a mask feed based on the _FillValue attributed to the variable in the netCDF file... but this method would only work if either _FillValue or missing_value existed.
I guess another crude way of addressing this would be to check for an acceptable range of values ... but that becomes difficult when setting up boundary conditions for tracers other than T/S.
Created by: jdha
... sorry just re-read the comment - as you say: it appears that the issue is with the CMEMS data not being valid at the masked wet points... sounds like you'll have to pre-process a new mask from the _FillValue field in the data. I'll try an add some additional error handling to flag potential problems ... but as you've found: the interpolation onto a regular grid employed in the CMEMS data may only produce small erroneous values that are harder to detect. I'll have a think...