read_FES_model.py: explicit definition of hc.mask fails on NaN fill_value
Hi,
in read_FES_model.py at the very end of read_netcdf_file you explicitly set the mask using
hc.mask = (amp.data == amp.fill_value) | (ph.data == ph.fill_value)
However, this doesn't work if fill_value is np.nan as comparing to nan is always false. Moreover, this is just creating the problem at all. When you read amp and ph using the NetCDF4 module, they are already masked arrays. So, calculating hc from these masked arrays already sets the mask correctly. On the next line, however, this correct mask is overwritten (without any need), causing this bug.
I suggest to simply remove #-- set masks and the following line from read_netcdf_file in read_FES_model.
You're right. That's a problem. I'll get this fixed today