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

dynamic root code divides by 0 #422

Closed
bishtgautam opened this issue Oct 31, 2015 · 2 comments
Closed

dynamic root code divides by 0 #422

bishtgautam opened this issue Oct 31, 2015 · 2 comments
Assignees

Comments

@bishtgautam
Copy link
Contributor

Reported by CSEG at http://bugs.cgd.ucar.edu/show_bug.cgi?id=2237:

Runs that activate both use_dynroot and crop crash in the first time step if run in debug mode. This is >due to a divide by 0 error in this line in CNRootDynMod:

               root_depth(p) = max(zi(c,2), min(hui(p)/huigrain(p)* root_dmx(ivt(p)), root_dmx(ivt(p))))

huigrain(p) can sometimes be 0; in the one case I looked at, hui was also 0. Also, in the first timestep of a cold start, huigrain is NaN.

So this needs:

(1) initialization of huigrain in cold start so that it isn't NaN: it should probably be initialized to 0

(2) appropriate handling of the case when huigrain = 0

@bbye
Copy link
Contributor

bbye commented Nov 12, 2015

@bishtgautam and @xyk-ornl I fixed this error, but when I went to test it I found some more errors that were introduced by the phosphorus code, which caused the crop model to fail. Do you want me to import all the bug fixes in one PR or break it into two?

@bishtgautam
Copy link
Contributor Author

@bbye : You can create a new issue (for e.g. Crop model incompatible with Phosphorus cycle). Then, issue a single PR that fixes this and the new issue. If possible, have two separate commits in the PR that fix each issue independently.

Later, if you send a set of commands to create a case with crop model active, I will try to add a new test to ensure current capabilities of crop model aren't broken as new PRs are merged to create the ACME v1.

bbye added a commit that referenced this issue Nov 16, 2015
Fixes the case with DEBUG = .true. and crops = .true.
that crashes due to divide by 0.

Fixes #422

[BFB] - Bit-For-Bit
bishtgautam pushed a commit that referenced this issue Dec 11, 2015
Updates the divide by 0 in the crop model
Fixes duplicated variable in phosphorus cycle
Updated crop parameter file to include phosphorus parameters

Fixes #422, #468

[BFB]
bishtgautam pushed a commit that referenced this issue Dec 11, 2015
Updates the divide by 0 in the crop model
Fixes duplicated variable in phosphorus cycle
Updated crop parameter file to include phosphorus parameters

Fixes #422, #468

[BFB]
mark-petersen added a commit to mark-petersen/E3SM that referenced this issue Mar 16, 2021
Codes for a semi implicit barotropic mode solver E3SM-Project#422
jonbob pushed a commit that referenced this issue May 19, 2021
Codes for a semi implicit barotropic mode solver #422

Adds semi-implicit barotropic mode solver.
jonbob pushed a commit that referenced this issue May 19, 2021
Codes for a semi implicit barotropic mode solver #422
yunpengshan2014 pushed a commit that referenced this issue Apr 2, 2024
Update release workflow to trigger building docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants