Add, as a new feature, functionality which creates corresponding 2D latitude and longitude coordinates (as outputs) from 1D projection coordinates and coordinate reference parameters (as inputs), considering bounds if they are relevant.
This is a useful and important feature, above all, because regridding explicitly requires knowledge/input of the 2D lat-lon coordinates when considering fields with coordinates defined by a projection, even though they are superfluous and hence optional for projection cases, so the feature would allow us to support the full set of CF-supported projections in regridding operations.
Implementation plans and notes
Achieve the above by making use of the pyproj library (see below) as a new dependency to cf-python, assuming it is capable of effectively and efficiently enabling us to do so (determine this first ideally, or if necessary during the process!). It will be needed to convert from 1D projection coordinates to the 2D lat-lon coordinates they correspond to for the given projection.
Should only need (as sufficient) to cover the projections supported by the CF Conventions (see reference below RE Appendix F).
Probably this will ultimately be (user-facing wise) in the form of a new function called create_2D_lats_and_lons or similar, analogous to the already-existing create_bounds method, which will be linked up to the regridding methods to ensure they utilise the created coordinates to regrid where applicable.
As a subsidiary issue, there is current functionality that manages as a special case of this problem the conversion from rotated poles to regular lats and lons, which we will want to subsume into this new feature to avoid duplication of effectively the same functionality for the special case. This could be done after the main work, or as part of it.
Relevant standards and libraries
PROJ (previously called PROJ.4), a cartographic projections and coordinate transformations library/standard: see e.g. the documentation here;
pyproj library, a Python interface to PROJ: see e.g. it on PyPI, GitHub;
(obviously!) the CF Conventions, with relevant chapters being:
Add, as a new feature, functionality which creates corresponding 2D latitude and longitude coordinates (as outputs) from 1D projection coordinates and coordinate reference parameters (as inputs), considering bounds if they are relevant.
This is a useful and important feature, above all, because regridding explicitly requires knowledge/input of the 2D lat-lon coordinates when considering fields with coordinates defined by a projection, even though they are superfluous and hence optional for projection cases, so the feature would allow us to support the full set of CF-supported projections in regridding operations.
Implementation plans and notes
create_2D_lats_and_lons
or similar, analogous to the already-existingcreate_bounds
method, which will be linked up to the regridding methods to ensure they utilise the created coordinates to regrid where applicable.Relevant standards and libraries