-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
9eeb7da
to
98b5ecb
Compare
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
98b5ecb
to
8a45796
Compare
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge
Bors r+ |
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.