Skip to content

Commit fd2e9b7

Browse files
committed
saving most recent PyGEM version before reverting to make a release for the HMA papers
1 parent 7f07c94 commit fd2e9b7

File tree

7 files changed

+507
-71
lines changed

7 files changed

+507
-71
lines changed

Farinotti_icethickness_process.ipynb

Lines changed: 378 additions & 0 deletions
Large diffs are not rendered by default.

analyze_simulation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
option_watersheds_colored = 0 # still good 11/6/2019
5252
option_runoff_monthlychange_and_components = 0 # updated - 11/20/2019
5353
runoff_erainterim_bywatershed = 0 # updated - better to export to table
54-
option_excess_meltwater_diagram = 1
54+
option_excess_meltwater_diagram = 0
5555

5656
option_startdate = 0
5757

@@ -61,7 +61,7 @@
6161
option_glaciermip_table = 0 # updated - 11/12/2019
6262
option_zemp_compare = 0 # updated - 11/6/2019
6363
option_gardelle_compare = 0 # updated - 11/6/2019
64-
option_wgms_compare = 0 # updated - 11/6/2019
64+
option_wgms_compare = 1 # updated - 11/6/2019
6565
option_dehecq_compare = 0
6666
option_uncertainty_fig = 0 # updated - 11/12/2019
6767
option_nick_snowline = 0
@@ -5776,8 +5776,8 @@ def __call__(self, value, clip=None):
57765776
# Loop through conditions:
57775777
condition_dict = OrderedDict()
57785778
condition_dict['All']= cal_data.index.values
5779-
condition_dict['All (> 1 yr)'] = (cal_data['t2'] - cal_data['t1']) >= 0.75
5780-
condition_dict['All (< 1 yr)'] = (cal_data['t2'] - cal_data['t1']) < 0.75
5779+
condition_dict['All (annual)'] = (cal_data['t2'] - cal_data['t1']) >= 0.75
5780+
condition_dict['All (seasonal)'] = (cal_data['t2'] - cal_data['t1']) < 0.75
57815781
condition_dict['Geodetic'] = cal_data['obs_type'] == 'mb_geo'
57825782
condition_dict['Glaciological'] = cal_data['obs_type'] == 'mb_glac'
57835783
condition_dict['Glaciological (annual)'] = ((cal_data['seasonal/annual'] == 'annual') &

class_climate.py

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -333,24 +333,24 @@ def importGCMvarnearestneighbor_xarray(self, filename, vn, main_glac_rgi, dates_
333333

334334
#%% Testing
335335
if __name__ == '__main__':
336-
# gcm = GCM(name='CanESM2', rcp_scenario='rcp85')
337-
gcm = GCM(name='ERA5')
338-
# gcm = GCM(name='ERA-Interim')
339-
340-
main_glac_rgi = modelsetup.selectglaciersrgitable(rgi_regionsO1=input.rgi_regionsO1, rgi_regionsO2 = 'all',
341-
rgi_glac_number=input.rgi_glac_number)
342-
dates_table = modelsetup.datesmodelrun(startyear=1980, endyear=2017, spinupyears=0,
343-
option_wateryear=input.gcm_wateryear)
344-
345-
# Air temperature [degC], Precipitation [m], Elevation [masl], Lapse rate [K m-1]
346-
gcm_temp, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.temp_fn, gcm.temp_vn, main_glac_rgi, dates_table)
347-
gcm_prec, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.prec_fn, gcm.prec_vn, main_glac_rgi, dates_table)
348-
gcm_elev = gcm.importGCMfxnearestneighbor_xarray(gcm.elev_fn, gcm.elev_vn, main_glac_rgi)
349-
if gcm.name == 'ERA-Interim' or gcm.name == 'ERA5':
350-
gcm_lr, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.lr_fn, gcm.lr_vn, main_glac_rgi, dates_table)
351-
if gcm.name == 'ERA5':
352-
gcm_tempstd, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.tempstd_fn, gcm.tempstd_vn, main_glac_rgi,
353-
dates_table)
336+
## gcm = GCM(name='CanESM2', rcp_scenario='rcp85')
337+
# gcm = GCM(name='ERA5')
338+
## gcm = GCM(name='ERA-Interim')
339+
#
340+
# main_glac_rgi = modelsetup.selectglaciersrgitable(rgi_regionsO1=input.rgi_regionsO1, rgi_regionsO2 = 'all',
341+
# rgi_glac_number=input.rgi_glac_number)
342+
# dates_table = modelsetup.datesmodelrun(startyear=1980, endyear=2017, spinupyears=0,
343+
# option_wateryear=input.gcm_wateryear)
344+
#
345+
# # Air temperature [degC], Precipitation [m], Elevation [masl], Lapse rate [K m-1]
346+
# gcm_temp, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.temp_fn, gcm.temp_vn, main_glac_rgi, dates_table)
347+
# gcm_prec, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.prec_fn, gcm.prec_vn, main_glac_rgi, dates_table)
348+
# gcm_elev = gcm.importGCMfxnearestneighbor_xarray(gcm.elev_fn, gcm.elev_vn, main_glac_rgi)
349+
# if gcm.name == 'ERA-Interim' or gcm.name == 'ERA5':
350+
# gcm_lr, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.lr_fn, gcm.lr_vn, main_glac_rgi, dates_table)
351+
# if gcm.name == 'ERA5':
352+
# gcm_tempstd, gcm_dates = gcm.importGCMvarnearestneighbor_xarray(gcm.tempstd_fn, gcm.tempstd_vn, main_glac_rgi,
353+
# dates_table)
354354
# else:
355355
# gcm_lr = np.tile(ref_lr_monthly_avg, int(gcm_temp.shape[1]/12))
356356
# # COAWST data has two domains, so need to merge the two domains
@@ -368,4 +368,18 @@ def importGCMvarnearestneighbor_xarray(self, filename, vn, main_glac_rgi, dates_
368368
# ~(input.coawst_d02_lon_min <= glac_lon <= input.coawst_d02_lon_max)):
369369
# gcm_prec[glac,:] = gcm_prec_d01[glac,:]
370370
# gcm_temp[glac,:] = gcm_temp_d01[glac,:]
371-
# gcm_elev[glac] = gcm_elev_d01[glac]
371+
# gcm_elev[glac] = gcm_elev_d01[glac]
372+
373+
#%%
374+
# # Get range of dates
375+
# rcp_scenario = 'rcp85'
376+
# gcm_names = ['bcc-csm1-1', 'CanESM2', 'CESM1-CAM5', 'CCSM4', 'CNRM-CM5', 'CSIRO-Mk3-6-0', 'FGOALS-g2', 'GFDL-CM3',
377+
# 'GFDL-ESM2G', 'GFDL-ESM2M', 'GISS-E2-R', 'HadGEM2-ES', 'IPSL-CM5A-LR', 'IPSL-CM5A-MR', 'MIROC-ESM',
378+
# 'MIROC-ESM-CHEM', 'MIROC5', 'MPI-ESM-LR', 'MPI-ESM-MR', 'MRI-CGCM3', 'NorESM1-M', 'NorESM1-ME']
379+
# for gcm_name in gcm_names:
380+
# print(gcm_name)
381+
# ds = xr.open_dataset(input.cmip5_fp_var_prefix + rcp_scenario + input.cmip5_fp_var_ending +
382+
# 'tas' + '_mon_' + gcm_name + '_' + rcp_scenario + '_r1i1p1_native.nc')
383+
#
384+
# print(' ', ds.time[0].values,
385+
# '\n ', ds.time[-1].values)

pygem_input.py

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@ def glac_fromcsv(csv_fullfn, cn='RGIId'):
128128
#rgi_glac_number = glac_num_fromrange(1,5)
129129
#rgi_glac_number = get_same_glaciers(output_filepath + 'cal_opt1/reg1/')
130130
#rgi_glac_number = get_shean_glacier_nos(rgi_regionsO1[0], 1, option_random=1)
131-
glac_no = None
131+
#glac_no = None
132132
#glac_no = glac_fromcsv(main_directory + '/../qgis_himat/trishuli_and_naltar_RGIIds.csv')
133-
#glac_no = ['15.01152']
133+
glac_no = ['15.03473']
134134
if glac_no is not None:
135135
rgi_regionsO1 = sorted(list(set([int(x.split('.')[0]) for x in glac_no])))
136136

137137
# ===== CLIMATE DATA =====
138138
# Reference period runs
139-
ref_gcm_name = 'ERA-Interim' # reference climate dataset
140-
#ref_gcm_name = 'ERA5' # reference climate dataset
139+
#ref_gcm_name = 'ERA-Interim' # reference climate dataset
140+
ref_gcm_name = 'ERA5' # reference climate dataset
141141

142142
#startyear = 1980 # first year of model run (reference dataset)
143143
#endyear = 2018 # last year of model run (reference dataset)
@@ -189,7 +189,7 @@ def glac_fromcsv(csv_fullfn, cn='RGIId'):
189189

190190
#%% ===== CALIBRATION OPTIONS =====
191191
# Calibration option (1 = minimization, 2 = MCMC, 3=HH2015, 4=modified HH2015)
192-
option_calibration = 2
192+
option_calibration = 4
193193
# Calibration datasets ('shean', 'larsen', 'mcnabb', 'wgms_d', 'wgms_ee', 'group')
194194
cal_datasets = ['shean']
195195
#cal_datasets = ['shean']
@@ -286,8 +286,8 @@ def glac_fromcsv(csv_fullfn, cn='RGIId'):
286286
# Model parameter column names and filepaths
287287
modelparams_colnames = ['lrgcm', 'lrglac', 'precfactor', 'precgrad', 'ddfsnow', 'ddfice', 'tempsnow', 'tempchange']
288288
# Model parameter filepath
289-
#modelparams_fp = output_filepath + 'cal_opt' + str(option_calibration) + '/'
290-
modelparams_fp = output_filepath + 'cal_opt2_spc_20190806/'
289+
modelparams_fp = output_filepath + 'cal_opt' + str(option_calibration) + '/'
290+
#modelparams_fp = output_filepath + 'cal_opt2_spc_20190806/'
291291

292292
#%% CLIMATE DATA
293293
# ERA-INTERIM (Reference data)
@@ -378,15 +378,24 @@ def glac_fromcsv(csv_fullfn, cn='RGIId'):
378378
option_shift_elevbins_20m = 0 # option to shift bins by 20 m (needed since off by 20 m, seem email 5/24/2018)
379379
# Dictionary of hypsometry filenames
380380
hyps_filepath = main_directory + '/../IceThickness_Farinotti/output/'
381-
hyps_filedict = {1: 'area_km2_01_Farinotti2019_10m.csv',}
381+
hyps_filedict = {1: 'area_km2_01_Farinotti2019_10m.csv',
382+
13: 'area_km2_13_Farinotti2019_10m.csv',
383+
14: 'area_km2_14_Farinotti2019_10m.csv',
384+
15: 'area_km2_15_Farinotti2019_10m.csv'}
382385
hyps_colsdrop = ['RGIId']
383386
# Thickness data
384387
thickness_filepath = main_directory + '/../IceThickness_Farinotti/output/'
385-
thickness_filedict = {1: 'thickness_m_01_Farinotti2019_10m.csv'}
388+
thickness_filedict = {1: 'thickness_m_01_Farinotti2019_10m.csv',
389+
13: 'thickness_m_13_Farinotti2019_10m.csv',
390+
14: 'thickness_m_14_Farinotti2019_10m.csv',
391+
15: 'thickness_m_15_Farinotti2019_10m.csv'}
386392
thickness_colsdrop = ['RGIId']
387393
# Width data
388394
width_filepath = main_directory + '/../IceThickness_Farinotti/output/'
389-
width_filedict = {1: 'width_km_01_Farinotti2019_10m.csv'}
395+
width_filedict = {1: 'width_km_01_Farinotti2019_10m.csv',
396+
13: 'width_km_13_Farinotti2019_10m.csv',
397+
14: 'width_km_14_Farinotti2019_10m.csv',
398+
15: 'width_km_15_Farinotti2019_10m.csv'}
390399
width_colsdrop = ['RGIId']
391400

392401
elif hyps_data == 'Huss':
@@ -440,6 +449,12 @@ def glac_fromcsv(csv_fullfn, cn='RGIId'):
440449
16: 'width_16_Huss_LowLatitudes_10m.csv',
441450
17: 'width_17_Huss_SouthernAndes_10m.csv'}
442451
width_colsdrop = ['RGI-ID','Cont_range']
452+
453+
# Debris datasets
454+
debris_fp = main_directory + '/../IceThickness_Farinotti/output/'
455+
debris_filedict = {15: 'meltfactor_15_10m.csv'}
456+
debris_colsdrop = ['RGIId']
457+
443458

444459
#%% MODEL TIME FRAME DATA
445460
# Models require complete data for each year such that refreezing, scaling, etc. can be calculated

pygemfxns_massbalance.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,12 @@ def runmassbalance(modelparameters, glacier_rgi_table, glacier_area_initial, ice
314314
# DDF based on surface type [m w.e. degC-1 day-1]
315315
for surfacetype_idx in surfacetype_ddf_dict:
316316
surfacetype_ddf[surfacetype == surfacetype_idx] = surfacetype_ddf_dict[surfacetype_idx]
317+
if input.option_surfacetype_debris == 1:
318+
print('\n\nLOAD THE MELTFACTOR DATASET over areas that are not firn\n\n')
319+
320+
if year == 0 and month == 0:
321+
print('\nDELETE ME\n surfacetype_ddf[glac_idx]:', surfacetype_ddf[glac_idx_t0])
322+
317323
bin_meltglac[glac_idx_t0,step] = surfacetype_ddf[glac_idx_t0] * melt_energy_available[glac_idx_t0]
318324
# TOTAL MELT (snow + glacier)
319325
# off-glacier need to include melt of refreeze because there are no glacier dynamics,

run_preprocessing_farinotti.py

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
pygemfxns_preprocessing.py is a list of the model functions that are used to preprocess the data into the proper format.
33
44
"""
5+
print('PROCESS FILE USING RASTERENV ENVIRONMENT')
56

67
# Built-in libraries
78
import os
89
import argparse
910
# External libraries
1011
from osgeo import gdal
11-
import geopandas as gpd
12+
#import geopandas as gpd
1213
import matplotlib.pyplot as plt
1314
import numpy as np
1415
import pandas as pd
15-
import shapely
16+
#import shapely
1617

1718
from pygeotools.lib import iolib, warplib, geolib, timelib, malib
1819

@@ -45,39 +46,43 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
4546
fig.savefig(fn, bbox_inches='tight', pad_inches=0, dpi=150)
4647

4748
#Input DEM filenames
48-
dem_ref_fn = '/Users/davidrounce/Documents/Dave_Rounce/HiMAT/DEMs/Alaska_albers_V3_mac/Alaska_albers_V3.tif'
49+
dem_ref_fn = None
50+
# dem_ref_fn = '/Users/davidrounce/Documents/Dave_Rounce/HiMAT/DEMs/Alaska_albers_V3_mac/Alaska_albers_V3.tif'
4951
thickness_fp_prefix = ('/Users/davidrounce/Documents/Dave_Rounce/HiMAT/IceThickness_Farinotti/' +
5052
'composite_thickness_RGI60-all_regions/')
51-
dem_farinotti_fp = ('/Users/davidrounce/Documents/Dave_Rounce/HiMAT/IceThickness_Farinotti/surface_DEMs_RGI60/' +
52-
'surface_DEMs_RGI60-01/')
53+
# dem_farinotti_fp = ('/Users/davidrounce/Documents/Dave_Rounce/HiMAT/IceThickness_Farinotti/surface_DEMs_RGI60/' +
54+
# 'surface_DEMs_RGI60-01/')
55+
dem_farinotti_fp_prefix = '/Users/davidrounce/Documents/Dave_Rounce/HiMAT/IceThickness_Farinotti/surface_DEMs_RGI60/'
5356
output_fp = '/Users/davidrounce/Documents/Dave_Rounce/HiMAT/IceThickness_Farinotti/output/'
5457
fig_fp = output_fp + 'figures/'
5558
if os.path.exists(output_fp) == False:
5659
os.makedirs(output_fp)
5760
if os.path.exists(fig_fp) == False:
5861
os.makedirs(fig_fp)
5962

60-
rgi_regionsO1 = [1] # RGI Order 1 regions
63+
rgi_regionsO1 = [14] # RGI Order 1 regions
6164
binsize = 10 # elevation bin (must be an integer greater than 1)
65+
dem_poorquality_switch = True # Switch to filter poor quality DEMs if another DEM is available
6266
dem_poorquality_threshold = 200 # threshold used to identify problems with Farinotti DEM
6367
option_plot_DEMsraw = True # Option to plot the raw DEMs
6468
option_plot_DEMs = False # Option to plot the masked DEMs
6569
debug = False
6670

67-
# ===== LOAD GLACIERS ======
71+
# ======
6872
glacno_wpoor_DEM = []
6973
for region in rgi_regionsO1:
7074

7175
thickness_fp = thickness_fp_prefix + 'RGI60-' + str(region).zfill(2) + '/'
76+
dem_farinotti_fp = dem_farinotti_fp_prefix + 'surface_DEMs_RGI60-' + str(region).zfill(2) + '/'
7277

7378
glacno_list = []
7479
for i in os.listdir(thickness_fp):
7580
if i.endswith('_thickness.tif'):
7681
glacno_list.append(i.split('-')[1].split('_')[0])
7782
glacno_list = sorted(glacno_list)
7883

79-
# print('\n\nDELETE ME - SWITCH TO COMPLETE LIST\n\n')
80-
# glacno_list = ['01.03622']
84+
# print('\n\nDELETE ME - SWITCH TO COMPLETE LIST\n\n')
85+
# glacno_list = ['15.02228']
8186
# glacno_list = glacno_list[10000:10010]
8287

8388
# Load RGI glacier data
@@ -97,32 +102,39 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
97102
main_glac_width['RGIId'] = main_glac_rgi.RGIId.values
98103
main_glac_length['RGIId'] = main_glac_rgi.RGIId.values
99104
main_glac_slope['RGIId'] = main_glac_rgi.RGIId.values
100-
105+
101106
# ===== PROCESS EACH GLACIER ======
102107
for nglac, glacno in enumerate(glacno_list):
103108
# print(nglac, glacno)
104109
thickness_fn = thickness_fp + 'RGI60-' + glacno + '_thickness.tif'
105110
dem_farinotti_fn = dem_farinotti_fp + 'surface_DEM_RGI60-' + glacno + '.tif'
106-
111+
107112
# Reproject, resample, warp rasters to common extent, grid size, etc.
108113
# note: use thickness for the reference to avoid unrealistic extrapolations, e.g., negative thicknesses
109114
# also using equal area increases areas significantly compared to RGI
110-
raster_fn_list = [dem_ref_fn, dem_farinotti_fn, thickness_fn]
115+
raster_fn_list = [dem_farinotti_fn, thickness_fn]
116+
if dem_ref_fn is not None:
117+
raster_fn_list.append(dem_ref_fn)
118+
119+
print(raster_fn_list)
120+
111121
ds_list = warplib.memwarp_multi_fn(raster_fn_list, extent='intersection', res='min', t_srs=thickness_fn)
112-
# print('\n\nSWITCH BACK TO THICKNESS_FN AFTER OTHERS CORRECTED!\n\n')
113-
# ds_list = warplib.memwarp_multi_fn(raster_fn_list, extent='intersection', res='min', t_srs=dem_ref_fn)
114122

115123
# masked arrays using ice thickness estimates
116-
dem_ref_raw, dem_far_raw, thickness = [iolib.ds_getma(i) for i in ds_list]
117-
dem_ref = dem_ref_raw.copy()
118-
dem_ref.mask = thickness.mask
124+
if dem_ref_fn is not None:
125+
dem_ref_raw, dem_far_raw, thickness = [iolib.ds_getma(i) for i in ds_list]
126+
dem_ref = dem_ref_raw.copy()
127+
dem_ref.mask = thickness.mask
128+
else:
129+
dem_far_raw, thickness = [iolib.ds_getma(i) for i in ds_list]
119130
dem_far = dem_far_raw.copy()
120131
dem_far.mask = thickness.mask
121-
132+
122133
# DEM selection for binning computations
123134
# if exceeds threshold, then use the reference
124-
if (abs(main_glac_rgi.loc[nglac,'Zmin'] - dem_far.min()) > dem_poorquality_threshold or
125-
abs(main_glac_rgi.loc[nglac,'Zmax'] - dem_far.max()) > dem_poorquality_threshold):
135+
if ((abs(main_glac_rgi.loc[nglac,'Zmin'] - dem_far.min()) > dem_poorquality_threshold or
136+
abs(main_glac_rgi.loc[nglac,'Zmax'] - dem_far.max()) > dem_poorquality_threshold)
137+
and dem_ref_fn is not None):
126138
print(' Check Glacier ' + glacno + ': use Christian DEM instead of Farinotti')
127139
print('\n RGI Zmin/Zmax:', main_glac_rgi.loc[nglac,'Zmin'], '/', main_glac_rgi.loc[nglac,'Zmax'])
128140
print(' Farinotti Zmin/Zmax:', np.round(dem_far.min(),0), '/', np.round(dem_far.max(),0))
@@ -148,7 +160,7 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
148160
else:
149161
dem = dem_far
150162
dem_raw = dem_far_raw
151-
163+
152164
#Extract x and y pixel resolution (m) from geotransform
153165
gt = ds_list[0].GetGeoTransform()
154166
px_res = (gt[1], -gt[5])
@@ -212,7 +224,7 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
212224

213225
elev_bin_edges = np.arange(elev_bin_min, elev_bin_max+binsize, binsize)
214226
elev_bins = (elev_bin_edges[0:-1] + binsize/2).astype(int)
215-
227+
216228
# Hypsometry [km2]
217229
# must used .compressed() in histogram to exclude masked values
218230
hist, elev_bin_edges = np.histogram(dem.reshape(-1).compressed(), bins=elev_bin_edges)
@@ -243,6 +255,13 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
243255

244256
# Width [km] - based on length (inherently slope) and bin area
245257
bin_width = bin_hyps / bin_length
258+
259+
# Remove negative values
260+
bin_hyps[bin_hyps < 0] = 0
261+
bin_thickness[bin_thickness < 0] = 0
262+
bin_width[bin_width < 0] = 0
263+
bin_length[bin_length < 0] = 0
264+
bin_slope[bin_slope < 0] = 0
246265

247266
# Record properties
248267
# Check if need to expand columns
@@ -267,12 +286,12 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
267286
main_glac_width = main_glac_width.fillna(0)
268287
main_glac_length = main_glac_length.fillna(0)
269288
main_glac_slope = main_glac_slope.fillna(0)
270-
# Remove negative values
271-
main_glac_hyps[main_glac_hyps < 0] = 0
272-
main_glac_thickness[main_glac_thickness < 0] = 0
273-
main_glac_width[main_glac_width < 0] = 0
274-
main_glac_length[main_glac_length < 0] = 0
275-
main_glac_slope[main_glac_slope < 0] = 0
289+
# # Remove negative values
290+
# main_glac_hyps[main_glac_hyps < 0] = 0
291+
# main_glac_thickness[main_glac_thickness < 0] = 0
292+
# main_glac_width[main_glac_width < 0] = 0
293+
# main_glac_length[main_glac_length < 0] = 0
294+
# main_glac_slope[main_glac_slope < 0] = 0
276295
# Export results
277296
main_glac_hyps.to_csv(output_fp + 'area_km2_' + "{:02d}".format(region) + '_Farinotti2019_' +
278297
str(binsize) + 'm.csv', index=False)
@@ -284,12 +303,3 @@ def plot3panel(dem_list, clim=None, titles=None, cmap='inferno', label=None, ove
284303
str(binsize) + 'm.csv', index=False)
285304
main_glac_slope.to_csv(output_fp + 'slope_deg_' + "{:02d}".format(region) + '_Farinotti2019_' +
286305
str(binsize) + 'm.csv', index=False)
287-
288-
##%%
289-
#import pandas as pd
290-
#import pygem_input as input
291-
#area = pd.read_csv(input.hyps_filepath + 'area_km2_01_Farinotti2019_10m_old.csv')
292-
#thickness = pd.read_csv(input.hyps_filepath + 'thickness_m_01_Farinotti2019_10m_old.csv')
293-
#length = pd.read_csv(input.hyps_filepath + 'length_km_01_Farinotti2019_10m_old.csv')
294-
#slope = pd.read_csv(input.hyps_filepath + 'slope_deg_01_Farinotti2019_10m_old.csv')
295-
#width = pd.read_csv(input.hyps_filepath + 'width_km_01_Farinotti2019_10m_old.csv')

0 commit comments

Comments
 (0)