Open abby-baskind opened 2 years ago
Can you print the dataset? I suspect that there are no coordinates, but it just counts from 0-360. Id be able to say more when I see the dataset.
Using the lat and lon from fgco2 to plot PCO2 doesn't make sense to me. As @jbusecke says, does PCO2 have lat and lon? If so, you should use them to plot that variable. There must be a mismatch between the coordinates for fgco2 and PCO2, which is what is muddling them when you try to use them together. You will see the mismatch in the coordinates if you plot them both independently just with pcolormesh
i.e. not with cartopy, and you should see that the continents are not appearing in the same place.
If PCO2 does have coordinates, you can just use them to plot, and use the fgco2 coordinates to plot fgco2 - then they will both be mapped to the correct locations.
If not, and you need to use the fgco2 coordinates for PCO2, then you will need to "roll" PCO2 along the x-axis in order to match them up. You can do this with PCO2.roll(x=A)
, where x is the name of the x dimension, and A is the number of indices that you need to shift.
hey @gmacgilchrist
here's the issue I've been having plotting a map of the PCO2 from chen. I tried it a few different ways
I get a fun little error, basically saying the shapes don't match up, and nothing gets plotted.
It plots (yay!) but clearly the coordinates get screwed up. For example, there's a huge blank spot over by Australia that clearly should be where South America is.
And it's the same issue as the last attempt. Any idea on the way around this?