Ignore:
Timestamp:
2021-11-06T08:24:04+01:00 (3 years ago)
Author:
agnes.ducharne
Message:

Simplification of soil texture processing, cf ticket #416: when using the Zobler map, the soil parameters are no more taken from 3-value "FAO" vectors in constantes_soil_var.f90, but from 13-value USDA vectors, owing to a pointer fao2usda. A 5-day running test with the Zobler map shows no changes, but over Greenland (class 6=ice in Zobler map).

Location:
branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/hydrol.f90

    r7255 r7337  
    14491449    IF (ier /= 0) CALL ipslerr_p(3,'hydrol_init','Problem in allocate of variable mc_adry','','') 
    14501450        
    1451     !! 2.2 Soil texture choose 
    1452  
    1453     SELECTCASE (nscm) 
    1454     CASE (3)               
    1455        pcent(:) = pcent_fao(:)  
    1456        mc_awet(:) = mc_awet_fao(:) 
    1457        mc_adry(:) = mc_adry_fao(:) 
    1458     CASE (13)            
    1459        pcent(:) = pcent_usda(:)  
    1460        mc_awet(:) = mc_awet_usda(:) 
    1461        mc_adry(:) = mc_adry_usda(:)        
    1462     CASE DEFAULT 
    1463        WRITE (numout,*) 'Unsupported soil type classification. Choose between zobler and usda according to the map' 
    1464        CALL ipslerr_p(3,'hydrol_init','Unsupported soil type classification. ',& 
    1465             'Choose between zobler and usda according to the map','') 
    1466     ENDSELECT 
    1467  
     1451    !! 2.2 Soil texture parameters 
     1452          
     1453    pcent(:) = pcent_usda(:)  
     1454    mc_awet(:) = mc_awet_usda(:) 
     1455    mc_adry(:) = mc_adry_usda(:)  
    14681456 
    14691457    !! 2.3 Read in the run.def the parameters values defined by the user 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90

    r7326 r7337  
    30323032             IF (ALLOC_ERR/=0) CALL ipslerr_p(3,'slowproc_soilt','Error in allocation for textfrac_table','','') 
    30333033             DO ib=1, nbpt 
    3034                 soilclass(ib,:) = soilclass_default_fao 
     3034                soilclass(ib,:) = soilclass_default_usda  
    30353035                clayfraction(ib) = clayfraction_default 
    30363036             ENDDO 
     
    30383038          CASE('zobler') 
    30393039             ! 
    3040              soilclass_default=soilclass_default_fao ! FAO means here 3 final texture classes 
     3040             soilclass_default=soilclass_default_usda ! USDA means here 13 final texture classes, owing to fao2usda 
    30413041             ! 
    30423042             IF (printlev_loc>=2) WRITE(numout,*) "Using a soilclass map with Zobler classification, to be read using XIOS" 
     
    30573057             !             ! 
    30583058             DO ib =1, nbpt 
    3059                 soilclass(ib,1)=textrefrac(ib,1) 
    3060                 soilclass(ib,2)=textrefrac(ib,2)+textrefrac(ib,3)+textrefrac(ib,4)+textrefrac(ib,7) 
    3061                 soilclass(ib,3)=textrefrac(ib,5) 
     3059                soilclass(ib,:)=0. 
     3060                soilclass(ib,fao2usda(1))=textrefrac(ib,1) 
     3061                soilclass(ib,fao2usda(2))=textrefrac(ib,2)+textrefrac(ib,3)+textrefrac(ib,4)+textrefrac(ib,7) 
     3062                soilclass(ib,fao2usda(3))=textrefrac(ib,5) 
    30623063 
    30633064                ! clayfraction is the sum of the % of clay (as a mineral of small granulometry, and not as a texture) 
     
    30753076                     textfrac_table(5,1) * textrefrac(ib,5)+textfrac_table(7,1) * textrefrac(ib,7) 
    30763077 
    3077                 sgn=SUM(soilclass(ib,1:3)) 
    3078  
    3079                 IF (sgn < min_sechiba) THEN 
     3078                sgn=SUM(soilclass(ib,1:3)) ! grid-cell fraction with texture info 
     3079 
     3080                IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume 28%/52%, 20% of texture classes 3/6/9 
    30803081                   soilclass(ib,:) = soilclass_default(:) 
    30813082                   clayfraction(ib) = clayfraction_default 
     
    31353136                ENDDO 
    31363137 
    3137                 sgn=SUM(soilclass(ib,:)) 
    3138  
    3139                 IF (sgn < min_sechiba) THEN 
     3138                sgn=SUM(soilclass(ib,:)) ! grid-cell fraction with texture info 
     3139 
     3140                IF (sgn < min_sechiba) THEN ! if no texture info in this grid-point, we assume 28%/52%, 20% of texture classes 3/6/9 
    31403141                   soilclass(ib,:) = soilclass_default(:) 
    31413142                   clayfraction(ib) = clayfraction_default 
     
    32343235             IF (ALLOC_ERR/=0) CALL ipslerr_p(3,'slowproc_soilt','Error in allocation for textfrac_table','','') 
    32353236             DO ib=1, nbpt 
    3236                 soilclass(ib,:) = soilclass_default_fao 
     3237                soilclass(ib,:) = soilclass_default_usda 
    32373238                clayfraction(ib) = clayfraction_default 
    32383239                sandfraction(ib) = sandfraction_default 
     
    32413242          CASE('zobler') 
    32423243             ! 
    3243              soilclass_default=soilclass_default_fao ! FAO means here 3 final texture classes 
     3244             soilclass(ib,:) = soilclass_default_usda ! USDA means here 13 final texture classes, owing to fao2usda 
    32443245             ! 
    32453246             IF (printlev_loc>=2) WRITE(numout,*) "Using a soilclass map with Zobler classification" 
     
    32943295                         SELECT CASE(solt(ilf)) 
    32953296                         CASE(1) 
    3296                             soilclass(ib,1) = soilclass(ib,1) + textrefrac(ib,solt(ilf)) 
     3297                            soilclass(ib,fao2usda(1)) = soilclass(ib,fao2usda(1)) + textrefrac(ib,solt(ilf)) 
    32973298                         CASE(2) 
    3298                             soilclass(ib,2) = soilclass(ib,2) + textrefrac(ib,solt(ilf)) 
     3299                            soilclass(ib,fao2usda(2)) = soilclass(ib,fao2usda(2)) + textrefrac(ib,solt(ilf)) 
    32993300                         CASE(3) 
    3300                             soilclass(ib,2) = soilclass(ib,2) + textrefrac(ib,solt(ilf)) 
     3301                            soilclass(ib,fao2usda(2)) = soilclass(ib,fao2usda(2)) + textrefrac(ib,solt(ilf)) 
    33013302                         CASE(4) 
    3302                             soilclass(ib,2) = soilclass(ib,2) + textrefrac(ib,solt(ilf)) 
     3303                            soilclass(ib,fao2usda(2)) = soilclass(ib,fao2usda(2)) + textrefrac(ib,solt(ilf)) 
    33033304                         CASE(5) 
    3304                             soilclass(ib,3) = soilclass(ib,3) + textrefrac(ib,solt(ilf)) 
     3305                            soilclass(ib,fao2usda(3)) = soilclass(ib,fao2usda(3)) + textrefrac(ib,solt(ilf)) 
    33053306                         CASE(7) 
    3306                             soilclass(ib,2) = soilclass(ib,2) + textrefrac(ib,solt(ilf)) 
     3307                            soilclass(ib,fao2usda(2)) = soilclass(ib,fao2usda(2)) + textrefrac(ib,solt(ilf)) 
    33073308                         CASE DEFAULT 
    33083309                            WRITE(numout,*) 'We should not be here, an impossible case appeared' 
     
    34513452       njsc(:) = 0 
    34523453       DO ib = 1, nbpt 
    3453           njsc(ib) = MAXLOC(soilclass(ib,:),1) 
     3454          njsc(ib) = MAXLOC(soilclass(ib,:),1) ! Here we get 3/6/9 for the Zobler classes Coarse/Medium/Fine 
    34543455       ENDDO 
    34553456 
     
    35453546 
    35463547       ELSE ! spmipexp is not maps nor unif, then it must be texture 
    3547          IF (spmipexp == 'texture') THEN 
    3548             IF (soil_classif == 'usda') THEN 
    3549                ! Texture map from SP-MIP, thus Soilgrids modified 
    3550                nvan(:) = nvan_usda(njsc(:)) 
    3551                avan(:) = avan_usda(njsc(:)) 
    3552                mcr(:) = mcr_usda(njsc(:)) 
    3553                mcs(:) = mcs_usda(njsc(:)) 
    3554                ks(:) = ks_usda(njsc(:)) 
    3555                mcfc(:) = mcf_usda(njsc(:)) 
    3556                mcw(:) = mcw_usda(njsc(:)) 
    3557                ! on aura pcent(:) = pcent(njsc(:)) dans hydrol 
    3558             ELSE ! soil_classif == 'zobler' or 'none' 
    3559                ! salma: here we are in exp3 -- Zobler map 
    3560                nvan(:) = nvan_fao(njsc(:)) 
    3561                avan(:) = avan_fao(njsc(:)) 
    3562                mcr(:) = mcr_fao(njsc(:)) 
    3563                mcs(:) = mcs_fao(njsc(:)) 
    3564                ks(:) = ks_fao(njsc(:)) 
    3565                mcfc(:) = mcf_fao(njsc(:)) 
    3566                mcw(:) = mcw_fao(njsc(:)) 
    3567             ENDIF !if spmipexp is texture        
     3548          IF (spmipexp == 'texture') THEN 
     3549             ! Whichever the soil texture map, we can use the USDA parameter vectors with 13 values  
     3550             nvan(:) = nvan_usda(njsc(:)) 
     3551             avan(:) = avan_usda(njsc(:)) 
     3552             mcr(:) = mcr_usda(njsc(:)) 
     3553             mcs(:) = mcs_usda(njsc(:)) 
     3554             ks(:) = ks_usda(njsc(:)) 
     3555             mcfc(:) = mcf_usda(njsc(:)) 
     3556             mcw(:) = mcw_usda(njsc(:))     
    35683557         ELSE ! if spmipexp is not among texture or maps or unif 
    35693558            WRITE(numout,*) "Unsupported spmipexp=",spmipexp 
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/thermosoil.f90

    r7207 r7337  
    379379 
    380380 
    381 !! Soil texture choose 
    382     SELECTCASE (nscm) 
    383     CASE (3) 
    384        QZ(:) = QZ_fao(:) 
    385        so_capa_dry_ns(:) = so_capa_dry_ns_fao(:) 
    386     CASE (13) !Salma changed from 12 to 13 for the new class Oxisols 
    387        QZ(:) = QZ_usda(:) 
    388        so_capa_dry_ns(:) = so_capa_dry_ns_usda(:) 
    389     CASE DEFAULT 
    390        WRITE (numout,*) 'Unsupported soil type classification. Choose between zobler, fao and usda according to the map' 
    391        STOP 'thermosoil_initialize' 
    392     ENDSELECT 
    393  
     381    !! Soil texture choose : Now useless since njsc defines the dominant texture within 13 classes whichever the soil map 
     382    QZ(:) = QZ_usda(:) 
     383    so_capa_dry_ns(:) = so_capa_dry_ns_usda(:) 
    394384     
    395385    !! 2. Initialize variable from restart file or with default values  
     
    13301320          ! Eq 11 in Peters-Lidard et al., 1998 
    13311321          IF ( satratio(ji,jg) >  0.1 ) THEN 
    1332             IF ((jst < 4 .AND. soil_classif == 'usda') .OR. (jst == 1 .AND. soil_classif == 'zobler') )  THEN 
     1322            IF (jst < 4 )  THEN 
    13331323                ! Coarse  
    13341324                ake(ji,jg) = 0.7 * LOG10 (SATRATIO(ji,jg)) + 1.0 
     
    13381328            ENDIF 
    13391329          ELSEIF ( satratio(ji,jg) >  0.05 .AND. satratio(ji,jg) <=  0.1 ) THEN 
    1340             IF ((jst < 4 .AND. soil_classif == 'usda') .OR. (jst == 1 .AND. soil_classif == 'zobler') )  THEN 
     1330            IF (jst < 4 )  THEN 
    13411331                ! Coarse  
    13421332                ake(ji,jg) = 0.7 * LOG10 (satratio(ji,jg)) + 1.0 
Note: See TracChangeset for help on using the changeset viewer.