GithubHelp home page GithubHelp logo

Comments (9)

Viskari avatar Viskari commented on June 12, 2024

Hello once again,

After going through the code in more detail, the problem is caused by the following if statement submitted by Markos at the end of last year. Now I can easily get past this problem, but I am checking as I am not completely certain what the if statement is supposed to be checking for as far as I can tell it is only checking the pft against one pft in the patch.

                                if ( include_pft(ipft) == cpatch%pft(1) ) then
                                   !---------------------------------------------------!
                                   !    PFTs match, send all disturbed area to this    !
                                   ! patch.                                            !
                                   !---------------------------------------------------!
                                   same_pft = .true.
                                   area_fac = act_area_loss(ipa,new_lu)/csite%area(npa)
                                   !---------------------------------------------------!
                                else
                                   !---------------------------------------------------!
                                   !    PFTs do not match, don't send anything to the  !
                                   ! new patch.                                        !
                                   !---------------------------------------------------!
                                   same_pft = .false.
                                   area_fac = 0.
                                   !---------------------------------------------------!
                                end if

from ed2.

mpaiao avatar mpaiao commented on June 12, 2024

@Viskari thanks for catching it, I think it is a typo in the big-leaf version of ED. I'll double check it tonight, but I think it should be:

fortran
if ( ipft == cpatch%pft(1) ) then
!---------------------------------------------------!
! PFTs match, send all disturbed area to this !
! patch. !
!---------------------------------------------------!
same_pft = .true.
area_fac = act_area_loss(ipa,new_lu)/csite%area(npa)
!---------------------------------------------------!
else
!---------------------------------------------------!
! PFTs do not match, don't send anything to the !
! new patch. !
!---------------------------------------------------!
same_pft = .false.
area_fac = 0.
!---------------------------------------------------!
end if

from ed2.

Viskari avatar Viskari commented on June 12, 2024

Okay, looks sensible, but why is the comparison only done with the first cohort in the patch?

-- Toni

from ed2.

mdietze avatar mdietze commented on June 12, 2024

If this is the "big leaf" variant, there is only one cohort.

from ed2.

mpaiao avatar mpaiao commented on June 12, 2024

I just checked the code again, I think the fix above should be enough.
Toni, since you found the bug, could you please submit a pull request? Thanks.

from ed2.

Viskari avatar Viskari commented on June 12, 2024

No problem, just wanted to check it first.

-- Toni

On Mon, May 4, 2015 at 9:25 PM, Marcos Longo [email protected]
wrote:

I just checked the code again, I think the fix above should be enough.
Toni, since you found the bug, could you please submit a pull request?
Thanks.


Reply to this email directly or view it on GitHub
#65 (comment).

from ed2.

apourmok avatar apourmok commented on June 12, 2024

Just pulled in the latest from main line and still get this error. @Viskari did you submit a pull request or should I do it?

from ed2.

Viskari avatar Viskari commented on June 12, 2024

The pull request was already submitted a week ago, it just hasn't been
processed yet.

On Tue, May 12, 2015 at 4:30 PM, Afshin Pourmokhtarian <
[email protected]> wrote:

Just pulled in the latest from main line and still get this error.
@Viskari https://github.com/Viskari did you submit a pull request or
should I do it?


Reply to this email directly or view it on GitHub
#65 (comment).

from ed2.

mdietze avatar mdietze commented on June 12, 2024

Just did the pull request

from ed2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.