- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear friends, I'm trying to isolating the Stage into 4 stages. The output only shows 1, 2 and 4. Why theStage = 3 is missing ?
if (gdd.lt.90.0) then
Stage = 1
else
if((gdd.gt.1800.0) then
if (Stage.eq.2) then
Stage = 3
end = doys
endif
if (Stage.eq.3 .and. growth.le.0.0) then
Stage = 4
else
if (Stage.eq.1) then
Stage = 2
start = doys
endif
endif
endif
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add diagnostic WRITE statements
[bash]write(*,*) 'IN: Stage, gdd, growth', Stage, gdd, growth if (gdd.lt.90.0) then Stage = 1 else if((gdd.gt.1800.0) then if (Stage.eq.2) then Stage = 3 end = doys endif if (Stage.eq.3 .and. growth.le.0.0) then Stage = 4 else if (Stage.eq.1) then Stage = 2 start = doys endif endif endif <--- missing endif here write(*,*) 'OUT: Stage, gdd, growth', Stage, gdd, growth Not knowing initial value of Stage and sequencing of values of gdd and value of growth makes it difficult for use to guess what will happen Jim Dempsey[/bash]
[bash][/bash]
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add diagnostic WRITE statements
[bash]write(*,*) 'IN: Stage, gdd, growth', Stage, gdd, growth if (gdd.lt.90.0) then Stage = 1 else if((gdd.gt.1800.0) then if (Stage.eq.2) then Stage = 3 end = doys endif if (Stage.eq.3 .and. growth.le.0.0) then Stage = 4 else if (Stage.eq.1) then Stage = 2 start = doys endif endif endif <--- missing endif here write(*,*) 'OUT: Stage, gdd, growth', Stage, gdd, growth Not knowing initial value of Stage and sequencing of values of gdd and value of growth makes it difficult for use to guess what will happen Jim Dempsey[/bash]
[bash][/bash]

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page