Hi! I’m trying to plot a few figures by running code on a compute node (not ARE) and using the analysis3 environment. When trying to plot coastlines, I get Network is unreachable. I imagine this is because compute nodes don’t have access to the internet and coastlines() needs to download something.
Does anyone have a workaround for this? Something that does not require using ARE?
Aidan
(Aidan Heerdegen, ACCESS-NRI Release Team Lead)
2
Hi @paocorrales, if you are looking for a quick fix, the land sea mask is written out as part of most model runs. You can read that field in and do a contour (with level =0.5) to get a coastline from the actual data you use.
This is actually more accurate when you are comparing different resolutions as well because you can see the degradation of the features in the coastline as you go to coarser data.
Yes, completely agree with Chermelle for this! Where cartopy puts its coastlines is not necessarily where the model has coastlines, especially at coarse resolution, so for scientific analysis it is often better to derive a coastline out of the landmask.
I’m not sure what would be best in this particular scenario, as on the one hand we want nice shiny graphics for the AM3 n512 poster, but on the other hand we are trying to compare resolutions! I would probably lean to cartopy for this, but for our analysis plots take the coastline out of the model.
Absolutely agree with this; it’s usually my go-to for model runs. In this case, I’m helping someone else trying to plot ERA5 data, only as a first test.
Funny enough, it’s working out of the box today. I’ll check with the other person and hopefully mark this as solved.