Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix in physics/m_micro.F90: correct calculation of flipped vertica…
…l index
- Loading branch information
41d34d0
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 am not sure why this is correct!
41d34d0
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.
PLE is allocated from 0:KM
prsi_i is allocated from 1:KM+1
we need to flip in the vertical
before the bugfix: k runs from 0 to km; ll runs from km to 0, but it needs to run from km+1 to 1 --> out of bounds
after the bugfix: k runs from 0 to km; ll runs from km+1 to 1 --> ok
41d34d0
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 see in my code
" real (kind=kind_phys), dimension(im,0:lm),intent(in):: prsi_i, &
& phii"
41d34d0
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.
41d34d0
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.
May be because of the change to assumed arrays? It makes it sound like the original code had bug.
41d34d0
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 think you are correct. I can rephrase the language. There is definitely a bug somewhere in csawmg, because we could not get it to run with GNU in the past (segfaults), and using explicit dimensions prevented us from finding the problem. With these changes, we can revisit the issue in the next weeks, create a DEBUG test and try to run it with GNU.