-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement conservative remapping of mixing coefficient in vert_mix module #54
Labels
enhancement
New feature or request
Comments
klindsay28
added a commit
that referenced
this issue
Mar 4, 2021
based on test_problem only iage TracerModule implemented advection, vert_mix, and horiz_mix processes not vetted with multiple tracers bldepth variation in time for vert_mix currently turned off adaptive time-stepping use many steps when bldepth varies perhaps this will improve when #54 is addressed comp_fcn uses scipy.integrate.solve_ivp to integrate ODEs will eventually migrate to PETSc apply_precond_jacobian not functional yet will do this after comp_fcn migration to PETSC On branch py_driver_2d Changes to be committed: new file: input/py_driver_2d/model_params.cfg new file: input/py_driver_2d/newton_krylov.cfg new file: input/py_driver_2d/tracer_module_defs.yaml new file: src/py_driver_2d/__init__.py new file: src/py_driver_2d/advection.py new file: src/py_driver_2d/horiz_mix.py new file: src/py_driver_2d/iage.py new file: src/py_driver_2d/model_process.py new file: src/py_driver_2d/model_state.py new file: src/py_driver_2d/setup_solver.py new file: src/py_driver_2d/tracer_module_state.py new file: src/py_driver_2d/vert_mix.py
klindsay28
added a commit
that referenced
this issue
Mar 14, 2021
* initial steps adding py_driver_2d model based on test_problem only iage TracerModule implemented advection, vert_mix, and horiz_mix processes not vetted with multiple tracers bldepth variation in time for vert_mix currently turned off adaptive time-stepping use many steps when bldepth varies perhaps this will improve when #54 is addressed comp_fcn uses scipy.integrate.solve_ivp to integrate ODEs will eventually migrate to PETSc apply_precond_jacobian not functional yet will do this after comp_fcn migration to PETSC On branch py_driver_2d Changes to be committed: new file: input/py_driver_2d/model_params.cfg new file: input/py_driver_2d/newton_krylov.cfg new file: input/py_driver_2d/tracer_module_defs.yaml new file: src/py_driver_2d/__init__.py new file: src/py_driver_2d/advection.py new file: src/py_driver_2d/horiz_mix.py new file: src/py_driver_2d/iage.py new file: src/py_driver_2d/model_process.py new file: src/py_driver_2d/model_state.py new file: src/py_driver_2d/setup_solver.py new file: src/py_driver_2d/tracer_module_state.py new file: src/py_driver_2d/vert_mix.py * add remap_linear_interpolant method to SpatialAxis class On branch py_driver_2d Changes to be committed: modified: src/spatial_axis.py modified: tests/test_spatial_axis.py * py_driver_2d vert_mix update: replace linear interpolation of piecewise linear mixing coefficients profile with conservative remapping modest decrease in runtime, due to longer timesteps enable bldepth variation in time On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/iage.py modified: src/py_driver_2d/vert_mix.py * py_driver_2d update: rename dtracer_vals_dt to tracer_tend_vals On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/iage.py modified: src/py_driver_2d/tracer_module_state.py * py_driver_2d update: add comp_jacobian methods and pass to solve_ivp On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/advection.py modified: src/py_driver_2d/horiz_mix.py modified: src/py_driver_2d/iage.py modified: src/py_driver_2d/model_process.py modified: src/py_driver_2d/model_state.py modified: src/py_driver_2d/tracer_module_state.py modified: src/py_driver_2d/vert_mix.py * py_driver_2d performance improvements use numpy arrays to construct sparse Jacobians, precomputing nnz cache Advection and HorizMix Jacobians cache remap_linear_interpolant results in VertMix.mixing_coeff On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/advection.py modified: src/py_driver_2d/horiz_mix.py modified: src/py_driver_2d/model_state.py modified: src/py_driver_2d/tracer_module_state.py modified: src/py_driver_2d/vert_mix.py * py_driver_2d coupled to overall solver implement apply_precond_jacobian precond jacobian is time mean of instantaneous jacobians fix typo in np.einsum call in TracerModuleState:stats_vars_vals enable --persist option for py_driver_2d tighten tolerances in solve_ivp call to 1.0e-6 loosen newton_rel_tol in newton_krylov.cfg to 1.0e-5 doesn't make sense to be more accurate than solve_ivp tolerances On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/newton_krylov.cfg modified: input/py_driver_2d/tracer_module_defs.yaml modified: src/py_driver_2d/iage.py modified: src/py_driver_2d/model_state.py modified: src/py_driver_2d/tracer_module_state.py modified: src/share.py * py_driver_2d updates adjust vert_mix paramters to increase iage local max add more layers in ypos direction On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/model_params.cfg modified: src/py_driver_2d/vert_mix.py * py_driver_2d: add support for multiple tracers add 2nd iage tracer with weaker restoring in surface layer construct jacobian sparsity matrix from jacobian at initial time instead of recomputing pattern On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/tracer_module_defs.yaml modified: src/py_driver_2d/advection.py modified: src/py_driver_2d/horiz_mix.py modified: src/py_driver_2d/iage.py modified: src/py_driver_2d/model_process.py modified: src/py_driver_2d/model_state.py modified: src/py_driver_2d/tracer_module_state.py modified: src/py_driver_2d/vert_mix.py modified: src/test_problem/model_state.py * py_driver_2d: rework apply_precond_jacobian for iage On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/iage.py * py_driver_2d: add phosphorus tracer module add {tracer}_depth_ypos_int to history output rm unused comp_jac_sparsity from class ModelProcess On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/newton_krylov.cfg modified: input/py_driver_2d/tracer_module_defs.yaml modified: src/py_driver_2d/model_process.py modified: src/py_driver_2d/model_state.py new file: src/py_driver_2d/phosphorus.py modified: src/py_driver_2d/tracer_module_state.py * py_driver_2d: add preformed tracer module On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/model_params.cfg modified: input/py_driver_2d/newton_krylov.cfg new file: input/py_driver_2d/po4_surf.nc modified: input/py_driver_2d/tracer_module_defs.yaml new file: src/py_driver_2d/preformed.py * py_driver_2d: correct iage restoring rate formula mv formula to iage.__init__, to avoid it being in more than 1 place On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/iage.py * update for black: rm trailing comma to satisfy black 20.8b1 On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/phosphorus.py * py_driver_2d: generalize parameter specification for phosphorus tracers place parameters in dict in phosphorus class enable specification of parameters in cfg modelinfo introduce function for evaluation of basic arithmetic operations in a string enables phosphorus parameters in cfg file to be expressions On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/phosphorus.py modified: src/utils.py * py_driver_2d: generalize preformed.gen_surf_restore_fcn and mv to utils On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/preformed.py modified: src/utils.py * py_driver_2d: modify parameters to increase regenerated po4 On branch py_driver_2d Changes to be committed: modified: input/py_driver_2d/po4_surf.nc modified: src/py_driver_2d/phosphorus.py modified: src/py_driver_2d/vert_mix.py * py_driver_2d: refactor __init__ in ModelProcess class and subclasses On branch py_driver_2d Changes to be committed: modified: src/py_driver_2d/advection.py modified: src/py_driver_2d/horiz_mix.py modified: src/py_driver_2d/model_process.py modified: src/py_driver_2d/vert_mix.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tracer values tend to jump as
bldepth
crosses layer interfacesreplacing linear interpolation of piecewise linear mixing coefficients profile with conservative remapping might prevent this
The text was updated successfully, but these errors were encountered: