Changeset 4127


Ignore:
Timestamp:
Apr 20, 2022, 11:01:09 AM (3 years ago)
Author:
acozic
Message:

modify lmdz code in order to transfer to inca model all infomations necessary for the coupling with dynamico

Location:
LMDZ6/trunk/libf
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r4124 r4127  
    293293      ALLOCATE(hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))
    294294      ALLOCATE(vadv_inca(nqINCA),  pbl_flg_inca(nqINCA))
    295       CALL init_transport(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
     295      CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)
    296296#endif
    297297   ELSE
     
    379379      ALLOCATE(hadv(nqtrue), conv_flg(nbtr), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))
    380380      ALLOCATE(vadv(nqtrue),  pbl_flg(nbtr), vadv_inca(nqINCA),  pbl_flg_inca(nqINCA))
    381       CALL init_transport(hadv_inca, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)
     381      CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)
    382382      !--- Passive CO2 tracer is at position 1 because: H2O has been removed ; nqCO2/=0 in "inco" case only
    383383      conv_flg(1:nbtr) = [(1,          k=1, nqCO2), conv_flg_inca]
  • LMDZ6/trunk/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90

    r4124 r4127  
    150150!$OMP END PARALLEL
    151151
    152   IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN
    153 #ifdef INCA
    154      call init_const_lmdz( &
    155           anneeref,dayref, iphysiq,day_step,nday,  &
    156           nbsrf, is_oce,is_sic, is_ter,is_lic, calend, &
    157           config_inca)
    158      call init_inca_para( &
    159           nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, &
    160           distrib_phys,communicator)
    161 #endif
    162   END IF
     152
    163153  IF (type_trac == 'repr') THEN
    164154#ifdef REPROBUS
     
    178168  IF (type_trac == 'inca' .OR. type_trac == 'inco') THEN
    179169#ifdef INCA
    180      CALL init_inca_dim(klon_omp,nbp_lev,nbp_lon,nbp_lat - 1, &
    181           rlonudyn,rlatudyn,rlonvdyn,rlatvdyn)
     170     CALL init_inca_dim_reg(nbp_lon, nbp_lat - 1, &
     171          rlonudyn, rlatudyn, rlonvdyn, rlatvdyn)
    182172#endif
    183173  END IF
     174
    184175  IF (type_trac == 'repr') THEN
    185176#ifdef REPROBUS
  • LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_mpi_data.F90

    r3435 r4127  
    4646CONTAINS
    4747 
    48   SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator)
     48  SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, nbp_lev, grid_type, nvertex, communicator)
     49
    4950  IMPLICIT NONE
    5051#ifdef CPP_MPI
     
    5455    INTEGER,INTENT(IN) :: nbp_lon
    5556    INTEGER,INTENT(IN) :: nbp_lat
     57    INTEGER,INTENT(IN) :: nbp_lev
    5658    INTEGER,INTENT(IN) :: communicator
     59    INTEGER,INTENT(IN) :: grid_type
     60    INTEGER,INTENT(IN) :: nvertex
    5761   
    5862    INTEGER,ALLOCATABLE :: distrib(:)
     
    179183   
    180184    CALL Print_module_data
     185
     186#ifdef INCA
     187       CALL init_inca_para( &
     188            nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, &
     189            distrib,nvertex, grid_type,communicator)
     190#endif
    181191   
    182192  END SUBROUTINE Init_phys_lmdz_mpi_data
  • LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_para.F90

    r3465 r4127  
    1717CONTAINS
    1818
    19   SUBROUTINE Init_phys_lmdz_para(nbp,nbp_lon,nbp_lat,communicator)
     19  SUBROUTINE Init_phys_lmdz_para(nbp,nbp_lon,nbp_lat,nbp_lev,grid_type, nvertex,communicator)
    2020  IMPLICIT NONE
    2121    INTEGER,INTENT(in) :: nbp
    2222    INTEGER,INTENT(in) :: nbp_lon
    2323    INTEGER,INTENT(in) :: nbp_lat
     24    INTEGER,INTENT(in) :: nbp_lev
    2425    INTEGER,INTENT(in) :: communicator
     26    INTEGER,INTENT(IN) :: grid_type
     27    INTEGER,INTENT(IN) :: nvertex
    2528
    26     CALL Init_phys_lmdz_mpi_data(nbp,nbp_lon,nbp_lat,communicator)
     29    CALL Init_phys_lmdz_mpi_data(nbp,nbp_lon,nbp_lat,nbp_lev, grid_type, nvertex,communicator)
    2730!$OMP PARALLEL
    2831    CALL Init_phys_lmdz_omp_data(klon_mpi)
  • LMDZ6/trunk/libf/phy_common/physics_distribution_mod.F90

    r3435 r4127  
    2929
    3030    CALL init_grid_phy_lmdz(grid_type,nvertex, nbp_lon,nbp_lat,nbp_lev)
    31     CALL init_phys_lmdz_para(nbp,nbp_lon, nbp_lat, communicator)
     31    CALL init_phys_lmdz_para(nbp,nbp_lon, nbp_lat,nbp_lev, grid_type,nvertex, communicator)
    3232!$OMP PARALLEL
    3333    CALL init_dimphy(klon_omp,nbp_lev)
     34
     35#ifdef INCA
     36       CALL Init_inca_dim(klon_omp,nbp_lev)
     37#endif
    3438
    3539! Initialization of Reprobus
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4120 r4127  
    3434    USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando
    3535    USE fonte_neige_mod, ONLY  : fonte_neige_get_vars
    36     USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
     36    USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg, longitude,latitude, &
     37         boundslon,boundslat, dx, dy, ind_cell_glo
    3738    USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, &
    3839         histwrite, ju2ymds, ymds2ju, getin
     
    5556    USE phystokenc_mod, ONLY: offline, phystokenc
    5657    USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, &
    57          year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour
     58         year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour, calend
    5859!!  USE phys_local_var_mod, ONLY : a long list of variables
    5960!!              ==> see below, after "CPP Keys" section
     
    7071    USE surface_data,     ONLY : type_ocean, ok_veget, landice_opt
    7172    USE time_phylmdz_mod, only: annee_ref, current_time, day_ini, day_ref, &
    72           day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time
     73          day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time, ndays
    7374    USE tracinca_mod, ONLY: config_inca
    7475    USE tropopause_m,     ONLY: dyn_tropopause
     
    20282029          WRITE(lunout,*) 'initial time chemini', days_elapsed, calday
    20292030
    2030           CALL chemini(  &
    2031                rg, &
    2032                ra, &
    2033                cell_area, &
     2031          call init_const_lmdz( &
     2032          ndays, nbsrf, is_oce,is_sic, is_ter,is_lic, calend, &
     2033          config_inca)
     2034
     2035          CALL init_inca_geometry( &
     2036               longitude, latitude, &
     2037               boundslon, boundslat, &
     2038               dx, dy, cell_area, ind_cell_glo)
     2039
     2040
     2041          CALL chemini(  pplay, &
     2042               nbp_lon, nbp_lat, &
    20342043               latitude_deg, &
    20352044               longitude_deg, &
     
    50835092            pphis, &
    50845093            zx_rh, &
    5085             aps, bps, ap, bp)
     5094            aps, bps, ap, bp, lafin)
    50865095
    50875096       CALL VTe(VTinca)
     
    53455354#ifdef CPP_XIOS
    53465355       IF (is_omp_master) CALL xios_context_finalize
     5356
     5357#ifdef INCA
     5358       if (type_trac == 'inca' ) then
     5359          IF (is_omp_master .and. grid_type==unstructured) THEN
     5360             CALL finalize_inca
     5361          ENDIF
     5362       endif
     5363#endif
     5364
    53475365#endif
    53485366       WRITE(lunout,*) ' physiq fin, nombre de steps ou cvpas = 1 : ', Ncvpaseq1
Note: See TracChangeset for help on using the changeset viewer.