Changeset 3781 for LMDZ6


Ignore:
Timestamp:
Oct 26, 2020, 10:33:06 AM (4 years ago)
Author:
evignon
Message:

Initialisation de la TKE pour les cas 1D (important pour GABLS1), Etienne

Location:
LMDZ6/trunk/libf/phylmd
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/dyn1d/1D_decl_cases.h

    r3780 r3781  
    287287        real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm)
    288288        real u_mod_cas(llm),v_mod_cas(llm)
    289         real omega_mod_cas(llm)
     289        real omega_mod_cas(llm),tke_mod_cas(llm+1)
    290290        real ht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm)
    291291        real hth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm)
  • LMDZ6/trunk/libf/phylmd/dyn1d/1D_interp_cases.h

    r3780 r3781  
    1313     &       ,u_cas,v_cas,ug_cas,vg_cas                                                     &
    1414     &       ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas                               &
    15      &       ,vitw_cas,omega_cas,du_cas,hu_cas,vu_cas                                       &
     15     &       ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas                                       &
    1616     &       ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas                           &
    1717     &       ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas       &
    18      &       ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas                                           &
     18     &       ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas                                           &
    1919!
    2020     &       ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas  &
     
    2222     &       ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas                                 &
    2323     &       ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas           &
    24      &       ,vitw_prof_cas,omega_prof_cas                                                  &
     24     &       ,vitw_prof_cas,omega_prof_cas,tke_prof_cas                                     &
    2525     &       ,du_prof_cas,hu_prof_cas,vu_prof_cas                                           &
    2626     &       ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas       &
    2727     &       ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas                            &
    2828     &       ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas                           &
    29      &       ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas)
     29     &       ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas)
    3030! EV tg instead of ts_cur
    3131             tg = ts_prof_cas
     
    3434
    3535! vertical interpolation:
    36       CALL interp2_case_vertical_std(play,nlev_cas,plev_prof_cas                                              &
     36      CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas                                              &
    3737     &         ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas                                       &
    3838     &         ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas                                 &
    3939     &         ,ug_prof_cas,vg_prof_cas                                                                   &
    4040     &         ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas                       &
    41      &         ,vitw_prof_cas,omega_prof_cas                                      &
     41     &         ,vitw_prof_cas,omega_prof_cas,tke_prof_cas                                                 &
    4242     &         ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas                   &
    4343     &         ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas    &
     
    4747     &         ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas                                                 &
    4848     &         ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas                           &
    49      &         ,w_mod_cas,omega_mod_cas                                                                   &
     49     &         ,w_mod_cas,omega_mod_cas,tke_mod_cas                                                       &
    5050     &         ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas                         &
    5151     &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas           &
     
    109109      do l = 1, llm
    110110! Modif w_mod_cas -> omega_mod_cas (MM+MPL 20170309)
     111        print*, l, llm
     112        print*, play(l), temp(l)
    111113       omega(l) = -w_mod_cas(l)*play(l)*rg/(rd*temp(l))
    112114      enddo
  • LMDZ6/trunk/libf/phylmd/dyn1d/1D_read_forc_cases.h

    r3780 r3781  
    2727     &       ,u_cas,v_cas,ug_cas,vg_cas                                                     &
    2828     &       ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas                               &
    29      &       ,vitw_cas,omega_cas,du_cas,hu_cas,vu_cas                                       &
     29     &       ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas                                       &
    3030     &       ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas                           &
    3131     &       ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas       &
    32      &       ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas                                           &
     32     &       ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas                                           &
    3333!
    3434     &       ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas  &
     
    3636     &       ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas                                 &
    3737     &       ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas           &
    38      &       ,vitw_prof_cas,omega_prof_cas                                                  &
     38     &       ,vitw_prof_cas,omega_prof_cas,tke_prof_cas                                    &
    3939     &       ,du_prof_cas,hu_prof_cas,vu_prof_cas                                           &
    4040     &       ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas       &
    4141     &       ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas                            &
    4242     &       ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas                           &
    43      &       ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas)
     43     &       ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas)
    4444
    4545      do l = 1, nlev_cas
     
    4949! vertical interpolation using interpolation routine:
    5050!      write(*,*)'avant interp vert', t_prof
    51       CALL interp2_case_vertical_std(play,nlev_cas,plev_prof_cas                                              &
     51      CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas                                              &
    5252     &         ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas                                          &
    5353     &         ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas                                 &
     
    5555     &       ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas                         &
    5656
    57      &         ,vitw_prof_cas,omega_prof_cas                                                              &
     57     &         ,vitw_prof_cas,omega_prof_cas,tke_prof_cas                                                 &
    5858     &         ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas                   &
    5959     &         ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas    &
     
    6363     &         ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas                                                 &
    6464     &         ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas                           &
    65      &         ,w_mod_cas,omega_mod_cas                                                                   &
     65     &         ,w_mod_cas,omega_mod_cas,tke_mod_cas                                                       &
    6666     &         ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas                         &
    6767     &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas           &
     
    9898       d_u_adv(l) = du_mod_cas(l)+hu_mod_cas(l)+vu_mod_cas(l)
    9999       d_v_adv(l) = dv_mod_cas(l)+hv_mod_cas(l)+vv_mod_cas(l)
     100      enddo
    100101
    101 !print*,'d_t_adv ',d_t_adv(1:20)*86400
     102! Etienne pour initialisation de TKE
    102103
    103       enddo     
     104       do l=1,llm+1
     105       pbl_tke(:,l,:)=tke_mod_cas(l)
     106       enddo     
    104107
    105108! Faut-il multiplier par -1 ? (MPL 20160713)
  • LMDZ6/trunk/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90

    r3780 r3781  
    1818        real, allocatable::  t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:)
    1919        real, allocatable::  th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:)
    20         real, allocatable::  u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:)
     20        real, allocatable::  u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:),tke_cas(:,:)
    2121
    2222!forcing
     
    3030        real, allocatable::  temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:)
    3131        real, allocatable::  lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:)
    32         real, allocatable::  uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke_cas(:)
     32        real, allocatable::  uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:)
    3333
    3434!champs interpoles
     
    4848        real, allocatable::  vitw_prof_cas(:)
    4949        real, allocatable::  omega_prof_cas(:)
     50        real, allocatable::  tke_prof_cas(:)
    5051        real, allocatable::  ug_prof_cas(:)
    5152        real, allocatable::  vg_prof_cas(:)
     
    7374
    7475
    75         real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke_prof_cas
     76        real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas
    7677        real o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas
    7778     
     
    168169        allocate(th_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),rv_cas(nlev_cas,nt_cas))
    169170        allocate(u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas),vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas))
    170 
     171        allocate(tke_cas(nlev_cas,nt_cas))
    171172!forcing
    172173        allocate(ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas),dt_cas(nlev_cas,nt_cas),dtrad_cas(nlev_cas,nt_cas))
     
    179180        allocate(temp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas))
    180181        allocate(u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas))
    181         allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tke_cas(nt_cas))
     182        allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tkes_cas(nt_cas))
    182183        allocate(uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas),q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas))
    183184
     
    200201        allocate(vitw_prof_cas(nlev_cas))
    201202        allocate(omega_prof_cas(nlev_cas))
     203        allocate(tke_prof_cas(nlev_cas))
    202204        allocate(ug_prof_cas(nlev_cas))
    203205        allocate(vg_prof_cas(nlev_cas))
     
    228230        CALL read_SCM (nid,nlev_cas,nt_cas,                                                                     &
    229231     &     ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas,                   &
    230      &     ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,ug_cas,vg_cas,                            &
     232     &     ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,tke_cas,ug_cas,vg_cas,                            &
    231233     &     temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas,                                                     &
    232234     &     du_cas,hu_cas,vu_cas,                                                                                &
    233235     &     dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,               &
    234      &     dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tke_cas,                      &
     236     &     dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tkes_cas,                      &
    235237     &     uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough, &
    236238     &     o3_cas,rugos_cas,clay_cas,sand_cas)
     
    254256        deallocate(t_cas,q_cas,qv_cas,ql_cas,qi_cas,rh_cas)
    255257        deallocate(th_cas,thl_cas,thv_cas,rv_cas)
    256         deallocate(u_cas,v_cas,vitw_cas,omega_cas)
     258        deallocate(u_cas,v_cas,vitw_cas,omega_cas,tke_cas)
    257259       
    258260!forcing
     
    265267        deallocate(ug_cas)
    266268        deallocate(vg_cas)
    267         deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tke_cas,uw_cas,vw_cas,q1_cas,q2_cas)
     269        deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tkes_cas,uw_cas,vw_cas,q1_cas,q2_cas)
    268270
    269271!champs interpoles
     
    283285        deallocate(vitw_prof_cas)
    284286        deallocate(omega_prof_cas)
     287        deallocate(tke_prof_cas)
    285288        deallocate(ug_prof_cas)
    286289        deallocate(vg_prof_cas)
     
    312315!=====================================================================
    313316      SUBROUTINE read_SCM(nid,nlevel,ntime,                                       &
    314      &     ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,ug,vg,&
     317     &     ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,tke,ug,vg,&
    315318     &     temp_nudg,qv_nudg,u_nudg,v_nudg,                                        &
    316319     &     du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq,                                    &
    317      &     dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tket,uw,vw,q1,q2,       &
     320     &     dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tkes,uw,vw,q1,q2,       &
    318321     &     orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,          &
    319322     &     heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas)
     
    334337      real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime)
    335338      real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime)
    336       real u(nlevel,ntime),v(nlevel,ntime),tket(ntime)
     339      real u(nlevel,ntime),v(nlevel,ntime),tkes(ntime)
    337340      real temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime)
    338341      real ug(nlevel,ntime),vg(nlevel,ntime)
    339       real vitw(nlevel,ntime),omega(nlevel,ntime)
     342      real vitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime)
    340343      real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime)
    341344      real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime)
     
    371374     &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt',   & ! #46-58
    372375     ! coordonnees temps #12
    373      &'tket','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&
     376     &'tkes','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&
    374377     &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',&
    375378     ! scalaires #4
     
    546549           case(56) ; u=resul
    547550           case(57) ; v=resul
    548            case(58) ; tket=resul2   ! donnees indexees en time
     551           case(58) ; tkes=resul2   ! donnees indexees en time
    549552           case(59) ; sens=resul2
    550553           case(60) ; flat=resul2
     
    581584             u(k,t)=u0(k)
    582585             v(k,t)=v0(k)
    583              !tke(k,t)=tke0(k)
     586             tke(k,t)=tke0(k)
    584587          enddo
    585588       enddo
     
    593596
    594597!======================================================================
     598
     599!**********************************************************************************************
    595600
    596601!**********************************************************************************************
     
    601606     &         ,qv_cas,ql_cas,qi_cas,u_cas,v_cas                                  &
    602607     &         ,ug_cas,vg_cas,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas     &
    603      &         ,vitw_cas,omega_cas,du_cas,hu_cas,vu_cas             &
     608     &         ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas             &
    604609     &         ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas               &
    605610     &         ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas                      &
    606611     &         ,lat_cas,sens_cas,ustar_cas                                        &
    607      &         ,uw_cas,vw_cas,q1_cas,q2_cas,tke_cas                               &
     612     &         ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas                               &
    608613!
    609614     &         ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas               &
     
    611616     &         ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas                     &
    612617     &         ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas     &
    613      &         ,vitw_prof_cas,omega_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas  &
     618     &         ,vitw_prof_cas,omega_prof_cas,tke_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas  &
    614619     &         ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas                   &
    615620     &         ,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas                &
    616621     &         ,hq_prof_cas,vq_prof_cas,dth_prof_cas,hth_prof_cas,vth_prof_cas    &
    617622     &         ,lat_prof_cas,sens_prof_cas                                        &
    618      &         ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas)
    619          
    620 
    621         implicit none
     623     &         ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas)
     624
     625
     626
     627
     628
     629
     630       implicit none
    622631
    623632!---------------------------------------------------------------------------------------
     
    639648        real ts_cas(nt_cas),ps_cas(nt_cas)
    640649        real plev_cas(nlev_cas,nt_cas)
    641         real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas)
     650        real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas)
     651        real thv_cas(nlev_cas,nt_cas), thl_cas(nlev_cas,nt_cas)
    642652        real qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas)
    643653        real u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas)
     
    646656        real u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas)
    647657
    648         real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)
     658        real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas)
    649659        real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas)
    650660        real dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas)
     
    653663        real dtrad_cas(nlev_cas,nt_cas)
    654664        real dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas)
    655         real lat_cas(nt_cas),sens_cas(nt_cas),tke_cas(nt_cas)
     665        real lat_cas(nt_cas),sens_cas(nt_cas),tkes_cas(nt_cas)
    656666        real ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas)
    657667        real q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)
     
    666676        real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas)
    667677
    668         real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)
     678        real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas)
    669679        real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas)
    670680        real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas)
     
    673683        real dtrad_prof_cas(nlev_cas)
    674684        real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas)
    675         real lat_prof_cas,sens_prof_cas,tke_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas
     685        real lat_prof_cas,sens_prof_cas,tkes_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas
    676686        real uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas)
    677687! local:
     
    757767       sens_prof_cas = sens_cas(it_cas2)                                 &
    758768     &          -frac*(sens_cas(it_cas2)-sens_cas(it_cas1))
    759        tke_prof_cas = tke_cas(it_cas2)                                   &
    760      &          -frac*(tke_cas(it_cas2)-tke_cas(it_cas1))
     769       tkes_prof_cas = tkes_cas(it_cas2)                                   &
     770     &          -frac*(tkes_cas(it_cas2)-tkes_cas(it_cas1))
    761771       ts_prof_cas = ts_cas(it_cas2)                                     &
    762772     &          -frac*(ts_cas(it_cas2)-ts_cas(it_cas1))
     
    804814        omega_prof_cas(k) = omega_cas(k,it_cas2)                         &
    805815     &          -frac*(omega_cas(k,it_cas2)-omega_cas(k,it_cas1))
     816        tke_prof_cas(k) = tke_cas(k,it_cas2)                         &
     817     &          -frac*(tke_cas(k,it_cas2)-tke_cas(k,it_cas1))
    806818        du_prof_cas(k) = du_cas(k,it_cas2)                               &
    807819     &          -frac*(du_cas(k,it_cas2)-du_cas(k,it_cas1))
     
    851863!**********************************************************************************************
    852864!=====================================================================
    853        SUBROUTINE interp2_case_vertical_std(play,nlev_cas,plev_prof_cas                                &
     865       SUBROUTINE interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas                           &
    854866     &         ,t_prof_cas,th_prof_cas,thv_prof_cas,thl_prof_cas                                       &
    855867     &         ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas                              &
    856868     &         ,ug_prof_cas,vg_prof_cas                                                                &
    857869     &         ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas                    &
    858      &         ,vitw_prof_cas,omega_prof_cas                                                           &
     870     &         ,vitw_prof_cas,omega_prof_cas,tke_prof_cas                                              &
    859871     &         ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas                &
    860872     &         ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas &
     
    865877     &         ,ug_mod_cas,vg_mod_cas                                                                  &
    866878     &         ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas                        &
    867      &         ,w_mod_cas,omega_mod_cas                                                                &
     879     &         ,w_mod_cas,omega_mod_cas,tke_mod_cas                                                    &
    868880     &         ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas                      &
    869881     &         ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas        &
     
    888900!       real hq_prof(nlevmax),vq_prof(nlevmax)
    889901 
    890        real play(llm), plev_prof_cas(nlev_cas)
     902       real play(llm), plev(llm+1), plev_prof_cas(nlev_cas)
    891903       real t_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas)
    892904       real qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas)
    893905       real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas)
    894        real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas)
     906       real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas)
    895907       real temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas)
    896908       real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas)
     
    905917       real qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm)
    906918       real u_mod_cas(llm),v_mod_cas(llm)
    907        real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm)
     919       real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm),tke_mod_cas(llm+1)
    908920       real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm)
    909921       real u_nudg_mod_cas(llm),v_nudg_mod_cas(llm)
     
    917929       real frac,frac1,frac2,fact
    918930 
    919 !       do l = 1, llm
    920 !       print *,'debut interp2, play=',l,play(l)
    921 !       enddo
    922 !      do l = 1, nlev_cas
    923 !      print *,'debut interp2, plev_prof_cas=',l,play(l),plev_prof_cas(l)
    924 !      enddo
    925 
    926 !       print*, 'plev_prof_cas', plev_prof_cas
    927 !       print*, 'play', play
     931
     932
     933! for variables defined at the middle of layers
     934
    928935       do l = 1, llm
    929936
     
    951958         enddo
    952959         endif
     960
     961
    953962
    954963         frac = (plev_prof_cas(k2)-play(l))/(plev_prof_cas(k2)-plev_prof_cas(k1))
     
    10781087       enddo ! l
    10791088
     1089! for variables defined at layer interfaces (EV):
     1090
     1091
     1092       do l = 1, llm+1
     1093
     1094        if (plev(l).ge.plev_prof_cas(nlev_cas)) then
     1095
     1096         mxcalc=l
     1097         k1=0
     1098         k2=0
     1099
     1100         if (plev(l).le.plev_prof_cas(1)) then
     1101
     1102         do k = 1, nlev_cas-1
     1103          if (plev(l).le.plev_prof_cas(k).and. plev(l).gt.plev_prof_cas(k+1)) then
     1104            k1=k
     1105            k2=k+1
     1106          endif
     1107         enddo
     1108
     1109         if (k1.eq.0 .or. k2.eq.0) then
     1110          write(*,*) 'PB! k1, k2 = ',k1,k2
     1111          write(*,*) 'l,plev(l) = ',l,plev(l)/100
     1112         do k = 1, nlev_cas-1
     1113          write(*,*) 'k,plev_prof_cas(k) = ',k,plev_prof_cas(k)/100
     1114         enddo
     1115         endif
     1116
     1117         frac = (plev_prof_cas(k2)-plev(l))/(plev_prof_cas(k2)-plev_prof_cas(k1))
     1118         tke_mod_cas(l)= tke_prof_cas(k2) - frac*(tke_prof_cas(k2)-tke_prof_cas(k1))
     1119         else !play>plev_prof_cas(1)
     1120         k1=1
     1121         k2=2
     1122         tke_mod_cas(l)= frac1*tke_prof_cas(k1) - frac2*tke_prof_cas(k2)
     1123
     1124         endif ! plev.le.plev_prof_cas(1)
     1125
     1126        else ! above max altitude of forcing file
     1127
     1128         tke_mod_cas(l)=0.0
     1129
     1130        endif ! plev
     1131
     1132       enddo ! l
     1133
     1134
    10801135
    10811136          return
  • LMDZ6/trunk/libf/phylmd/dyn1d/old_lmdz1d.F90

    r3780 r3781  
    632632!          (phys_state_var_init is called again in physiq)
    633633      read_climoz = 0
    634 !
     634      nsw=6          ! EV et LF: sinon, falb_dir et falb_dif ne peuvent etre alloues
     635
     636
    635637      call phys_state_var_init(read_climoz)
    636638
     
    850852        zpic = zpicinp
    851853        ftsol=tsurf
    852         nsw=6 ! on met le nb de bandes SW=6, pour initialiser
    853               ! 6 albedo, mais on peut quand meme tourner avec
    854               ! moins. Seules les 2 ou 4 premiers seront lus
    855               print*, 'les albedos sont sont', albedo, falb_dir
    856854        falb_dir=albedo
    857855        falb_dif=albedo
    858              print*, falb_dir
    859856        rugoro=rugos
    860857        t_ancien(1,:)=temp(:)
  • LMDZ6/trunk/libf/phylmd/dyn1d/scm.F90

    r3780 r3781  
    412412!          (phys_state_var_init is called again in physiq)
    413413      read_climoz = 0
    414 !
     414      nsw=6
     415
    415416      call phys_state_var_init(read_climoz)
    416417
     
    624625        zpic = zpicinp
    625626        ftsol=tsurf
    626         nsw=6 ! on met le nb de bandes SW=6, pour initialiser
    627               ! 6 albedo, mais on peut quand meme tourner avec
    628               ! moins. Seules les 2 ou 4 premiers seront lus
    629               print*, 'les albedos sont', albedo
    630627        falb_dir=albedo
    631628        falb_dif=albedo
     
    639636        prw_ancien = 0.
    640637!jyg<
     638! Etienne: comment those lines since now the TKE is inialized in 1D_read_forc_cases
    641639!!      pbl_tke(:,:,:)=1.e-8
    642         pbl_tke(:,:,:)=0.
    643 ! EV: pourquoi????
     640!        pbl_tke(:,:,:)=0.
    644641!        pbl_tke(:,2,:)=1.e-2
    645         PRINT *, ' pbl_tke dans lmdz1d '
    646         if (prt_level .ge. 5) then
    647          DO nsrf = 1,4
    648            PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf)
    649          ENDDO
    650         end if
    651 
    652642!>jyg
    653643        rain_fall=0.
  • LMDZ6/trunk/libf/phylmd/phys_state_var_mod.F90

    r3780 r3781  
    449449
    450450include "clesphys.h"
     451
     452      print*, 'is_initialized', is_initialized
    451453      IF (is_initialized) RETURN
    452454      is_initialized=.TRUE.
     
    460462      ALLOCATE(falb2(klon,nbsrf))
    461463!albedo SB >>>
     464      print*, 'allocate falb'
    462465      ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf))
     466      print*, 'allocate falb good', falb_dir(1,1,1)
    463467      ALLOCATE(chl_con(klon))
    464468!albedo SB <<<
Note: See TracChangeset for help on using the changeset viewer.