Changeset 2924 for LMDZ5/branches


Ignore:
Timestamp:
Jun 30, 2017, 12:00:23 PM (7 years ago)
Author:
fcheruy
Message:

Creation of LMDZ branch to incorporate tree drag from ORCHIDEE.
Should merge in LMDZ trunk quickly

  1. Cheruy with assistance from LF
Location:
LMDZ5/branches/LMDZ_tree_FC
Files:
19 edited
1 copied

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/LMDZ_tree_FC/DefLists/field_def_lmdz.xml

    r2860 r2924  
    463463        <field id="l_mix_oce"    long_name="PBL mixing length oce"    unit="m" />
    464464        <field id="l_mix_sic"    long_name="PBL mixing length sic"    unit="m" />
     465        <field id="treedrg_ter"    long_name="tree drag profile ter "    unit="-" />
     466        <field id="treedrg_lic"    long_name="tree drag profile ter "    unit="-" />
     467        <field id="treedrg_oce"    long_name="tree drag profile ter "    unit="-" />
     468        <field id="treedrg_sic"    long_name="tree drag profile ter "    unit="-" />
    465469        <field id="l_mixmin_ter"    long_name="min PBL mixing length ter"    unit="m" />
    466470        <field id="l_mixmin_lic"    long_name="min PBL mixing length lic"    unit="m" />
  • LMDZ5/branches/LMDZ_tree_FC/DefLists/file_def_histday_lmdz.xml

    r2854 r2924  
    2828                <field field_ref="t2m_oce" level="6" />
    2929                <field field_ref="t2m_sic" level="6" />
     30                <field field_ref="treedrg_ter" level="6" />
     31                <field field_ref="treedrg_lic" level="6" />
     32                <field field_ref="treedrg_oce" level="6" />
     33                <field field_ref="treedrg_sic" level="6" />
    3034                <field field_ref="gusts" level="1" />
    3135                <field field_ref="wind10m" level="1" />
  • LMDZ5/branches/LMDZ_tree_FC/DefLists/file_def_histhf_lmdz.xml

    r2855 r2924  
    2828                <field field_ref="t2m_oce" level="10" />
    2929                <field field_ref="t2m_sic" level="10" />
     30                <field field_ref="treedrg_ter" level="5" />
     31                <field field_ref="treedrg_lic" level="5" />
     32                <field field_ref="treedrg_oce" level="5" />
     33                <field field_ref="treedrg_sic" level="5" />
    3034                <field field_ref="gusts" level="10" />
    3135                <field field_ref="wind10m" level="10" />
     
    285289                <field field_ref="tpot" level="10" />
    286290                <field field_ref="tpote" level="10" />
    287                 <field field_ref="tke" level="10" />
     291                <field field_ref="tke" level="5" />
    288292                <field field_ref="tke_ter" level="10" />
    289293                <field field_ref="tke_lic" level="10" />
     
    533537                <field field_ref="wake_deltaq" level="10" />
    534538                <field field_ref="wake_omg" level="10" />
    535                 <field field_ref="wdtrainA" level="4" />
    536                 <field field_ref="wdtrainM" level="4" />
     539                <field field_ref="wdtrainA" level="10" />
     540                <field field_ref="wdtrainM" level="10" />
    537541                <field field_ref="Vprecip" level="10" />
    538542                <field field_ref="ftd" level="10" />
  • LMDZ5/branches/LMDZ_tree_FC/DefLists/file_def_histmth_lmdz.xml

    r2854 r2924  
    4848                <field field_ref="t2m_oce" level="10" />
    4949                <field field_ref="t2m_sic" level="10" />
     50                <field field_ref="treedrg_ter" level="10" />
     51                <field field_ref="treedrg_lic" level="10" />
     52                <field field_ref="treedrg_oce" level="10" />
     53                <field field_ref="treedrg_sic" level="10" />
    5054                <field field_ref="gusts" level="1" />
    5155                <field field_ref="wind10m" level="1" />
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/clesphys.h

    r2788 r2924  
    1 
    2 !
    31! $Id$
    42!
     
    1513       INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv
    1614       REAL co2_ppm, co2_ppm0, solaire
     15!FC
     16       REAL Cd_frein
    1717       LOGICAL ok_suntime_rrtm
    1818       REAL(kind=8) RCO2, RCH4, RN2O, RCFC11, RCFC12 
     
    109109     &     , qsol0,albsno0,evap0                                        &
    110110     &     , co2_ppm0                                                   &
     111!FC
     112     &     , Cd_frein                                                   &
    111113     &     , ecrit_LES                                                  &
    112114     &     , ecrit_ins, ecrit_hf, ecrit_day                             &
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/coef_diff_turb_mod.F90

    r2561 r2924  
    1414  SUBROUTINE coef_diff_turb(dtime, nsrf, knon, ni, &
    1515       ypaprs, ypplay, yu, yv, yq, yt, yts, yqsurf, ycdragm, &
    16        ycoefm, ycoefh ,yq2)
     16       ycoefm, ycoefh ,yq2, ydrgpro)
    1717 
    1818    USE dimphy
     
    3737    REAL, DIMENSION(klon), INTENT(IN)          :: yts, yqsurf
    3838    REAL, DIMENSION(klon), INTENT(IN)          :: ycdragm
     39!FC
     40    REAL, DIMENSION(klon,klev), INTENT(IN)     :: ydrgpro
     41
    3942
    4043! InOutput arguments
     
    167170               yzlev,yzlay,yu,yv,yteta, &
    168171               ycdragm,yq2,ykmm,ykmn,ykmq,yustar, &
    169                iflag_pbl)
     172               iflag_pbl,ydrgpro)
     173!FC
    170174       ENDIF
    171175       
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/compbl.h

    r2455 r2924  
    55!!      integer iflag_pbl,iflag_pbl_split
    66!!      common/compbl/iflag_pbl,iflag_pbl_split
    7       integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
    8       common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
     7!!FC      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
     8!FC      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
     9      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
     10      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw, ifl_pbltree
    911!>jyg+al1
    1012!$OMP THREADPRIVATE(/compbl/)
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/conf_phys_m.F90

    r2852 r2924  
    186186    INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
    187187    INTEGER,SAVE :: iflag_pbl_split_omp
     188!FC
     189    INTEGER,SAVE :: ifl_pbltree_omp
     190    REAL,SAVE :: Cd_frein_omp
     191!FC
    188192    INTEGER,SAVE :: iflag_order2_sollw_omp
    189193    INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp
     
    13671371    iflag_pbl_omp = 1
    13681372    CALL getin('iflag_pbl',iflag_pbl_omp)
     1373
     1374!FC
     1375    !Config Key  = ifl_pbltree
     1376    !Config Desc = drag from trees 0 no activated
     1377    !Config Def  = 0
     1378    !Config Help =
     1379    !
     1380    ifl_pbltree_omp = 0
     1381    CALL getin('ifl_pbltree',ifl_pbltree_omp)
     1382!FC
     1383    !Config Key  = Cd_frein
     1384    !Config Desc = drag from trees
     1385    !Config Def  = 7.5E-02 (valeur Masson mais fait planter avec des LAI eleves)
     1386    !Config Help =
     1387    !
     1388    Cd_frein_omp = 7.5E-02
     1389    CALL getin('Cd_frein',Cd_frein_omp)
     1390
    13691391    !
    13701392    !Config Key  = iflag_pbl_split
     
    21592181    iflag_pbl = iflag_pbl_omp
    21602182    iflag_pbl_split = iflag_pbl_split_omp
     2183!FC
     2184    ifl_pbltree = ifl_pbltree_omp
     2185    Cd_frein    =Cd_frein_omp
    21612186    iflag_order2_sollw = iflag_order2_sollw_omp
    21622187    lev_histhf = lev_histhf_omp
     
    25252550    write(lunout,*)' freq_calNMC = ',freq_calNMC
    25262551    write(lunout,*)' iflag_pbl = ', iflag_pbl
     2552!FC
     2553    write(lunout,*)' ifl_pbltree = ', ifl_pbltree
    25272554    write(lunout,*)' iflag_pbl_split = ', iflag_pbl_split
    25282555    write(lunout,*)' iflag_order2_sollw = ', iflag_order2_sollw
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/indice_sol_mod.F90

    r1918 r2924  
    88
    99            CHARACTER(len=3), DIMENSION(nbsrf), PARAMETER :: clnsurf = (/'ter', 'lic', 'oce', 'sic'/)
     10!FC
     11           INTEGER, SAVE    :: nvm_orch ! Nombre de type de vegetation ds ORCHIDEE                 
    1012
    1113      END MODULE indice_sol_mod
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/pbl_surface_mod.F90

    r2898 r2924  
    3939  integer, save :: iflag_pbl_surface_t2m_bug
    4040  !$OMP THREADPRIVATE(iflag_pbl_surface_t2m_bug)
     41!FC
     42!  integer, save :: iflag_frein
     43!  !$OMP THREADPRIVATE(iflag_frein)
    4144
    4245CONTAINS
     
    138141    iflag_pbl_surface_t2m_bug=0
    139142    CALL getin_p('iflag_pbl_surface_t2m_bug',iflag_pbl_surface_t2m_bug)
    140 
     143!FC
     144!    iflag_frein = 0
     145!    CALL getin_p('iflag_frein',iflag_frein)
     146!
    141147  END SUBROUTINE pbl_surface_init
    142148
     
    196202!!        tke_x,     tke_w                              &
    197203       wake_dltke                                     &
     204        , treedrg                                   &
     205!FC
    198206!!!
    199207                        )
     
    281289    INCLUDE "compbl.h"
    282290    INCLUDE "flux_arp.h"
     291!FC
     292    INCLUDE "dimpft.h"
     293
    283294!****************************************************************************************
    284295    REAL,                         INTENT(IN)        :: dtime   ! time interval (s)
     
    447458    REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_u     ! u wind tension (kg m/s)/(m**2 s) or Pascal
    448459    REAL, DIMENSION(klon, klev, nbsrf), INTENT(OUT) :: flux_v     ! v wind tension (kg m/s)/(m**2 s) or Pascal
     460!FC
     461    REAL, DIMENSION(klon, klev, nbsrf), INTENT(INOUT)  :: treedrg      ! tree drag (m)               
     462
    449463
    450464! Output not needed
     
    548562    REAL, DIMENSION(klon,klev+1)       :: ytke
    549563    REAL, DIMENSION(klon,nsoilmx)      :: ytsoil
     564!FC
     565    REAL, DIMENSION(klon,nvm_lmdz)          :: yveget
     566    REAL, DIMENSION(klon,nvm_lmdz)          :: ylai
     567    REAL, DIMENSION(klon,nvm_lmdz)          :: yheight
     568    REAL, DIMENSION(klon,klev)              :: y_d_u_frein
     569    REAL, DIMENSION(klon,klev)              :: y_d_v_frein
     570    REAL, DIMENSION(klon,klev)              :: y_treedrg
     571!FC
     572
     573
    550574    CHARACTER(len=80)                  :: abort_message
    551575    CHARACTER(len=20)                  :: modname = 'pbl_surface'
     
    929953    yqsol = 0.0   
    930954    ytherm = 0.0  ; ytke=0.
     955!FC
     956    y_treedrg=0.
     957
    931958    ! Martin
    932959    ysnowhgt = 0.0; yqsnow = 0.0     ; yrunoff = 0.0   ; ytoice =0.0
     
    952979!!!
    953980    ytsoil = 999999.
     981!FC
     982    y_d_u_frein(:,:)=0.
     983    y_d_v_frein(:,:)=0.
     984!FC
     985
     986
    954987
    955988
     
    12401273             ytke(j,k)   = tke_x(i,k,nsrf)
    12411274!>jyg
     1275!FC
     1276             y_treedrg(j,k) =  treedrg(i,k,nsrf)
     1277!            print*,nsrf, "treedrg ",y_treedrg(j,k),j,k
     1278!FC
     1279
    12421280             yu(j,k) = u(i,k)
    12431281             yv(j,k) = v(i,k)
     
    14351473        CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
    14361474            ypaprs, ypplay, yu, yv, yq, yt, yts, yqsurf, ycdragm, &
    1437             ycoefm, ycoefh, ytke)
     1475            ycoefm, ycoefh, ytke, y_treedrg)
     1476!            ycoefm, ycoefh, ytke)
     1477!FC y_treedrg ajouté
    14381478       IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
    14391479! In this case, coef_diff_turb is called for the Cd only
     
    14621502        CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
    14631503            ypaprs, ypplay, yu_x, yv_x, yq_x, yt_x, yts_x, yqsurf, ycdragm_x, &
    1464             ycoefm_x, ycoefh_x, ytke_x)
     1504            ycoefm_x, ycoefh_x, ytke_x,y_treedrg)
     1505!            ycoefm_x, ycoefh_x, ytke_x)
     1506!FC doit on le mettre ( on ne l utilise pas si il y a du spliting)
    14651507       IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
    14661508! In this case, coef_diff_turb is called for the Cd only
     
    14881530        CALL coef_diff_turb(dtime, nsrf, knon, ni,  &
    14891531            ypaprs, ypplay, yu_w, yv_w, yq_w, yt_w, yts_w, yqsurf, ycdragm_w, &
    1490             ycoefm_w, ycoefh_w, ytke_w)
     1532            ycoefm_w, ycoefh_w, ytke_w,y_treedrg)
     1533!            ycoefm_w, ycoefh_w, ytke_w)
    14911534       IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
    14921535! In this case, coef_diff_turb is called for the Cd only
     
    17751818               yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,&
    17761819               yqsurf, ytsurf_new, y_dflux_t, y_dflux_q, &
    1777                y_flux_u1, y_flux_v1 )
     1820               y_flux_u1, y_flux_v1, &
     1821               yveget,ylai,yheight )
     1822!FC quid qd yveget ylai yheight ne sont pas definit
     1823!FC  yveget,ylai,yheight, &
     1824            if (ifl_pbltree .eq. 1) then
     1825            CALL   freinage(knon, yu, yv, yt, &
     1826!              yveget,ylai, yheight,ypaprs,ypplay,y_d_u_frein,y_d_v_frein)
     1827              yveget,ylai, yheight,ypaprs,ypplay,y_treedrg, y_d_u_frein,y_d_v_frein)
     1828             endif
     1829
    17781830               
    17791831! Special DICE MPL 05082013 puis BOMEX
     
    21822234             y_d_u(j,k)  = y_d_u(j,k) * ypct(j)
    21832235             y_d_v(j,k)  = y_d_v(j,k) * ypct(j)
     2236!FC
     2237              if  (nsrf .EQ. is_ter .and. ifl_pbltree .eq. 1  ) then
     2238!            if (y_d_u_frein(j,k).ne.0. ) then
     2239!        print*, nsrf,'IS_TER ++', y_d_u_frein(j,k)*ypct(j),y_d_u(j,k),j,k
     2240!            endif
     2241             y_d_u(j,k) =y_d_u(j,k) + y_d_u_frein(j,k)*ypct(j)
     2242             y_d_v(j,k) =y_d_v(j,k) + y_d_v_frein(j,k)*ypct(j)
     2243             treedrg(i,k,nsrf)=y_treedrg(j,k)
     2244               endif
     2245!FC
    21842246
    21852247             flux_t(i,k,nsrf) = y_flux_t(j,k)
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/phyetat0.F90

    r2656 r2924  
    1818       wake_deltat, wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, &
    1919       wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, &
    20        zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m
     20       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg
     21!FC
    2122  USE geometry_mod, ONLY : longitude_deg, latitude_deg
    2223  USE iostart, ONLY : close_startphy, get_field, get_var, open_startphy
     
    319320     found=phyetat0_srf(1,z0h,"Z0h","Roughness length, enthalpy ",0.001)
    320321  ENDIF
     322!FC
     323  !lecture du profile de freinage des arbres
     324   IF (.not. found ) then
     325     treedrg(:,1:klev,1:nbsrf)= 0.0
     326   else
     327  found=phyetat0_srf(klev,treedrg,"treedrg","freinage arbres",0.)
     328   ENDIF
     329
    321330
    322331  ! Lecture de l'age de la neige:
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/phyredem.F90

    r2656 r2924  
    2222                                wake_pe, wake_fip, fm_therm, entr_therm,     &
    2323                                detr_therm, Ale_bl, Ale_bl_trig, Alp_bl,     &
    24                                 du_gwd_rando, du_gwd_front, u10m, v10m
     24                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
     25                                treedrg
    2526  USE geometry_mod, ONLY : longitude_deg, latitude_deg
    2627  USE iostart, ONLY: open_restartphy, close_restartphy, put_field, put_var
     
    160161! ================== Tsoil =========================================
    161162  CALL put_field_srf2("Tsoil","Temperature",tsoil(:,:,:))
     163!FC
     164  CALL put_field_srf2("treedrg","freinage arbres",treedrg(:,:,:))
     165
    162166
    163167  CALL put_field_srf1("QS"  , "Humidite",qsurf(:,:))
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/phys_output_ctrlout_mod.F90

    r2876 r2924  
    961961      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_sic',       &
    962962      "Max Turb. Kinetic Energy "//clnsurf(4),"m2/s2", (/ ('', i=1, 10) /)) /)
     963!FC
     964!  TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_treedrg_srf      = (/             &
     965!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_ter',       &
     966!      "Drag from trees "//clnsurf(1),"-", (/ ('', i=1, 10) /)), &
     967!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_lic',       &
     968!      "Drag from trees "//clnsurf(2),"-", (/ ('', i=1, 10) /)), &
     969!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_oce',       &
     970!      "Drag from trees "//clnsurf(3),"-", (/ ('', i=1, 10) /)), &
     971!      ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'treedrg_sic',       &
     972!      "Drag from trees "//clnsurf(4),"-", (/ ('', i=1, 10) /)) /)
     973!FC
     974
    963975
    964976  TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_l_mixmin      = (/             &
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/phys_output_write_mod.F90

    r2854 r2924  
    9999         o_SWdownOR, o_LWdownOR, o_snowl, &
    100100         o_solldown, o_dtsvdfo, o_dtsvdft, &
    101          o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od443aer, o_od550aer, &
     101         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h,  o_od443aer, o_od550aer, &
    102102         o_dryod550aer, o_od865aer, o_abs550aer, o_od550lt1aer, &
    103103         o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, &
     
    834834          ENDIF
    835835!>jyg
     836!          IF (iflag_pbl > 1 .AND. ifl_pbltree  >=1 ) THEN
     837!       CALL histwrite_phy(o_treedrg_srf(nsrf), treedrg(:,1:klev,nsrf))
     838!            ENDIF
     839
    836840
    837841       ENDDO
     
    11651169       CALL histwrite_phy(o_z0m, z0m(:,nbsrf+1))
    11661170       CALL histwrite_phy(o_z0h, z0h(:,nbsrf+1))
     1171
    11671172       ! od550 per species
    11681173!--OLIVIER
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/phys_state_var_mod.F90

    r2825 r2924  
    3232      REAL,ALLOCATABLE,SAVE :: qsol(:),fevap(:,:),z0m(:,:),z0h(:,:),agesno(:,:)
    3333!$OMP THREADPRIVATE(qsol,fevap,z0m,z0h,agesno)
     34!FC drag des arbres
     35      REAL, ALLOCATABLE, SAVE :: treedrg(:,:,:)
     36!$OMP THREADPRIVATE(treedrg)
     37
    3438!      character(len=6), SAVE :: ocean
    3539!!!!!!$OMP THREADPRIVATE(ocean)
     
    430434      ALLOCATE(qsol(klon),fevap(klon,nbsrf))
    431435      ALLOCATE(z0m(klon,nbsrf+1),z0h(klon,nbsrf+1),agesno(klon,nbsrf))
     436!FC
     437      ALLOCATE(treedrg(klon,klev,nbsrf))
    432438      ALLOCATE(falb1(klon,nbsrf))
    433439      ALLOCATE(falb2(klon,nbsrf))
     
    603609      deallocate(pctsrf, ftsol, falb1, falb2)
    604610      deallocate(qsol,fevap,z0m,z0h,agesno)
     611!FC
     612      deallocate(treedrg)
    605613      deallocate(rain_fall, snow_fall, solsw, sollw, radsol, swradcorr)
    606614      deallocate(zmea, zstd, zsig, zgam)
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/physiq_mod.F90

    r2897 r2924  
    22422242            zxfluxt,   zxfluxq,   q2m,     fluxq, pbl_tke, &
    22432243                                !nrlmd+jyg<
    2244             wake_delta_pbl_TKE &
     2244            wake_delta_pbl_TKE, &
    22452245                                !>nrlmd+jyg
    2246             )
     2246             treedrg )
     2247!FC
    22472248       !
    22482249       !  Add turbulent diffusion tendency to the wake difference variables
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/surf_land_mod.F90

    r2571 r2924  
    11!
    22MODULE surf_land_mod
    3  
     3#ifndef LMDZ_nofrein
     4
    45  IMPLICIT NONE
    56
     
    1920       z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, &   
    2021       qsurf, tsurf_new, dflux_s, dflux_l, &
    21        flux_u1, flux_v1 )
     22       flux_u1, flux_v1 , &
     23       veget,lai,height)
     24
     25!FCveget,lai,height, &
    2226
    2327    USE dimphy
     
    3337    USE surf_land_orchidee_noz0h_mod
    3438#else
    35     ! Compilation with default interface
     39#if ORCHIDEE_NOFREIN
     40    ! Compilation with cpp key ORCHIDEE_NOFREIN
     41    USE surf_land_orchidee_nofrein_mod
     42#else
    3643    USE surf_land_orchidee_mod
     44#endif
    3745#endif
    3846#endif
     
    4755    INCLUDE "clesphys.h"
    4856!albedo SB <<<
     57!FC
     58   INCLUDE "dimpft.h"
     59
    4960
    5061! Input variables 
     
    96107    REAL, DIMENSION(klon), INTENT(OUT)       :: dflux_s, dflux_l     
    97108    REAL, DIMENSION(klon), INTENT(OUT)       :: flux_u1, flux_v1  ! flux for U and V at first model level
     109!FC
     110    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT)       :: veget,lai
     111    REAL, DIMENSION(klon,nvm_lmdz), INTENT(OUT)            :: height
    98112
    99113! Local variables
     
    150164            evap, fluxsens, fluxlat, &             
    151165            tsol_rad, tsurf_new, alb1_new, alb2_new, &
    152             emis_new, z0m, z0h, qsurf)       
     166            emis_new, z0m, z0h, qsurf, &
     167            veget, lai, height)       
     168
     169!    print*, " FC SORTIE surf_land_orchidee" ,height(1:100,2)
     170!FC
     171
    153172
    154173
     
    217236!****************************************************************************************
    218237
     238#endif
    219239END MODULE surf_land_mod
    220240!
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/surf_land_orchidee_mod.F90

    r2571 r2924  
    33#ifndef ORCHIDEE_NOOPENMP
    44#ifndef ORCHIDEE_NOZ0H
     5#ifndef ORCHIDEE_NOFREIN
     6!FC la derniere ligne et la fin
    57!
    68! This module controles the interface towards the model ORCHIDEE.
     
    4446       evap, fluxsens, fluxlat, &             
    4547       tsol_rad, tsurf_new, alb1_new, alb2_new, &
    46        emis_new, z0m_new, z0h_new, qsurf)
     48       emis_new, z0m_new, z0h_new, qsurf, &
     49       veget, lai, height )
     50!FC
     51
    4752
    4853    USE mod_surf_para
     
    109114!
    110115    INCLUDE "YOMCST.h"
     116!FC
     117    INCLUDE "dimpft.h"
     118
     119
    111120 
    112121!
     
    139148    REAL, DIMENSION(klon), INTENT(OUT)        :: alb1_new, alb2_new
    140149    REAL, DIMENSION(klon), INTENT(OUT)        :: emis_new, z0m_new, z0h_new
     150!FC
     151    REAL, DIMENSION (klon,nvm_lmdz),INTENT(OUT)         :: veget
     152    REAL, DIMENSION (klon,nvm_lmdz),INTENT(OUT)         :: lai
     153    REAL, DIMENSION (klon,nvm_lmdz) ,INTENT(OUT)        :: height
     154
    141155
    142156! Local
     
    217231! Test of coherence between variable ok_veget and cpp key CPP_VEGET
    218232#ifndef CPP_VEGET
     233             print* , "nvm_orch FC  ", nvm_orch
     234             print* , "nvm_lmdz FC  ", nvm_lmdz
     235
    219236       abort_message='Pb de coherence: ok_veget = .true. mais CPP_VEGET = .false.'
    220237       CALL abort_physic(modname,abort_message,1)
     
    409426               cdrag, petA_orc, peqA_orc, petB_orc, peqB_orc, &
    410427               precip_rain, precip_snow, lwdown, swnet, swdown, ps, &
    411                evap, fluxsens, fluxlat, coastalflow, riverflow, &
     428               nvm_orch, evap, fluxsens, fluxlat, coastalflow, riverflow, &
    412429               tsol_rad, tsurf_new, qsurf, albedo_out, emis_new, z0m_new, &
    413430               lon_scat, lat_scat, q2m, t2m, z0h_new)
     
    427444    IF (knon > 0) THEN
    428445#ifdef CPP_VEGET   
     446!FC
     447           if(nvm_orch .ne.nvm_lmdz ) then
     448       abort_message='Pb de dimensiosn PFT: nvm_orch et nvm_lmdz differents.'
     449       CALL abort_physic(modname,abort_message,1)
     450           endif
     451!FC
     452
    429453       CALL intersurf_main_gathered (itime+itau_phy, nbp_lon, nbp_lat, knon, ktindex, dtime,  &
    430454            lrestart_read, lrestart_write, lalo, &
     
    435459            evap(1:knon), fluxsens(1:knon), fluxlat(1:knon), coastalflow(1:knon), riverflow(1:knon), &
    436460            tsol_rad(1:knon), tsurf_new(1:knon), qsurf(1:knon), albedo_out(1:knon,:), emis_new(1:knon), z0m_new(1:knon), &
    437             lon_scat, lat_scat, q2m, t2m, z0h_new(1:knon), coszang=yrmu0(1:knon))
     461            lon_scat, lat_scat, q2m, t2m, z0h_new(1:knon),&
     462            veget(1:knon,:),lai(1:knon,:),height(1:knon,:),&
     463              coszang=yrmu0(1:knon))
    438464#endif       
     465!FC on doit mettre nvm_orch la ???
    439466    ENDIF
    440467
     
    665692#endif
    666693#endif
     694#endif
    667695END MODULE surf_land_orchidee_mod
  • LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/yamada4.F90

    r2891 r2924  
    22
    33SUBROUTINE yamada4(ni, nsrf, ngrid, dt, g, rconst, plev, temp, zlev, zlay, u, v, teta, &
    4     cd, tke, km, kn, kq, ustar, iflag_pbl)
     4    cd, tke, km, kn, kq, ustar, iflag_pbl, drgpro)
    55
    66  USE dimphy
     
    101101  INTEGER ni(klon)
    102102
     103!FC
     104  REAL drgpro(klon,klev)
     105  REAL winds(klon,klev)
    103106
    104107  ! Local
     
    479482         DO ig=1,ngrid
    480483         tkeprov=q2(ig,k)/ydeux
    481          disseff=dissip(ig,k)-min(0.,buoy(ig,k))
     484
     485!             if(ifl_pbltree .eq. 0) then
     486!         disseff=dissip(ig,k)-min(0.,buoy(ig,k))
     487!         tkeexp=exp(-dt*disseff/tkeprov)
     488!         tkeprov= shear(ig,k)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
     489!           else
     490!FC on ajoute la dissipation due aux arbres
     491         disseff=dissip(ig,k)-min(0.,buoy(ig,k)) + drgpro(ig,k)*tkeprov
    482492         tkeexp=exp(-dt*disseff/tkeprov)
    483          tkeprov= shear(ig,k)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
     493! on prend en compte la tke cree par les arbres
     494         winds(ig,k)=sqrt(u(ig,k)**2+v(ig,k)**2)
     495         tkeprov= (shear(ig,k)+ &
     496          & drgpro(ig,k)*(winds(ig,k))**3)*tkeprov/disseff*(1.-tkeexp)+tkeprov*tkeexp
     497!               endif
     498
    484499         q2(ig,k)=tkeprov*ydeux
     500
    485501         ! En cas stable, on traite la flotabilite comme la
    486502         ! dissipation, en supposant que buoy/q2^3 est constant.
Note: See TracChangeset for help on using the changeset viewer.