Ignore:
Timestamp:
May 11, 2017, 12:49:55 PM (8 years ago)
Author:
millour
Message:

Adaptations to the Icosa/LMDZ interface to account for the structural changes due to the update of LMDZ5.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/aquaplanet/ICOSA_LMDZ/src/interface_icosa_lmdz.f90

    r3961 r3991  
    5757  USE transfert_mod
    5858  USE physics_distribution_mod, ONLY : init_physics_distribution
    59   USE geometry_mod, ONLY : init_geometry
    60   USE vertical_layers_mod, ONLY : init_vertical_layers
    61   USE infotrac_phy, ONLY : init_infotrac_phy
    62   USE inifis_mod, ONLY : inifis
    63   USE phyaqua_mod, ONLY : iniaqua
     59!  USE geometry_mod, ONLY : init_geometry
     60!  USE vertical_layers_mod, ONLY : init_vertical_layers
     61!  USE infotrac_phy, ONLY : init_infotrac_phy
     62!  USE inifis_mod, ONLY : inifis
     63!  USE phyaqua_mod, ONLY : iniaqua
    6464   
    6565 
     
    175175  USE mpipara
    176176  USE disvert_mod
     177  USE earth_const, ONLY: scale_height
    177178  USE xios_mod
    178179  USE time_mod , init_time_icosa=> init_time
     
    184185  USE time_phylmdz_mod, ONLY: init_time_lmdz => init_time
    185186  USE transfert_mod
    186   USE physics_distribution_mod, ONLY : init_physics_distribution
     187!  USE physics_distribution_mod, ONLY : init_physics_distribution
    187188  USE geometry_mod, ONLY : init_geometry
    188189  USE vertical_layers_mod, ONLY : init_vertical_layers
     
    208209
    209210  REAL(rstd) :: pseudoalt(llm)
     211  REAL(rstd) :: aps(llm)
     212  REAL(rstd) :: bps(llm)
     213  REAL(rstd) :: scaleheight
    210214
    211215  INTEGER :: run_length 
     
    225229  INTEGER,ALLOCATABLE           :: pbl_flg(:)  ! pbl_flg(it)=0  : boundary layer diffusion desactivaded for tracer number it
    226230  CHARACTER(len=8),ALLOCATABLE  :: solsym(:)  ! tracer name from inca
     231  ! Isotopes
     232  INTEGER,ALLOCATABLE :: nqfils(:)
     233  INTEGER,ALLOCATABLE :: nqdesc(:)
     234  INTEGER :: nqdesc_tot
     235  INTEGER,ALLOCATABLE :: iqfils(:,:)
     236  INTEGER,ALLOCATABLE :: iqpere(:)
     237  LOGICAL :: ok_isotopes
     238  LOGICAL :: ok_iso_verif
     239  LOGICAL :: ok_isotrac
     240  LOGICAL :: ok_init_iso
     241  INTEGER :: niso_possibles
     242  REAL,ALLOCATABLE :: tnat(:)
     243  REAL,ALLOCATABLE :: alpha_ideal(:)
     244  LOGICAL,ALLOCATABLE :: use_iso(:)
     245  INTEGER,ALLOCATABLE :: iqiso(:,:)
     246  INTEGER,ALLOCATABLE :: iso_num(:)
     247  INTEGER,ALLOCATABLE :: iso_indnum(:)
     248  INTEGER,ALLOCATABLE :: zone_num(:)
     249  INTEGER,ALLOCATABLE :: phase_num(:)
     250  INTEGER,ALLOCATABLE :: indnum_fn_num(:)
     251  INTEGER,ALLOCATABLE :: index_trac(:,:)
     252  INTEGER :: niso
     253  INTEGER :: ntraceurs_zone
     254  INTEGER :: ntraciso
     255
    227256  TYPE(t_field),POINTER,SAVE    :: f_ind_cell_glo(:)
    228257 
     
    264293     
    265294             
    266     CALL init_geometry(lonfi, latfi, bounds_lonfi, bounds_latfi, airefi, INT(ind_cell_glo))
    267 
     295    CALL init_geometry(klon_omp,lonfi, latfi, bounds_lonfi, bounds_latfi, airefi, INT(ind_cell_glo))
     296
     297    scaleheight=scale_height/1000. ! Atmospheric scale height (km)
     298    aps(1:llm)=0.5*(ap(1:llm)+ap(2:llm+1))
     299    bps(1:llm)=0.5*(bp(1:llm)+bp(2:llm+1))
    268300    pseudoalt(:)=0
    269     CALL init_vertical_layers(llm,preff,ap,bp,presnivs,pseudoalt)
     301    CALL init_vertical_layers(llm,preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt)
    270302
    271303
     
    307339    niadv(3)=3
    308340    niadv(4)=4
     341    ! isotopes
     342    ALLOCATE(nqfils(nqtot)) ; nqfils(:)=0
     343    ALLOCATE(nqdesc(nqtot)) ; nqdesc(:)=0
     344    nqdesc_tot=0
     345    ALLOCATE(iqfils(nqtot,nqtot)) ; iqfils(:,:)=0
     346    ALLOCATE(iqpere(nqtot)) ; iqpere(:)=0
     347    ok_isotopes=.false.
     348    ok_iso_verif=.false.
     349    ok_isotrac=.false.
     350    ok_init_iso=.false.
     351    niso_possibles=5
     352    niso=0
     353    ntraceurs_zone=0
     354    ntraciso=0
     355    ALLOCATE(tnat(niso_possibles)) ; tnat(:)=0
     356    ALLOCATE(alpha_ideal(niso_possibles)) ; alpha_ideal(:)=0
     357    ALLOCATE(use_iso(niso_possibles)) ; use_iso(:)=.false.
     358    ALLOCATE(iqiso(ntraciso,nqo)) ; iqiso(:,:)=0
     359    ALLOCATE(iso_num(nqtot)) ; iso_num(:)=0
     360    ALLOCATE(iso_indnum(nqtot)) ; iso_indnum(:)=0
     361    ALLOCATE(zone_num(nqtot)) ; zone_num(:)=0
     362    ALLOCATE(phase_num(nqtot)) ; phase_num(:)=0
     363    ALLOCATE(indnum_fn_num(niso_possibles)) ; indnum_fn_num(:)=0
     364    ALLOCATE(index_trac(ntraceurs_zone,niso)) ; index_trac(:,:)=0
    309365       
    310366    CALL init_infotrac_phy(nqtot,nqo,nbtr,tname,ttext,type_trac,&
    311                            niadv,conv_flg,pbl_flg,solsym)
     367                           niadv,conv_flg,pbl_flg,solsym, &
     368                           nqfils,nqdesc,nqdesc_tot,iqfils,iqpere, &
     369                           ok_isotopes,ok_iso_verif,ok_isotrac, &
     370                           ok_init_iso,niso_possibles,tnat, &
     371                           alpha_ideal,use_iso,iqiso,iso_num, &
     372                           iso_indnum,zone_num,phase_num, &
     373                           indnum_fn_num,index_trac, &
     374                           niso,ntraceurs_zone,ntraciso)
    312375
    313376   ! Initialize physical constant
     
    362425  USE mod_phys_lmdz_omp_data, ONLY: klon_omp
    363426  USE geometry_mod, ONLY : cell_area
     427  USE physiq_mod, ONLY: physiq
    364428  IMPLICIT NONE
    365429 
     
    405469    REAL(rstd),ALLOCATABLE,SAVE :: ulat_phy(:,:)
    406470!$OMP THREADPRIVATE(ulat_phy)
     471    REAL(rstd),ALLOCATABLE,SAVE :: rot_phy(:,:)
     472!$OMP THREADPRIVATE(rot_phy)
    407473    REAL(rstd),ALLOCATABLE,SAVE :: q_phy(:,:,:)
    408474!$OMP THREADPRIVATE(q_phy)
     
    450516      ALLOCATE(ulon_phy(klon_omp,llm))
    451517      ALLOCATE(ulat_phy(klon_omp,llm))
     518      ALLOCATE(rot_phy(klon_omp,llm))
    452519      ALLOCATE(q_phy(klon_omp,llm,nqtot))
    453520      ALLOCATE(wflux_phy(klon_omp,llm))
     
    542609    CALL wxios_set_context()
    543610 
     611    ! Ehouarn: rot_phy() not implemented!! Set it to zero for now
     612    rot_phy(:,:)=0
    544613    CALL physiq(klon_omp, llm, debut, lafin, dtphy, &
    545                 p_phy, p_layer_phy, phi_phy, phis_phy, presnivs, ulon_phy, ulat_phy, Temp_phy, q_phy, wflux_phy, &
     614                p_phy, p_layer_phy, phi_phy, phis_phy, presnivs, &
     615                ulon_phy, ulat_phy, rot_phy, Temp_phy, q_phy, wflux_phy, &
    546616                dulon_phy, dulat_phy, dTemp_phy, dq_phy, dps_phy)
    547617   
Note: See TracChangeset for help on using the changeset viewer.