Skip to content

Commit

Permalink
Code update
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptisteVandecrux committed Jul 4, 2023
1 parent 69991af commit d66c0ce
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 1_data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def interp_pandas(s, kind="quadratic"):
df_swc["reference_short"] = ["Ohmura et al. (1992)"]*3
df_swc[
"reference"
] = ["Ohmura, A. and 10 others. 1992; Energy and Mass balance during the melt season at the equilibrium line altitude, Paakitsoq, Greenland ice sheet. Zürich, Swiss Federal Institute of Technology. (ETH Greenland Expedition. Progress Report 2.)"]*3
] = ["Ohmura, A., Steffen, K., Blatter, H., Greuell, W., Rotach, M., Stober, M., Konzelmann, T., Forrer, J., Abe-Ouchi, A., Steiger, D. and Niederbaumer, G.: Energy and mass balance during the melt season at the equilibrium line altitude. Paakitsoq, Greenland ice sheet: Progress report, 2, 1992."]*3

df_swc["method"] = ["NA"]*3
df_swc["durationOpen"] = ["NA"]*3
Expand Down
14 changes: 7 additions & 7 deletions 4_RCM_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
# ds_ann = ds_ann.rio.reproject(target_crs)


# %% Extracting model values at observation sites
# Extracting model values at observation sites
# finding observation coordinate in RACMO's CRS
df.date = pd.to_datetime(df.date)
df["x"], df["y"] = transform(
Expand Down Expand Up @@ -417,8 +417,8 @@ def get_distance(point1, point2):
latitude=site_list.loc[site, "lat"],
method="nearest").to_dataframe().resample("Y").mean()
df_ANN_interp = np.interp(df_select.date, df_ANN.index, df_ANN.T10m)
MD = np.sqrt(np.mean((df_ANN_interp - df_select.temperatureObserved) ** 2))
RMSD = np.mean((df_ANN_interp - df_select.temperatureObserved))
RMSD = np.sqrt(np.mean((df_ANN_interp - df_select.temperatureObserved) ** 2))
MD = np.mean((df_ANN_interp - df_select.temperatureObserved))
N = df_select.temperatureObserved.notnull().sum()
print("%s, %i, %0.1f, %0.1f" % (site, N, RMSD, MD))

Expand Down Expand Up @@ -954,10 +954,10 @@ def plot_selected_ds(tmp_in, ax, label, mask=0, trend_line=False):
def table_selected_ds(tmp_in,label, mask=0):
# tmp.plot(ax=ax, color='black', label='_no_legend_',alpha=0.3)
tmp_in = tmp_in.resample("Y").mean()
# y1 = [1980, 2010]
# y2 = [1990, 2020]
y1 = [1950, 2017]
y2 = [1960, 2022]
y1 = [1980, 2010]
y2 = [1990, 2020]
# y1 = [1950, 2017]
# y2 = [1960, 2022]

for i in range(len(y1)):
tmp = tmp_in.loc[str(y1[i]):str(y2[i])]
Expand Down
Binary file modified figures/figure2_histograms.pdf
Binary file not shown.
Binary file modified figures/figure2_histograms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/figure3.pdf
Binary file not shown.
Binary file modified figures/figure3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/figure5_site_comp.pdf
Binary file not shown.
Binary file modified figures/layers_and_nodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified figures/learning_curve_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d66c0ce

Please sign in to comment.