This pull request does many things to improve the mapping tool, and break down the steps into functions required for preprocessing and analysis.
Masking Improvements:
Implements a land-fraction based masking routine from an external source for North America coastlines
Implements a masking routine that disqualifies any ensemble member grid cell that is NaN
Combines these masks into a master mask that can be used for the entire ensemble
Provides a method to convert this mask to the ensemble shaped array, retaining the indices in this shape that correspond to a qualified grid cell
Gridding observations:
Using the rlon and rlat arrays of different sizes from the CanRCM4 models, create ordered pairs of the grid locations in rotated pole coordinates. This is in the function rlat_rlon_to_ens()
Using the lat and lon 2D grid arrays, look up the corrected (regular) latitudes and longitudes corresponding to the given iso-rotated longitudinal and iso-rotated latitudinal grid position.
Finds the index of the smallest euclidean distance between a meteorological station's latitude and longitude, and uses that to find the ensemble grid cell corresponding to that observation.
Cleanup
Removes old MapXtremePCIC.py file containing outdated OOP version of this software.
Demo
Improves explanations of steps to actually carry out EOF analysis from start to finish in jupyter .ipynb notebook.
This pull request does many things to improve the mapping tool, and break down the steps into functions required for preprocessing and analysis.
Masking Improvements:
NaN
Gridding observations:
rlon
andrlat
arrays of different sizes from theCanRCM4
models, create ordered pairs of the grid locations in rotated pole coordinates. This is in the functionrlat_rlon_to_ens()
lat
andlon
2D grid arrays, look up the corrected (regular) latitudes and longitudes corresponding to the given iso-rotated longitudinal and iso-rotated latitudinal grid position.Cleanup
MapXtremePCIC.py
file containing outdated OOP version of this software.Demo
.ipynb
notebook.