Skip to content
Snippets Groups Projects
Commit 99caebd5 authored by Aiko Voigt's avatar Aiko Voigt
Browse files

Purely editorial changes: replaced __ with _ in prepare.py

parent 95ef2230
No related branches found
No related tags found
No related merge requests found
...@@ -15,13 +15,13 @@ import xarray as xr ...@@ -15,13 +15,13 @@ import xarray as xr
def prepare_grid(model, path, file): def prepare_grid(model, path, file):
if model == 'ICON': if model == 'ICON':
_ds_grid = __grid_icon(path+file) _ds_grid = _grid_icon(path+file)
return _ds_grid return _ds_grid
# implementation for ICON model # implementation for ICON model
def __grid_icon(_gridfile): def _grid_icon(_gridfile):
ds_grid = xr.open_dataset(_gridfile) ds_grid = xr.open_dataset(_gridfile)
ds_grid = ds_grid[['neighbor_cell_index', 'edge_of_cell', 'edge_vertices']] ds_grid = ds_grid[['neighbor_cell_index', 'edge_of_cell', 'edge_vertices']]
...@@ -52,19 +52,19 @@ def __grid_icon(_gridfile): ...@@ -52,19 +52,19 @@ def __grid_icon(_gridfile):
def prepare_field(model, path, file, var, threshold, cubulation): def prepare_field(model, path, file, var, threshold, cubulation):
if model == 'ICON': if model == 'ICON':
_field, _field_cube = __field_icon(path, file, var, threshold, cubulation) _field, _field_cube = _field_icon(path, file, var, threshold, cubulation)
return _field, _field_cube return _field, _field_cube
def prepare_field_lev(model, path, file, var, threshold, cubulation): def prepare_field_lev(model, path, file, var, threshold, cubulation):
if model == 'ICON': if model == 'ICON':
_field, _field_cube = __field_icon_lev(path, file, var, threshold, cubulation) _field, _field_cube = _field_icon_lev(path, file, var, threshold, cubulation)
return _field, _field_cube return _field, _field_cube
# implementation for ICON model # implementation for ICON model
# single-level data # single-level data
def __field_icon(path, file, var, threshold, cubulation): def _field_icon(path, file, var, threshold, cubulation):
# field on triangular grid # field on triangular grid
field = xr.open_dataset(path + file)[var].squeeze().values field = xr.open_dataset(path + file)[var].squeeze().values
...@@ -90,7 +90,7 @@ def __field_icon(path, file, var, threshold, cubulation): ...@@ -90,7 +90,7 @@ def __field_icon(path, file, var, threshold, cubulation):
return field, field_cube return field, field_cube
# data on multiple levels # data on multiple levels
def __field_icon_lev(path, file, var, threshold, cubulation): def _field_icon_lev(path, file, var, threshold, cubulation):
# field on triangular grid # field on triangular grid
field = xr.open_dataset(path + file)[var].squeeze().values field = xr.open_dataset(path + file)[var].squeeze().values
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment