Ignore:
Timestamp:
Sep 20, 2024, 12:32:04 PM (8 weeks ago)
Author:
Laurent Fairhead
Message:

Updating cirrus branch to trunk revision 5171

Location:
LMDZ6/branches/cirrus
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/cirrus

  • LMDZ6/branches/cirrus/libf/phylmd/phys_local_var_mod.F90

    r4951 r5202  
    1414      REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:)
    1515      !$OMP THREADPRIVATE(ql_seri,qs_seri)
     16! SN 15/07/2024 ISO 4D
     17      REAL, SAVE, ALLOCATABLE :: qx_seri(:,:,:)
     18      !$OMP THREADPRIVATE(qx_seri)
     19! SN
    1620      REAL, SAVE, ALLOCATABLE :: qbs_seri(:,:)
    1721      !$OMP THREADPRIVATE(qbs_seri)
     
    2428      REAL, SAVE, ALLOCATABLE :: pbl_eps(:,:,:)
    2529      !$OMP THREADPRIVATE(pbl_eps)
     30      REAL, SAVE, ALLOCATABLE :: tke_shear(:,:,:), tke_buoy(:,:,:), tke_trans(:,:,:)
     31      !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans)
    2632      REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:)
    2733      !$OMP THREADPRIVATE(tr_seri)
     
    6470      REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:),d_ql_eva(:,:),d_qi_eva(:,:)
    6571      !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva)
     72! SN 15/07/2024 ISO 4D
     73      REAL, SAVE, ALLOCATABLE :: d_qx_eva(:,:,:)
     74      !$OMP THREADPRIVATE(d_qx_eva)
     75! SN
    6676      REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:)
    6777      !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst)
     
    8494      REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:)
    8595      !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x)
    86       REAL, SAVE, ALLOCATABLE :: d_t_bs(:,:), d_q_bs(:,:), d_qbs_bs(:,:)
    87       !$OMP THREADPRIVATE( d_t_bs,d_q_bs, d_qbs_bs)
     96      REAL, SAVE, ALLOCATABLE :: d_t_bsss(:,:), d_q_bsss(:,:), d_qbs_bsss(:,:)
     97      !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss)
    8898!>nrlmd+jyg
    8999      REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:)
     
    117127      REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:)
    118128      !$OMP THREADPRIVATE(d_q_ch4)
     129#ifdef ISO
     130      REAL, SAVE, ALLOCATABLE :: xt_seri(:,:,:)
     131      !$OMP THREADPRIVATE( xt_seri)
     132      REAL, SAVE, ALLOCATABLE :: xtl_seri(:,:,:)
     133      !$OMP THREADPRIVATE( xtl_seri)
     134      REAL, SAVE, ALLOCATABLE :: xts_seri(:,:,:)
     135      !$OMP THREADPRIVATE( xts_seri)
     136      REAL, SAVE, ALLOCATABLE :: xtbs_seri(:,:,:)
     137      !$OMP THREADPRIVATE( xtbs_seri)
     138      REAL, SAVE, ALLOCATABLE :: d_xt_eva(:,:,:)
     139      !$OMP THREADPRIVATE( d_xt_eva)
     140      REAL, SAVE, ALLOCATABLE :: d_xtl_eva(:,:,:)
     141      !$OMP THREADPRIVATE( d_xtl_eva)
     142      REAL, SAVE, ALLOCATABLE :: d_xti_eva(:,:,:)
     143      !$OMP THREADPRIVATE( d_xti_eva)
     144      REAL, SAVE, ALLOCATABLE :: d_xt_vdf(:,:,:)
     145      !$OMP THREADPRIVATE( d_xt_vdf)
     146      REAL, SAVE, ALLOCATABLE :: d_xt_dyn(:,:,:)
     147      !$OMP THREADPRIVATE( d_xt_dyn)
     148      REAL, SAVE, ALLOCATABLE :: d_xtl_dyn(:,:,:), d_xts_dyn(:,:,:), d_xtbs_dyn(:,:,:)
     149      !$OMP THREADPRIVATE(d_xtl_dyn, d_xts_dyn, d_xtbs_dyn)
     150      REAL, SAVE, ALLOCATABLE :: d_xt_con(:,:,:)
     151      !$OMP THREADPRIVATE( d_xt_con)
     152      REAL, SAVE, ALLOCATABLE :: d_xt_wake(:,:,:)
     153      !$OMP THREADPRIVATE( d_xt_wake)
     154      REAL, SAVE, ALLOCATABLE :: d_xt_lsc(:,:,:),d_xtl_lsc(:,:,:),d_xti_lsc(:,:,:)
     155      !$OMP THREADPRIVATE( d_xt_lsc,d_xtl_lsc,d_xti_lsc)
     156      REAL, SAVE, ALLOCATABLE :: d_xt_ajsb(:,:,:)
     157      !$OMP THREADPRIVATE( d_xt_ajsb)
     158      REAL, SAVE, ALLOCATABLE :: d_xt_ajs(:,:,:)
     159      !$OMP THREADPRIVATE( d_xt_ajs)
     160      REAL, SAVE, ALLOCATABLE :: d_xt_ajs_w(:,:,:), d_xt_ajs_x(:,:,:)
     161      !$OMP THREADPRIVATE(d_xt_ajs_w, d_xt_ajs_x)
     162      REAL, SAVE, ALLOCATABLE :: d_xt_vdf_w(:,:,:), d_xt_vdf_x(:,:,:)
     163      !$OMP THREADPRIVATE(d_xt_vdf_w, d_xt_vdf_x)
     164      REAL, SAVE, ALLOCATABLE :: d_xt_ch4(:,:,:)
     165      !$OMP THREADPRIVATE( d_xt_ch4)
     166      REAL, SAVE, ALLOCATABLE :: d_xt_prod_nucl(:,:,:)
     167      !$OMP THREADPRIVATE( d_xt_prod_nucl)
     168      REAL, SAVE, ALLOCATABLE :: d_xt_cosmo(:,:,:)
     169      !$OMP THREADPRIVATE( d_xt_cosmo)
     170      REAL, SAVE, ALLOCATABLE :: d_xt_decroiss(:,:,:)
     171      !$OMP THREADPRIVATE( d_xt_decroiss)
     172#endif
    119173
    120174! tendance du a la conersion Ec -> E thermique
     
    124178      !$OMP THREADPRIVATE(d_ts, d_tr)
    125179
    126 ! aerosols
    127       REAL, SAVE, ALLOCATABLE :: m_allaer (:,:,:)
    128       !$OMP THREADPRIVATE(m_allaer)
    129180! diagnostique pour le rayonnement
    130181      REAL, SAVE, ALLOCATABLE :: topswad_aero(:),  solswad_aero(:)      ! diag
     
    307358!!!OMP THREADPRIVATE(d_s_the, d_dens_the)
    308359      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)           :: d_deltat_ajs_cv, d_deltaq_ajs_cv
    309 !$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)                       
     360!$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)
     361#ifdef ISO
     362    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          :: d_deltaxt_wk
     363!$OMP THREADPRIVATE(d_deltaxt_wk)
     364    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          :: d_deltaxt_wk_gw
     365!$OMP THREADPRIVATE(d_deltaxt_wk_gw)
     366    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          ::  d_deltaxt_the
     367!$OMP THREADPRIVATE(d_deltaxt_the)
     368    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:)          ::  d_deltaxt_vdf
     369!$OMP THREADPRIVATE(d_deltaxt_vdf)
     370      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)           ::  d_deltaxt_ajs_cv
     371!$OMP THREADPRIVATE(d_deltaxt_ajs_cv)
     372#endif                       
    310373!!         End of Wake variables
    311374!!
     
    343406      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte
    344407!$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)
    345       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic
    346 !$OMP THREADPRIVATE(zxrunofflic)
     408!SN runoffdiag
     409      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic, runoff_diag
     410!$OMP THREADPRIVATE(zxrunofflic, runoff_diag)
    347411      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num
    348412!$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)
     413#ifdef ISO
     414      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtevap,xtprw
     415!$OMP THREADPRIVATE(xtevap,xtprw)
     416      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: h1_diag
     417      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrunoff_diag
     418!$OMP THREADPRIVATE(h1_diagv,xtrunoff_diag)
     419      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfxtcalving
     420!$OMP THREADPRIVATE(zxfxtcalving)
     421      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtsnow_lsc, zxfxtfonte
     422!$OMP THREADPRIVATE(xtsnow_lsc, zxfxtfonte)
     423      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxxtrunofflic
     424!$OMP THREADPRIVATE(zxxtrunofflic)
     425      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrain_lsc
     426!$OMP THREADPRIVATE(xtrain_lsc)
     427#endif
    349428!
    350429!jyg+nrlmd<
     
    384463      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w
    385464!$OMP THREADPRIVATE(kh, kh_x, kh_w)
     465#ifdef ISO
     466      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: dxtvdf_x, dxtvdf_w
     467!$OMP THREADPRIVATE(dxtvdf_x, dxtvdf_w)
     468      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xt_therm
     469!$OMP THREADPRIVATE(xt_therm)
     470#endif
    386471!!!
    387472!!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
     
    446531      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij
    447532!$OMP THREADPRIVATE(sij)
     533#ifdef ISO
     534      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtwdtrainA
     535!$OMP THREADPRIVATE(xtwdtrainA)
     536      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtev
     537!$OMP THREADPRIVATE(xtev)
     538      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xttaa
     539!$OMP THREADPRIVATE(xttaa)
     540      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtclw
     541!$OMP THREADPRIVATE(xtclw)
     542#ifdef DIAGISO
     543      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qlp
     544!$OMP THREADPRIVATE(qlp)
     545      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: qvp
     546!$OMP THREADPRIVATE(qvp)
     547      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_detrainement
     548!$OMP THREADPRIVATE(fq_detrainement)
     549      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_ddft
     550!$OMP THREADPRIVATE(fq_ddft)
     551      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_fluxmasse
     552!$OMP THREADPRIVATE(fq_fluxmasse)
     553      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: fq_evapprecip
     554!$OMP THREADPRIVATE(fq_evapprecip)
     555      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: f_detrainement
     556!$OMP THREADPRIVATE(f_detrainement)
     557      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: q_detrainement
     558!$OMP THREADPRIVATE(q_detrainement)
     559      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xt_detrainement
     560!$OMP THREADPRIVATE(xt_detrainement)
     561      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtlp
     562!$OMP THREADPRIVATE(xtlp)
     563      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xtvp
     564!$OMP THREADPRIVATE(xtvp)
     565      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: q_the
     566!$OMP THREADPRIVATE(q_the)
     567      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: xt_the
     568!$OMP THREADPRIVATE(xt_the)
     569      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_detrainement
     570!$OMP THREADPRIVATE(fxt_detrainement)
     571      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_ddft
     572!$OMP THREADPRIVATE(fxt_ddft)
     573      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_fluxmasse
     574!$OMP THREADPRIVATE(fxt_fluxmasse)
     575      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:)  :: fxt_evapprecip
     576!$OMP THREADPRIVATE(fxt_evapprecip)
     577#endif
     578#endif
    448579!
    449580!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
     
    481612      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld
    482613!$OMP THREADPRIVATE(pfraclr,pfracld)
     614      REAL, SAVE, ALLOCATABLE :: cldfraliq(:,:)
     615!$OMP THREADPRIVATE(cldfraliq)
     616      REAL, SAVE, ALLOCATABLE ::mean_icefracturb(:,:)
     617!$OMP THREADPRIVATE(mean_icefracturb)
     618      REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:,:)
     619!$OMP THREADPRIVATE(sigma2_icefracturb)
    483620
    484621! variables de sorties MM
     
    487624!$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)
    488625!$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)
     626#ifdef ISO
     627      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: zxxtsnow
     628!$OMP THREADPRIVATE(zxxtsnow)     
     629      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xtVprecip,xtVprecipi
     630!$OMP THREADPRIVATE(xtVprecip,xtVprecipi)
     631      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pxtrfl, pxtsfl
     632!$OMP THREADPRIVATE(pxtrfl, pxtsfl)
     633#endif
    489634
    490635      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause
     
    567712      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4
    568713!$OMP THREADPRIVATE(R2SO4)
     714      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: R2SO4B
     715!$OMP THREADPRIVATE(R2SO4B)
    569716      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4
    570717!$OMP THREADPRIVATE(DENSO4)
     718      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: DENSO4B
     719!$OMP THREADPRIVATE(DENSO4B)     
    571720      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet
    572721!$OMP THREADPRIVATE(f_r_wet)
     722      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: f_r_wetB
     723!$OMP THREADPRIVATE(f_r_wetB)
    573724      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer
    574725!$OMP THREADPRIVATE(decfluxaer)
     
    599750      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer
    600751!$OMP THREADPRIVATE(vsed_aer)
     752!     Sulfate aerosol concentration (dry mixing ratio) (condensed H2SO4 mmr)
     753      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulfmmr
     754!$OMP THREADPRIVATE(sulfmmr)
     755!     SAD all aerosols (cm2/cm3)
     756      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SAD_sulfate
     757!$OMP THREADPRIVATE(SAD_sulfate)
     758!     Effective radius of wet surface aerosols (cm)
     759      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: reff_sulfate
     760!$OMP THREADPRIVATE(reff_sulfate)
     761!     sulfate MMR in different modes (based on sulfmmr, it must be dry mmr)
     762      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sulfmmr_mode
     763!$OMP THREADPRIVATE(sulfmmr_mode)
     764!     particle concentration in different modes (part/m3)
     765      REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nd_mode
     766!$OMP THREADPRIVATE(nd_mode)
    601767!
    602768!---3D budget variables
     
    647813SUBROUTINE phys_local_var_init
    648814USE dimphy
    649 USE infotrac_phy, ONLY : nbtr
     815USE infotrac_phy, ONLY : nbtr,nqtot
     816#ifdef ISO
     817USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
     818#endif
    650819USE aero_mod
    651820USE indice_sol_mod
    652821USE phys_output_var_mod
    653822USE phys_state_var_mod
     823#ifdef CPP_StratAer
     824USE infotrac_phy, ONLY : nbtr_bin
     825#endif
    654826
    655827IMPLICIT NONE
    656828      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev))
     829! SN 4D ISO
     830      ALLOCATE(qx_seri(klon,klev,nqtot))
     831! SN
    657832      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
    658833      ALLOCATE(cf_seri(klon,klev),rvc_seri(klon,klev))
    659834      ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf))
    660835      ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))
     836      ALLOCATE(tke_shear(klon,klev+1,nbsrf), tke_buoy(klon,klev+1,nbsrf), tke_trans(klon,klev+1,nbsrf))
    661837      pbl_eps(:,:,:)=0.
     838      tke_shear(:,:,:)=0.; tke_buoy(:,:,:)=0.; tke_trans(:,:,:)=0.
    662839      l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis
    663840      ALLOCATE(rhcl(klon,klev))
     
    684861      ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
    685862      ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))
     863! SN 4D ISO
     864      ALLOCATE(d_qx_eva(klon,klev,nqtot))
     865! SN
    686866      ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
    687867      ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
     
    690870      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
    691871      ALLOCATE (d_qbs_vdf(klon,klev))
    692       ALLOCATE(d_t_bs(klon,klev),d_q_bs(klon,klev),d_qbs_bs(klon,klev))
     872      ALLOCATE(d_t_bsss(klon,klev),d_q_bsss(klon,klev),d_qbs_bsss(klon,klev))
    693873      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
    694874      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
     875#ifdef ISO
     876      allocate(xt_seri(ntraciso,klon,klev))
     877      allocate(xtl_seri(ntraciso,klon,klev))
     878      allocate(xts_seri(ntraciso,klon,klev))
     879      allocate(xtbs_seri(ntraciso,klon,klev))
     880      allocate(d_xt_dyn(ntraciso,klon,klev))
     881      allocate(d_xtl_dyn(ntraciso,klon,klev))
     882      allocate(d_xts_dyn(ntraciso,klon,klev))
     883      allocate(d_xtbs_dyn(ntraciso,klon,klev))
     884      allocate(d_xt_con(ntraciso,klon,klev))
     885      allocate(d_xt_wake(ntraciso,klon,klev))
     886      allocate(d_xt_lsc(ntraciso,klon,klev))
     887      allocate(d_xtl_lsc(ntraciso,klon,klev))
     888      allocate(d_xti_lsc(ntraciso,klon,klev))
     889      allocate(d_xt_ajsb(ntraciso,klon,klev))
     890      allocate(d_xt_ajs(ntraciso,klon,klev))
     891      allocate(d_xt_ajs_w(ntraciso,klon,klev))
     892      allocate(d_xt_ajs_x(ntraciso,klon,klev))
     893      allocate(d_xt_eva(ntraciso,klon,klev))
     894      allocate(d_xtl_eva(ntraciso,klon,klev))
     895      allocate(d_xti_eva(ntraciso,klon,klev))
     896      allocate(d_xt_vdf(ntraciso,klon,klev)) 
     897      allocate(d_xt_vdf_w(ntraciso,klon,klev))
     898      allocate(d_xt_vdf_x(ntraciso,klon,klev))
     899      allocate(d_xt_ch4(ntraciso,klon,klev))
     900      allocate(d_xt_prod_nucl(ntraciso,klon,klev))
     901      allocate(d_xt_cosmo(ntraciso,klon,klev))
     902      allocate(d_xt_decroiss(ntraciso,klon,klev))
     903#endif
    695904
    696905      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
     
    704913      ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
    705914
    706 ! aerosols
    707       ALLOCATE(m_allaer(klon,klev,naero_tot))
    708915! Special RRTM
    709916      ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
     
    8131020!!      ALLOCATE( d_s_the(klon), d_dens_the(klon))
    8141021      ALLOCATE(d_deltat_ajs_cv(klon, klev), d_deltaq_ajs_cv(klon, klev))
     1022#ifdef ISO
     1023      ALLOCATE(d_deltaxt_wk(ntraciso,klon, klev))
     1024      ALLOCATE(d_deltaxt_wk_gw(ntraciso,klon, klev))
     1025      ALLOCATE(d_deltaxt_the(ntraciso,klon, klev))
     1026      ALLOCATE(d_deltaxt_vdf(ntraciso,klon, klev))
     1027      ALLOCATE(d_deltaxt_ajs_cv(ntraciso,klon, klev))
     1028#endif
    8151029!!         End of wake variables
    8161030!!
     
    8341048      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
    8351049      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
    836       ALLOCATE(zxrunofflic(klon))
     1050! SN add runoff_diag
     1051      ALLOCATE(zxrunofflic(klon), runoff_diag(klon))
     1052      runoff_diag(:)=0.
    8371053      ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon))
    8381054      zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0.
     
    8411057      ALLOCATE(qlth(klon,klev), qith(klon,klev), qsith(klon,klev), wiceth(klon,klev))
    8421058      !
     1059#ifdef ISO
     1060      ALLOCATE(xtevap(ntraciso,klon))
     1061      ALLOCATE(xtprw(ntraciso,klon))
     1062      ALLOCATE(zxfxtcalving(niso,klon))
     1063      ALLOCATE(xtsnow_lsc(ntraciso,klon), zxfxtfonte(niso,klon))
     1064      ALLOCATE(zxxtrunofflic(niso,klon))
     1065      ALLOCATE(xtrain_lsc(ntraciso,klon))
     1066      ALLOCATE(xtrunoff_diag(niso,klon))
     1067      ALLOCATE(h1_diag(klon))
     1068!SN
     1069      xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points
     1070#endif
     1071!
    8431072      ALLOCATE(sens_x(klon), sens_w(klon))
    8441073      ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon))
     
    8571086      ALLOCATE(cdragm_x(klon), cdragm_w(klon))
    8581087      ALLOCATE(kh(klon), kh_x(klon), kh_w(klon))
     1088#ifdef ISO
     1089      ALLOCATE(dxtvdf_x(ntraciso,klon,klev), dxtvdf_w(ntraciso,klon,klev))
     1090      ALLOCATE(xt_therm(ntraciso,klon,klev))
     1091#endif
    8591092!
    8601093      ALLOCATE(ptconv(klon,klev))
     
    9121145      ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev))
    9131146      ALLOCATE(sij(klon,klev,klev))
     1147#ifdef ISO
     1148      ALLOCATE(xtwdtrainA(ntraciso,klon,klev))
     1149      ALLOCATE(xtev(ntraciso,klon,klev) )
     1150      ALLOCATE(xttaa(ntraciso,klon,klev) )
     1151      ALLOCATE(xtclw(ntraciso,klon,klev) )
     1152#ifdef DIAGISO
     1153      ALLOCATE(qlp(klon,klev))
     1154      ALLOCATE(qvp(klon,klev))
     1155      ALLOCATE(fq_detrainement(klon,klev))
     1156      ALLOCATE(fq_ddft(klon,klev))
     1157      ALLOCATE(fq_fluxmasse(klon,klev))
     1158      ALLOCATE(fq_evapprecip(klon,klev))
     1159      ALLOCATE(f_detrainement(klon,klev), q_detrainement(klon,klev))
     1160      ALLOCATE(xtlp(ntraciso,klon,klev))
     1161      ALLOCATE(xtvp(ntraciso,klon,klev))
     1162      ALLOCATE(q_the(klon,klev), xt_the(ntraciso,klon,klev))
     1163      ALLOCATE(fxt_detrainement(ntraciso,klon,klev))
     1164      ALLOCATE(fxt_ddft(ntraciso,klon,klev))
     1165      ALLOCATE(fxt_fluxmasse(ntraciso,klon,klev))
     1166      ALLOCATE(fxt_evapprecip(ntraciso,klon,klev))
     1167      ALLOCATE(xt_detrainement(ntraciso,klon,klev))
     1168#endif
     1169#endif
    9141170
    9151171      ALLOCATE(prfl(klon, klev+1))
     
    9311187      ALLOCATE(pfraclr(klon,klev),pfracld(klon,klev))
    9321188      pfraclr(:,:)=0. ; pfracld(:,:)=0. ! because not always defined
     1189      ALLOCATE(cldfraliq(klon,klev))
     1190      ALLOCATE(sigma2_icefracturb(klon,klev))
     1191      ALLOCATE(mean_icefracturb(klon,klev))
    9331192      ALLOCATE(distcltop(klon,klev))
    9341193      ALLOCATE(temp_cltop(klon,klev))
     
    9371196      ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))
    9381197      ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))
     1198#ifdef ISO
     1199      ALLOCATE (zxxtsnow(niso,klon))
     1200      ALLOCATE(xtVprecip(ntraciso,klon, klev+1),xtVprecipi(ntraciso,klon, klev+1))
     1201      ALLOCATE(pxtsfl(ntraciso,klon, klev+1),pxtrfl(ntraciso,klon, klev+1))
     1202#endif
    9391203
    9401204      ALLOCATE (p_tropopause(klon))
     
    9681232      ALLOCATE (d_q_emiss(klon,klev))
    9691233      ALLOCATE (R2SO4(klon,klev))
     1234      ALLOCATE (R2SO4B(klon,klev,nbtr_bin))
    9701235      ALLOCATE (DENSO4(klon,klev))
     1236      ALLOCATE (DENSO4B(klon,klev,nbtr_bin))
    9711237      ALLOCATE (f_r_wet(klon,klev))
     1238      ALLOCATE (f_r_wetB(klon,klev,nbtr_bin))
    9721239      ALLOCATE (decfluxaer(klon,nbtr))
    9731240      ALLOCATE (mdw(nbtr))
     
    10061273      ALLOCATE (surf_PM25_sulf(klon))
    10071274      ALLOCATE (vsed_aer(klon,klev))
     1275      ALLOCATE (sulfmmr(klon,klev))
     1276      ALLOCATE (SAD_sulfate(klon,klev))
     1277      ALLOCATE (reff_sulfate(klon,klev))
     1278      ALLOCATE (sulfmmr_mode(klon,klev,nbtr_bin))
     1279      ALLOCATE (nd_mode(klon,klev,nbtr_bin))
    10081280#endif
    10091281
     
    10161288IMPLICIT NONE
    10171289      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri)
     1290! SN 4D ISO
     1291      DEALLOCATE(qx_seri)
     1292! SN
    10181293      DEALLOCATE(u_seri,v_seri)
    10191294      DEALLOCATE(cf_seri,rvc_seri)
    10201295      DEALLOCATE(l_mixmin,l_mix,wprime)
     1296      DEALLOCATE(tke_shear,tke_buoy,tke_trans)
    10211297      DEALLOCATE(pbl_eps)
    10221298      DEALLOCATE(rhcl)
     
    10431319      DEALLOCATE(d_u_ajs,d_v_ajs)
    10441320      DEALLOCATE(d_t_eva,d_q_eva)
     1321! SN 4D ISO
     1322      DEALLOCATE(d_qx_eva)
     1323! SN
    10451324      DEALLOCATE(d_ql_eva,d_qi_eva)
    10461325      DEALLOCATE(d_t_lscst,d_q_lscst)
     
    10491328      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
    10501329      DEALLOCATE(d_qbs_vdf)
    1051       DEALLOCATE(d_t_bs,d_q_bs,d_qbs_bs)
     1330      DEALLOCATE(d_t_bsss,d_q_bsss,d_qbs_bsss)
     1331#ifdef ISO
     1332      deallocate(xt_seri,xtl_seri,xts_seri,xtbs_seri)
     1333      DEALLOCATE(d_xtl_eva,d_xti_eva)
     1334      deallocate(d_xt_dyn,d_xtl_dyn,d_xts_dyn,d_xtbs_dyn)
     1335      deallocate(d_xt_con)
     1336      deallocate(d_xt_wake)
     1337      deallocate(d_xt_lsc)
     1338      deallocate(d_xtl_lsc,d_xti_lsc)
     1339      deallocate(d_xt_ajsb)
     1340      deallocate(d_xt_ajs)
     1341      deallocate(d_xt_ajs_w,d_xt_ajs_x)
     1342      deallocate(d_xt_eva)
     1343      deallocate(d_xtl_eva)
     1344      deallocate(d_xti_eva)
     1345      deallocate(d_xt_vdf)
     1346      deallocate(d_xt_vdf_w,d_xt_vdf_x)
     1347      deallocate(d_xt_ch4)
     1348      deallocate(d_xt_prod_nucl)
     1349      deallocate(d_xt_cosmo)
     1350      deallocate(d_xt_decroiss)
     1351#endif
     1352
    10521353      DEALLOCATE(d_u_vdf,d_v_vdf)
    10531354      DEALLOCATE(d_t_oli,d_t_oro)
     
    11211422      DEALLOCATE(solsw_aerop, solsw0_aerop)
    11221423      DEALLOCATE(topswcf_aerop, solswcf_aerop)
    1123 !AI Aerosols
    1124       DEALLOCATE(m_allaer)
    11251424!CK LW diagnostics
    11261425      DEALLOCATE(toplwad_aerop, sollwad_aerop)
     
    11551454!!      DEALLOCATE( d_s_the, d_dens_the)
    11561455      DEALLOCATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)
     1456#ifdef ISO
     1457      DEALLOCATE(d_deltaxt_wk)
     1458      DEALLOCATE(d_deltaxt_wk_gw)
     1459      DEALLOCATE(d_deltaxt_ajs_cv)
     1460      DEALLOCATE(d_deltaxt_vdf)
     1461#endif
    11571462!
    11581463      DEALLOCATE(bils)
     
    11731478      DEALLOCATE(uwat, vwat)
    11741479      DEALLOCATE(zxfqcalving, zxfluxlat)
    1175       DEALLOCATE(zxrunofflic)
     1480! SN runoff_diag
     1481      DEALLOCATE(zxrunofflic, runoff_diag)
    11761482      DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic)
    11771483      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
     
    11941500      DEALLOCATE(cdragm_x, cdragm_w)
    11951501      DEALLOCATE(kh, kh_x, kh_w)
     1502#ifdef ISO
     1503      DEALLOCATE(xtevap,xtprw)
     1504      DEALLOCATE(zxfxtcalving)
     1505      DEALLOCATE(zxxtrunofflic)
     1506      DEALLOCATE(xtsnow_lsc, zxfxtfonte)
     1507      DEALLOCATE(xtrain_lsc)
     1508      DEALLOCATE(dxtvdf_x, dxtvdf_w)
     1509      DEALLOCATE(xt_therm)
     1510      DEALLOCATE(h1_diag,xtrunoff_diag)
     1511#endif
    11961512!
    11971513      DEALLOCATE(ptconv)
     
    12431559      DEALLOCATE(epmlmMm, eplaMm)
    12441560      DEALLOCATE(sij)
     1561#ifdef ISO
     1562      DEALLOCATE(xtwdtrainA)
     1563      DEALLOCATE(xttaa )
     1564      DEALLOCATE(xtclw )
     1565      DEALLOCATE(xtev )
     1566#ifdef DIAGISO
     1567      DEALLOCATE(qlp)
     1568      DEALLOCATE(qvp)
     1569      DEALLOCATE(fq_detrainement)
     1570      DEALLOCATE(fq_ddft)
     1571      DEALLOCATE(fq_fluxmasse)
     1572      DEALLOCATE(fq_evapprecip)
     1573      DEALLOCATE(f_detrainement,q_detrainement)
     1574      DEALLOCATE(xtlp)
     1575      DEALLOCATE(xtvp)
     1576      DEALLOCATE(q_the,xt_the)
     1577      DEALLOCATE(fxt_detrainement)
     1578      DEALLOCATE(fxt_ddft)
     1579      DEALLOCATE(fxt_fluxmasse)
     1580      DEALLOCATE(fxt_evapprecip)
     1581      DEALLOCATE(xt_detrainement)
     1582#endif
     1583#endif
    12451584
    12461585
     
    12591598      DEALLOCATE(rneb)
    12601599      DEALLOCATE(pfraclr,pfracld)
     1600      DEALLOCATE(cldfraliq)
     1601      DEALLOCATE(sigma2_icefracturb)
     1602      DEALLOCATE(mean_icefracturb)
    12611603      DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)
    12621604      DEALLOCATE(distcltop)
    12631605      DEALLOCATE(temp_cltop)
     1606#ifdef ISO
     1607      DEALLOCATE (zxxtsnow,xtVprecip,xtVprecipi,pxtrfl,pxtsfl)
     1608#endif
     1609
    12641610      DEALLOCATE (p_tropopause)
    12651611      DEALLOCATE (z_tropopause)
     
    12911637! variables for strat. aerosol CK
    12921638      DEALLOCATE (d_q_emiss)
    1293       DEALLOCATE (R2SO4)
    1294       DEALLOCATE (DENSO4)
    1295       DEALLOCATE (f_r_wet)
     1639      DEALLOCATE (R2SO4, R2SO4B)
     1640      DEALLOCATE (DENSO4, DENSO4B)
     1641      DEALLOCATE (f_r_wet, f_r_wetB)
    12961642      DEALLOCATE (decfluxaer)
    12971643      DEALLOCATE (mdw)
     
    13081654      DEALLOCATE (surf_PM25_sulf)
    13091655      DEALLOCATE (vsed_aer)
     1656      DEALLOCATE (sulfmmr)
     1657      DEALLOCATE (SAD_sulfate)
     1658      DEALLOCATE (reff_sulfate)
     1659      DEALLOCATE (sulfmmr_mode)
     1660      DEALLOCATE (nd_mode)
    13101661      DEALLOCATE (budg_3D_ocs_to_so2)
    13111662      DEALLOCATE (budg_3D_so2_to_h2so4)
Note: See TracChangeset for help on using the changeset viewer.