Opened 4 months ago

Closed 2 months ago

#796 closed defect (fixed)

Restartability lost in the trunk (1+1 != 2)

Reported by: jgipsl Owned by: somebody
Priority: major Milestone: ORCHIDEE 4.1
Component: Model architecture Version: trunc
Keywords: Cc:

Description

Test with trunk ORCHIDEE revision 7293

Tested in offline(FG2 without routing) and coupled run. 3 years, run with periodLength=1Y or =1M do not give the same results. Tests are done at Jean-Zay in production compilation mode.

Change History (6)

comment:1 Changed 4 months ago by jgipsl

Until rev 6793 included, the trunk is restartable. But since commit r6794 it is not the case anymore. Also the code becomes in some cases non reproducible (running the same experiences twice gives different results).

In stomate_season, the section IF (firstcall_season_pre_disturbance) is the cause of the non restartability. Commenting out following initializations again, makes the code reproduceble and restartable (tests done for 10years, FG2 setup).

       !! 1.3.8 number of growing days, threshold -5 deg C (::ngd_minus5):
       IF ( ABS( SUM( ngd_minus5(:,2:nvm) ) ) .LT. min_stomate ) THEN
          IF(printlev_loc>=2) WRITE(numout,*) 'Warning! Number of growing days (-5 deg) is initialized to 0.'
!          ngd_minus5(:,:) = zero
       ENDIF

       !! 1.3.9 "long term" npp (::npp_longterm):
       IF ( ABS( SUM( npp_longterm(:,2:nvm) ) ) .LT. min_stomate ) THEN
          IF(printlev_loc>=2) WRITE(numout,*) 'Warning! Long term NPP is initialized to 0.'
!          npp_longterm(:,:) = zero
       ENDIF

       !! 1.3.10 "long term" turnover (::turnover_longterm):
       IF ( ABS( SUM( turnover_longterm(:,2:nvm,:,:) ) ) .LT. min_stomate ) THEN
          IF(printlev_loc>=2) WRITE(numout,*) 'Warning! Long term turnover is initialized to 0.'
!          turnover_longterm(:,:,:,:) = zero
       ENDIF

       !! 1.3.11 "weekly" GPP (::gpp_week):
       IF ( ABS( SUM( gpp_week(:,2:nvm) ) ) .LT. min_stomate ) THEN
          IF(printlev_loc>=2) WRITE(numout,*) 'Warning! Weekly GPP is initialized to 0.'
!          gpp_week(:,:) = zero
       ENDIF


This will now be tested as well in the latest version of the trunk. Another condition for the above initializations must be done instead of IF (firstcall_season_pre_disturbance).

comment:2 Changed 3 months ago by jgipsl

There are 2 issues of this peace of code that needs to be re-written.

  • 1) As said above, the re-initalization is set in IF ( firstcall_season_pre_disturbance ) THEN so depending on the execution lenght, it will be done every year, month or day. It will not give the same results. => we wont have correct restarability (no 1+1=2)
  • 2) Following IF statement is not correct. Here we compare a vector with a scalar. First I don't know if this is in the norme Fortran. Secondly, depending on the parallelization, number of cores used for the specfic run, this way of coding might change the results. For example, when running on 1MPI, the vector represents the full domain. But when running on let say 72MPI, the vector is a small domain. The results might be different.
    IF ( ABS( SUM( gpp_week(:,2:nvm) ) ) .LT. min_stomate ) THEN
              IF(printlev_loc>=2) WRITE(numout,*) 'Warning! Weekly GPP is initialized to 0.'
              gpp_week(:,:) = zero
    ENDIF
    

comment:3 follow-up: Changed 3 months ago by luyssaert

Bewteen r7180 and r7247 restartability of beetle_generation and risk_index was lost. When running for 1Y risk_index was zero (seems OK) when running 12M the risk_index was 271 (which doesn't make any sense - this seems a good entry point for debugging).

comment:4 in reply to: ↑ 3 Changed 3 months ago by luyssaert

Restartability of the model with and without ok_pest is restored in r7334.

Last edited 3 months ago by luyssaert (previous) (diff)

comment:5 Changed 2 months ago by jgipsl

  • [7341] and [7340] are needed for restartability in the head of trunk today.
  • [7342] : stomate_season, section IF (firstcall_season_pre_disturbance) is commented, see explanation above. Temporary modification commited only. This section needs to be changed.

Tests for 2 years seems to be ok using rev 7342 and OOL_SEC_STO_FG2 set up. Tests only done at irene for the moment.

comment:6 Changed 2 months ago by jgipsl

  • Resolution set to fixed
  • Status changed from new to closed

[7347] : temporary solution above has been cleaned and replaced by permanent solution. SL, JG

Note: See TracTickets for help on using tickets.