Ignore:
Timestamp:
2011-08-31T10:30:44+02:00 (13 years ago)
Author:
didier.solyga
Message:

Reorganize the algorithm for using teststomate with the externalization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_EXT/ORCHIDEE_OL/teststomate.f90

    r408 r427  
    8383!!$ >>  DS for the externalized version 
    8484  REAL(r_std),ALLOCATABLE,DIMENSION(:) :: hist_PFTaxis 
     85  ! Flag impos_param : it is set to true by default 
     86  LOGICAL, SAVE :: impose_param = .TRUE. 
    8587!!$ >>  DS 
    8688  REAL(r_std),DIMENSION(10)         :: hist_pool_10axis      
     
    215217  CALL getin_p('LONGPRINT',long_print) 
    216218 
    217 !!$ >> DS added for the externalised version 
    218 !!$ we need to know the pft parameters values used for stomate 
    219  
    220   ! 1. Read the number of PFTs 
    221   ! 
    222   !Config Key  = NVM 
    223   !Config Desc = number of PFTs   
    224   !Config  if  = ANYTIME 
    225   !Config  Def  = 13 
    226   !Config  Help = The number of vegetation types define by the user 
    227   !Config  Units = NONE 
    228   CALL getin_p('NVM',nvm) 
    229  
    230   ! 2. Allocate and read the pft parameters stomate specific 
    231   CALL pft_parameters_main 
    232 !!$ DS 
    233  
    234219  !- 
    235220  ! activate CO2, STOMATE, but not sechiba 
     
    249234  WRITE(numout,*) 'LPJ is activated: ',control%ok_dgvm 
    250235 
    251 !!$ >> DS now we search the values for the scalar parameters in  some .def files 
    252  
    253   ! 07/2011 
     236!!$ >> DS added for the externalised version 
     237 
     238  ! 1. Number of PFTs defined by the user 
     239 
     240  !Config Key  = NVM 
     241  !Config Desc = number of PFTs   
     242  !Config if  = ANYTIME 
     243  !Config Def  = 13 
     244  !Config Help = The number of vegetation types define by the user 
     245  !Config Units = NONE 
     246  ! 
     247  CALL getin_p('NVM',nvm) 
     248  WRITE(numout,*)'the number of pfts is : ', nvm 
     249 
     250  ! 2. Should we read the parameters in the run.def file ? 
     251   
     252  !Config Key  = IMPOSE_PARAM 
     253  !Config Desc = Do you impose the values of the parameters? 
     254  !Config if  = ANYTIME 
     255  !Config Def  = y 
     256  !Config Help = This flag can deactivate the reading of some parameters. 
     257  !               Useful if you want to use the standard values without commenting the run.def 
     258  !Config Units = NONE 
     259  ! 
     260  CALL getin_p('IMPOSE_PARAM',impose_param) 
     261 
     262  ! 3. Allocate and intialize the pft parameters 
     263 
     264  CALL pft_parameters_main(control%ok_sechiba,control%ok_stomate) 
     265 
     266  ! 4. Activation sub-models of ORCHIDEE 
     267 
    254268  CALL activate_sub_models(control%ok_sechiba,control%river_routing,control%ok_stomate) 
     269 
     270  ! 5. Vegetation configuration (impose_veg, land_use, lcchange...previously in slowproc) 
     271 
    255272  CALL veget_config 
    256   ! 
    257   CALL getin_stomate_pft_parameters 
    258   CALL getin_co2_parameters 
    259    CALL getin_stomate_parameters 
    260   IF (control%ok_dgvm) THEN  
    261      CALL getin_dgvm_parameters    
    262   ENDIF 
     273 
     274  ! 6. Read the parameters in the run.def file 
     275 
     276  IF ( impose_param) THEN 
     277     CALL getin_stomate_pft_parameters 
     278     CALL getin_co2_parameters 
     279     CALL getin_stomate_parameters 
     280  ENDIF 
     281  !- 
     282  IF (control%ok_dgvm) THEN 
     283     IF ( impose_param ) THEN 
     284        CALL getin_dgvm_parameters 
     285     ENDIF 
     286  ENDIF 
     287 
    263288!!$ >> DS  
    264289 
Note: See TracChangeset for help on using the changeset viewer.