Skip to content

Commit

Permalink
reorganize
Browse files Browse the repository at this point in the history
  • Loading branch information
khider committed Jun 13, 2024
1 parent beb3b34 commit e05b80b
Show file tree
Hide file tree
Showing 4 changed files with 1,670 additions and 1,253 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ Recently, [Steinman et al. (2022)](https://www.pnas.org/doi/full/10.1073/pnas.21

This Cookbook is broken down into three main sections. The first section performs the PCA analysis on the output of the CESM LME simulation. The second section performs the same analysis on paleoclimate observations. The last section compares the two analyses.

### PCA analysis on proxy observations

The section shows the query used to obtain relevant proxy datasets from a graphDB mirroring the LiPDverse data, filtering for records that cover at least 1500 of the last 2000 years with a resolution better than 60 years, and running PCA.

### PCA analysis on the CESM Last Millennium Analysis¶

The section walks through fetching the data from JetStream2, calculating the precipitation d18O and running PCA.

### PCA analysis on proxy observations

The section shows the query used to obtain relevant proxy datasets from a graphDB mirroring the LiPDverse data, filtering for records that cover at least 1500 of the last 2000 years with a resolution better than 60 years, and running PCA.

### Model Data Comparison

Expand Down
64 changes: 32 additions & 32 deletions notebooks/.virtual_documents/notebook-template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,38 +144,6 @@ eof1 = solver.eofsAsCovariance(neofs=3)



clevs = np.linspace(-1, 1, 20)
proj = ccrs.PlateCarree(central_longitude=290)
fig, ax = plt.subplots(figsize=[10,4], subplot_kw=dict(projection=proj))
ax.coastlines()
eof1[0].plot.contourf(ax=ax, levels = clevs, cmap=plt.cm.RdBu_r,
transform=ccrs.PlateCarree(), add_colorbar=True)
fig.axes[1].set_ylabel('')
fig.axes[1].set_yticks(np.arange(-1,1.2,0.2))
ax.set_title('EOF1 expressed as covariance', fontsize=16)
plt.show()





pcs = solver.pcs(npcs=3, pcscaling=1)


fig, ax = plt.subplots(figsize=[20,4])
pcs[:, 0].plot(ax=ax, linewidth=1)

ax = plt.gca()
ax.axhline(0, color='k')
ax.set_ylim(-3, 3)
ax.set_xlabel('Year')
ax.set_ylabel('Normalized Units')
ax.set_title('PC1 Time Series', fontsize=16)








Expand Down Expand Up @@ -409,6 +377,38 @@ pca.modeplot(index=2)



clevs = np.linspace(-1, 1, 20)
proj = ccrs.PlateCarree(central_longitude=290)
fig, ax = plt.subplots(figsize=[10,4], subplot_kw=dict(projection=proj))
ax.coastlines()
eof1[0].plot.contourf(ax=ax, levels = clevs, cmap=plt.cm.RdBu_r,
transform=ccrs.PlateCarree(), add_colorbar=True)
fig.axes[1].set_ylabel('')
fig.axes[1].set_yticks(np.arange(-1,1.2,0.2))
ax.set_title('EOF1 expressed as covariance', fontsize=16)
plt.show()





pcs = solver.pcs(npcs=3, pcscaling=1)


fig, ax = plt.subplots(figsize=[20,4])
pcs[:, 0].plot(ax=ax, linewidth=1)

ax = plt.gca()
ax.axhline(0, color='k')
ax.set_ylim(-3, 3)
ax.set_xlabel('Year')
ax.set_ylabel('Normalized Units')
ax.set_title('PC1 Time Series', fontsize=16)








Expand Down
Loading

0 comments on commit e05b80b

Please sign in to comment.