Opened 8 years ago

Closed 7 years ago

#197 closed defect (fixed)

Problem ok_freeze in hydrol.f90

Reported by: maignan Owned by: maignan
Priority: major Milestone: IPSLCM6.v1
Component: Physical processes Version: trunc
Keywords: Cc:

Description (last modified by maignan)

In the following parts under IF ok_freeze ELSE, the jst index should always appear instead of : on the third dimension as we are in a loop over jst:

3991	    !
3992	    !! -- START MAIN LOOP OVER SOILTILES
3993	    !!    The called subroutines work on arrays with DIMENSION(kjpindex), recursively used for each soiltile jst
3994	    !
3995	    DO jst = 1,nstm
...
4162       IF (ok_freeze_cwrr) THEN
4163	          DO ji =1, kjpindex
4164	             DO jsl = 1, nslm
4165	                mcl(ji,jsl,:)= MIN(mc(ji,jsl,:),mcr(njsc(ji))+(1-profil_froz_hydro_ns(ji,jsl, :))*(mc(ji,jsl,:)-mcr(njsc(ji))))
4166	             ENDDO
4167	          ENDDO
4168	       ELSE
4169	          mcl(:,:,:)=mc(:,:,:)
4170	       ENDIF
...
4237	       ! Calculation of total soil moisture content (liquid + frozen)
4238	       IF (ok_freeze_cwrr) THEN
4239	          DO ji =1, kjpindex
4240	             DO jsl = 1, nslm
4241	                mc(ji,jsl,:)=MAX(mcl(ji,jsl,:), mcl(ji,jsl,:)+profil_froz_hydro_ns(ji,jsl,:)*(mc(ji,jsl,:)-mcr(njsc(ji))))
4242	             ENDDO
4243	          ENDDO
4244	       ELSE
4245	          mc(:,:,:)=mcl(:,:,:)
4246	       ENDIF
...
4744	       IF (ok_freeze_cwrr) THEN
4745	          DO ji =1, kjpindex
4746	             DO jsl = 1, nslm
4747	                mcl(ji,jsl,:)= MIN(mc(ji,jsl,:),mcr(njsc(ji))+(1-profil_froz_hydro_ns(ji,jsl, :))*(mc(ji,jsl,:)-mcr(njsc(ji))))
4748	             ENDDO
4749	          ENDDO
4750	       ELSE
4751	          mcl(:,:,:)=mc(:,:,:)
4752	       ENDIF
...
4823	       IF (ok_freeze_cwrr) THEN
4824	          DO ji =1, kjpindex
4825	             DO jsl = 1, nslm
4826	                mc(ji,jsl,:)=MAX(mcl(ji,jsl,:), mcl(ji,jsl,:)+profil_froz_hydro_ns(ji,jsl,:)*(mc(ji,jsl,:)-mcr(njsc(ji))))
4827	             ENDDO
4828	          ENDDO
4829	       ELSE
4830	          mc(:,:,:)=mcl(:,:,:)
4831	       ENDIF
...
4922	    ENDDO !end loop on tiles

Change History (5)

comment:1 Changed 8 years ago by maignan

  • Description modified (diff)

comment:2 Changed 8 years ago by maignan

In hydrol_soil, prior to any use of profil_froz_hydro_ns, a:

CALL hydrol_soil_coef(kjpindex,jst,njsc)

has to be made to update profil_froz_hydro_ns in the possible case where mc has been modified.
In rev [2928], this concerns lines 4197, 4539 for sure.
It's not always easy to see when mc is modified because it can be done in any subroutine as mc is a global variable.
The best solution would be to make a systematic call, as ulterior modifications may again modify mc between a call to hydrol_soil_coef and the following use of profil_froz_hydro_ns.
This would also concern lines 4272, 4804, 4883.

comment:3 Changed 7 years ago by maignan

  • Milestone changed from ORCHIDEE 1.9.7 to IPSLCM6.v1
  • Owner changed from somebody to maignan
  • Status changed from new to assigned

comment:4 Changed 7 years ago by maignan

  • Status changed from assigned to accepted

comment:5 Changed 7 years ago by jgipsl

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

Done rev [3012]

Note: See TracTickets for help on using tickets.