Changeset 143 for branches/ORCHIDEE_EXT/ORCHIDEE/src_sechiba
- Timestamp:
- 2011-03-16T10:14:01+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_EXT/ORCHIDEE/src_sechiba/slowproc.f90
r134 r143 510 510 LOGICAL, PARAMETER :: check = .FALSE. 511 511 ! 512 ! DS 15032011 add for replacing SUM(veget_max(ji,nvm-1:nvm 513 REAL(r_std) :: sum_veget_max 514 ! 515 516 517 ! 512 518 ! 1 allocation 513 519 ! … … 970 976 ! set to 0 as well 971 977 972 ! IF (agriculture) THEN 973 ! veget_max(:,2:nvm-2) = zero 974 ! DO ji = 1, kjpindex 975 ! veget_max(ji,1) = un - SUM(veget_max(ji,nvm-1:nvm)) & 976 ! - SUM(frac_nobio(ji,:)) 977 ! ENDDO 978 ! ELSE 979 ! veget_max(:,:) = zero 980 ! DO ji = 1, kjpindex 981 ! veget_max(ji,1) = un - SUM(frac_nobio(ji,:)) 982 ! ENDDO 983 ! ENDIF 984 985 !$$$ 25/10/10 :: Modif DS & NV :: attention garde t'on la masse de C !!! 978 !$$$ 25/10/10 :: Modif DS & NV :: attention garde t'on la masse de C !!! 979 ! Modif 15/03/2011 980 986 981 IF (agriculture) THEN 987 DO j = 2, nvm 988 WHERE( natural(:)) 989 veget_max (:,j) = zero 990 ENDWHERE 991 ENDDO 982 DO jv=2,nvm 983 IF (natural(jv)) THEN 984 veget_max(:,jv)=zero 985 ELSE 986 sum_veget_max = zero 987 DO ji = 1, kjpindex 988 ! we sum only on the indexes corresponding to the non_natural pfts 989 sum_veget_max = sum_veget_max + veget_max(ji,jv) 990 ! veget_max(ji,1) = un - SUM(veget_max(ji,jv))-SUM(frac_nobio(ji,:)) 991 ENDDO 992 veget_max(ji,1) = un - sum_veget_max - SUM(frac_nobio(ji,:)) 993 ENDIF 994 ENDDO !- end loop nvm 992 995 ELSE 993 996 veget_max(:,:) = zero 997 DO ji = 1, kjpindex 998 veget_max(ji,1) = un - SUM(frac_nobio(ji,:)) 999 ENDDO 994 1000 ENDIF 995 996 DO ji = 1, kjpindex997 veget_max(ji,1) = un - SUM(veget_max(ji,2:nvm)) - SUM(frac_nobio(ji,:))998 ENDDO999 1001 ! 1000 1002 ENDIF … … 1012 1014 ! set to 0 as well 1013 1015 1014 ! IF (agriculture) THEN 1015 ! veget_max(:,2:nvm-2) = zero 1016 ! DO ji = 1, kjpindex 1017 ! veget_max(ji,1) = un - SUM(veget_max(ji,nvm-1:nvm)) & 1018 ! - SUM(frac_nobio(ji,:)) 1019 ! ENDDO 1020 ! ELSE 1021 ! veget_max(:,:) = zero 1022 ! DO ji = 1, kjpindex 1023 ! veget_max(ji,1) = un - SUM(frac_nobio(ji,:)) 1024 ! ENDDO 1025 ! ENDIF 1026 ! 1027 ! ENDIF 1028 1029 !$$$ 25/10/10 :: Modif DS & NV :: attention garde t'on la masse de C !!! 1030 IF (agriculture) THEN 1031 DO j = 2, nvm 1032 WHERE( natural(:)) 1033 veget_max (:,j) = zero 1034 ENDWHERE 1035 ENDDO 1016 !$$$ 25/10/10 :: Modif DS & NV :: attention garde t'on la masse de C !!! 1017 ! DS : Nouvelle correction 15/03/2011 1018 IF (agriculture) THEN 1019 DO jv = 2, nvm 1020 IF (natural(jv)) THEN 1021 veget_max(:,jv)=zero 1022 ELSE 1023 ! Add 15/03/2011 1024 sum_veget_max = zero 1025 DO ji = 1, kjpindex 1026 sum_veget_max = sum_veget_max + veget_max(ji,jv) 1027 ENDDO 1028 veget_max(ji,1) = un - sum_veget_max- SUM(frac_nobio(ji,:)) 1029 ENDIF 1030 ENDDO !- end loop nvm 1036 1031 ELSE 1037 1032 veget_max(:,:) = zero 1038 ENDIF1039 1040 DO ji = 1, kjpindex1041 veget_max(ji,1) = un - SUM(veget_max(ji,2:nvm)) - SUM(frac_nobio(ji,:))1042 ENDDO1043 ENDIF1033 DO ji = 1, kjpindex 1034 veget_max(ji,1) = un - SUM(frac_nobio(ji,:)) 1035 ENDDO 1036 ENDIF 1037 ! 1038 ENDIF 1044 1039 ! 1045 1040 ENDIF 1046 !1041 ! 1047 1042 ELSE 1048 ! WITH restarts for vegetation and DGVM and NO AGRICULTURE1049 IF ( control%ok_dgvm ) THEN1043 ! WITH restarts for vegetation and DGVM and NO AGRICULTURE 1044 IF ( control%ok_dgvm ) THEN 1050 1045 ! 1051 1046 ! If we are dealing with dynamic vegetation then all … … 1063 1058 !$$$ 25/10/10 :: Modif DS & NV :: attention garde t'on la masse de C !!! 1064 1059 IF (.NOT. agriculture) THEN 1065 DO j = 2, nvm1060 DO jv = 2, nvm 1066 1061 DO ji = 1, kjpindex 1067 IF ( .NOT. natural (j )) THEN1068 veget_max(ji,1) = veget_max(ji,1) + veget_max(ji,j )1069 veget_max(ji,j ) = zero1062 IF ( .NOT. natural (jv)) THEN 1063 veget_max(ji,1) = veget_max(ji,1) + veget_max(ji,jv) 1064 veget_max(ji,jv) = zero 1070 1065 ENDIF 1071 1066 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.