Beispiel #1
0
        '_elevation' + '.pickle', 'rb'))

#%%
# Create elevation plots for the available transects - saved as png and pickle
data.get_transect_plot(config)

# to reopen pickle file with figure:
# figx = pickle.load(open(config['root'] + config['save locations']['DirB'] + 'Transect_' + str(transect) + '.fig.pickle','rb'))
# figx.show()

#%%###################################
# EXTRACT CHARACTERISTICS PARAMETERS
######################################

# Extract all requested dimensions for the available transects and years
extract = Extraction(data, config)
extract.get_all_dimensions()
# note that extract.dimensions holds the dataframe with dimensions for the last transect after applying the function above.

dimensions = extract.get_requested_variables()

# Convert all dimensions extracted per transect location to a dataframe per dimension
extract.get_dataframe_per_dimension()

# Normalize dimensions along the x-axis
extract.normalize_dimensions()

#%%###################
# OPEN DF's
######################
# For further analysis one can load pickle files from the directory where the dataframes have been saved.
Beispiel #2
0
metadata = yaml.safe_load(open(config['inputdir'] + config['data locations']['MetaData'])) 

# Load jarkus dataset
data = Transects(config)

#%%##############################
####      EXECUTE            ####
#################################
now = datetime.now()
current_time = now.strftime("%Y-%m-%d %H:%M:%S")

cx = list(range(-3000, 9315,5))

version = 0.1

extract = Extraction(data, config) # initalize the extra class 
variables = extract.get_requested_variables() # get all variables that were requested (based on jarkus.yml file)

# get one variable to extract shape
variable = variables[0]
dimension = pickle.load(open(config['outputdir'] + config['save locations']['DirD'] + variable + '_dataframe.pickle','rb')) 

# create netcdf file
netcdf_dir = config['inputdir'] + 'extracted_parameters.nc'
ds = Dataset(netcdf_dir, 'w', format='NETCDF4')

# assign global metadata
ds.naming_authority = 'tudelft'
ds.title = 'characteristic parameters extracted from the JarKus dataset using the JAT'
ds.summary =  'The Jarkus Analysis Toolbox (JAT) was used to extract a range of characteristic parameters from the JarKus dataset. This file provides the locations of characteristic parameters in all coastal profiles measured since 1965'
ds.keywords = 'coastal profile, Jarkus, python'