def func_pwc_mr_fd(ds_single): # print(ds_single) ds_res = CARDAMOMlib.compute_ds_pwc_mr_fd_greg(ds_single, comp_dict) write_to_logfile("finished single,", "lat:", ds_single.lat.data, "lon:", ds_single.lon.data, "prob:", ds_single.prob.data) return ds_res
def func_pwc_mr_fd(ds_single): # print(ds_single) ds_res = CARDAMOMlib.compute_ds_pwc_mr_fd_greg( ds_single, # integration_method='solve_ivp', integration_method='trapezoidal', nr_nodes=51) write_to_logfile("finished single,", "lat:", ds_single.lat.data, "lon:", ds_single.lon.data, "prob:", ds_single.prob.data) return ds_res
def func_start_values(*args): v_names = args[-1] d = {v_names[i]: args[i].reshape((-1, )) for i in range(len(args[:-1]))} # print([v.shape for v in d.values()]) print('lat:', d['lat'], 'lon:', d['lon'], 'prob:', d['prob'], flush=True) # print('time:', d['time'], flush=True) # print([v.shape for v in d.values()], flush=True) start_values = CARDAMOMlib.load_start_values_greg_dict(d) ds_res = CARDAMOMlib.compute_ds_pwc_mr_fd_greg( ds_single, integration_method='trapezoidal', nr_nodes=51) # print(start_values, flush=True) # start_values = da.from_array(1.1 * np.ones((1, 1, 1, 6), dtype=np.float64, chunks=(1,1,6)) # start_values.to_dask() return start_values.reshape(1, 1, 1, 6)
def func_pwc_mr_fd(ds_single): # print(ds_single) with warnings.catch_warnings(): warnings.simplefilter("ignore") ds_res = CARDAMOMlib.compute_ds_pwc_mr_fd_greg( ds_single, # integration_method='solve_ivp', integration_method='trapezoidal', nr_nodes=151, errors=errors) write_to_logfile("finished single,", "lat:", ds_single.lat.data, "lon:", ds_single.lon.data, "prob:", ds_single.prob.data) return ds_res