Skip to content
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

solver for advection diffusion equation #499

Merged
merged 8 commits into from
Jan 7, 2025

Conversation

nmizukami
Copy link
Collaborator

@nmizukami nmizukami commented Dec 7, 2024

Separate a advection-diffusion equation solver out of dfw_route.f90 and put it in advection_diffusion.f90 so this can be used for a tracer. The below is the interface. This can be used for advection equation solver by setting dk=0

  SUBROUTINE solve_ade(reach_length,  & ! input: Reach length [m]
                       nMolecule,     & ! input: number of sub-segments
                       dt_local,      & ! input: time_step [sec]
                       FluxUpstream,  & ! input: Flux from upstream [unit of flux]
                       ck,            & ! input: velocity [m/s]
                       dk,            & ! input: diffusivity [m2/s]
                       FluxLat,       & ! input: lateral flux into channel [unit of flux]
                       FluxPrev,      & ! input: Flux at previous time step [unit of flux]
                       FluxLocal,     & ! inout: Flux solved at current time step [unit of flux]
                       verbose,       & ! input: reach index to be examined
                       ierr,message)

@nmizukami nmizukami added new features Adding new features infrastructure issues or code changes related to code organization, data structure, refactoring science issue or code change related to routing physics, river network labels Dec 7, 2024
@nmizukami nmizukami marked this pull request as draft December 7, 2024 15:23
@nmizukami nmizukami marked this pull request as ready for review December 21, 2024 23:16
@nmizukami
Copy link
Collaborator Author

This PR is merged before implementing a tracer module, which require substantial code changes.

@nmizukami nmizukami merged commit dba1fc0 into ESCOMP:cesm-coupling Jan 7, 2025
@nmizukami nmizukami deleted the cesm-coupling_ade_solver branch January 7, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure issues or code changes related to code organization, data structure, refactoring new features Adding new features science issue or code change related to routing physics, river network
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant