Changeset 7338 for branches/ORCHIDEE_2_2
- Timestamp:
- 2021-11-06T12:00:01+01:00 (3 years ago)
- Location:
- branches/ORCHIDEE_2_2/ORCHIDEE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_2_2/ORCHIDEE/src_parameters/constantes_soil_var.f90
r7337 r7338 113 113 114 114 INTEGER(i_std), PARAMETER,DIMENSION(nscm_fao) :: fao2usda = (/ 3,6,9 /) !! To find the values of Coarse, Medium, Fine in Zobler map 115 !! from the USDA lookup tables 116 117 !!$ REAL(r_std),DIMENSION(nscm_fao),SAVE :: soilclass_default_fao = & !! Default soil texture distribution for fao : 118 !!$ & (/ 0.28, 0.52, 0.20 /) !! in the following order : COARSE, MEDIUM, FINE (unitless) 119 !!$!$OMP THREADPRIVATE(soilclass_default_fao) 120 115 !! from the USDA lookup tables 116 121 117 !! 2. Parameters for USDA Classification 122 118 … … 127 123 ! Greenland, where the Zobler map has no data, were changed, even when having 0.28 at the 3rd place below 128 124 ! I kept the original soilclass_default_usda to keep the Reynolds map unchanged 129 130 REAL(r_std),DIMENSION(nscm_usda),SAVE :: soilclass_default_usda = & !! Default soil texture distribution in the above order : 131 & (/ 0.28, 0.52, 0.20, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 /) !! Thus different from "FAO"'s COARSE, MEDIUM, FINE 132 !! which have indices 3,6,9 in the 12-texture vector 133 !$OMP THREADPRIVATE(soilclass_default_usda) 134 135 !!$ REAL(r_std),DIMENSION(nscm_usda),SAVE :: soilclass_default_usda = & !! Default soil texture distribution, to be coherent with the 136 !!$ & (/ 0.0, 0.0, 0.28, 0.0, 0.0, 0.52, 0.0, 0.0, 0.20, 0.0, 0.0, 0.0, 0.0 /) !! original FAO/Zobler values 137 !!$ !$OMP THREADPRIVATE(soilclass_default_usda) 138 125 126 INTEGER(i_std), SAVE :: usda_default = 6 !! Default USDA texture class if no value found from map 127 !$OMP THREADPRIVATE(usda_default) 128 139 129 REAL(r_std),PARAMETER,DIMENSION(nscm_usda) :: nvan_usda = & !! Van Genuchten coefficient n (unitless) 140 130 & (/ 2.68_r_std, 2.28_r_std, 1.89_r_std, 1.41_r_std, & ! RK: 1/n=1-m -
branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90
r7337 r7338 71 71 !$OMP THREADPRIVATE(siltfraction) 72 72 REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:,:) :: laimap !! LAI map when the LAI is prescribed and not calculated by STOMATE 73 !$OMP THREADPRIVATE(laimap)74 REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:) :: soilclass_default75 !$OMP THREADPRIVATE(soilclass_default)76 73 REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:,:) :: veget_max_new !! New year fraction of vegetation type (0-1, unitless) 77 74 !$OMP THREADPRIVATE(veget_max_new) … … 948 945 siltfraction(:)=undef_sechiba 949 946 950 ! Initialisation of the fraction of the different vegetation: Start with 100% of bare soil951 ALLOCATE (soilclass_default(nscm),stat=ier)952 IF (ier /= 0) CALL ipslerr_p(3,'slowproc_init','Problem in allocation of variable soilclass_default','','')953 soilclass_default(:)=undef_sechiba954 955 947 ! Allocation of last year vegetation fraction in case of land use change 956 948 ALLOCATE(veget_max_new(kjpindex, nvm), STAT=ier) … … 1300 1292 IF (impsoilt) THEN 1301 1293 1302 ! If njsc is not in restart file, then initialize soilclass from values1303 ! from run.def file and recalculate njsc1294 ! If njsc is not in restart file, then initialize to default value 1295 ! tbd - reading from run.def file 1304 1296 IF ( ALL(njsc(:) .EQ. undef_int )) THEN 1305 !Config Key = SOIL_FRACTIONS 1306 !Config Desc = Fraction of the 3 soil types (0-dim mode) 1307 !Config Def = undef_sechiba 1308 !Config If = IMPOSE_VEG and IMPOSE_SOILT 1309 !Config Help = Determines the fraction for the 3 soil types 1310 !Config in the mesh in the following order : sand loam and clay. 1311 !Config Units = [-] 1312 1313 soilclass(1,:) = soilclass_default(:) 1314 CALL getin_p('SOIL_FRACTIONS',soilclass(1,:)) 1315 ! Assign for each grid-cell the % of the different textural classes (up to 12 if 'usda') 1316 DO ji=2,kjpindex 1317 ! here we read, for the prescribed grid-cell, the % occupied by each of the soil texture classes 1318 soilclass(ji,:) = soilclass(1,:) 1319 ENDDO 1320 1321 ! Simplify an heterogeneous grid-cell into an homogeneous one with the dominant texture 1322 njsc(:) = 0 1323 DO ji = 1, kjpindex 1324 ! here we reduce to the dominant texture class 1325 njsc(ji) = MAXLOC(soilclass(ji,:),1) 1326 ENDDO 1297 njsc(:) = usda_default ! 6 = Loam 1327 1298 END IF 1328 1299 … … 1357 1328 CALL slowproc_soilt(njsc, ks, nvan, avan, mcr, mcs, mcfc, mcw, kjpindex, lalo, neighbours, resolution, contfrac, soilclass, & 1358 1329 clayfraction, sandfraction, siltfraction) 1359 njsc(:) = 01360 DO ji = 1, kjpindex1361 njsc(ji) = MAXLOC(soilclass(ji,:),1)1362 ENDDO1363 1330 call_slowproc_soilt=.FALSE. 1364 1331 ENDIF … … 1494 1461 clayfraction, sandfraction, siltfraction) 1495 1462 IF (printlev_loc>=4) WRITE (numout,*) 'After slowproc_soilt' 1496 njsc(:) = 01497 DO ji = 1, kjpindex1498 njsc(ji) = MAXLOC(soilclass(ji,:),1)1499 ENDDO1500 1463 call_slowproc_soilt=.FALSE. 1501 1464 ENDIF … … 1604 1567 IF (ALLOCATED (woodharvest)) DEALLOCATE (woodharvest) 1605 1568 IF (ALLOCATED (frac_nobio_new)) DEALLOCATE (frac_nobio_new) 1606 IF ( ALLOCATED (soilclass_default)) DEALLOCATE (soilclass_default)1607 1569 1608 1570 ! 2. Clear all the variables in stomate … … 2920 2882 sandfraction=0.81 2921 2883 siltfraction=0.13 2922 ! njsc=22923 2884 DO ib=1 , nbpt 2924 2885 njsc(ib) = 2 … … 2931 2892 mcw(ib) = 0.05221 2932 2893 ENDDO 2933 ! definir clayfraction à partir du barycentre du domaine loamy sand2934 ! definir njsc pour cette classe => pcent dans hydrol2935 2894 2936 2895 CASE ('b') !loam … … 2938 2897 sandfraction=0.4 2939 2898 siltfraction=0.4 2940 !njsc=62941 2899 DO ib=1, nbpt 2942 2900 njsc(ib) = 6 … … 2949 2907 mcw(ib) = 0.09115 2950 2908 ENDDO 2951 ! definir clayfraction à partir du barycentre du domaine2952 ! definir njsc pour cette classe2953 2909 2954 2910 CASE ('c') !silt … … 2956 2912 sandfraction=0.06 2957 2913 siltfraction=0.84 2958 !njsc=52959 2914 DO ib=1, nbpt 2960 2915 njsc(ib)=5 … … 2968 2923 ENDDO 2969 2924 2970 ! definir clayfraction à partir du barycentre du domaine2971 ! definir njsc pour cette classe2972 2925 CASE ('d')!clay 2973 2926 clayfraction=0.55 2974 2927 sandfraction=0.15 2975 2928 siltfraction=0.3 2976 !njsc=122977 2929 DO ib=1, nbpt 2978 2930 njsc(ib)=12 … … 2985 2937 mcw(ib) = 0.1897 2986 2938 ENDDO 2987 ! definir clayfraction à partir du barycentre du domaine2988 ! definir njsc pour cette classe2989 2939 2990 2940 CASE DEFAULT … … 3032 2982 IF (ALLOC_ERR/=0) CALL ipslerr_p(3,'slowproc_soilt','Error in allocation for textfrac_table','','') 3033 2983 DO ib=1, nbpt 3034 soilclass(ib,:) = soilclass_default_usda2984 njsc(ib) = usda_default ! 6 = Loam 3035 2985 clayfraction(ib) = clayfraction_default 3036 2986 ENDDO 3037 2987 3038 2988 CASE('zobler') 3039 ! 3040 soilclass_default=soilclass_default_usda ! USDA means here 13 final texture classes, owing to fao2usda 3041 ! 2989 ! ! 3042 2990 IF (printlev_loc>=2) WRITE(numout,*) "Using a soilclass map with Zobler classification, to be read using XIOS" 3043 2991 ! … … 3076 3024 textfrac_table(5,1) * textrefrac(ib,5)+textfrac_table(7,1) * textrefrac(ib,7) 3077 3025 3078 sgn=SUM(soilclass(ib, 1:3)) ! grid-cell fraction with texture info3079 3080 IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume 28%/52%, 20% of texture classes 3/6/93081 soilclass(ib,:) = soilclass_default(:)3026 sgn=SUM(soilclass(ib,:)) ! grid-cell fraction with texture info 3027 3028 IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume that texture = Loam 3029 njsc(ib) = usda_default ! 6 = Loam 3082 3030 clayfraction(ib) = clayfraction_default 3083 3031 sandfraction(ib) = sandfraction_default … … 3089 3037 sandfraction(ib) = sandfraction(ib) / sgn 3090 3038 siltfraction(ib) = siltfraction(ib) / sgn 3091 soilclass(ib,1:3) = soilclass(ib,1:3) / sgn 3092 ENDIF 3039 soilclass(ib,:) = soilclass(ib,:) / sgn 3040 njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Dominant texture class 3041 ENDIF 3093 3042 3094 3043 ENDDO … … 3097 3046 3098 3047 IF (printlev_loc>=4) WRITE (numout,*) 'slowproc_soilt: start case usda' 3099 3100 soilclass_default=soilclass_default_usda3101 3048 ! 3102 3049 WRITE(numout,*) "Using a soilclass map with usda classification, to be read using XIOS" … … 3134 3081 sandfraction(ib) = sandfraction(ib) + textfrac_table(ilf,2)*textrefrac(ib,ilf) 3135 3082 siltfraction(ib) = siltfraction(ib) + textfrac_table(ilf,1)*textrefrac(ib,ilf) 3083 ! textfrac_table holds the %silt,%sand,%clay 3136 3084 ENDDO 3137 3085 3138 3086 sgn=SUM(soilclass(ib,:)) ! grid-cell fraction with texture info 3139 3087 3140 IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume 28%/52%, 20% of texture classes 3/6/93141 soilclass(ib,:) = soilclass_default(:)3088 IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume that texture = Loam 3089 njsc(ib) = usda_default ! 6 = Loam 3142 3090 clayfraction(ib) = clayfraction_default 3143 3091 sandfraction(ib) = sandfraction_default … … 3150 3098 siltfraction(ib) = siltfraction(ib) / sgn 3151 3099 atext(ib)=sgn 3152 ENDIF 3100 njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Dominant texture class 3101 ENDIF 3102 3153 3103 ENDDO 3154 3104 … … 3235 3185 IF (ALLOC_ERR/=0) CALL ipslerr_p(3,'slowproc_soilt','Error in allocation for textfrac_table','','') 3236 3186 DO ib=1, nbpt 3237 soilclass(ib,:) = soilclass_default_usda3187 njsc(ib) = usda_default ! 6 = Loam 3238 3188 clayfraction(ib) = clayfraction_default 3239 3189 sandfraction(ib) = sandfraction_default … … 3241 3191 ENDDO 3242 3192 CASE('zobler') 3243 ! 3244 soilclass(ib,:) = soilclass_default_usda ! USDA means here 13 final texture classes, owing to fao2usda 3245 ! 3193 ! ! 3246 3194 IF (printlev_loc>=2) WRITE(numout,*) "Using a soilclass map with Zobler classification" 3247 3195 ! … … 3265 3213 ! No points were found for current grid box, use default values 3266 3214 nbexp = nbexp + 1 3267 soilclass(ib,:) = soilclass_default(:)3215 njsc(ib) = usda_default ! 6=Loam 3268 3216 clayfraction(ib) = clayfraction_default 3269 3217 sandfraction(ib) = sandfraction_default … … 3332 3280 ! or if now information on the source grid was found. 3333 3281 nbexp = nbexp + 1 3334 soilclass(ib,:) = soilclass_default(:)3282 njsc(ib) = usda_default ! 6 = Loam 3335 3283 clayfraction(ib) = clayfraction_default 3336 3284 sandfraction(ib) = sandfraction_default … … 3341 3289 clayfraction(ib) = clayfraction(ib)/sgn 3342 3290 sandfraction(ib) = sandfraction(ib)/sgn 3343 siltfraction(ib) = siltfraction(ib)/sgn 3291 siltfraction(ib) = siltfraction(ib)/sgn 3292 njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Dominant texture class 3344 3293 ENDIF 3345 3294 ENDIF … … 3350 3299 CASE("usda") 3351 3300 IF (printlev_loc>=2) WRITE(numout,*) "Using a soilclass map with usda classification" 3352 3353 soilclass_default=soilclass_default_usda3354 3355 3301 3356 3302 ALLOCATE(textfrac_table(nscm,ntext), STAT=ALLOC_ERR) … … 3381 3327 IF (printlev_loc>=3) WRITE(numout,*)'slowproc_soilt: no soil class in input file found for point=', ib 3382 3328 nbexp = nbexp + 1 3383 soilclass(ib,:) = soilclass_default3329 njsc(ib) = usda_default ! 6 = Loam 3384 3330 clayfraction(ib) = clayfraction_default 3385 3331 sandfraction(ib) = sandfraction_default … … 3413 3359 ! 3414 3360 ENDDO 3361 njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Dominant texture class 3415 3362 3416 3363 ! Set default values if the surface in source file is too small 3364 ! Warning - This test is donne differently for Zobler (based on sgn, related to class 6=ice) 3417 3365 IF ( atext(ib) .LT. min_sechiba) THEN 3418 3366 nbexp = nbexp + 1 3419 soilclass(ib,:) = soilclass_default(:)3367 njsc(ib) = usda_default ! 6 = Loam 3420 3368 clayfraction(ib) = clayfraction_default 3421 3369 sandfraction(ib) = sandfraction_default … … 3426 3374 ENDDO 3427 3375 3428 3376 IF (printlev_loc>=4) WRITE (numout,*) ' slowproc_soilt: End case usda' 3429 3377 3430 3378 CASE DEFAULT … … 3448 3396 3449 3397 ENDIF ! xios_interpolation 3450 3451 !salma: calculate njsc3452 njsc(:) = 03453 DO ib = 1, nbpt3454 njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Here we get 3/6/9 for the Zobler classes Coarse/Medium/Fine3455 ENDDO3456 3398 3457 3399 ! End of soil texture reading, for 'maps' and classical behavior
Note: See TracChangeset
for help on using the changeset viewer.