Database Assembly using cfr’s built in PAGES 2k database#
This notebook walks through the process of building a proxy database containing only the PAGES2k Phase 2 (PAGES2kv2) proxy records. This is the most straighforward and shortest way to obtain a ProxyDatabase to use for an emulation of LMRv2.1.
Key steps include:
Filtering for annual and subannual records with sufficient temporal coverage
Optionally filtering by archive type used in Tardif et al. (2019)
The final result is saved as a NetCDF file that can be used in subsequent data assimilation notebooks.
import cfr
octave not found, please see README
Use cfr’s .fetch()
to pull PAGES2kv2 from the cloud#
This is a ProxyDatabase
object
pdb = cfr.ProxyDatabase().fetch('PAGES2kv2')
Use ProxyDatabase.filter()
to filter by resolution#
We want only annual and subannually resolved records, hence dt ≤ 1.2 (a little higher than 1.0 as buffer)
filtered_pdb = pdb.filter(by='dt', keys= (0.0,1.2))
(Optional) Use the same filtering method for archive type#
Instead of dt, we use ptype to specify which archives we want used. This eliminates certain records despite being annual/subanually resolved.
filtered_pdb_2= filtered_pdb.filter(by='ptype', keys=['coral', 'tree', 'bivalve', 'ice', 'lake.varve_thickness', 'lake.varve_property', 'lake.accumulation'])
print(len(filtered_pdb.records))
print(len(filtered_pdb_2.records))
571
558
Save as a netCDF file to use in the data assimilation workflow#
filtered_pdb.to_nc('./prev_data/filtered_res_cfr_pages2kv2.nc')
>>> Warning: this is an experimental feature.
>>> Warning: this is an experimental feature.
100%|██████████| 571/571 [00:19<00:00, 29.11it/s]
>>> Data before 1 CE is dropped for records: ['NAm_019', 'Arc_026', 'NAm_011', 'Ant_010', 'Eur_003', 'Ant_007', 'Ant_028', 'Arc_033', 'SAm_030', 'Arc_032', 'Arc_002', 'Aus_001', 'Arc_020', 'Arc_022', 'Arc_004', 'Eur_006'].
ProxyDatabase saved to: ./prev_data/filtered__res_cfr_pages2kv2.nc
filtered_pdb_2.to_nc('./prev_data/filtered_ptype_res_cfr_pages2kv2.nc')
>>> Warning: this is an experimental feature.
>>> Warning: this is an experimental feature.
100%|██████████| 558/558 [00:18<00:00, 30.24it/s]
>>> Data before 1 CE is dropped for records: ['NAm_019', 'Arc_026', 'NAm_011', 'Ant_010', 'Eur_003', 'Ant_007', 'Ant_028', 'Arc_033', 'Arc_032', 'Arc_002', 'Aus_001', 'Arc_020', 'Arc_022', 'Arc_004', 'Eur_006'].
ProxyDatabase saved to: ./prev_data/filtered__ptype_res_cfr_pages2kv2.nc