from src.run_assimilator import run_assimilator if __name__ == "__main__": run_assimilator( particles_dataset_path="data/advector_output_rivers_2012.nc", observations_type="from_csv", observations_source_path="data/observations.csv", assimilation_domain_coords=(195 - 360, 23, 235 - 360, 45), assimilation_grid_size=(int(40 / 0.5), int(22 / 0.5)), size_ensemble=10, initial_ensemble_spread_percent=0.05, t_start=0, t_end=300, radius_observation=50, )
from src.run_assimilator import run_assimilator if __name__ == "__main__": run_assimilator( particles_dataset_path="data/advector_output_rivers_2012.nc", observations_type="from_simulation", observations_source_path="data/advector_output_coastal_2012.nc", assimilation_domain_coords=(195 - 360, 23, 235 - 360, 45), assimilation_grid_size=(int(40 / 0.5), int(22 / 0.5)), size_ensemble=10, initial_ensemble_spread_percent=0.05, observations_error_percent=0.01, observation_locations=[(12, 4), (55, 27)], t_start=0, t_end=300, initial_mass_multiplicator=2, radius_observation=50, )
import numpy as np cell_area = lambda dlon, dlat, lat: dlat * 111 * dlon * 111 * np.cos(lat * np. pi / 180) GRID_COORDS = (-165, 23, -125, 45) GRID_RESOLUTION = 0.5 cells_area = np.array([[ cell_area(0.5, 0.5, lat_id * GRID_RESOLUTION + GRID_COORDS[1]) for lat_id in range(44) ] for lon_id in range(80)]) if __name__ == "__main__": run_assimilator( particles_dataset_path="data/advector_output_rivers_2012.nc", observations_type="from_simulation", observations_source_path="data/advector_output_coastal_2012.nc", assimilation_domain_coords=GRID_COORDS, assimilation_grid_size=(int(40 / GRID_RESOLUTION), int(22 / GRID_RESOLUTION)), size_ensemble=10, initial_ensemble_spread=50, observations_error_percent=0.01, observation_locations=[(12, 4), (55, 27)], t_start=0, t_end=365, radius_observation=np.inf, initial_mass_multiplicator=1000, # Set to your initial particles mass cells_area=cells_area)
from src.run_assimilator import run_assimilator import numpy as np cell_area = lambda dlon, dlat, lat: dlat * 111 * dlon * 111 * np.cos(lat * np. pi / 180) GRID_COORDS = (-165, 23, -125, 45) GRID_RESOLUTION = 0.5 cells_area = np.array([[ cell_area(0.5, 0.5, lat_id * GRID_RESOLUTION + GRID_COORDS[1]) for lat_id in range(44) ] for lon_id in range(80)]) if __name__ == "__main__": run_assimilator( particles_dataset_path="data/advector_output_rivers_2012.nc", observations_type="from_csv", observations_source_path="data/observations.csv", assimilation_domain_coords=GRID_COORDS, assimilation_grid_size=(int(40 / GRID_RESOLUTION), int(22 / GRID_RESOLUTION)), size_ensemble=10, initial_ensemble_spread= 50, # Define, a tested, functionning value can be 0.5% of your initial particle mass t_start=0, t_end=365, radius_observation=np.inf, initial_mass_multiplicator=1000, # Set to your initial particles mass cells_area=cells_area)
from src.run_assimilator import run_assimilator mu = 2 A = 0.1175 epsilon = 0.25 sigma_rel = 0.01 if __name__ == "__main__": run_assimilator( particles_dataset_path="data/parts_double_gyre_standard_as_3.nc", observations_type="from_simulation", observations_source_path= f"data/parts_double_gyre_ref_eps_{epsilon}_A_{A}_as_2.nc", simulation_name=f"mu_{mu}_A_{A}_eps_{epsilon}_sigma_rel_{sigma_rel}", assimilation_domain_coords=(195, 20, 225, 40), assimilation_grid_size=(60, 40), size_ensemble=10, initial_ensemble_spread=0.05, t_start=0, t_end=2000, observations_error_percent=sigma_rel, observation_locations=[(12, 4), (55, 27)], initial_mass_multiplicator=mu, )