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

Precipitation flux calculation #17

Open
claresinger opened this issue May 17, 2023 · 0 comments
Open

Precipitation flux calculation #17

claresinger opened this issue May 17, 2023 · 0 comments

Comments

@claresinger
Copy link

Update to include blk2m. Also, L120 where it is overwriting each horz slice as it loops through (from top-to-bottom) is rather confusing and opaque. I think after staring at it for a few minutes it is correct that you want the incoming flux from above to be the net flux when you are calculating precipitation flux in the level below, but it's a bit hidden that this is what's happening. It would be nice to add a comment here explaining this.

else if(this->micro == "blk_1m")
try
{
res = this->h5load_timestep("precip_rate", at); // precip_rate is the difference between influx and outflux
for(int z = this->map["z"] - 2; z>=0; --z)
{
res(this->hrzntl_slice(z)) = res(this->hrzntl_slice(z+1)) - res(this->hrzntl_slice(z));
}
res *= rhod * this->map["dz"] * L_evap;
}

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

No branches or pull requests

1 participant