Ignore:
Timestamp:
2021-12-08T20:11:09+01:00 (3 years ago)
Author:
agnes.ducharne
Message:

Corrects two bugs: default value for nscm after r7337 and r7338; xios_interpolation now working, compared to r7339 (cf ticket #416). Note that xios_interpolation gives different results than "normal interpolation", see ticket #812.

File:
1 edited

Legend:

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

    r7339 r7375  
    127127       CALL xios_orchidee_set_fieldgroup_attr("soil_text",enabled=.FALSE.) 
    128128    END IF 
    129      
    130  
     129 
     130    !! See commented part below for the reading of params_sp_mip.nc if spmipexp='maps' 
     131    !! (with a bug, but helpful) 
     132     
    131133    !! 2. Prepare for reading of PFTmap file 
    132134    filename = 'PFTmap.nc' 
     
    223225    ENDIF 
    224226 
    225     !Salma 
    226     !! 6. Prepare for reading of soil parameter files 
    227  
    228     ! Get the file name from run.def file and set file attributes accordingly 
    229     filename = 'params_sp_mip.nc' 
    230     CALL getin_p('PARAM_FILE',filename) 
    231     name = filename(1:LEN_TRIM(FILENAME)-3) 
    232     CALL xios_orchidee_set_file_attr("soilparam_file",name=name) 
    233     ! Determine if the file will be read by XIOS. If not, deactivate reading of the file. 
    234     IF (xios_interpolation .AND. restname_in=='NONE' .AND. .NOT. impsoilt) THEN 
    235        ! Reading will be done with XIOS later 
    236        IF (printlev>=2) WRITE(numout,*) 'Reading of soil hydraulic parameters file will be done later using XIOS. The filename is ', filename 
    237     ELSE 
    238        ! No reading by XIOS, deactivate soilparam_file and related variables declared in context_input_orchidee.xml. 
    239        ! If this is not done, the model will crash if the file is not available in the run directory. 
    240        IF (printlev>=2) WRITE(numout,*) 'Reading of soil parameter file will not be done with XIOS.' 
    241        CALL xios_orchidee_set_file_attr("soilparam_file",enabled=.FALSE.) 
    242        CALL xios_orchidee_set_field_attr("soilks",enabled=.FALSE.) 
    243        CALL xios_orchidee_set_field_attr("soilnvan",enabled=.FALSE.) 
    244        CALL xios_orchidee_set_field_attr("soilavan",enabled=.FALSE.) 
    245        CALL xios_orchidee_set_field_attr("soilmcr",enabled=.FALSE.) 
    246        CALL xios_orchidee_set_field_attr("soilmcs",enabled=.FALSE.) 
    247        CALL xios_orchidee_set_field_attr("soilmcfc",enabled=.FALSE.) 
    248        CALL xios_orchidee_set_field_attr("soilmcw",enabled=.FALSE.) 
    249     ENDIF 
     227    !! This part was introduced to prepare the reading of params_sp_mip.nc if spmipexp='maps' 
     228    !! but there are mistakes in the IF ELSE ENDIF and we go through ELSE 
     229    !! each time xios_interpolation = T, even if we don't need to read this file 
     230    !! and it is not provided by sechiba.card 
     231    !! The corresponding part in context_input_orchidee.xml is also commented 
     232     
     233!!$    !! 6. Prepare for reading of soil parameter files 
     234!!$ 
     235!!$    ! Get the file name from run.def file and set file attributes accordingly 
     236!!$    filename = 'params_sp_mip.nc' 
     237!!$    CALL getin_p('PARAM_FILE',filename) 
     238!!$    name = filename(1:LEN_TRIM(FILENAME)-3) 
     239!!$    CALL xios_orchidee_set_file_attr("soilparam_file",name=name) 
     240!!$    ! Determine if the file will be read by XIOS. If not, deactivate reading of the file. 
     241!!$    IF (xios_interpolation .AND. restname_in=='NONE' .AND. .NOT. impsoilt) THEN 
     242!!$       ! Reading will be done with XIOS later 
     243!!$       IF (printlev>=2) WRITE(numout,*) 'Reading of soil hydraulic parameters file will be done later using XIOS. The filename is ', filename 
     244!!$    ELSE 
     245!!$       ! No reading by XIOS, deactivate soilparam_file and related variables declared in context_input_orchidee.xml. 
     246!!$       ! If this is not done, the model will crash if the file is not available in the run directory. 
     247!!$       IF (printlev>=2) WRITE(numout,*) 'Reading of soil parameter file will not be done with XIOS.' 
     248!!$       CALL xios_orchidee_set_file_attr("soilparam_file",enabled=.FALSE.) 
     249!!$       CALL xios_orchidee_set_field_attr("soilks",enabled=.FALSE.) 
     250!!$       CALL xios_orchidee_set_field_attr("soilnvan",enabled=.FALSE.) 
     251!!$       CALL xios_orchidee_set_field_attr("soilavan",enabled=.FALSE.) 
     252!!$       CALL xios_orchidee_set_field_attr("soilmcr",enabled=.FALSE.) 
     253!!$       CALL xios_orchidee_set_field_attr("soilmcs",enabled=.FALSE.) 
     254!!$       CALL xios_orchidee_set_field_attr("soilmcfc",enabled=.FALSE.) 
     255!!$       CALL xios_orchidee_set_field_attr("soilmcw",enabled=.FALSE.) 
     256!!$    ENDIF 
    250257 
    251258    IF (printlev_loc>=3) WRITE(numout,*) 'End slowproc_xios_intialize' 
Note: See TracChangeset for help on using the changeset viewer.