The `xesmf`is only necessary for the 'NSIDC' definition.
For a quick use, only the `src/tbxsectors.py` file is necessary, but the NSIDC definition will not be available then.
For those wishing to use NSIDC, make sure `xesmf` is installed and download the `data/NSIDC-0780_SeaIceRegions_PS-N3.125km_v1_wLatLon_df1.nc` netCDF file containing the NSIDC mask. Set it in your current working directory, or provide the path and name of the file to the `groupby_sectors` function.
For those wishing to use NSIDC, make sure `xesmf` is installed and download the `data/NSIDCRegions_N3.125km_v1.1_wLatLon_df1.nc` netCDF file containing the NSIDC mask. Set it in your current working directory, or provide the path and name of the file to the `groupby_sectors` function.
## Further details
The Koenigk et al. (2016), Årthun et al. (2021), Zwally et al. (1983) and Raphael & Hobbs (2014) are all based on simple latitude and longitude values, so can be applied with pure pythonic functions and conditions to any grid.
The NSIDC definition is more complexe and doesn't follow meridians or parallels: it is based on a mask provided by the NSIDC (see https://nsidc.org/sites/default/files/documents/technical-reference/nsidc-special-report-25.pdf and https://nsidc.org/data/nsidc-0780/versions/1).
In order to apply this definition, the mask (provided here as `data/NSIDC-0780_SeaIceRegions_PS-N3.125km_v1_wLatLon_df1.nc`) needs to be interpolated onto the grid of the user data (hence the use of `xesmf` package), before it can be used.
In order to apply this definition, the mask (provided here as `data/NSIDCRegions_N3.125km_v1.1_wLatLon_df1.nc`) needs to be interpolated onto the grid of the user data (hence the use of `xesmf` package), before it can be used.
For ELIC users, `xesmf` is only installed on coriolis at the moment. Some workaround is implemented to still be able to use the module on cyclone, but the NSIDC definition is not (yet) available there.
## Tips
If the user uses the same input grid over and over again, a significant time gain would be provided by using the `interp_mask2grid` function, then saving the interpolated mask (use the `xr.Dataset.to_netcdf('path/filename.nc')`), and finally requesting this new interpolated mask when calling the `groupby_sectors` function.
If the user uses the same input grid over and over again, a significant time gain would be provided by using the `interp_mask2grid` function, then saving the interpolated mask (use the `xr.Dataset.to_netcdf('path/filename.nc')`), and finally requesting this new interpolated mask when calling the `groupby_sectors` function, by using the `target_gd='Path/to/file/filename.nc'` argument.
## Support
Please mention any bug or issue you might be encountering. Don't hesitate to request the implementation of new sector definitions as well.