MetOffice / CATNIP

Climate Analysis Tool: Now In Python
Other
5 stars 2 forks source link

Ability to define custom projection. #166

Open thomascrocker opened 3 years ago

thomascrocker commented 3 years ago

This PR adds the ability to explicitly set the projection used to produce the plot. The prior behaviour simply used the projection of the supplied data. It addresses https://github.com/MetOffice/CATNIP/issues/164 If the user specifies a projection that is different to that of the supplied data, the data is transformed onto the new projection. Also if the data does not have a co-ordinate system (e.g. most of the CMIP5 data under /project/champ) PlateCarree is assumed.

Lastly I removed the try clauses around getting the x and y coords, since if a coord not found error is ignored here it will almost certainly cause problems further on but be harder to debug.