!$Id: init_inca_para.F90 104 2008-12-23 10:28:51Z acosce $ !! ========================================================================= !! INCA - INteraction with Chemistry and Aerosols !! !! Copyright Laboratoire des Sciences du Climat et de l'Environnement (LSCE) !! Unite mixte CEA-CNRS-UVSQ !! !! Contributors to this INCA subroutine: !! !! !! Anne Cozic, LSCE, anne.cozic@cea.fr !! Yann Meurdesoif, LSCE, yann.meurdesoif@cea.fr !! !! This software is a computer program whose purpose is to simulate the !! atmospheric gas phase and aerosol composition. The model is designed to be !! used within a transport model or a general circulation model. This version !! of INCA was designed to be coupled to the LMDz GCM. LMDz-INCA accounts !! for emissions, transport (resolved and sub-grid scale), photochemical !! transformations, and scavenging (dry deposition and washout) of chemical !! species and aerosols interactively in the GCM. Several versions of the INCA !! model are currently used depending on the envisaged applications with the !! chemistry-climate model. !! !! This software is governed by the CeCILL license under French law and !! abiding by the rules of distribution of free software. You can use, !! modify and/ or redistribute the software under the terms of the CeCILL !! license as circulated by CEA, CNRS and INRIA at the following URL !! "http://www.cecill.info". !! !! As a counterpart to the access to the source code and rights to copy, !! modify and redistribute granted by the license, users are provided only !! with a limited warranty and the software's author, the holder of the !! economic rights, and the successive licensors have only limited !! liability. !! !! In this respect, the user's attention is drawn to the risks associated !! with loading, using, modifying and/or developing or reproducing the !! software by the user in light of its specific status of free software, !! that may mean that it is complicated to manipulate, and that also !! therefore means that it is reserved for developers and experienced !! professionals having in-depth computer knowledge. Users are therefore !! encouraged to load and test the software's suitability as regards their !! requirements in conditions enabling the security of their systems and/or !! data to be ensured and, more generally, to use and operate it in the !! same conditions as regards security. !! !! The fact that you are presently reading this means that you have had !! knowledge of the CeCILL license and that you accept its terms. !! ========================================================================= SUBROUTINE INIT_INCA_PARA( & iim , & jjp1 , & llm , & nbp , & nb_proc , & distrib , & nvertex_lmdz, & grid_type_lmdz, & COMM_LMDZ) USE MOD_INCA_PARA, mpi_root_x=>mpi_root USE MOD_GRID_INCA USE PRINT_INCA USE xios IMPLICIT NONE include 'mpif.h' INTEGER, INTENT(in) :: iim INTEGER, INTENT(in) :: jjp1 INTEGER, INTENT(in) :: llm INTEGER, INTENT(in) :: nbp INTEGER, INTENT(in) :: nb_proc INTEGER, INTENT(in) :: distrib(0:nb_proc-1) INTEGER, INTENT(in) :: nvertex_lmdz INTEGER, INTENT(in) :: grid_type_lmdz INTEGER, INTENT(in) :: comm_lmdz INTEGER :: index(nbp) INTEGER :: pos,i CHARACTER(len=*),PARAMETER :: id="client" !! Id for initialization of ORCHIDEE in 1 integer :: xios_comm iim_glo=iim jjm_glo=jjp1 iim_g=iim_glo jjm_g=jjm_glo nbp_glo=iim*jjp1-2*(iim-1) nvertex = nvertex_lmdz grid_type = grid_type_lmdz CALL Init_mod_inca_para(iim,jjp1,llm,nb_proc,distrib,COMM_LMDZ) ALLOCATE(nbp_para_nb(0:mpi_size-1)) ALLOCATE(nbp_para_begin(0:mpi_size-1)) ALLOCATE(nbp_para_end(0:mpi_size-1)) DO i=0,mpi_size-1 nbp_para_nb(i)=distrib(i) ENDDO nbp_para_begin(0)=1 nbp_para_end(0)=nbp_para_nb(0) DO i=1,mpi_size-1 nbp_para_begin(i)=nbp_para_end(i-1)+1 nbp_para_end(i)=nbp_para_begin(i)+nbp_para_nb(i)-1 ENDDO nbp_mpi=nbp_para_nb(mpi_rank) index(1)=1 pos=iim_glo+1 DO i=2,nbp_glo index(i)=pos pos=pos+1 ENDDO CALL init_inca_io_para END SUBROUTINE INIT_INCA_PARA SUBROUTINE INIT_INCA_IO_PARA USE IOIPSL USE INCA_DATA_PARA IMPLICIT NONE INTEGER,DIMENSION(2) :: ddid INTEGER,DIMENSION(2) :: dsg INTEGER,DIMENSION(2) :: dsl INTEGER,DIMENSION(2) :: dpf INTEGER,DIMENSION(2) :: dpl INTEGER,DIMENSION(2) :: dhs INTEGER,DIMENSION(2) :: dhe ddid=(/ 1,2 /) dsg=(/ iim_glo, jjm_glo /) dsl=(/ iim_glo, jj_nb /) dpf=(/ 1,jj_begin /) dpl=(/ iim_glo, jj_end /) dhs=(/ ii_begin-1,0 /) IF (mpi_rank==mpi_size-1) THEN dhe=(/0,0/) ELSE dhe=(/ iim_glo-ii_end,0 /) ENDIF CALL flio_dom_set( & mpi_size,mpi_rank, & ddid,dsg,dsl,dpf, & dpl,dhs,dhe, & 'APPLE',inca_domain_id) END SUBROUTINE Init_inca_io_para