NCAS-CMS / NCAS-CMS/cf-python

2D lat-lon coordinates calculation for CF-supported projections

Aperta
#628 1 commento 1 reazione 1 assegnatario Vedi su GitHub

@sadielbartholomew ci sta già lavorando.

Dal 29/3/2023.

enhancement
Lingua principale
Python
Stelle
150
Fork
23
Merge medio
1g 11h
PR unite (30g)
2

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.