How to handle large files
import pyaerocom as pya
from warnings import filterwarnings
filterwarnings('ignore')
pya.change_verbosity('critical', log=pya.const.print_log)
pya.__version__
NOTE: YOU NEED PYAEROCOM v0.8.1.dev4 or larger for this
DATA_DIR = '/home/notebook/shared-ns1000k/inputs/pyaerocom-testdata/modeldata/MIROC-SPRINTARS_AP3-CTRL/renamed/'
LARGE_FILE = 'aerocom3_MIROC-SPRINTARS_AP3-CTRL_ec550aer_ModelLevel_2010_6hourly.nc'
This file has 64 GB filesize
data = pya.GriddedData(DATA_DIR + LARGE_FILE, var_name='ec550aer')
data
data_surf = data.extract_surface_level()
data_surf_cropped = data_surf.crop(time_range=(4, 8), lat_range=(66, 90))
data_surf_cropped
data_surf_cropped.to_netcdf('.', 'SPRINTARS_extract.nc')
reloaded_subset = pya.GriddedData('SPRINTARS_extract.nc')
reloaded_subset
reloaded_subset.quickplot_map();