marbl-ecosys / HiRes-CESM-analysis

Notebooks and tools for validating the 0.1 degree POP / CICE run with ocean BGC
http://hires-cesm-analysis.dokku.projectpythia.org/Interactive_Dashboard
5 stars 7 forks source link

address issues arising from land-block elimination #20

Open matt-long opened 4 years ago

matt-long commented 4 years ago

The coordinates in the history files (i.e., TLAT, TLONG) have missing values due to land block elimination. I have found this problematic for making plots in geophysical space.

In previous cases (i.e., the ASD run) with land block elimination, where the _FillValues were not being set, I found it sufficient to simply mask the data appropriately: https://gist.github.com/matt-long/018ac5a24d82a7f1812f0a067d5dbe0e

Should we consider automating the replacement of coordinates with a call to pop_tools.get_grid?

This is what I did recently to make some plots.

grid = pop_tools.get_grid('POP_tx0.1v3')
case = utils.CaseClass('g.e22.G1850ECO_JRA_HR.TL319_t13.004')
stream = "pop.h"
case._open_history_files(stream)
ds = case.history_contents[stream]
for v in grid.data_vars:
    ds[v] = grid[v]