Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mammatus95 committed Apr 21, 2024
1 parent 13636ce commit bcd3085
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

def run(model_obj, fp):
config = ut.load_yaml('config.yml')

if model_obj.getname() == "IFS" or model_obj.getname() == "GFS":
cape_fld, u_fld, v_fld, lats, lons = ut.open_gribfile_preslvl(model_obj, fp, path="./modeldata/")

print(np.nanmean(u_fld, axis=(1, 2)))
plotlib.basic_plot(model_obj, cape_fld, u_fld, v_fld, lats, lons, fp,
threshold=config["threshold"])
Expand Down
3 changes: 1 addition & 2 deletions src/modelinfolib.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python3
from datetime import datetime, date
from utilitylib import load_yaml

"""
# ICON Nest
Expand Down Expand Up @@ -38,7 +37,7 @@
"""
# ---------------------------------------------------------------------------------------------------------------------
# name typeOfLevel level
# name typeOfLevel level
par_list_gfs = [
('u', 'isobaricInhPa', 1000),
('u', 'isobaricInhPa', 975),
Expand Down
4 changes: 2 additions & 2 deletions src/plotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import cartopy.crs as crs
import cartopy.feature as cfeature
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
states_provinces = cfeature.NaturalEarthFeature(
category='cultural', name='admin_0_boundary_lines_land', scale='10m', facecolor='none')
states_provinces = cfeature.NaturalEarthFeature(category='cultural', name='admin_0_boundary_lines_land',
scale='10m', facecolor='none')

# own moduls
import utilitylib as ut
Expand Down
4 changes: 3 additions & 1 deletion test/test_modelinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
sys.path.append('../src/')
from modelinfolib import MODELIFNO


class TestMODELIFNO(unittest.TestCase):
def setUp(self):
self.icon_nest = MODELIFNO("ICON Nest", 1377, 657, 0.0625, "pres")
Expand Down Expand Up @@ -51,5 +52,6 @@ def test_getd_grad(self):
def test_create_plottitle(self):
self.assertEqual(self.icon_nest.create_plottitle(), "Hodographmap of ICON Nest")


if __name__ == '__main__':
unittest.main()
unittest.main()

0 comments on commit bcd3085

Please sign in to comment.