Ignore:
Timestamp:
2011-07-08T14:24:28+02:00 (13 years ago)
Author:
didier.solyga
Message:

Move and clean the rest of the externalized parameters from sechiba and stomate to src_parameters. Add two subroutines in constantes. Correct Olson type number 79 in vegcorr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_EXT/ORCHIDEE/src_sechiba/slowproc.f90

    r277 r311  
    5050  ! 
    5151  INTEGER(i_std) , SAVE                              :: veget_update=0   !! update frequency in years for landuse 
    52   INTEGER(i_std) , SAVE                              :: veget_year_orig=0     !! first year for landuse 
    53   LOGICAL, SAVE                                      :: land_use = .FALSE.        ! Land Use 
    54   LOGICAL, SAVE                                      :: veget_reinit=.FALSE.  !! To change LAND USE file in a run. 
    55   ! 
    56   LOGICAL, SAVE                                   :: read_lai = .FALSE.        ! Lai Map 
    57   LOGICAL, SAVE                                   :: old_lai = .FALSE.         ! Old Lai Map interpolation 
    58   LOGICAL, SAVE                                   :: impveg = .FALSE. 
    59   LOGICAL, SAVE                                   :: impsoilt = .FALSE. 
    60   LOGICAL, SAVE                                   :: old_veget = .FALSE.         ! Old veget Map interpolation 
    6152  ! 
    6253  REAL(r_std), ALLOCATABLE, SAVE, DIMENSION (:)    :: clayfraction  
     
    502493    CHARACTER(LEN=80)                                    :: var_name       !! To store variables names for I/O 
    503494    INTEGER(i_std)                                       :: ji, jv, ier 
    504     LOGICAL, INTENT(out)                                 ::  read_lai 
     495    ! DS 08072011 change in intent(in) 
     496    LOGICAL, INTENT(in)                                 ::  read_lai 
    505497    REAL(r_std)                                           :: frac_nobio1    !! temporary 
    506     REAL(r_std)                                           :: stempdiag_bid  !! only needed for an initial LAI  
    507                                                                             !! if there is no restart file 
    508498    REAL(r_std), DIMENSION(kjpindex,nbdl)                 :: stempdiag2_bid !! matrix to store stempdiag_bid 
    509499    CHARACTER(LEN=4)                                     :: vegsoil_dist   !! Flag to choose the soil/vegetation distribution 
     
    587577    CALL setvar_p (day_counter, val_exp, 'SECHIBA_DAY', zero) 
    588578    ! 
    589     !Config Key  = LAI_MAP 
    590     !Config Desc = Read the LAI map 
    591     !Config Def  = n 
    592     !Config Help = It is possible to read a 12 month LAI map which will 
    593     !Config        then be interpolated to daily values as needed. 
    594     ! 
    595     read_lai = .FALSE. 
    596     CALL getin_p('LAI_MAP',read_lai) 
    597     ! 
    598579    var_name= 'veget' 
    599580    CALL ioconf_setatt('UNITS', '-') 
     
    613594    CALL restget_p (rest_id, var_name, nbp_glo, nnobio, 1, kjit, .TRUE., frac_nobio, "gather", nbp_glo, index_g) 
    614595    ! 
    615     !Config Key  = LAND_USE 
    616     !Config Desc = Read a land_use vegetation map 
    617     !Config Def  = n 
    618     !Config Help = pft values are needed, max time axis is 293 
    619     ! 
    620     land_use = .FALSE. 
    621596    veget_update=0 
    622     CALL getin_p('LAND_USE',land_use) 
     597 
    623598    IF (land_use) THEN 
    624        ! 
    625        !Config Key  = VEGET_YEAR 
    626        !Config Desc = Year of the land_use vegetation map to be read (0 == NO TIME AXIS) 
    627        !Config If   = LAND_USE 
    628        !Config Def  = 282 
    629        !Config Help = First year for landuse vegetation (2D map by pft). 
    630        !Config Help   If VEGET_YEAR == 0, this means there is no time axis. 
    631        ! 
    632        veget_year_orig=282 
    633        CALL getin_p('VEGET_YEAR', veget_year_orig) 
    634        ! 
    635        !Config Key  = VEGET_REINIT 
    636        !Config Desc = booleen to indicate that a new LAND USE file will be used. 
    637        !Config If   = LAND_USE 
    638        !Config Def  = n 
    639        !Config Help = The parameter is used to bypass veget_year count  
    640        !Config Help   and reinitialize it with VEGET_YEAR parameter. 
    641        !Config Help   Then it is possible to change LAND USE file. 
    642        ! 
    643        veget_reinit = .FALSE. 
    644        CALL getin_p('VEGET_REINIT', veget_reinit) 
    645        ! 
    646599       ! 
    647600       var_name= 'veget_year' 
     
    678631       WRITE(numout,*) "Update frequency for land use in years :",veget_update 
    679632       ! 
    680        !Config  Key  = LAND_COVER_CHANGE 
    681        !Config  Desc = treat land use modifications 
    682        !Config  If   = LAND_USE 
    683        !Config  Def  = y 
    684        !Config  Help = With this variable, you can use a Land Use map 
    685        !Config         to simulate anthropic modifications such as  
    686        !Config         deforestation. 
    687        ! 
    688        lcchange = .TRUE.   
    689        CALL getin_p('LAND_COVER_CHANGE', lcchange) 
    690633       IF ( veget_update == 0 .AND. lcchange ) THEN 
    691634          CALL ipslerr (2,'slowproc_init', & 
     
    750693    CALL setvar_p (zcanop, val_exp, 'SECHIBA_ZCANOP', 0.5_r_std) 
    751694    ! 
    752     !Config Key  = HYDROL_SOIL_DEPTH 
    753     !Config Desc = Total depth of soil reservoir 
    754     !Config Def  = 2. 
    755     ! 
    756     dpu_cste=2. 
    757     CALL getin_p ("HYDROL_SOIL_DEPTH", dpu_cste) 
     695    ! Initialisation of dpu 
    758696    dpu(:)=dpu_cste 
    759697!MM, T. d'O. : before in constantes_soil : 
     
    783721 
    784722    ! 
    785     !  Interception reservoir coefficient 
    786     ! 
    787     !Config  Key  = 'SECHIBA_QSINT'  
    788     !Config  Desc = Interception reservoir coefficient 
    789     !Config  Def  = 0.1 
    790     !Config  Help = Transforms leaf area index into size of interception reservoir 
    791     !Config         for slowproc_derivvar or stomate 
    792  
    793 !!$    qsintcst = 0.1 
    794     CALL getin_p('SECHIBA_QSINT', qsintcst) 
    795     WRITE(numout, *)' SECHIBA_QSINT, qsintcst = ', qsintcst 
    796  
     723!!$    WRITE(numout, *)' SECHIBA_QSINT, qsintcst = ', qsintcst 
    797724    ! 
    798725    ! Time step of STOMATE and LAI update 
     
    807734    dt_slow = one_day 
    808735    CALL getin_p('DT_SLOW', dt_slow) 
    809     ! 
    810  
    811     !Config Key  = SLOWPROC_LAI_TEMPDIAG 
    812     !Config Desc = Temperature used for the initial guess of LAI 
    813     !Config Def  = 280. 
    814     !Config Help = If there is no LAI in the restart file, we may need 
    815     !Config        a temperature that is used to guess the initial LAI. 
    816     ! 
    817     stempdiag_bid = 280. 
    818     CALL getin_p('SLOWPROC_LAI_TEMPDIAG',stempdiag_bid) 
    819     !  
     736 
    820737    ! 
    821738    ! get restart value if none were found in the restart file 
    822739    ! 
    823     !Config  Key  = AGRICULTURE 
    824     !Config  Desc = agriculture allowed? 
    825     !Config  Def  = y 
    826     !Config  Help = With this variable, you can determine 
    827     !Config         whether agriculture is allowed 
    828     ! 
    829     agriculture = .TRUE. 
    830     CALL getin_p('AGRICULTURE', agriculture) 
    831     IF ( .NOT. agriculture .AND. land_use ) THEN  
    832        CALL ipslerr (2,'slowproc_init', & 
    833                &     'Problem with agriculture desactivated and Land Use activated.',& 
    834                &     'Are you sure ?', & 
    835                &     '(check your parameters).') 
    836     ENDIF 
    837  
    838     ! 
    839     !Config Key  = IMPOSE_VEG 
    840     !Config Desc = Should the vegetation be prescribed 
    841     !Config Def  = n 
    842     !Config Help = This flag allows the user to impose a vegetation distribution 
    843     !Config        and its characterisitcs. It is espacially interesting for 0D 
    844     !Config        simulations. On the globe it does not make too much sense as 
    845     !Config        it imposes the same vegetation everywhere 
    846     ! 
    847     impveg = .FALSE. 
    848     CALL getin_p('IMPOSE_VEG', impveg) 
     740!!$    IF ( .NOT. agriculture .AND. land_use ) THEN  
     741!!$       CALL ipslerr (2,'slowproc_init', & 
     742!!$               &     'Problem with agriculture desactivated and Land Use activated.',& 
     743!!$               &     'Are you sure ?', & 
     744!!$               &     '(check your parameters).') 
     745!!$    ENDIF 
    849746    ! 
    850747    IF ( impveg ) THEN 
     
    899796       CALL setvar_p (lai, val_exp, 'SECHIBA_LAI', llaimax) 
    900797 
    901        ! 
    902        !Config Key  = IMPOSE_SOILT 
    903        !Config Desc = Should the soil typ be prescribed 
    904        !Config Def  = n 
    905        !Config If   = IMPOSE_VEG 
    906        !Config Help = This flag allows the user to impose a soil type distribution. 
    907        !Config        It is espacially interesting for 0D 
    908        !Config        simulations. On the globe it does not make too much sense as 
    909        !Config        it imposes the same soil everywhere 
    910        ! 
    911        impsoilt = .FALSE. 
    912        CALL getin_p('IMPOSE_SOILT', impsoilt) 
    913798       IF (impsoilt) THEN 
    914799          !Config Key  = SOIL_FRACTIONS 
     
    958843 
    959844          IF ( .NOT. land_use ) THEN 
    960  
    961              !Config Key  = SLOWPROC_VEGET_OLD_INTERPOL 
    962              !Config Desc = Flag to use old "interpolation" of vegetation map. 
    963              !Config If   = NOT IMPOSE_VEG and NOT LAND_USE 
    964              !Config Def  = FALSE 
    965              !Config Help = If you want to recover the old (ie orchidee_1_2 branch)  
    966              !Config        "interpolation" of vegetation map. 
    967              ! 
    968              old_veget = .FALSE. 
    969              CALL getin_p('SLOWPROC_VEGET_OLD_INTERPOL',old_veget) 
    970845 
    971846             ! The interpolation of vegetation has changed. 
     
    1092967       ! 
    1093968       IF (read_lai) THEN 
    1094  
    1095           !Config Key  = SLOWPROC_LAI_OLD_INTERPOL 
    1096           !Config Desc = Flag to use old "interpolation" of LAI 
    1097           !Config If   = LAI_MAP 
    1098           !Config Def  = FALSE 
    1099           !Config Help = If you want to recover the old (ie orchidee_1_2 branch)  
    1100           !Config        "interpolation" of LAI map. 
    1101           ! 
    1102           old_lai = .FALSE. 
    1103           CALL getin_p('SLOWPROC_LAI_OLD_INTERPOL',old_lai) 
    1104969 
    1105970          ! 
     
    46704535    ! 79 warm C4 woody savanna 
    46714536    vegcorr(79,:) = & 
    4672          & (/0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0, 0.0/) 
     4537         & (/0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.6, 0.0, 0.0/) 
    46734538    ! 80 cool woody savanna 
    46744539    vegcorr(80,:) = & 
Note: See TracChangeset for help on using the changeset viewer.