Skip to content

Commit 3265e9c

Browse files
committed
small update fig 4
1 parent 266d351 commit 3265e9c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

figures/figure4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ def check_lens(dic):
270270

271271
cbar_ax.set_visible(False)
272272
# cbar.ax.xaxis.set_label_position('right')
273-
cbar.ax.set_ylabel('$^{\circ}$C', fontsize=fs, rotation=-90)
273+
cbar.ax.set_ylabel('$^{\circ}$C', fontsize=fs, rotation='horizontal')
274+
cbar.ax.yaxis.set_label_coords(-0.1, -0.3)
274275
cbar.ax.tick_params(labelsize=fs)
275276

276277
#legend

figures/merTf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def nearest_int(T, latm, lonm, lond, latd, res='HR'):
132132
Td = griddata(points, values, (lond, latd), method='nearest')
133133
return Td.flatten()
134134

135-
def model_uncertainty(T, latm, lonm, lond, latd, deg = 2, res='HR'):
135+
def model_uncertainty(T, latm, lonm, lond, latd, deg = 3, res='HR'):
136136
# deg determines the degree box that is used to calculate the uncertainty
137137
# in the model due to the paleolocation
138138
# first nearest interpolate land values
@@ -157,9 +157,12 @@ def model_uncertainty(T, latm, lonm, lond, latd, deg = 2, res='HR'):
157157
for i in range(len(resl)):
158158
distances = (lond[i]-lonmf)**2+(latd[i]-latmf)**2
159159
arg = np.argmin(distances)
160-
idx = np.where(np.logical_and(np.logical_and(np.logical_and(lonmf>=lonmf[arg]-deg,lonmf<=lonmf[arg]+deg),
161-
latmf>=latmf[arg]-deg),
162-
latmf<=latmf[arg]+deg))
160+
# idx = np.where(np.logical_and(np.logical_and(np.logical_and(lonmf>=lonmf[arg]-deg,lonmf<=lonmf[arg]+deg),
161+
# latmf>=latmf[arg]-deg),
162+
# latmf<=latmf[arg]+deg))
163+
dist = np.sqrt((lonmf-lonmf[arg])**2+(latmf-latmf[arg])**2)
164+
165+
idx = np.where(dist<=deg)
163166
resl[i] = np.min(T[idx])
164167
resh[i] = np.max(T[idx])
165168

0 commit comments

Comments
 (0)