From 3eb45ecc4776e72b780dc29a8003e7910a4620d2 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 23 Jan 2022 10:31:18 +0100 Subject: [PATCH] Fixed issue with animation --- bathymetry/generate/__main__.py | 4 ++-- post_process/animate/alpha_water.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bathymetry/generate/__main__.py b/bathymetry/generate/__main__.py index b4432fc..8388758 100644 --- a/bathymetry/generate/__main__.py +++ b/bathymetry/generate/__main__.py @@ -44,7 +44,7 @@ L0 = float(config['main']['L0']) L1 = float(config['main']['L1']) direction = float(config['main']['dir']) -artha = artha.append(pd.DataFrame([ +artha = pd.concat((artha, pd.DataFrame([ { 'lat': artha.lat.at[0] \ + np.cos(direction*np.pi/180) * L0/earth_radius * 180/np.pi, @@ -59,7 +59,7 @@ artha = artha.append(pd.DataFrame([ - np.sin(direction*np.pi/180) * L1/earth_radius * 180/np.pi \ / np.cos(artha.lat.at[0] * np.pi/180), }, -], index=[-1, 1])) +], index=[-1, 1]))) # --- Interpolation log.info('Interpolating data') diff --git a/post_process/animate/alpha_water.py b/post_process/animate/alpha_water.py index 1953c4b..8596180 100644 --- a/post_process/animate/alpha_water.py +++ b/post_process/animate/alpha_water.py @@ -1,7 +1,6 @@ from pathlib import Path import re from multiprocessing.pool import ThreadPool -from pprint import pp from time import time import logging import configparser @@ -93,11 +92,11 @@ def animate(config_path): ), *[ ax.fill( - bloc.index, - bloc, + a.index.values, + a.values, color='k', zorder=12 - ) for bloc in blocs.values() + ) for a in blocs.values() ] ]