wolfhece.mar.commontools

Created on Mon Dec 5 09:03:34 2022

@author: jbrajkovic

Module Contents

wolfhece.mar.commontools.openfile(fileloc, col)[source]
wolfhece.mar.commontools.openfileh(fileloc, col)[source]
wolfhece.mar.commontools.isbis(year)[source]
wolfhece.mar.commontools.seasonalmeans(fileloc, col, start_year, end_year, mod, season)[source]
wolfhece.mar.commontools.seasonalsums(fileloc, col, start_year, end_year, mod, season)[source]
wolfhece.mar.commontools.text_into_matrix(model_name, scenario, mx, my, sy, ey)[source]

This function reads precipitation text files to put all of it in a 3D matrix of yearly precipitation

wolfhece.mar.commontools.slidingmeans(TS, interval, std_or_mean=1)[source]
wolfhece.mar.commontools.RGPD(vec, shape, scale, pu, teta, th)[source]
wolfhece.mar.commontools.GPD_frequency(valu, shape, scale, pu, teta, th, events_per_year)[source]
wolfhece.mar.commontools.RGPDI_values(vec, shape, scale, th)[source]
wolfhece.mar.commontools.RGPD_values(vec, shape, scale)[source]
wolfhece.mar.commontools.CIGPD(vec, shape, scale, pu, teta, th, varsc, varsh, cov)[source]
wolfhece.mar.commontools.JJ2date(day, year)[source]
wolfhece.mar.commontools.date2JJ(day, month, year, fn1='__', type_mod=2)[source]
wolfhece.mar.commontools.makebounds(mat, step)[source]
wolfhece.mar.commontools.map_belgium(ax, lons, lats)[source]
wolfhece.mar.commontools.map_belgium_J21(ax, lons, lats)[source]
wolfhece.mar.commontools.map_Vesdre(ax, lons, lats)[source]
wolfhece.mar.commontools.map_belgium_zoom(ax, lons, lats)[source]
wolfhece.mar.commontools.map_Europe(ax, lons, lats)[source]
wolfhece.mar.commontools.mean_netcdf_alldomain(start_year, end_year, direct, var)[source]
wolfhece.mar.commontools.quick_map_plot(lons, lats, mat, bounds, cmap, MSK=np.zeros(0), nticks=4)[source]
wolfhece.mar.commontools.quick_map_plot2(lons, lats, mat, bounds, cmap, ax)[source]
wolfhece.mar.commontools.mask_belgium(lon, lat, path_in, path_out, center_or_all=2)[source]
This routine takes as arguments:

-The longitudes and latitudes of the netcdf (gridded) -a .tif file of the mask we want to create (tif must be in epsg:31370 lambbert 72)

and creates a mask at the resolution of the input netcdf which is saved as netcdf in path_out

L’option center_or_all precise si l’on souhaite qu’un des 4 coins des pixels chosisis soient à l’intérieur de la zone ou si on regarde uniquement le centre. Si center_or_all vaut 1, on ragarde uniquement le centre et donc le masque sera plus petit

conseil : raster d’une résolution 100 mètres en input’

wolfhece.mar.commontools.mask_belgiumV2(lon, lat, path_in, path_out, center_or_all=2, discheck=300000, buffer=2)[source]
This routine takes as arguments:

-The longitudes and latitudes of the netcdf (gridded) -a .tif file of the mask we want to create (tif must be in epsg:31370 lambbert 72)

and creates a mask at the resolution of the input netcdf which is saved as netcdf in path_out

L’option center_or_all precise si l’on souhaite qu’un des 4 coins des pixels chosisis soient à l’intérieur de la zone ou si on regarde uniquement le centre. Si center_or_all vaut 1, on ragarde uniquement le centre et donc le masque sera plus petit

conseil : raster d’une résolution 100 mètres en input’

wolfhece.mar.commontools.dis2pix(lat1, lon1, lat2, lon2)[source]
wolfhece.mar.commontools.anomaly_cmap()[source]
wolfhece.mar.commontools.grid_mean(folder, year, var, season, sum_or_mean=0, nts=24, lev=0, nf=0, fn1='__')[source]
wolfhece.mar.commontools.find_pix_be(lon_p, lat_p, lons, lats)[source]
wolfhece.mar.commontools.find_MARs_closest_pixel(lonsm, latsm, lonsi, latsi, neighbours=1)[source]
wolfhece.mar.commontools.IPCC_cmap()[source]
wolfhece.mar.commontools.draw_cities(m, fs_c=14, fs_C=16)[source]
wolfhece.mar.commontools.draw_stations(m, n_id=1, fs=8)[source]
wolfhece.mar.commontools.box_plot(data, edge_color, fill_color, ax)[source]
wolfhece.mar.commontools.endmonth(year)[source]
wolfhece.mar.commontools.radar_coord()[source]
wolfhece.mar.commontools.marray(ds, var)[source]
wolfhece.mar.commontools.marrayV2(ds, var)[source]
wolfhece.mar.commontools.RGEV(retp, nyears, loc, sca, sha)[source]
wolfhece.mar.commontools.GEV_frequency(value, loc, sca, sha)[source]
wolfhece.mar.commontools.GEVCI(retp, loc, sc, sh, varloc, varsc, varsh, covlocsc, covlocsh, covscsh)[source]
wolfhece.mar.commontools.gumCI(retp, loc, sc, varloc, varsc, covlocsc)[source]
wolfhece.mar.commontools.RGum(retp, nyears, loc, sca)[source]
wolfhece.mar.commontools.Gum_frequency(value, loc, sca)[source]
wolfhece.mar.commontools.extreme_matrix(fn, ret_per=20, value=50, mx=80, my=50, abs_or_retour=1, ydays=365, start_year=2011, end_year=2040, nts=24, gpd_gev_gum=0)[source]
wolfhece.mar.commontools.extreme_matrix_V2(fn, ret_per=20, value=50, mx=80, my=50, abs_or_retour=1, ydays=365, start_year=2011, end_year=2040, nts=24, gpd_gev_gum=0, unst_st=0, var_unst='MKam', y_unst=2021)[source]
wolfhece.mar.commontools.find_clusters(TS1)[source]
wolfhece.mar.commontools.df_from_file(fn)[source]