I would like to convert shape of dataset from general lat-lon girdded netCDF dataset to a square array on the polar stereographic projection for making training dataset for a deep learning project (Figure 1 might help you understand the question). However, I still can't figure out how to do this.. it's been over a month.
Format of dataset I have and desired shape of the dataset
First I tried making a polar stereographic plot using cartopy and matplotlib and extract array from it. So I was able to make this plot (figure 2) but extracting the square array from the figure was impossible.
I thought about just making image dataset by saving generate plots but exact number of the dataset is very important so I could not just use image dataset.
A heatmap of geopotential height on the polar stereographic projection
I would greatly apprecitate for providing any ideas for this problem.