Opened 9 years ago

Closed 9 years ago

#25 closed defect (fixed)

Bug at mercure SX9 : soilclass non initialize

Reported by: jgipsl Owned by: jgipsl
Priority: major Milestone: ORCHIDEE 2.0
Component: Communication channels Version: orchidee_1_9_6
Keywords: Cc:

Description

The trunk ORCHIDEE do not run at mercure SX9. Error message :

#######################################
EXECUTION of : time mpirun -np 4 ./lmdz.x

    * 253 Invalid operation PROG=slowproc.slowproc_init ELN=1275(400ac1aa0)
 ****  99 Execution suspended PROG=slowproc.slowproc_init ELN=1275(400ac1aa0)
                 Called from slowproc.slowproc_main ELN=222(400abc114)
                 Called from sechiba.sechiba_main ELN=406(400a7a194)
                 Called from intersurf.intersurf_gathered_2m ELN=2361(4009eaee4)
                 Called from surf_land_orchidee_noopenmp_mod. ELN=416(4001f9540)
                 Called from surf_land_mod.surf_land ELN=127(4001f6208)
                 Called from pbl_surface_mod.pbl_surface ELN=824(4000d83a0)
                 Called from physiq ELN=3106(40019f784)
                 Called from calfis_p ELN=819(4003a4f5c)
                 Called from leapfrog_p ELN=1070(400075804)
                 Called from gcm ELN=769(400002e20)

Test done with LMDZOR_v5 and :

  • LMDZ rev 1628
  • ORCHIDEE trunk rev 971
  • IOIPSL trunk rev 1660

Changing to tag ORCHIDEE_1_9_5 in case above, and it works! No test done in offline.

Change History (2)

comment:1 Changed 9 years ago by jgipsl

  • Owner changed from somebody to jgipsl
  • Status changed from new to accepted
  • Summary changed from Bug at mercure SX9 to Bug at mercure SX9 : soilclass non initialize

Case 1 : impveg=false

Error is due to the variable soilclass that is not initialized before used in following IF, ligne 1275 in slowproc_init :

IF ( MINVAL(soilclass) .EQ. MAXVAL(soilclass) .AND. MAXVAL(soilclass) .EQ. val_exp .OR. &
            & MINVAL(clayfraction) .EQ. MAXVAL(clayfraction) .AND. MAXVAL(clayfraction) .EQ. val_exp .OR. &
            & MINVAL(njsc) .EQ. MAXVAL(njsc) .AND. MAXVAL(njsc) .EQ. undef_int ) THEN

This would have been correct if restget(soilclass..) was done before but it is not the case.

soilclass is only used to calculate njsc in slowproc_init. Therefore soilclass do not need to be in restart file. Only clayfraction and njsc need to be in restart. Correction will be done by removing soilclass from the if as follow :

IF ( MINVAL(clayfraction) .EQ. MAXVAL(clayfraction) .AND. MAXVAL(clayfraction) .EQ. val_exp .OR. &
   & MINVAL(njsc) .EQ. MAXVAL(njsc) .AND. MAXVAL(njsc) .EQ. undef_int ) THEN

Case 2 : impveg=true and impsoilt=true
Following line is not correct, line 1010, slowproc_init because soilclass not in restart file :

          !Config Key   = SOIL_FRACTIONS
          !Config Desc  = Fraction of the 3 soil types (0-dim mode)
          !Config Def   = 0.28, 0.52, 0.20
          !Config If    = IMPOSE_VEG and IMPOSE_SOILT
          !Config Help  = Determines the fraction for the 3 soil types
          !Config         in the mesh in the following order : sand loam and clay.
          !Config Units = [-]
          !
          CALL setvar_p (soilclass, val_exp, 'SOIL_FRACTIONS', soilclass_default)

I propose to change this into following :

          !! If njsc is not in restart file, then initialize soilclass and recalculate njsc
          IF ( ALL(njcs(:)) == val_exp ) THEN
             !Config Key   = SOIL_FRACTIONS
             !Config Desc  = Fraction of the 3 soil types (0-dim mode)
             !Config Def   = 0.28, 0.52, 0.20
             !Config If    = IMPOSE_VEG and IMPOSE_SOILT
             !Config Help  = Determines the fraction for the 3 soil types
             !Config         in the mesh in the following order : sand loam and clay.
             !Config Units = [-]
             soilclass(1,:) = soilclass_default(:)
             CALL getin_p('SOIL_FRACTIONS',soilclass(1,:))
             soilclass(:,:) = soilclass(1,:)

             njsc(:) = 0
             DO ji = 1, kjpindex
                njsc(ji) = MAXLOC(soilclass(ji,:),1)
             ENDDO
          END IF

But soilclass_default is initialized as sechiba_undef and not according to comments 0.28, 0.52, 0.20. What should be used ?

Case 3 : impveg=true and impsoilt=false
This case is similare to case 1. soilclass will be removed from IF statement.

comment:2 Changed 9 years ago by jgipsl

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

Correction has been commited in rev 1079.

Commit rev 1095 and rev 1096 are also needed to compile at SX9.

Note: See TracTickets for help on using tickets.