From b90f9ddef2bebb6ee2f0cb364f96c15306b29db3 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Mon, 29 Jan 2024 09:42:56 +0100 Subject: [PATCH 1/3] moved and renamed example scripts --- .../postprocess_CMCC_plotting.py} | 0 .../postprocess_curved_quiver.py} | 0 .../postprocess_delft3D4_netcdf.py} | 0 .../postprocess_exporttoshapefile.py} | 0 .../postprocess_gethisdata_subsettinglatlon.py} | 0 .../postprocess_interpolate_edgevar_tofaces.py} | 0 .../postprocess_interpolate_uds_toplipoints.py} | 0 .../postprocess_map_monthlymean.py} | 0 .../postprocess_mapfile_inpolygon.py} | 0 .../postprocess_mapfile_to_regulargrid.py} | 0 .../postprocess_morphology.py} | 0 .../postprocess_waqua_netcdf_convertedwith_getdata.py} | 0 .../postprocess_xarray_performance.py} | 0 ...ta_oceandata.py => preprocess_download_meteodata_oceandata.py} | 0 .../preprocess_meshkernel_creategrid.py} | 0 .../preprocess_meshkernel_interpgtsm.py} | 0 .../preprocess_modelbuilder.py} | 0 .../preprocess_nestingFMtoFM.py} | 0 .../preprocess_network_1Dto2D_topology.py} | 0 .../preprocess_read_netcdf_bndfile.py} | 0 .../preprocess_write_struct_bcfile.py} | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename tests/{examples_workinprogress/workinprogress_CMCC_plotting.py => examples/postprocess_CMCC_plotting.py} (100%) rename tests/{examples_workinprogress/workinprogress_curved_quiver.py => examples/postprocess_curved_quiver.py} (100%) rename tests/{examples_workinprogress/workinprogress_delft3D4_netcdf.py => examples/postprocess_delft3D4_netcdf.py} (100%) rename tests/{examples_workinprogress/workinprogress_exporttoshapefile.py => examples/postprocess_exporttoshapefile.py} (100%) rename tests/{examples_workinprogress/workinprogress_gethisdata_subsettinglatlon.py => examples/postprocess_gethisdata_subsettinglatlon.py} (100%) rename tests/{examples_workinprogress/workinprogress_interpolate_edgevar_tofaces.py => examples/postprocess_interpolate_edgevar_tofaces.py} (100%) rename tests/{examples_workinprogress/workinprogress_interpolate_uds_toplipoints.py => examples/postprocess_interpolate_uds_toplipoints.py} (100%) rename tests/{examples_workinprogress/workinprogress_map_monthlymean.py => examples/postprocess_map_monthlymean.py} (100%) rename tests/{examples_workinprogress/workinprogress_mapfile_inpolygon.py => examples/postprocess_mapfile_inpolygon.py} (100%) rename tests/{examples_workinprogress/workinprogress_mapfile_to_regulargrid.py => examples/postprocess_mapfile_to_regulargrid.py} (100%) rename tests/{examples_workinprogress/workinprogress_morphology.py => examples/postprocess_morphology.py} (100%) rename tests/{examples_workinprogress/workinprogress_waqua_netcdf_convertedwith_getdata.py => examples/postprocess_waqua_netcdf_convertedwith_getdata.py} (100%) rename tests/{examples_workinprogress/workinprogress_xarray_performance.py => examples/postprocess_xarray_performance.py} (100%) rename tests/examples/{download_meteodata_oceandata.py => preprocess_download_meteodata_oceandata.py} (100%) rename tests/{examples_workinprogress/workinprogress_meshkernel_creategrid.py => examples/preprocess_meshkernel_creategrid.py} (100%) rename tests/{examples_workinprogress/workinprogress_meshkernel_interpgtsm.py => examples/preprocess_meshkernel_interpgtsm.py} (100%) rename tests/{examples_workinprogress/workinprogress_modelbuilder.py => examples/preprocess_modelbuilder.py} (100%) rename tests/{examples_workinprogress/workinprogress_nestingFMtoFM.py => examples/preprocess_nestingFMtoFM.py} (100%) rename tests/{examples_workinprogress/workinprogress_network_1Dto2D_topology.py => examples/preprocess_network_1Dto2D_topology.py} (100%) rename tests/{examples_workinprogress/workinprogress_read_netcdf_bndfile.py => examples/preprocess_read_netcdf_bndfile.py} (100%) rename tests/{examples_workinprogress/workinprogress_write_struct_bcfile.py => examples/preprocess_write_struct_bcfile.py} (100%) diff --git a/tests/examples_workinprogress/workinprogress_CMCC_plotting.py b/tests/examples/postprocess_CMCC_plotting.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_CMCC_plotting.py rename to tests/examples/postprocess_CMCC_plotting.py diff --git a/tests/examples_workinprogress/workinprogress_curved_quiver.py b/tests/examples/postprocess_curved_quiver.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_curved_quiver.py rename to tests/examples/postprocess_curved_quiver.py diff --git a/tests/examples_workinprogress/workinprogress_delft3D4_netcdf.py b/tests/examples/postprocess_delft3D4_netcdf.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_delft3D4_netcdf.py rename to tests/examples/postprocess_delft3D4_netcdf.py diff --git a/tests/examples_workinprogress/workinprogress_exporttoshapefile.py b/tests/examples/postprocess_exporttoshapefile.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_exporttoshapefile.py rename to tests/examples/postprocess_exporttoshapefile.py diff --git a/tests/examples_workinprogress/workinprogress_gethisdata_subsettinglatlon.py b/tests/examples/postprocess_gethisdata_subsettinglatlon.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_gethisdata_subsettinglatlon.py rename to tests/examples/postprocess_gethisdata_subsettinglatlon.py diff --git a/tests/examples_workinprogress/workinprogress_interpolate_edgevar_tofaces.py b/tests/examples/postprocess_interpolate_edgevar_tofaces.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_interpolate_edgevar_tofaces.py rename to tests/examples/postprocess_interpolate_edgevar_tofaces.py diff --git a/tests/examples_workinprogress/workinprogress_interpolate_uds_toplipoints.py b/tests/examples/postprocess_interpolate_uds_toplipoints.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_interpolate_uds_toplipoints.py rename to tests/examples/postprocess_interpolate_uds_toplipoints.py diff --git a/tests/examples_workinprogress/workinprogress_map_monthlymean.py b/tests/examples/postprocess_map_monthlymean.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_map_monthlymean.py rename to tests/examples/postprocess_map_monthlymean.py diff --git a/tests/examples_workinprogress/workinprogress_mapfile_inpolygon.py b/tests/examples/postprocess_mapfile_inpolygon.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_mapfile_inpolygon.py rename to tests/examples/postprocess_mapfile_inpolygon.py diff --git a/tests/examples_workinprogress/workinprogress_mapfile_to_regulargrid.py b/tests/examples/postprocess_mapfile_to_regulargrid.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_mapfile_to_regulargrid.py rename to tests/examples/postprocess_mapfile_to_regulargrid.py diff --git a/tests/examples_workinprogress/workinprogress_morphology.py b/tests/examples/postprocess_morphology.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_morphology.py rename to tests/examples/postprocess_morphology.py diff --git a/tests/examples_workinprogress/workinprogress_waqua_netcdf_convertedwith_getdata.py b/tests/examples/postprocess_waqua_netcdf_convertedwith_getdata.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_waqua_netcdf_convertedwith_getdata.py rename to tests/examples/postprocess_waqua_netcdf_convertedwith_getdata.py diff --git a/tests/examples_workinprogress/workinprogress_xarray_performance.py b/tests/examples/postprocess_xarray_performance.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_xarray_performance.py rename to tests/examples/postprocess_xarray_performance.py diff --git a/tests/examples/download_meteodata_oceandata.py b/tests/examples/preprocess_download_meteodata_oceandata.py similarity index 100% rename from tests/examples/download_meteodata_oceandata.py rename to tests/examples/preprocess_download_meteodata_oceandata.py diff --git a/tests/examples_workinprogress/workinprogress_meshkernel_creategrid.py b/tests/examples/preprocess_meshkernel_creategrid.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_meshkernel_creategrid.py rename to tests/examples/preprocess_meshkernel_creategrid.py diff --git a/tests/examples_workinprogress/workinprogress_meshkernel_interpgtsm.py b/tests/examples/preprocess_meshkernel_interpgtsm.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_meshkernel_interpgtsm.py rename to tests/examples/preprocess_meshkernel_interpgtsm.py diff --git a/tests/examples_workinprogress/workinprogress_modelbuilder.py b/tests/examples/preprocess_modelbuilder.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_modelbuilder.py rename to tests/examples/preprocess_modelbuilder.py diff --git a/tests/examples_workinprogress/workinprogress_nestingFMtoFM.py b/tests/examples/preprocess_nestingFMtoFM.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_nestingFMtoFM.py rename to tests/examples/preprocess_nestingFMtoFM.py diff --git a/tests/examples_workinprogress/workinprogress_network_1Dto2D_topology.py b/tests/examples/preprocess_network_1Dto2D_topology.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_network_1Dto2D_topology.py rename to tests/examples/preprocess_network_1Dto2D_topology.py diff --git a/tests/examples_workinprogress/workinprogress_read_netcdf_bndfile.py b/tests/examples/preprocess_read_netcdf_bndfile.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_read_netcdf_bndfile.py rename to tests/examples/preprocess_read_netcdf_bndfile.py diff --git a/tests/examples_workinprogress/workinprogress_write_struct_bcfile.py b/tests/examples/preprocess_write_struct_bcfile.py similarity index 100% rename from tests/examples_workinprogress/workinprogress_write_struct_bcfile.py rename to tests/examples/preprocess_write_struct_bcfile.py From d16064092c49336c0d495c968d870bde40ac6e44 Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Mon, 29 Jan 2024 09:43:30 +0100 Subject: [PATCH 2/3] update testcase --- tests/test_examples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_examples.py b/tests/test_examples.py index 8d00e641d..a4ebd36d9 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -13,7 +13,7 @@ # ACCEPTANCE TESTS VIA EXAMPLE SCRIPTS, these are the ones who are only meant to generate output files dir_tests = os.path.dirname(__file__) #F9 doesnt work, only F5 (F5 also only method to reload external definition scripts) -list_configfiles = glob.glob(os.path.join(dir_tests,'examples','*.py')) + glob.glob(os.path.join(dir_tests,'examples_workinprogress','*.py')) +list_configfiles = glob.glob(os.path.join(dir_tests,'examples','*.py')) list_configfiles = [x for x in list_configfiles if 'workinprogress_xarray_performance' not in x] #ignore this slow script dir_output_general = os.path.join(dir_tests,'examples_output') os.makedirs(dir_output_general, exist_ok=True) From 35fcc72a9d5abe52591be9bd16c96941417eca0b Mon Sep 17 00:00:00 2001 From: veenstrajelmer Date: Mon, 29 Jan 2024 10:00:45 +0100 Subject: [PATCH 3/3] cleanup scripts --- tests/examples/postprocess_mapnc_regular.py | 112 ------------------ tests/examples/postprocess_morphology.py | 83 ------------- ...reprocess_hydrolib_write_struct_bcfile.py} | 0 .../preprocess_read_netcdf_bndfile.py | 22 ---- 4 files changed, 217 deletions(-) delete mode 100644 tests/examples/postprocess_mapnc_regular.py delete mode 100644 tests/examples/postprocess_morphology.py rename tests/examples/{preprocess_write_struct_bcfile.py => preprocess_hydrolib_write_struct_bcfile.py} (100%) delete mode 100644 tests/examples/preprocess_read_netcdf_bndfile.py diff --git a/tests/examples/postprocess_mapnc_regular.py b/tests/examples/postprocess_mapnc_regular.py deleted file mode 100644 index 90ca7bfb0..000000000 --- a/tests/examples/postprocess_mapnc_regular.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Wed Oct 27 22:03:01 2021 - -@author: veenstra - -""" - -import os -import numpy as np -import matplotlib.pyplot as plt -plt.close('all') -import xarray as xr -import dfm_tools as dfmt - -dir_output = '.' - -file_nc_list = [r'p:\archivedprojects\1220688-lake-kivu\2_data\COSMO\COSMOCLM_2012_out02_merged_4Wouter.nc', #COSMO - r'p:\11202255-sfincs\Testbed\Original_tests\01_Implementation\08_restartfile\sfincs_map.nc', #SFINCS - ] - -for file_nc in file_nc_list: - basename = os.path.basename(file_nc).replace('.','') - - data_xr = xr.open_dataset(file_nc) - if 'COSMOCLM' in file_nc: #add ldb for Kivu - name_wl_x,name_wl_y,name_wl = None,None,None - name_uv_x,name_uv_y,name_u,name_v = 'lon','lat','U_10M','V_10M' - thinning = 2 - data_xr = data_xr.drop_vars(['height_10m','height_2m']) #gives cleaner figure title - clim_wl = [0,0.15] - clim_uv = [0,5] - add_ldb = True - fig_args = dict(nrows=1,ncols=3,figsize=(14,6)) - elif 'sfincs' in file_nc: - name_wl_x,name_wl_y,name_wl = 'x','y','zs' - name_uv_x,name_uv_y,name_u,name_v = 'edge_x','edge_y','u','v' #TODO: uv is now on centers, so use new mapfile (and simplify/lessen xyvarnames) - thinning = 5 - data_xr = data_xr.set_coords(['x','y','edge_x','edge_y']) #set coordinates for sfincs. TODO: request x/y/etc as coords in sfincs mapfile https://github.com/Deltares/SFINCS/issues/10 - clim_wl = [0,0.15] - clim_uv = [0,0.6] - add_ldb = False - fig_args = dict(nrows=3,ncols=1,figsize=(10,8)) - - - if name_wl is not None: - data_fromnc_zs = data_xr[name_wl] - fig, axs = plt.subplots(**fig_args) - for iT, timestep in enumerate([0,1,10]): - ax=axs[iT] - pc = data_fromnc_zs.isel(time=timestep).plot.pcolormesh(x=name_wl_x,y=name_wl_y,cmap='jet', ax=ax) - pc.set_clim(clim_wl) - ax.set_aspect('equal') - fig.tight_layout() - plt.savefig(os.path.join(dir_output,f'{basename}_waterlevel')) - - - data_uv = data_xr[[name_u,name_v]] - data_u = data_xr[name_u] - data_v = data_xr[name_v] - - fig, axs = plt.subplots(**fig_args) - for iT, timestep in enumerate([0,1,10]): - ax=axs[iT] - coordlist = list(data_u.coords) - coordlist.remove('time') - data_u_tsel = data_u.isel(time=timestep) - data_v_tsel = data_v.isel(time=timestep) - #data_uv_tsel = data_uv.isel(time=timestep) #TODO: also possible to quiver a uv dataset directly - data_magn = np.sqrt(data_u_tsel**2 + data_v_tsel**2) - pc = data_magn.plot.pcolormesh(x=name_uv_x,y=name_uv_y, cmap='jet',ax=ax) - #pc = data_uv_tsel.plot.quiver(x='lon',y='lat',u='U_10M',v='V_10M', cmap='jet',ax=ax) - pc.set_clim(clim_uv) - if add_ldb: - dfmt.plot_coastlines(ax=ax) - data_u_thin = data_u_tsel.loc[::thinning,::thinning] - data_v_thin = data_v_tsel.loc[::thinning,::thinning] - ax.quiver(data_u_thin[name_uv_x], data_u_thin[name_uv_y], data_u_thin, data_v_thin, #raises warnings for some reason - color='w')#,scale=50,width=0.008), cmap='jet') - fig.tight_layout() - plt.savefig(os.path.join(dir_output,f'{basename}_magn_pcolorquiver')) - - - #curved vector plot #TODO: workinprogress - dist = 0.106 - reg_x_vec = np.arange(data_xr[name_uv_x].min(),data_xr[name_uv_x].max()+dist,dist) - reg_y_vec = np.arange(data_xr[name_uv_y].min(),data_xr[name_uv_y].max()+dist,dist) - reg_grid_X,reg_grid_Y = np.meshgrid(reg_x_vec,reg_y_vec) - from scipy.interpolate import griddata - - fig, axs = plt.subplots(**fig_args,sharex=True,sharey=True) - for iT, timestep in enumerate([0,1,10]): - ax=axs[iT] - data_u_tsel = data_u.isel(time=timestep) - data_v_tsel = data_v.isel(time=timestep) - lonvals_flat = data_u_tsel[name_uv_x].to_numpy().flatten() - latvals_flat = data_u_tsel[name_uv_y].to_numpy().flatten() - U = griddata((lonvals_flat,latvals_flat),data_u_tsel.to_numpy().flatten(),(reg_grid_X,reg_grid_Y),method='nearest') #TODO: this is probably easier with xarray - V = griddata((lonvals_flat,latvals_flat),data_v_tsel.to_numpy().flatten(),(reg_grid_X,reg_grid_Y),method='nearest') - speed = np.sqrt(U*U + V*V) - #quiv_curved = dfmt.velovect(ax,reg_grid_X,reg_grid_Y,U,V, arrowstyle='fancy', density=5, grains=25, color=speed)#, cmap='jet') #TODO: requested adding curved-quiver to matplotlib https://github.com/matplotlib/matplotlib/issues/20038 - #quiv_curved.lines.set_clim(0,5) - quiv_curved = ax.streamplot(reg_x_vec,reg_y_vec,U,V, arrowstyle='-|>', integration_direction='forward',broken_streamlines=False, color=speed, density=1) - cbar = fig.colorbar(quiv_curved.lines, ax=ax) - cbar.set_label('velocity magnitude (%s)'%(data_v.attrs['units'])) - ax.set_title(data_v_tsel.time.to_pandas()) - if add_ldb: - dfmt.plot_coastlines(ax=ax) - fig.tight_layout() - plt.savefig(os.path.join(dir_output,f'{basename}_magn_curvedquiver')) - - diff --git a/tests/examples/postprocess_morphology.py b/tests/examples/postprocess_morphology.py deleted file mode 100644 index 5684d531e..000000000 --- a/tests/examples/postprocess_morphology.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Wed Oct 27 22:01:16 2021 - -@author: veenstra -""" - -import os -import matplotlib.pyplot as plt -plt.close('all') -import xarray as xr -import dfm_tools as dfmt - -dir_output = '.' - -#MAPFILE -file_nc = r'p:\archivedprojects\11203869-morwaqeco3d\05-Tidal_inlet\02_FM_201910\FM_MF10_Max_30s\fm\DFM_OUTPUT_inlet\inlet_map.nc' -data_frommap_merged = dfmt.open_partitioned_dataset(file_nc) - -vars_pd = dfmt.get_ncvarproperties(data_frommap_merged) -vars_pd_sel = vars_pd[vars_pd['long_name'].str.contains('transport')] -#vars_pd_sel = vars_pd[vars_pd['dimensions'].str.contains('mesh2d_nFaces') & vars_pd['long_name'].str.contains('wave')] - -varname = 'mesh2d_mor_bl' -var_clims = [-50,0] -var_longname = vars_pd['long_name'][vars_pd.index==varname].iloc[0] -fig, (ax1,ax2,ax3) = plt.subplots(3,1, figsize=(6,9)) - -data_frommap_0 = data_frommap_merged[varname].isel(time=0) -pc = data_frommap_0.ugrid.plot(ax=ax1, linewidth=0.5, cmap='jet', clim=var_clims) - -data_frommap_end = data_frommap_merged[varname].isel(time=-1) -pc = data_frommap_end.ugrid.plot(ax=ax2, linewidth=0.5, cmap='jet', clim=var_clims) - -data_diff = data_frommap_end-data_frommap_0 -pc = data_diff.ugrid.plot(ax=ax3, linewidth=0.5, cmap='jet', clim=[-3,3]) - -for ax in (ax1,ax2,ax3): - ax.set_aspect('equal') - #ax.set_ylim(val_ylim) -fig.tight_layout() -plt.savefig(os.path.join(dir_output,'%s_%s'%(os.path.basename(file_nc).replace('.',''), varname))) - -varname = 'mesh2d_hwav' -var_longname = vars_pd['long_name'][vars_pd.index==varname].iloc[0] -fig, ax = plt.subplots(1,1) -data_frommap = data_frommap_merged[varname].isel(time=-1) -pc = data_frommap.ugrid.plot(ax=ax, linewidth=0.5, cmap='jet') -ax.set_aspect('equal') - -fig.tight_layout() -plt.savefig(os.path.join(dir_output,'%s_%s'%(os.path.basename(file_nc).replace('.',''), varname))) - - - -#WAVM FILE -file_nc = r'p:\archivedprojects\11203869-morwaqeco3d\05-Tidal_inlet\02_FM_201910\FM_MF10_Max_30s\wave\wavm-inlet.nc' -data_xr = xr.open_dataset(file_nc) -vars_pd = dfmt.get_ncvarproperties(data_xr) -vars_pd_sel = vars_pd[vars_pd['long_name'].str.contains('dissi')] -#vars_pd_sel = vars_pd[vars_pd['dimensions'].str.contains('mesh2d_nFaces') & vars_pd['long_name'].str.contains('wave')] - -varname_list = ['hsign', 'dir', 'period', 'dspr'] -var_clim = [[0,2], [0,360], [0,7.5], [0,35], [0,20]] -for iV, varname in enumerate(varname_list): - var_longname = vars_pd['long_name'][vars_pd.index==varname].iloc[0] - - fig, (ax1,ax2) = plt.subplots(1,2, figsize=(12,7)) - fig.suptitle('%s (%s)'%(varname, var_longname)) - - pc = data_xr[varname].isel(time=10).plot(ax=ax1, cmap='jet') - pc.set_clim(var_clim[iV]) - ax1.set_aspect('equal') - - pc = data_xr[varname].isel(time=-1).plot(ax=ax2, cmap='jet') - pc.set_clim(var_clim[iV]) - ax2.set_aspect('equal') - - fig.tight_layout() - plt.savefig(os.path.join(dir_output,'%s_%s'%(os.path.basename(file_nc).replace('.',''), varname))) - - - diff --git a/tests/examples/preprocess_write_struct_bcfile.py b/tests/examples/preprocess_hydrolib_write_struct_bcfile.py similarity index 100% rename from tests/examples/preprocess_write_struct_bcfile.py rename to tests/examples/preprocess_hydrolib_write_struct_bcfile.py diff --git a/tests/examples/preprocess_read_netcdf_bndfile.py b/tests/examples/preprocess_read_netcdf_bndfile.py deleted file mode 100644 index 0f712c766..000000000 --- a/tests/examples/preprocess_read_netcdf_bndfile.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Mon Nov 14 14:34:12 2022 - -@author: veenstra -""" - -import matplotlib.pyplot as plt -plt.close('all') -import xarray as xr -import dfm_tools as dfmt - -file_nc_bc = r'p:\1204257-dcsmzuno\data\CMEMS\bnd\NorthSeaAndBaltic_1993-2019_20210510\temperature_extra_rand_dcsm.nc' - -data_xr = xr.open_dataset(file_nc_bc) -data_xr = data_xr.set_coords(['station_id'])#,'station_names']) -data_xr = dfmt.preprocess_hisnc(data_xr) - -fig,ax = plt.subplots() -data_xr.temperature.sel(node='extra_rand_dcsm_0001').T.plot() -fig.tight_layout() -