CliMA / ClimaAtmos.jl

ClimaAtmos.jl is a library for building atmospheric circulation models that is designed from the outset to leverage data assimilation and machine learning tools. We welcome contributions!
Apache License 2.0
81 stars 15 forks source link

Initialize tendencies with zeros #188

Closed jiahe23 closed 2 years ago

jiahe23 commented 2 years ago

These lines are a bit confusing https://github.com/CliMA/ClimaAtmos.jl/blob/main/src/Models/Nonhydrostatic3DModels/equations_thermodynamics.jl#L114-L117

Let's initialize dY fields with zeros and use -= or += to update all tendency terms (as opposed to the current way which initialize it with a certain tendency term, e.g., hyperdiffusion in this case).

bischtob commented 2 years ago

@jiahe23 can you think about the best design of how and where we should do this?