Changeset 5627


Ignore:
Timestamp:
Apr 25, 2025, 2:21:02 PM (6 weeks ago)
Author:
amaison
Message:

Representation of heterogeneous continental subsurfaces with parameter or flux aggregation in the simplified surface model (bucket) for 1D case studies.

Location:
LMDZ6/trunk/libf/phylmd
Files:
3 added
16 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/compbl_mod_h.f90

    r5296 r5627  
    33MODULE compbl_mod_h
    44  IMPLICIT NONE; PRIVATE
    5   PUBLIC iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
     5  PUBLIC iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree, iflag_hetero_surf
    66
    77  !!      integer iflag_pbl,iflag_pbl_split
     
    99  !!FC      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
    1010  !FC      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
    11   INTEGER iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
    12   !$OMP THREADPRIVATE(iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree)
     11  INTEGER iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree, iflag_hetero_surf
     12  !$OMP THREADPRIVATE(iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree, iflag_hetero_surf)
    1313
    1414  !>jyg+al1
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.f90

    r5622 r5627  
    193193    REAL,SAVE :: Cd_frein_omp
    194194!FC
     195!AM
     196    INTEGER,SAVE :: iflag_hetero_surf_omp
    195197    INTEGER,SAVE :: iflag_order2_sollw_omp
    196198    INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp
     
    15311533    Cd_frein_omp = 7.5E-02
    15321534    CALL getin('Cd_frein',Cd_frein_omp)
    1533 
     1535!AM
     1536    !Config Key  = iflag_hetero_surf
     1537    !Config Desc = type of treatment for heterogeneous continental sub-surfaces
     1538    !Config Def  = 0
     1539    !Config Help = 0: homo. surface; 1: heteo. surface with parameter aggregation; 2: heteo surface with flux aggregation
     1540    !
     1541    iflag_hetero_surf_omp = 0
     1542    CALL getin('iflag_hetero_surf',iflag_hetero_surf_omp)
    15341543    !
    15351544    !Config Key  = iflag_pbl_split
     
    23902399    ifl_pbltree = ifl_pbltree_omp
    23912400    Cd_frein    =Cd_frein_omp
     2401!AM
     2402    iflag_hetero_surf = iflag_hetero_surf_omp
    23922403    iflag_order2_sollw = iflag_order2_sollw_omp
    23932404    lev_histhf = lev_histhf_omp
     
    28392850    WRITE(lunout,*) ' ifl_pbltree = ', ifl_pbltree
    28402851    WRITE(lunout,*) ' Cd_frein = ', Cd_frein
     2852!AM
     2853    WRITE(lunout,*) ' iflag_hetero_surf = ', iflag_hetero_surf
    28412854    WRITE(lunout,*) ' iflag_pbl_split = ', iflag_pbl_split
    28422855    WRITE(lunout,*) ' iflag_order2_sollw = ', iflag_order2_sollw
  • LMDZ6/trunk/libf/phylmd/dimphy.f90

    r5494 r5627  
    1212  INTEGER,SAVE :: klevm1
    1313  INTEGER,SAVE :: kflev
     14  INTEGER,SAVE :: nbtersrf !AM
     15  INTEGER,SAVE :: nbtsoildepths !AM
    1416
    1517!$OMP THREADPRIVATE(klon,kfdia,kidia,kdlon)
     
    4446  END SUBROUTINE Init_dimphy
    4547
    46   SUBROUTINE Init_dimphy1D(klon0,klev0)
     48  SUBROUTINE Init_dimphy1D(klon0,klev0,nbtersrf0,nbtsoildepths0)
    4749! 1D special version of dimphy without ALLOCATE(zmasq)
    4850! which will be allocated in iniphysiq
     
    5153    INTEGER, INTENT(in) :: klon0
    5254    INTEGER, INTENT(in) :: klev0
    53    
     55    INTEGER, INTENT(in), OPTIONAL :: nbtersrf0
     56    INTEGER, INTENT(in), OPTIONAL :: nbtsoildepths0
     57
    5458    klon=klon0
    5559    kdlon=klon
     
    6064    klevm1=klev-1
    6165    kflev=klev
    62    
     66    nbtersrf=nbtersrf0
     67    nbtsoildepths=nbtsoildepths0
     68
    6369  END SUBROUTINE Init_dimphy1D
    6470
  • LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h

    r5392 r5627  
    415415       CALL getin('tau_soil_nudge',tau_soil_nudge)
    416416
     417!Config  Key  = nb_ter_srf
     418!Config  Desc = nb_ter_srf
     419!Config  Def  = 0
     420!Config  Help =
     421       nb_ter_srf = 0
     422       CALL getin('nb_ter_srf',nb_ter_srf)
     423
     424!Config  Key  = alpha_soil_ter_srf
     425!Config  Desc = alpha_soil_ter_srf
     426!Config  Def  = 2.
     427!Config  Help =
     428       alpha_soil_ter_srf = 2.
     429       CALL getin('alpha_soil_ter_srf',alpha_soil_ter_srf)
     430
     431!Config  Key  = period_ter_srf
     432!Config  Desc = period_ter_srf
     433!Config  Def  = 1800.
     434!Config  Help =
     435       period_ter_srf = 1800.
     436       CALL getin('period_ter_srf',period_ter_srf)
     437
     438!Config  Key  = frac_ter_srf
     439!Config  Desc = frac_ter_srf
     440!Config  Def  = 0.
     441!Config  Help =
     442       frac_ter_srf = 0.
     443       CALL getin('frac_ter_srf',frac_ter_srf)
     444
     445!Config  Key  = rugos_ter_srf
     446!Config  Desc = rugos_ter_srf
     447!Config  Def  = 0.
     448!Config  Help =
     449       rugos_ter_srf = 0.
     450       CALL getin('rugos_ter_srf',rugos_ter_srf)
     451
     452!Config  Key  = ratio_z0m_z0h_ter_srf
     453!Config  Desc = ratio_z0m_z0h_ter_srf
     454!Config  Def  = 10.
     455!Config  Help =
     456       ratio_z0m_z0h_ter_srf = 10.
     457       CALL getin('ratio_z0m_z0h_ter_srf',ratio_z0m_z0h_ter_srf)
     458
     459!Config  Key  = albedo_ter_srf
     460!Config  Desc = albedo_ter_srf
     461!Config  Def  = 0.
     462!Config  Help =
     463       albedo_ter_srf = 0.
     464       CALL getin('albedo_ter_srf',albedo_ter_srf)
     465
     466!Config  Key  = beta_ter_srf
     467!Config  Desc = beta_ter_srf
     468!Config  Def  = 0.
     469!Config  Help =
     470       beta_ter_srf = 0.
     471       CALL getin('beta_ter_srf',beta_ter_srf)
     472
     473!Config  Key  = inertie_ter_srf
     474!Config  Desc = inertie_ter_srf
     475!Config  Def  = 0.
     476!Config  Help =
     477       inertie_ter_srf = 0.
     478       CALL getin('inertie_ter_srf',inertie_ter_srf)
     479
     480!Config  Key  = hcond_ter_srf
     481!Config  Desc = hcond_ter_srf
     482!Config  Def  = 0.
     483!Config  Help =
     484       hcond_ter_srf = 0.
     485       CALL getin('hcond_ter_srf',hcond_ter_srf)
     486
     487!Config  Key  = tsurf_ter_srf
     488!Config  Desc = tsurf_ter_srf
     489!Config  Def  = 283.
     490!Config  Help =
     491       tsurf_ter_srf = 283.
     492       CALL getin('tsurf_ter_srf',tsurf_ter_srf)
     493
     494!Config  Key  = tsoil_ter_srf
     495!Config  Desc = tsoil_ter_srf
     496!Config  Def  = 283.
     497!Config  Help =
     498       tsoil_ter_srf = 283.
     499       CALL getin('tsoil_ter_srf',tsoil_ter_srf)
     500
     501!Config  Key  = tsoil_depths
     502!Config  Desc = tsoil_depths
     503!Config  Def  = 0.
     504!Config  Help =
     505       tsoil_depths = 0.
     506       CALL getin('tsoil_depths',tsoil_depths)
     507
     508!Config  Key  = nb_tsoil_depths
     509!Config  Desc = nb_tsoil_depths
     510!Config  Def  = 0
     511!Config  Help =
     512       nb_tsoil_depths = 0
     513       CALL getin('nb_tsoil_depths',nb_tsoil_depths)
     514
    417515!----------------------------------------------------------
    418516! Param??tres de for??age pour les forcages communs:
     
    631729      write(lunout,*)' nudging_t  = ', nudging_t
    632730      write(lunout,*)' nudging_qv  = ', nudging_qv
     731      write(lunout,*)' nb_ter_srf = ', nb_ter_srf
     732      write(lunout,*)' alpha_soil_ter_srf = ', alpha_soil_ter_srf
     733      write(lunout,*)' period_ter_srf = ', period_ter_srf
     734      write(lunout,*)' frac_ter_srf = ', frac_ter_srf
     735      write(lunout,*)' rugos_ter_srf = ', rugos_ter_srf
     736      write(lunout,*)' ratio_z0m_z0h_ter_srf = ', ratio_z0m_z0h_ter_srf
     737      write(lunout,*)' albedo_ter_srf = ', albedo_ter_srf
     738      write(lunout,*)' beta_ter_srf = ', beta_ter_srf
     739      write(lunout,*)' inertie_ter_srf = ', inertie_ter_srf
     740      write(lunout,*)' hcond_ter_srf = ', hcond_ter_srf
     741      write(lunout,*)' tsurf_ter_srf = ', tsurf_ter_srf
     742      write(lunout,*)' tsoil_ter_srf = ', tsoil_ter_srf
     743
    633744      IF (forcing_type .eq.40) THEN
    634745        write(lunout,*) '--- Forcing type GCSS Old --- with:'
  • LMDZ6/trunk/libf/phylmd/dyn1d/compar1d_mod_h.f90

    r5302 r5627  
    88          iflag_nudge, snowmass, &
    99          restart, ok_old_disvert, &
     10          nb_ter_srf, alpha_soil_ter_srf, period_ter_srf, frac_ter_srf, &
     11          rugos_ter_srf, ratio_z0m_z0h_ter_srf, albedo_ter_srf, beta_ter_srf, &
     12          inertie_ter_srf, hcond_ter_srf, tsurf_ter_srf, tsoil_ter_srf, &
     13          tsoil_depths, nb_tsoil_depths, &
    1014          tadv, tadvv, tadvh, qadv, qadvv, qadvh, thadv, thadvv, thadvh, &
    1115          trad, forc_omega, forc_u, forc_v, forc_w, forc_geo, forc_ustar, &
     
    4448  LOGICAL :: ok_old_disvert
    4549
     50  INTEGER :: nb_ter_srf
     51  REAL :: alpha_soil_ter_srf
     52  REAL :: period_ter_srf
     53  REAL, DIMENSION(5) :: frac_ter_srf
     54  REAL, DIMENSION(5) :: rugos_ter_srf
     55  REAL, DIMENSION(5) :: ratio_z0m_z0h_ter_srf
     56  REAL, DIMENSION(5) :: albedo_ter_srf
     57  REAL, DIMENSION(5) :: beta_ter_srf
     58  REAL, DIMENSION(5) :: inertie_ter_srf
     59  REAL, DIMENSION(5) :: hcond_ter_srf
     60  REAL, DIMENSION(5) :: tsurf_ter_srf
     61  REAL, DIMENSION(5*5) :: tsoil_ter_srf
     62  REAL, DIMENSION(5*5) :: tsoil_depths
     63  INTEGER :: nb_tsoil_depths
     64
    4665  ! Pour les forcages communs: ces entiers valent 0 ou 1
    4766  ! tadv= advection tempe, tadvv= adv tempe verticale, tadvh= adv tempe horizontale
     
    6584  !$OMP      iflag_nudge, snowmass, &
    6685  !$OMP      restart, ok_old_disvert, &
     86  !$OMP      nb_ter_srf, frac_ter_srf, rugos_ter_srf, albedo_ter_srf,         &
     87  !$OMP      beta_ter_srf, inertie_ter_srf, alpha_soil_ter_srf,               &
     88  !$OMP      period_ter_srf, hcond_ter_srf, ratio_z0m_z0h_ter_srf,            &
     89  !$OMP      tsurf_ter_srf, tsoil_ter_srf, tsoil_depths, nb_tsoil_depths,     &
    6790  !$OMP      tadv, tadvv, tadvh, qadv, qadvv, qadvh, thadv, thadvv, thadvh, &
    6891  !$OMP      trad, forc_omega, forc_u, forc_v, forc_w, forc_geo, forc_ustar, &
  • LMDZ6/trunk/libf/phylmd/dyn1d/scm.f90

    r5490 r5627  
    88       clwcon, detr_therm, &
    99       qsol, fevap, z0m, z0h, agesno, &
     10       frac_tersrf, z0m_tersrf, ratio_z0m_z0h_tersrf, &
     11       albedo_tersrf, beta_tersrf, inertie_tersrf, &
     12       alpha_soil_tersrf, period_tersrf, hcond_tersrf, &
     13       tsurfi_tersrf, tsoili_tersrf, tsoil_depth, &
    1014       du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, &
    1115       falb_dir, falb_dif, &
     
    178182      real :: fder(1),snsrf(1,nbsrf),qsurfsrf(1,nbsrf)
    179183      real :: tsoil(1,nsoilmx,nbsrf)
     184      ! AM
     185      REAL, ALLOCATABLE, DIMENSION(:,:) :: tsoil_ter_srf2 ! resized initial soil temperature on vertical levels (K)
     186      REAL, ALLOCATABLE, DIMENSION(:,:) :: tsoil_depths2  ! resized soil depth at which inititial temperature is given (m)
    180187
    181188!---------------------------------------------------------------------
     
    222229!                           <> 0, tendencies of forcing are not added
    223230      INTEGER :: flag_inhib_forcing = 0
    224 
     231      CHARACTER(len=80) :: abort_message
     232      CHARACTER(len=20) :: modname = 'scm'
    225233
    226234      print*,'VOUS ENTREZ DANS LE 1D FORMAT STANDARD'
     
    385393!     call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq
    386394!     but we still need to initialize dimphy module (klon,klev,etc.)  here.
    387       call init_dimphy1D(1,llm)
     395      call init_dimphy1D(1,llm,nb_ter_srf,nb_tsoil_depths)
    388396      call suphel
    389397      call init_infotrac
     
    560568        agesno  = xagesno
    561569        tsoil(:,:,:)=tsurf
     570
     571        iflag_hetero_surf = 0
     572        CALL getin('iflag_hetero_surf',iflag_hetero_surf)
     573
     574        IF (iflag_hetero_surf .GT. 0) THEN
     575          PRINT*, 'scm iflag_hetero_surf', iflag_hetero_surf
     576          IF ((nbtersrf .LT. 2) .OR. (nbtersrf .GT. max_nbtersrf)) THEN
     577            abort_message='The number of continental sub-surfaces (nb_ter_srf) must be between 2 and 5'
     578            CALL abort_physic(modname,abort_message,1)
     579          ENDIF
     580          ! resized initial soil temperature on vertical levels and soil depth at which inititial temperature is given
     581          ALLOCATE(tsoil_ter_srf2(nbtsoildepths,nbtersrf))
     582          ALLOCATE(tsoil_depths2(nbtsoildepths,nbtersrf))
     583          tsoil_ter_srf2(:,:) = 0.
     584          tsoil_depths2(:,:) = 0.
     585          DO i=1, nbtersrf
     586            DO l=1, nbtsoildepths
     587              k = nbtsoildepths*(i-1)+l
     588              tsoil_ter_srf2(l,i) = tsoil_ter_srf(k)
     589              tsoil_depths2(l,i) = tsoil_depths(k)
     590            ENDDO
     591          ENDDO
     592          !
     593          DO i=1, nbtersrf
     594            frac_tersrf(:,i) = frac_ter_srf(i)                   ! fraction of land surface heterogeneity (-)
     595            z0m_tersrf(:,i) = rugos_ter_srf(i)                   ! roughness length for momentum of land sub-surfaces (m)
     596            ratio_z0m_z0h_tersrf(:,i) = ratio_z0m_z0h_ter_srf(i) ! ratio of heat to momentum roughness length of land sub-surfaces (-)
     597            albedo_tersrf(:,i) = albedo_ter_srf(i)               ! albedo of land sub-surfaces (-)
     598            beta_tersrf(:,i) = beta_ter_srf(i)                   ! evapotranspiration coef of land sub-surfaces (-)
     599            inertie_tersrf(:,i) = inertie_ter_srf(i)             ! soil thermal inertia of land sub-surfaces (J/m2/K/s1/2)
     600            hcond_tersrf(:,i) = hcond_ter_srf(i)                 ! soil heat conductivity (W/(m.K))
     601            tsurfi_tersrf(:,i) = tsurf_ter_srf(i)                ! initial surface temperature (K)
     602            DO l=1, nbtsoildepths
     603              tsoili_tersrf(:,l,i) = tsoil_ter_srf2(l,i)         ! initial soil temperature on vertical levels (K)
     604              tsoil_depth(:,l,i) = tsoil_depths2(l,i)
     605            ENDDO
     606          ENDDO
     607          alpha_soil_tersrf = alpha_soil_ter_srf               ! ratio between the thicknesses of 2 successive layers (-)
     608          period_tersrf = period_ter_srf                       ! temperature oscillation amplitude period
     609          !
     610          DEALLOCATE(tsoil_ter_srf2)
     611          DEALLOCATE(tsoil_depths2)
     612        ENDIF
     613
    562614!-----------------------------------------------------------------------
    563615        call pbl_surface_init(fder, snsrf, qsurfsrf, tsoil)
  • LMDZ6/trunk/libf/phylmd/indice_sol_mod.f90

    r5268 r5627  
    1414           INTEGER, SAVE    :: nvm_orch ! Nombre de type de vegetation ds ORCHIDEE                 
    1515           !$OMP THREADPRIVATE(nvm_orch)
     16!
     17!AM heterogeneous continental sub-surfaces
     18            !!! If max_nbtersrf is modified, please change also the output number in phys_output_ctrlout_mod.F90
     19            INTEGER, PARAMETER :: max_nbtersrf = 5  ! maximal number of continental sub-surfaces
     20            CHARACTER(len=1), DIMENSION(max_nbtersrf), PARAMETER :: nb_tersrf = (/'1', '2', '3', '4', '5'/)
     21            !!! nsoilout must be lower than nsoilmx
     22            INTEGER, PARAMETER :: nsoilout = 10  ! number of soil layers for output
     23            CHARACTER(len=2), DIMENSION(nsoilout), PARAMETER :: nb_soil = (/'01','02','03','04','05','06','07','08','09','10'/)!,'11','12','13','14'/)
    1624
    1725      END MODULE indice_sol_mod
  • LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90

    r5486 r5627  
    313313!!        tke_x,     tke_w                              &
    314314       wake_dltke,                                   &
    315         treedrg                                      &
     315        treedrg,                                      &
    316316!FC
     317!AM heterogeneous continental sub-surfaces
     318       tsurf_tersrf, tsoil_tersrf, qsurf_tersrf, tsurf_new_tersrf, &
     319       cdragm_tersrf, cdragh_tersrf, &
     320       swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf &
    317321!!!
    318322#ifdef ISO
     
    390394! pblT-----output-R- T au nveau HCL
    391395! treedrg--output-R- tree drag (m)               
    392 !
     396! qsurf_tersrf--output-R- surface specific humidity of continental sub-surfaces
     397! cdragm_tersrf--output-R- momentum drag coefficient of continental sub-surfaces
     398! cdragh_tersrf--output-R- heat drag coefficient of continental sub-surfaces
     399! tsurf_new_tersrf--output-R- surface temperature of continental sub-surfaces
     400! swnet_tersrf--output-R- net shortwave radiation of continental sub-surfaces
     401! lwnet_tersrf--output-R- net longwave radiation of continental sub-surfaces
     402! fluxsens_tersrf--output-R- sensible heat flux of continental sub-surfaces
     403! fluxlat_tersrf--output-R- latent heat flux of continental sub-surfaces
     404
    393405    USE carbon_cycle_mod,   ONLY : carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm
    394406    USE carbon_cycle_mod,   ONLY : co2_send, nbcf_out, fields_out, yfields_out, cfname_out
     
    414426    USE ioipsl_getin_p_mod, ONLY : getin_p
    415427    use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, dter, &
    416          dser, dt_ds, zsig, zmea
     428         dser, dt_ds, zsig, zmea, &
     429         frac_tersrf, z0m_tersrf, ratio_z0m_z0h_tersrf, albedo_tersrf !AM
    417430    use phys_output_var_mod, only: tkt, tks, taur, sss
    418431    use lmdz_blowing_snow_ini, only : zeta_bs
     
    420433    USE netcdf, only: missing_val_netcdf => nf90_fill_real
    421434    USE dimsoil_mod_h, ONLY: nsoilmx
     435    USE surf_param_mod, ONLY: eff_surf_param  !AM
    422436
    423437    USE yomcst_mod_h
     
    620634    REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_v     ! v wind tension (kg m/s)/(m**2 s) or Pascal
    621635!FC
    622     REAL, DIMENSION(klon, klev, nbsrf), INTENT(INOUT) :: treedrg  ! tree drag (m)               
     636    REAL, DIMENSION(klon, klev, nbsrf), INTENT(INOUT) :: treedrg  ! tree drag (m)     
     637!AM heterogeneous continental sub-surfaces
     638    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: tsurf_tersrf     ! surface temperature of continental sub-surfaces (K)               
     639    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: qsurf_tersrf     ! surface specific humidity of continental sub-surfaces (kg/kg)               
     640    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: tsurf_new_tersrf ! surface temperature of continental sub-surfaces (K)               
     641    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: cdragm_tersrf    ! momentum drag coefficient of continental sub-surfaces (-)               
     642    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: cdragh_tersrf    ! heat drag coefficient of continental sub-surfaces (-)               
     643    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: swnet_tersrf     ! net shortwave radiation of continental sub-surfaces (W/m2)               
     644    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: lwnet_tersrf     ! net longwave radiation of continental sub-surfaces (W/m2)               
     645    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: fluxsens_tersrf  ! sensible heat flux of continental sub-surfaces (W/m2)               
     646    REAL, DIMENSION(klon, nbtersrf), INTENT(INOUT) :: fluxlat_tersrf   ! latent heat flux of continental sub-surfaces (W/m2)               
     647    REAL, DIMENSION(klon, nsoilmx, nbtersrf), INTENT(INOUT) :: tsoil_tersrf ! soil temperature of continental sub-surfaces (K)               
    623648#ifdef ISO       
    624649    REAL, DIMENSION(niso,klon),   INTENT(OUT)       :: xtsol      ! water height in the soil (mm)
     
    10501075    ! dt_ds, tkt, tks, taur, sss on ocean points
    10511076    REAL :: missing_val
     1077    ! AM !
     1078    REAL, DIMENSION(klon) :: z0m_eff, z0h_eff, ratio_z0m_z0h_eff, albedo_eff
     1079    REAL, DIMENSION(klon, nbtersrf) :: z0h_tersrf
    10521080#ifdef ISO
    10531081    REAL, DIMENSION(klon)       :: h1
     
    14741502    ENDDO
    14751503
     1504    ! AM heterogeneous continental subsurfaces
     1505    ! compute time-independent effective surface parameters
     1506    IF (iflag_hetero_surf .GT. 0) THEN
     1507      albedo_eff = eff_surf_param(klon, nbtersrf, albedo_tersrf, frac_tersrf, 'ARI')
     1508    ENDIF
     1509
    14761510! Mean calculations of albedo
    14771511!
     
    14861520     DO nsrf = 1, nbsrf
    14871521       DO i = 1, klon
     1522          ! AM heterogeneous continental sub-surfaces
     1523          IF (nsrf .EQ. is_ter .AND. iflag_hetero_surf .GT. 0) THEN
     1524            alb_dir(i,k,nsrf) = albedo_eff(i)
     1525            alb_dif(i,k,nsrf) = albedo_eff(i)
     1526          ENDIF
     1527          !
    14881528          alb_dir_m(i,k) = alb_dir_m(i,k) + alb_dir(i,k,nsrf) * pctsrf(i,nsrf)
    14891529          alb_dif_m(i,k) = alb_dif_m(i,k) + alb_dif(i,k,nsrf) * pctsrf(i,nsrf)
     
    18831923           speed(i) = SQRT(yu(i,1)**2+yv(i,1)**2)
    18841924        ENDDO
     1925!       
     1926        !!! AM heterogeneous continental subsurfaces
     1927        IF (nsrf .EQ. is_ter) THEN
     1928          ! compute time-dependent effective surface parameters (function of zgeo1) !! AM
     1929          IF (iflag_hetero_surf .GT. 0) THEN
     1930            DO i=1,klon
     1931              DO j=1,nbtersrf
     1932                IF (ratio_z0m_z0h_tersrf(i,j) .NE. 0.) THEN
     1933                  z0h_tersrf(i,j) = z0m_tersrf(i,j) / ratio_z0m_z0h_tersrf(i,j)
     1934                ELSE
     1935                  z0h_tersrf(i,j) = 0.
     1936                ENDIF
     1937              ENDDO
     1938            ENDDO
     1939            !
     1940            z0m_eff = eff_surf_param(klon, nbtersrf, z0m_tersrf, frac_tersrf, 'CDN', zgeo1/RG)
     1941            z0h_eff = eff_surf_param(klon, nbtersrf, z0h_tersrf, frac_tersrf, 'CDN', zgeo1/RG)
     1942            yz0m = z0m_eff
     1943            yz0h = z0h_eff
     1944            !
     1945          ENDIF
     1946        ENDIF
     1947!
    18851948        CALL cdrag(knon, nsrf, &
    18861949            speed, yt(:,1), yq(:,1), zgeo1, ypaprs(:,1), s_pblh, &
     
    24252488               yqsurf, ytsurf_new, y_dflux_t, y_dflux_q, &
    24262489               y_flux_u1, y_flux_v1, &
    2427                yveget,ylai,yheight   &
     2490               yveget,ylai,yheight, tsurf_tersrf, tsoil_tersrf, qsurf_tersrf, tsurf_new_tersrf, &
     2491               cdragm_tersrf, cdragh_tersrf, &
     2492               swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf  &
    24282493#ifdef ISO
    24292494         &      ,yxtrain_f, yxtsnow_f,yxt1, &
     
    24322497#endif               
    24332498         &      )
    2434  
     2499
     2500          tsurf_tersrf(:,:) =  tsurf_new_tersrf(:,:) ! for next time step
     2501
    24352502!FC quid qd yveget ylai yheight ne sont pas definit
    24362503!FC  yveget,ylai,yheight, &
  • LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90

    r5285 r5627  
    355355    alp_bl =0.
    356356    treedrg(:,:,:)=0.
     357    tsurf_tersrf(:,:) = 0.
     358    qsurf_tersrf(:,:) = 0.
     359    cdragm_tersrf(:,:) = 0.
     360    cdragh_tersrf(:,:) = 0.
     361    swnet_tersrf(:,:) = 0.
     362    lwnet_tersrf(:,:) = 0.
     363    fluxsens_tersrf(:,:) = 0.
     364    fluxlat_tersrf(:,:) = 0.
    357365
    358366    u10m = 0.
  • LMDZ6/trunk/libf/phylmd/phyetat0_mod.f90

    r5481 r5627  
    1111
    1212  USE clesphys_mod_h
    13   USE dimphy, only: klon, zmasq, klev
     13  USE dimphy, only: klon, zmasq, klev, nbtersrf, nbtsoildepths
    1414  USE iophy, ONLY : init_iophy_new
    1515  USE ocean_cpl_mod,    ONLY : ocean_cpl_init
     
    3030       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, &
    3131       ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal, dter, dser, &
    32        dt_ds, ratqs_inter_
     32       dt_ds, ratqs_inter_, frac_tersrf, z0m_tersrf, ratio_z0m_z0h_tersrf, &
     33       albedo_tersrf, beta_tersrf, inertie_tersrf, alpha_soil_tersrf, &
     34       period_tersrf, hcond_tersrf, tsurfi_tersrf, tsoili_tersrf, tsoil_depth, &
     35       qsurf_tersrf, tsurf_tersrf, tsoil_tersrf, tsurf_new_tersrf, cdragm_tersrf, &
     36       cdragh_tersrf, swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf
    3337!FC
    3438  USE geometry_mod,     ONLY: longitude_deg, latitude_deg
     
    4448  use netcdf, only: missing_val_netcdf => nf90_fill_real
    4549  use config_ocean_skin_m, only: activate_ocean_skin
     50  USE surf_param_mod, ONLY: average_surf_var, interpol_tsoil !AM
    4651  USE dimsoil_mod_h, ONLY: nsoilmx
    4752  USE yomcst_mod_h
     
    386391  ENDIF
    387392
     393  IF (iflag_hetero_surf .GT. 0) THEN
     394    found=phyetat0_srf(frac_tersrf,"frac_tersrf","fraction of continental sub-surfaces",0.)
     395    found=phyetat0_srf(z0m_tersrf,"z0m_tersrf","roughness length for momentum of continental sub-surfaces",0.)
     396    found=phyetat0_srf(ratio_z0m_z0h_tersrf,"ratio_z0m_z0h_tersrf","ratio of heat to momentum roughness length of continental sub-surfaces",0.)
     397    found=phyetat0_srf(albedo_tersrf,"albedo_tersrf","albedo of continental sub-surfaces",0.)
     398    found=phyetat0_srf(beta_tersrf,"beta_tersrf","evapotranspiration coef of continental sub-surfaces",0.)
     399    found=phyetat0_srf(inertie_tersrf,"inertie_tersrf","soil thermal inertia of continental sub-surfaces",0.)
     400    found=phyetat0_srf(hcond_tersrf,"hcond_tersrf","heat conductivity of continental sub-surfaces",0.)
     401    found=phyetat0_srf(tsurfi_tersrf,"tsurfi_tersrf","initial surface temperature of continental sub-surfaces",0.)
     402    !
     403    ! Check if the sum of the sub-surface fractions is equal to 1
     404    DO it=1,klon
     405      IF (SUM(frac_tersrf(it,:)) .NE. 1.) THEN
     406        PRINT*, 'SUM(frac_tersrf) = ', SUM(frac_tersrf(it,:))
     407        CALL abort_physic('conf_phys', 'the sum of fractions of heterogeneous land subsurfaces must be equal &
     408                          & to 1 for iflag_hetero_surf = 1 and 2',1)
     409      ENDIF
     410    ENDDO
     411    !
     412    ! Initialisation of surface and soil temperatures (potentially different initial temperatures between sub-surfaces)
     413    DO iq=1,nbtersrf
     414      DO it=1,klon
     415        tsurf_tersrf(it,iq) = tsurfi_tersrf(it,iq)
     416      ENDDO
     417    ENDDO
     418    !
     419    DO isoil=1, nbtsoildepths
     420      IF (isoil.GT.99) THEN
     421        PRINT*, "Trop de couches "
     422        CALL abort_physic("phyetat0", "", 1)
     423      ENDIF
     424      WRITE(str2,'(i2.2)') isoil
     425      found=phyetat0_srf(tsoil_depth(:,isoil,:),"tsoil_depth"//str2//"srf","soil depth of continental sub-surfaces",0.)
     426      found=phyetat0_srf(tsoili_tersrf(:,isoil,:),"Tsoili"//str2//"srf","initial soil temperature of continental sub-surfaces",0.)
     427      IF (.NOT. found) THEN
     428        PRINT*, "phyetat0: Le champ <Tsoili"//str2//"> est absent"
     429        PRINT*, "          Il prend donc la valeur de surface"
     430        tsoili_tersrf(:, isoil, :) = tsurfi_tersrf(:, :)
     431      ENDIF
     432    ENDDO
     433    !
     434    tsoil_tersrf = interpol_tsoil(klon, nbtersrf, nsoilmx, nbtsoildepths, alpha_soil_tersrf, period_tersrf, &
     435                   inertie_tersrf, hcond_tersrf, tsoil_depth, tsurf_tersrf, tsoili_tersrf)
     436    !
     437    ! initialise also average surface and soil temperatures
     438    ftsol(:,is_ter) = average_surf_var(klon, nbtersrf, tsurf_tersrf, frac_tersrf, 'ARI')
     439    DO k=1, nsoilmx
     440      tsoil(:,k,is_ter) = average_surf_var(klon, nbtersrf, tsoil_tersrf(:,k,:), frac_tersrf, 'ARI')
     441    ENDDO
     442    !
     443  ENDIF ! iflag_hetero_surf > 0
     444
    388445  endif ! iflag_physiq <= 1
    389446
  • LMDZ6/trunk/libf/phylmd/phyredem.f90

    r5481 r5627  
    3434                                du_gwd_rando, du_gwd_front, u10m, v10m, &
    3535                                treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, &
    36                                 delta_sst, ratqs_inter_, dter, dser, dt_ds
     36                                delta_sst, ratqs_inter_, dter, dser, dt_ds,  &
     37                                frac_tersrf, z0m_tersrf, ratio_z0m_z0h_tersrf, &
     38                                albedo_tersrf, beta_tersrf, inertie_tersrf,  &
     39                                hcond_tersrf, tsurfi_tersrf, tsoili_tersrf, tsoil_depth, &
     40                                qsurf_tersrf, tsurf_tersrf, tsoil_tersrf, tsurf_new_tersrf, &
     41                                cdragm_tersrf, cdragh_tersrf, &
     42                                swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf
    3743
    3844  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    189195!  CALL put_field_srf2("treedrg","freinage arbres",treedrg(:,:,:))
    190196    CALL put_field(pass,"treedrg_ter","freinage arbres",treedrg(:,:,is_ter))
    191 
     197!AM
     198    CALL put_field_srf1(pass,"frac_tersrf","fraction sous surface", frac_tersrf(:,:))
     199    CALL put_field_srf1(pass,"z0m_tersrf","rugosite sous surface", z0m_tersrf(:,:))
     200    CALL put_field_srf1(pass,"ratio_z0m_z0h_tersrf","ratio rugosites sous surface", ratio_z0m_z0h_tersrf(:,:))
     201    CALL put_field_srf1(pass,"albedo_tersrf","albedo sous surface", albedo_tersrf(:,:))
     202    CALL put_field_srf1(pass,"beta_tersrf","beta sous surface", beta_tersrf(:,:))
     203    CALL put_field_srf1(pass,"inertie_tersrf","inertie sous surface", inertie_tersrf(:,:))
     204    CALL put_field_srf1(pass,"hcond_tersrf","conductivité thermique sous surface", hcond_tersrf(:,:))
     205    CALL put_field_srf1(pass,"tsurfi_tersrf","temperature surface sous surface initiale", tsurfi_tersrf(:,:))
     206    CALL put_field_srf2(pass,"Tsoili","temperature sol sous surface initiale", tsoili_tersrf(:,:,:))
     207    CALL put_field_srf2(pass,"tsoil_depth","profondeur temperature sol sous surface", tsoil_depth(:,:,:))
     208    CALL put_field_srf1(pass,"qsurf_tersrf","humidite surface sous surface", qsurf_tersrf(:,:))
     209    CALL put_field_srf1(pass,"tsurf_tersrf","temperature surface sous surface", tsurf_tersrf(:,:))
     210    CALL put_field_srf1(pass,"tsurf_new_tersrf","temperature surface sous surface", tsurf_new_tersrf(:,:))
     211    CALL put_field_srf1(pass,"cdragm_tersrf","coeff trainee quantite mouvement sous surface", cdragm_tersrf(:,:))
     212    CALL put_field_srf1(pass,"cdragh_tersrf","coeff trainee chaleur sous surface", cdragh_tersrf(:,:))
     213    CALL put_field_srf1(pass,"swnet_tersrf","shortwave net sous surface", swnet_tersrf(:,:))
     214    CALL put_field_srf1(pass,"lwnet_tersrf","longwave net sous surface", lwnet_tersrf(:,:))
     215    CALL put_field_srf1(pass,"fluxsens_tersrf","flux sensible sous surface", fluxsens_tersrf(:,:))
     216    CALL put_field_srf1(pass,"fluxlat_tersrf","flux latent sous surface", fluxlat_tersrf(:,:))
     217    CALL put_field_srf2(pass,"tsoil_tersrf","temperature sol sous surface", tsoil_tersrf(:,:,:))
    192218
    193219    CALL put_field_srf1(pass,"QS"  , "Humidite",qsurf(:,:))
  • LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r5614 r5627  
    538538  TYPE(ctrl_out), SAVE :: o_tauy = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    539539    'tauy', 'Meridional wind stress', 'Pa', (/ ('', i=1, 10) /))
     540
     541! AM
     542  !!! The number of continental sub-surfaces (max_nbtersrf) is defined in indice_sol_mod
     543
     544  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_frac_tersrf     = (/ &
     545    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'frac_tersrf'//nb_tersrf(1),  &
     546    "Fraction of each continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     547    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'frac_tersrf'//nb_tersrf(2),  &
     548    "Fraction of each continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     549    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'frac_tersrf'//nb_tersrf(3),  &
     550    "Fraction of each continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     551    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'frac_tersrf'//nb_tersrf(4),  &
     552    "Fraction of each continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     553    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'frac_tersrf'//nb_tersrf(5),  &
     554    "Fraction of each continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     555
     556  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_qsurf_tersrf     = (/ &
     557    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'qsurf_tersrf'//nb_tersrf(1),  &
     558    "Surface humidity of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     559    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'qsurf_tersrf'//nb_tersrf(2),  &
     560    "Surface humidity of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     561    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'qsurf_tersrf'//nb_tersrf(3),  &
     562    "Surface humidity of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     563    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'qsurf_tersrf'//nb_tersrf(4),  &
     564    "Surface humidity of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     565    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'qsurf_tersrf'//nb_tersrf(5),  &
     566    "Surface humidity of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     567
     568  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_tsurf_new_tersrf     = (/ &
     569    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsol_tersrf'//nb_tersrf(1),  &
     570    "Surface temperature of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     571    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsol_tersrf'//nb_tersrf(2),  &
     572    "Surface temperature of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     573    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsol_tersrf'//nb_tersrf(3),  &
     574    "Surface temperature of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     575    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsol_tersrf'//nb_tersrf(4),  &
     576    "Surface temperature of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     577    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsol_tersrf'//nb_tersrf(5),  &
     578    "Surface temperature of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     579  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_swnet_tersrf     = (/ &
     580    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sols_tersrf'//nb_tersrf(1),  &
     581    "Net SW radiation of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     582    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sols_tersrf'//nb_tersrf(2),  &
     583    "Net SW radiation of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     584    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sols_tersrf'//nb_tersrf(3),  &
     585    "Net SW radiation of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     586    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sols_tersrf'//nb_tersrf(4),  &
     587    "Net SW radiation of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     588    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sols_tersrf'//nb_tersrf(5),  &
     589    "Net SW radiation of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     590
     591  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_lwnet_tersrf     = (/ &
     592    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'soll_tersrf'//nb_tersrf(1),  &
     593    "Net LW radiation of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     594    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'soll_tersrf'//nb_tersrf(2),  &
     595    "Net LW radiation of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     596    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'soll_tersrf'//nb_tersrf(3),  &
     597    "Net LW radiation of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     598    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'soll_tersrf'//nb_tersrf(4),  &
     599    "Net LW radiation of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     600    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'soll_tersrf'//nb_tersrf(5),  &
     601    "Net LW radiation of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     602
     603  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_fluxsens_tersrf     = (/ &
     604    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sens_tersrf'//nb_tersrf(1),  &
     605    "Sensible heat flux of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     606    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sens_tersrf'//nb_tersrf(2),  &
     607    "Sensible heat flux of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     608    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sens_tersrf'//nb_tersrf(3),  &
     609    "Sensible heat flux of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     610    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sens_tersrf'//nb_tersrf(4),  &
     611    "Sensible heat flux of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     612    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'sens_tersrf'//nb_tersrf(5),  &
     613    "Sensible heat flux of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     614 TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_fluxlat_tersrf     = (/ &
     615    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'flat_tersrf'//nb_tersrf(1),  &
     616    "Latent heat flux of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     617    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'flat_tersrf'//nb_tersrf(2),  &
     618    "Latent heat flux of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     619    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'flat_tersrf'//nb_tersrf(3),  &
     620    "Latent heat flux of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     621    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'flat_tersrf'//nb_tersrf(4),  &
     622    "Latent heat flux of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     623    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'flat_tersrf'//nb_tersrf(5),  &
     624    "Latent heat flux of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     625 TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_cdragm_tersrf     = (/ &
     626    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrm_tersrf'//nb_tersrf(1),  &
     627    "Momentum drag coefficient of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     628    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrm_tersrf'//nb_tersrf(2),  &
     629    "Momentum drag coefficient of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     630    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrm_tersrf'//nb_tersrf(3),  &
     631    "Momentum drag coefficient of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     632    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrm_tersrf'//nb_tersrf(4),  &
     633    "Momentum drag coefficient of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     634    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrm_tersrf'//nb_tersrf(5),  &
     635    "Momentum drag coefficient of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     636
     637  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf) :: o_cdragh_tersrf     = (/ &
     638    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrh_tersrf'//nb_tersrf(1),  &
     639    "Heat drag coefficient of continental sub-surface "//nb_tersrf(1),"K", (/ ('', i=1, 10) /)),  &
     640    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrh_tersrf'//nb_tersrf(2),  &
     641    "Heat drag coefficient of continental sub-surface "//nb_tersrf(2),"K", (/ ('', i=1, 10) /)),  &
     642    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrh_tersrf'//nb_tersrf(3),  &
     643    "Heat drag coefficient of continental sub-surface "//nb_tersrf(3),"K", (/ ('', i=1, 10) /)),  &
     644    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrh_tersrf'//nb_tersrf(4),  &
     645    "Heat drag coefficient of continental sub-surface "//nb_tersrf(4),"K", (/ ('', i=1, 10) /)),  &
     646    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'cdrh_tersrf'//nb_tersrf(5),  &
     647    "Heat drag coefficient of continental sub-surface "//nb_tersrf(5),"K", (/ ('', i=1, 10) /)) /)
     648
     649  TYPE(ctrl_out), SAVE, DIMENSION(max_nbtersrf*nsoilout) :: o_tsoil_tersrf     = (/ &
     650    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(1),  &
     651    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(1),"K", (/ ('', i=1, 10) /)),  &
     652    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(2),  &
     653    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(2),"K", (/ ('', i=1, 10) /)),  &
     654    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(3),  &
     655    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(3),"K", (/ ('', i=1, 10) /)),  &
     656    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(4),  &
     657    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(4),"K", (/ ('', i=1, 10) /)),  &
     658    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(5),  &
     659    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(5),"K", (/ ('', i=1, 10) /)),  &
     660    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(6),  &
     661    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(6),"K", (/ ('', i=1, 10) /)),  &
     662    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(7),  &
     663    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(7),"K", (/ ('', i=1, 10) /)),  &
     664    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(8),  &
     665    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(8),"K", (/ ('', i=1, 10) /)),  &
     666    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(9),  &
     667    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(9),"K", (/ ('', i=1, 10) /)),  &
     668    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(10),  &
     669    "Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(10),"K", (/ ('', i=1, 10) /)),  &
     670    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(11),  &
     671    !"Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(11),"K", (/ ('', i=1, 10) /)),  &
     672    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(12),  &
     673    !"Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(12),"K", (/ ('', i=1, 10) /)),  &
     674    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(13),  &
     675    !"Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(13),"K", (/ ('', i=1, 10) /)),  &
     676    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(14),  &
     677    !"Soil temperature of continental sub-surface "//nb_tersrf(1)//" layer "//nb_soil(14),"K", (/ ('', i=1, 10) /)),  &
     678    !
     679    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(1),  &
     680    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(1),"K", (/ ('', i=1, 10) /)),  &
     681    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(2),  &
     682    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(2),"K", (/ ('', i=1, 10) /)),  &
     683    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(3),  &
     684    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(3),"K", (/ ('', i=1, 10) /)),  &
     685    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(4),  &
     686    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(4),"K", (/ ('', i=1, 10) /)),  &
     687    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(5),  &
     688    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(5),"K", (/ ('', i=1, 10) /)),  &
     689    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(6),  &
     690    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(6),"K", (/ ('', i=1, 10) /)),  &
     691    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(7),  &
     692    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(7),"K", (/ ('', i=1, 10) /)),  &
     693    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(8),  &
     694    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(8),"K", (/ ('', i=1, 10) /)),  &
     695    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(9),  &
     696    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(9),"K", (/ ('', i=1, 10) /)),  &
     697    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(10),  &
     698    "Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(10),"K", (/ ('', i=1, 10) /)),  &
     699    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(11),  &
     700    !"Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(11),"K", (/ ('', i=1, 10) /)),  &
     701    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(12),  &
     702    !"Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(12),"K", (/ ('', i=1, 10) /)),  &
     703    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(13),  &
     704    !"Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(13),"K", (/ ('', i=1, 10) /)),  &
     705    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(2)//"_l"//nb_soil(14),  &
     706    !"Soil temperature of continental sub-surface "//nb_tersrf(2)//" layer "//nb_soil(14),"K", (/ ('', i=1, 10) /)),  &
     707    !
     708    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(1),  &
     709    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(1),"K", (/ ('', i=1, 10) /)),  &
     710    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(2),  &
     711    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(2),"K", (/ ('', i=1, 10) /)),  &
     712    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(3),  &
     713    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(3),"K", (/ ('', i=1, 10) /)),  &
     714    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(4),  &
     715    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(4),"K", (/ ('', i=1, 10) /)),  &
     716    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(5),  &
     717    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(5),"K", (/ ('', i=1, 10) /)),  &
     718    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(6),  &
     719    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(6),"K", (/ ('', i=1, 10) /)),  &
     720    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(1)//"_l"//nb_soil(7),  &
     721    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(7),"K", (/ ('', i=1, 10) /)),  &
     722    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(8),  &
     723    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(8),"K", (/ ('', i=1, 10) /)),  &
     724    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(9),  &
     725    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(9),"K", (/ ('', i=1, 10) /)),  &
     726    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(10),  &
     727    "Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(10),"K", (/ ('', i=1, 10) /)),  &
     728    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(11),  &
     729    !"Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(11),"K", (/ ('', i=1, 10) /)),  &
     730    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(12),  &
     731    !"Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(12),"K", (/ ('', i=1, 10) /)),  &
     732    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(13),  &
     733    !"Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(13),"K", (/ ('', i=1, 10) /)),  &
     734    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(3)//"_l"//nb_soil(14),  &
     735    !"Soil temperature of continental sub-surface "//nb_tersrf(3)//" layer "//nb_soil(14),"K", (/ ('', i=1, 10) /)),  &
     736    !
     737    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(1),  &
     738    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(1),"K", (/ ('', i=1, 10) /)),  &
     739    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(2),  &
     740    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(2),"K", (/ ('', i=1, 10) /)),  &
     741    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(3),  &
     742    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(3),"K", (/ ('', i=1, 10) /)),  &
     743    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(4),  &
     744    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(4),"K", (/ ('', i=1, 10) /)),  &
     745    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(5),  &
     746    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(5),"K", (/ ('', i=1, 10) /)),  &
     747    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(6),  &
     748    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(6),"K", (/ ('', i=1, 10) /)),  &
     749    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(7),  &
     750    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(7),"K", (/ ('', i=1, 10) /)),  &
     751    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(8),  &
     752    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(8),"K", (/ ('', i=1, 10) /)),  &
     753    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(9),  &
     754    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(9),"K", (/ ('', i=1, 10) /)),  &
     755    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(10),  &
     756    "Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(10),"K", (/ ('', i=1, 10) /)),  &
     757    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(11),  &
     758    !"Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(11),"K", (/ ('', i=1, 10) /)),  &
     759    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(12),  &
     760    !"Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(12),"K", (/ ('', i=1, 10) /)),  &
     761    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(13),  &
     762    !"Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(13),"K", (/ ('', i=1, 10) /)),  &
     763    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(4)//"_l"//nb_soil(14),  &
     764    !"Soil temperature of continental sub-surface "//nb_tersrf(4)//" layer "//nb_soil(14),"K", (/ ('', i=1, 10) /)),  &
     765    !
     766    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(1),  &
     767    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(1),"K", (/ ('', i=1, 10) /)),  &
     768    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(2),  &
     769    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(2),"K", (/ ('', i=1, 10) /)),  &
     770    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(3),  &
     771    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(3),"K", (/ ('', i=1, 10) /)),  &
     772    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(4),  &
     773    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(4),"K", (/ ('', i=1, 10) /)),  &
     774    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(5),  &
     775    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(5),"K", (/ ('', i=1, 10) /)),  &
     776    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(6),  &
     777    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(6),"K", (/ ('', i=1, 10) /)),  &
     778    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(7),  &
     779    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(7),"K", (/ ('', i=1, 10) /)),  &
     780    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(8),  &
     781    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(8),"K", (/ ('', i=1, 10) /)),  &
     782    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(9),  &
     783    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(9),"K", (/ ('', i=1, 10) /)),  &
     784    ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(10),  &
     785    "Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(10),"K", (/ ('', i=1, 10) /)) /)
     786    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(11),  &
     787    !"Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(11),"K", (/ ('', i=1, 10) /)),  &
     788    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(12),  &
     789    !"Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(12),"K", (/ ('', i=1, 10) /)),  &
     790    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(13),  &
     791    !"Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(13),"K", (/ ('', i=1, 10) /)),  &
     792    !ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/),'tsoil_tersrf'//nb_tersrf(5)//"_l"//nb_soil(14),  &
     793    !"Soil temperature of continental sub-surface "//nb_tersrf(5)//" layer "//nb_soil(14),"K", (/ ('', i=1, 10) /)) /)
     794
     795  TYPE(ctrl_out), SAVE, DIMENSION(nsoilout) :: o_ftsoil = (/ &
     796    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(1), &
     797    'Continental soil temperature layer '//nb_soil(1), 'K', (/ ('', i=1, 10) /)), &
     798    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(2), &
     799    'Continental soil temperature layer '//nb_soil(2), 'K', (/ ('', i=1, 10) /)), &
     800    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(3), &
     801    'Continental soil temperature layer '//nb_soil(3), 'K', (/ ('', i=1, 10) /)), &
     802    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(4), &
     803    'Continental soil temperature layer '//nb_soil(4), 'K', (/ ('', i=1, 10) /)), &
     804    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(5), &
     805    'Continental soil temperature layer '//nb_soil(5), 'K', (/ ('', i=1, 10) /)), &
     806    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(6), &
     807    'Continental soil temperature layer '//nb_soil(6), 'K', (/ ('', i=1, 10) /)), &
     808    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(7), &
     809    'Continental soil temperature layer '//nb_soil(7), 'K', (/ ('', i=1, 10) /)), &
     810    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(8), &
     811    'Continental soil temperature layer '//nb_soil(8), 'K', (/ ('', i=1, 10) /)), &
     812    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(9), &
     813    'Continental soil temperature layer '//nb_soil(9), 'K', (/ ('', i=1, 10) /)), &
     814    ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(10), &
     815    'Continental soil temperature layer '//nb_soil(10), 'K', (/ ('', i=1, 10) /)) /)
     816    !ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(11), &
     817    !'Continental soil temperature layer '//nb_soil(11), 'K', (/ ('', i=1, 10) /)), &
     818    !ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(12), &
     819    !'Continental soil temperature layer '//nb_soil(12), 'K', (/ ('', i=1, 10) /)), &
     820    !ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(13), &
     821    !'Continental soil temperature layer '//nb_soil(13), 'K', (/ ('', i=1, 10) /)), &
     822    !ctrl_out((/ 1, 2, 10, 10, 10, 10, 11, 11, 11, 11/), 'tsoil'//nb_soil(14), &
     823    !'Continental soil temperature layer '//nb_soil(14), 'K', (/ ('', i=1, 10) /)) /)
     824! AM
    540825
    541826!AI Ecrad 3Deffect
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r5614 r5627  
    2525    ! defined and initialised in phys_output_mod.F90
    2626
    27     USE dimphy, ONLY: klon, klev, klevp1
     27    USE dimphy, ONLY: klon, klev, klevp1, nbtersrf
    2828    USE infotrac_phy, ONLY: nbtr, nqtot, nqo, type_trac, tracers, niso, ntiso
    2929    USE strings_mod,  ONLY: maxlen
     
    6565         o_bils_ec,o_bils_ech, o_bils_tke, o_bils_kinetic, &
    6666         o_bils_latent, o_bils_enthalp, o_sens, &
    67          o_fder, o_ffonte, o_fqcalving, o_fqfonte, o_mrroli, o_runofflic, &
     67         o_fder, o_ftsoil, o_ffonte, o_fqcalving, o_fqfonte, o_mrroli, o_runofflic, &
    6868         o_taux, o_tauy, o_snowsrf, o_qsnow, &
    6969! SN runoff_diag
     
    203203         o_lat_prec_sol_oce, o_lat_prec_sol_sic, &
    204204         o_sza, &
     205! AM
     206         o_frac_tersrf, o_qsurf_tersrf, o_tsurf_new_tersrf, &
     207         o_cdragm_tersrf, o_cdragh_tersrf, &
     208         o_swnet_tersrf, o_lwnet_tersrf, o_fluxsens_tersrf, o_fluxlat_tersrf, &
     209         o_tsoil_tersrf, &
    205210! Marine
    206211         o_map_prop_hc, o_map_prop_hist, o_map_emis_hc, o_map_iwp_hc, &
     
    303308         rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, &
    304309         wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, &
     310         frac_tersrf, qsurf_tersrf, tsurf_new_tersrf, cdragm_tersrf, cdragh_tersrf, &
     311         swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf, tsoil_tersrf, &
    305312#ifdef ISO
    306313         xtrain_con, xtsnow_con, xtrain_fall, xtsnow_fall, fxtevap, &
     
    459466    USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, &
    460467        slab_ekman,slab_hdiff,slab_gm,dt_ekman, dt_hdiff, dt_gm, dt_qflux
    461     USE pbl_surface_mod, ONLY: snow
    462     USE indice_sol_mod, ONLY: nbsrf
     468    USE pbl_surface_mod, ONLY: snow, ftsoil
     469    USE indice_sol_mod, ONLY: nbsrf, nsoilout
    463470#ifdef ISO
    464471    USE isotopes_mod, ONLY: iso_HTO, isoName
     
    518525    ! Local
    519526    INTEGER :: itau_w
    520     INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero
     527    INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero, j
    521528    REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d, wind100m
    522529    REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv
     
    944951       CALL histwrite_phy(o_topl, toplw)
    945952       CALL histwrite_phy(o_topl0, toplw0)
     953
     954       !AM heterogeneous continental sub-surfaces
     955       IF (iflag_hetero_surf .EQ. 2) THEN
     956         iq = 0
     957         DO j = 1, nbtersrf
     958           IF (vars_defined) zx_tmp_fi2d(1 : klon) = frac_tersrf( 1 : klon, j)
     959           CALL histwrite_phy(o_frac_tersrf(j), zx_tmp_fi2d)
     960           IF (vars_defined) zx_tmp_fi2d(1 : klon) = qsurf_tersrf( 1 : klon, j)
     961           CALL histwrite_phy(o_qsurf_tersrf(j), zx_tmp_fi2d)
     962           IF (vars_defined) zx_tmp_fi2d(1 : klon) = tsurf_new_tersrf( 1 : klon, j)
     963           CALL histwrite_phy(o_tsurf_new_tersrf(j), zx_tmp_fi2d)
     964           IF (vars_defined) zx_tmp_fi2d(1 : klon) = cdragm_tersrf( 1 : klon, j)
     965           CALL histwrite_phy(o_cdragm_tersrf(j), zx_tmp_fi2d)
     966           IF (vars_defined) zx_tmp_fi2d(1 : klon) = cdragh_tersrf( 1 : klon, j)
     967           CALL histwrite_phy(o_cdragh_tersrf(j), zx_tmp_fi2d)
     968           IF (vars_defined) zx_tmp_fi2d(1 : klon) = swnet_tersrf( 1 : klon, j)
     969           CALL histwrite_phy(o_swnet_tersrf(j), zx_tmp_fi2d)
     970           IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwnet_tersrf( 1 : klon, j)
     971           CALL histwrite_phy(o_lwnet_tersrf(j), zx_tmp_fi2d)
     972           IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxsens_tersrf( 1 : klon, j)
     973           CALL histwrite_phy(o_fluxsens_tersrf(j), zx_tmp_fi2d)
     974           IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxlat_tersrf( 1 : klon, j)
     975           CALL histwrite_phy(o_fluxlat_tersrf(j), zx_tmp_fi2d)
     976           !
     977           DO k = 1, nsoilout
     978             iq = iq + 1
     979             IF (vars_defined) zx_tmp_fi2d(1 : klon) = tsoil_tersrf( 1 : klon, k, j)
     980             CALL histwrite_phy(o_tsoil_tersrf(iq), zx_tmp_fi2d)
     981           ENDDO
     982         ENDDO
     983       ENDIF
     984       ! add tsoil as output
     985       IF (iflag_hetero_surf .GT. 0) THEN
     986         DO k = 1, nsoilout
     987           IF (vars_defined) zx_tmp_fi2d(1 : klon) = ftsoil( 1 : klon, k, is_ter)
     988           CALL histwrite_phy(o_ftsoil(k), zx_tmp_fi2d)
     989         ENDDO
     990       ENDIF
     991       !AM
    946992
    947993! offline
  • LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90

    r5569 r5627  
    1010! Declaration des variables
    1111      USE dimphy
     12      USE dimsoil_mod_h, ONLY: nsoilmx
    1213      USE netcdf, only: nf90_fill_real
    1314      INTEGER, PARAMETER :: nlevSTD=17
     
    3940      REAL, ALLOCATABLE, SAVE :: treedrg(:,:,:)
    4041!$OMP THREADPRIVATE(treedrg)
     42!AM land surface heterogeneities
     43      REAL, SAVE :: alpha_soil_tersrf
     44!$OMP THREADPRIVATE(alpha_soil_tersrf)
     45      REAL, SAVE :: period_tersrf
     46!$OMP THREADPRIVATE(period_tersrf)
     47      REAL, ALLOCATABLE, SAVE :: frac_tersrf(:,:)
     48!$OMP THREADPRIVATE(frac_tersrf)
     49      REAL, ALLOCATABLE, SAVE :: z0m_tersrf(:,:)
     50!$OMP THREADPRIVATE(z0m_tersrf)
     51      REAL, ALLOCATABLE, SAVE :: ratio_z0m_z0h_tersrf(:,:)
     52!$OMP THREADPRIVATE(ratio_z0m_z0h_tersrf)
     53      REAL, ALLOCATABLE, SAVE :: albedo_tersrf(:,:)
     54!$OMP THREADPRIVATE(albedo_tersrf)
     55      REAL, ALLOCATABLE, SAVE :: beta_tersrf(:,:)
     56!$OMP THREADPRIVATE(beta_tersrf)
     57      REAL, ALLOCATABLE, SAVE :: inertie_tersrf(:,:)
     58!$OMP THREADPRIVATE(inertie_tersrf)
     59      REAL, ALLOCATABLE, SAVE :: hcond_tersrf(:,:)
     60!$OMP THREADPRIVATE(hcond_tersrf)
     61      REAL, ALLOCATABLE, SAVE :: tsurfi_tersrf(:,:)
     62!$OMP THREADPRIVATE(tsurfi_tersrf)
     63      REAL, ALLOCATABLE, SAVE :: tsoili_tersrf(:,:,:)
     64!$OMP THREADPRIVATE(tsoili_tersrf)
     65      REAL, ALLOCATABLE, SAVE :: tsoil_depth(:,:,:)
     66!$OMP THREADPRIVATE(tsoil_depth)
     67      REAL, ALLOCATABLE, SAVE :: tsurf_tersrf(:,:)
     68!$OMP THREADPRIVATE(tsurf_tersrf)
     69     REAL, ALLOCATABLE, SAVE :: tsoil_tersrf(:,:,:)
     70!$OMP THREADPRIVATE(tsoil_tersrf)
     71      REAL, ALLOCATABLE, SAVE :: qsurf_tersrf(:,:)
     72!$OMP THREADPRIVATE(qsurf_tersrf)
     73      REAL, ALLOCATABLE, SAVE :: tsurf_new_tersrf(:,:)
     74!$OMP THREADPRIVATE(tsurf_new_tersrf)
     75      REAL, ALLOCATABLE, SAVE :: cdragm_tersrf(:,:)
     76!$OMP THREADPRIVATE(cdragm_tersrf)
     77      REAL, ALLOCATABLE, SAVE :: cdragh_tersrf(:,:)
     78!$OMP THREADPRIVATE(cdragh_tersrf)
     79      REAL, ALLOCATABLE, SAVE :: swnet_tersrf(:,:)
     80!$OMP THREADPRIVATE(swnet_tersrf)
     81      REAL, ALLOCATABLE, SAVE :: lwnet_tersrf(:,:)
     82!$OMP THREADPRIVATE(lwnet_tersrf)
     83      REAL, ALLOCATABLE, SAVE :: fluxsens_tersrf(:,:)
     84!$OMP THREADPRIVATE(fluxsens_tersrf)
     85      REAL, ALLOCATABLE, SAVE :: fluxlat_tersrf(:,:)
     86!$OMP THREADPRIVATE(fluxlat_tersrf)
    4187
    4288!      character(len=6), SAVE :: ocean
     
    563609!FC
    564610      ALLOCATE(treedrg(klon,klev,nbsrf))
     611!AM
     612      ALLOCATE(frac_tersrf(klon,nbtersrf))
     613      ALLOCATE(z0m_tersrf(klon,nbtersrf))
     614      ALLOCATE(ratio_z0m_z0h_tersrf(klon,nbtersrf))
     615      ALLOCATE(albedo_tersrf(klon,nbtersrf))
     616      ALLOCATE(beta_tersrf(klon,nbtersrf))
     617      ALLOCATE(inertie_tersrf(klon,nbtersrf))
     618      ALLOCATE(hcond_tersrf(klon,nbtersrf))
     619      ALLOCATE(tsurfi_tersrf(klon,nbtersrf))
     620      ALLOCATE(tsoili_tersrf(klon,nbtsoildepths,nbtersrf))
     621      ALLOCATE(tsoil_depth(klon,nbtsoildepths,nbtersrf))
     622      ALLOCATE(tsurf_tersrf(klon,nbtersrf))
     623      ALLOCATE(tsoil_tersrf(klon,nsoilmx,nbtersrf))
     624      ALLOCATE(qsurf_tersrf(klon,nbtersrf))
     625      ALLOCATE(tsurf_new_tersrf(klon,nbtersrf))
     626      ALLOCATE(cdragm_tersrf(klon,nbtersrf))
     627      ALLOCATE(cdragh_tersrf(klon,nbtersrf))
     628      ALLOCATE(swnet_tersrf(klon,nbtersrf))
     629      ALLOCATE(lwnet_tersrf(klon,nbtersrf))
     630      ALLOCATE(fluxsens_tersrf(klon,nbtersrf))
     631      ALLOCATE(fluxlat_tersrf(klon,nbtersrf))
     632
    565633      ALLOCATE(falb1(klon,nbsrf))
    566634      ALLOCATE(falb2(klon,nbsrf))
     
    806874!FC
    807875      DEALLOCATE(treedrg)
     876!AM
     877      DEALLOCATE(frac_tersrf)
     878      DEALLOCATE(z0m_tersrf)
     879      DEALLOCATE(ratio_z0m_z0h_tersrf)
     880      DEALLOCATE(albedo_tersrf)
     881      DEALLOCATE(beta_tersrf)
     882      DEALLOCATE(inertie_tersrf)
     883      DEALLOCATE(hcond_tersrf)
     884      DEALLOCATE(tsurfi_tersrf)
     885      DEALLOCATE(tsoili_tersrf)
     886      DEALLOCATE(tsoil_depth)
     887      DEALLOCATE(tsurf_tersrf)
     888      DEALLOCATE(tsoil_tersrf)
     889      DEALLOCATE(qsurf_tersrf)
     890      DEALLOCATE(tsurf_new_tersrf)
     891      DEALLOCATE(cdragm_tersrf)
     892      DEALLOCATE(cdragh_tersrf)
     893      DEALLOCATE(swnet_tersrf)
     894      DEALLOCATE(lwnet_tersrf)
     895      DEALLOCATE(fluxsens_tersrf)
     896      DEALLOCATE(fluxlat_tersrf)
    808897      DEALLOCATE(rain_fall, snow_fall, bs_fall,solsw, solswfdiff, sollw, radsol, swradcorr)
    809898      DEALLOCATE(zmea, zstd, zsig, zgam)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r5622 r5627  
    29322932            wake_delta_pbl_TKE, &
    29332933                                !>nrlmd+jyg
    2934              treedrg )
     2934             treedrg, &
    29352935!FC
     2936!AM
     2937            tsurf_tersrf, tsoil_tersrf, qsurf_tersrf, tsurf_new_tersrf, &
     2938            cdragm_tersrf, cdragh_tersrf, &
     2939            swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf)
    29362940       !
    29372941       !  Add turbulent diffusion tendency to the wake difference variables
  • LMDZ6/trunk/libf/phylmd/surf_land_mod.F90

    r5305 r5627  
    2020       qsurf, tsurf_new, dflux_s, dflux_l, &
    2121       flux_u1, flux_v1 , &
    22        veget,lai,height &
     22       veget,lai,height, tsurf_tersrf, tsoil_tersrf, qsurf_tersrf, tsurf_new_tersrf, &
     23       cdragm_tersrf, cdragh_tersrf, &
     24       swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf &
    2325#ifdef ISO
    2426       ,xtprecip_rain, xtprecip_snow,xtspechum, &
     
    6365   
    6466    USE surf_land_bucket_mod
     67    USE surf_land_bucket_hetero_mod
    6568    USE calcul_fluxs_mod
    6669    USE indice_sol_mod
     
    7881USE print_control_mod, ONLY: lunout
    7982    USE dimsoil_mod_h, ONLY: nsoilmx
    80 
     83    USE compbl_mod_h
    8184
    8285! Input variables 
     
    8992    LOGICAL, INTENT(IN)                     :: debut, lafin
    9093    REAL, INTENT(IN)                        :: dtime
    91     REAL, DIMENSION(klon), INTENT(IN)       :: zlev, ccanopy
     94    REAL, DIMENSION(klon), INTENT(IN)       :: ccanopy
    9295    REAL, DIMENSION(klon), INTENT(IN)       :: swnet, lwnet
    9396    REAL, DIMENSION(klon), INTENT(IN)       :: albedo  ! albedo for whole short-wave interval
     
    106109                                                         ! corresponds to previous sollwdown
    107110    REAL, DIMENSION(klon), INTENT(IN)       :: q2m, t2m
     111    REAL, DIMENSION(klon, nbtersrf), INTENT(IN) :: tsurf_tersrf
    108112#ifdef ISO
    109113    REAL, DIMENSION(ntiso,klon), INTENT(IN)       :: xtprecip_rain, xtprecip_snow
     
    115119    REAL, DIMENSION(klon), INTENT(INOUT)          :: agesno
    116120    REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil
     121    REAL, DIMENSION(klon), INTENT(INOUT)          :: zlev
     122    REAL, DIMENSION(klon, nsoilmx, nbtersrf), INTENT(INOUT) :: tsoil_tersrf
    117123#ifdef ISO
    118124    REAL, DIMENSION(niso,klon), INTENT(INOUT)    :: xtsnow, xtsol
     
    136142    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: veget,lai
    137143    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT) :: height
     144! AM
     145    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: tsurf_new_tersrf
     146    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: qsurf_tersrf
     147    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: cdragm_tersrf
     148    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: cdragh_tersrf
     149    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: swnet_tersrf
     150    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: lwnet_tersrf
     151    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: fluxsens_tersrf
     152    REAL, DIMENSION(klon, nbtersrf), INTENT(OUT) :: fluxlat_tersrf
    138153#ifdef ISO
    139154    REAL, DIMENSION(ntiso,klon), INTENT(OUT)      :: xtevap
     
    153168    REAL, DIMENSION(klon) :: u0, v0     ! surface speed
    154169    REAL, DIMENSION(klon) :: precip_totsnow     ! total solid precip
    155     INTEGER               :: i
     170    INTEGER               :: i,j
     171    CHARACTER (len = 20)  :: modname = 'surf_land'
     172    CHARACTER (len = 100) :: abort_message
    156173
    157174!albedo SB >>>
     
    285302        !write(*,*) 'surf_land 258'
    286303#endif
     304      IF (iflag_hetero_surf .GT. 0) THEN
     305        IF (klon .EQ. 1) THEN
     306          !
     307          CALL surf_land_bucket_hetero(itime, jour, knon, knindex, debut, dtime,&
     308              tsurf, p1lay, cdragh, precip_rain, precip_totsnow, temp_air, &
     309              spechum, AcoefH, AcoefQ, BcoefH, BcoefQ, pref, zlev, &
     310              u1, v1, gustiness, rugoro, swnet, lwnet, &
     311              snow, qsol, agesno, tsoil, &
     312              qsurf, z0m, z0h, alb1_new, alb2_new, evap, &
     313              fluxsens, fluxlat, tsurf_new, dflux_s, dflux_l, &
     314              tsurf_tersrf, tsoil_tersrf, qsurf_tersrf, tsurf_new_tersrf, &
     315              cdragm_tersrf, cdragh_tersrf, &
     316              swnet_tersrf, lwnet_tersrf, fluxsens_tersrf, fluxlat_tersrf)
     317        ELSE
     318          abort_message = 'Heterogeneous continental subsurfaces (iflag_hetero_surf > 0) are only compatible in 1D cases.'
     319          CALL abort_physic(modname,abort_message,1)
     320        ENDIF
     321      !
     322      ELSE
    287323       CALL surf_land_bucket(itime, jour, knon, knindex, debut, dtime,&
    288324            tsurf, p1lay, cdragh, precip_rain, precip_totsnow, temp_air, &
     
    300336        z0h(1:knon)=z0m(1:knon) ! En attendant mieux
    301337
     338      ENDIF ! iflag_hetero_surf
    302339
    303340    ENDIF ! ok_veget
Note: See TracChangeset for help on using the changeset viewer.