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

Separate the update and initialization in TurbulencePrognosticTKE #136

Merged
merged 2 commits into from
Aug 18, 2021

Conversation

yairchn
Copy link
Member

@yairchn yairchn commented Aug 17, 2021

In this PR I am taking the first step to writing the model equations as RHS and LHS. To that end I am starting by taking anything relating initialization out of the update function in TurbulencePrognosticTKE.
Doing so, I found that some cases with variable ustar has zero ustar at the initialization which leads to nan in the surface covariances. To avoid this I added a ustar value for these cases that is over written by compute_ustar after initialization.

The PR has behavioral changes that are negligible to my opinion.

@yairchn yairchn force-pushed the yc/organize_rhs branch 5 times, most recently from 9eeb7da to 98b5ecb Compare August 17, 2021 17:27
merge update and comput prognostic upd

WIP

unify first decom_env

move init env cov to initialize_covariance

move all initializations from update to init

move all initialization componenets from update to initilize

move all initialization componenets from update to initilize
end
update_inversion(self, GMV, Case.inversion_option)
self.wstar = get_wstar(Case.Sur.bflux, self.zi)
microphysics(self.EnvThermo, self.EnvVar, self.Rain, TS.dt)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trontrytel I think this microphysics call is needed - but I am not sure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will start by including it and maybe remove it later PR

end
update_inversion(self, GMV, Case.inversion_option)
self.wstar = get_wstar(Case.Sur.bflux, self.zi)
microphysics(self.EnvThermo, self.EnvVar, self.Rain, TS.dt)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will start by including it and maybe remove it later PR

@@ -260,7 +279,8 @@ function update(self::EDMF_PrognosticTKE, GMV::GridMeanVariables, Case::CasesBas
buoyancy(self.UpdThermo, self.UpdVar, self.EnvVar, GMV, self.extrapolate_buoyancy)
compute_eddy_diffusivities_tke(self, GMV, Case)
update_GMV_ED(self, GMV, Case, TS)
compute_covariance(self, GMV, Case, TS)
compute_covariance_rhs(self, GMV, Case, TS)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here 'compute_covariance' was split into 'compute_covariance_rhs' and 'update_covariance' as these two functions will be called separately in a future PR

Copy link
Member

@haakon-e haakon-e left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge

@yairchn
Copy link
Member Author

yairchn commented Aug 18, 2021

Bors r+

@bors
Copy link
Contributor

bors bot commented Aug 18, 2021

@bors bors bot merged commit f764aac into main Aug 18, 2021
@bors bors bot deleted the yc/organize_rhs branch August 18, 2021 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants