Ignore:
Timestamp:
Aug 25, 2015, 5:14:59 PM (9 years ago)
Author:
Ehouarn Millour
Message:

More on physics/dynamics separation and cleanup:

  • Set things up so that all physics-related initializations are done via iniphysiq.
  • Created a "geometry_mod.F90" module in phy_common to store information on the loacl grid (i.e. replaces comgeomphy) and moreover give these variables more obvious names (e.g.: rlond => longitude, rlatd => latitude, airephy => cell_area).
  • removed obsolete comgeomphy.h and comgeomphy.F90

EM

Location:
LMDZ5/trunk/libf/dyn3dmem
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/dyn3dmem/bands.F90

    r1907 r2351  
    105105   SUBROUTINE  Set_Bands
    106106     USE parallel_lmdz
    107 #ifdef CPP_PHYS
    108 ! Ehouarn: what follows is only related to // physics
    109      USE mod_phys_lmdz_para, ONLY : jj_para_begin,jj_para_end
    110 #endif
    111107     IMPLICIT NONE
    112108     INCLUDE 'dimensions.h'   
    113      INTEGER :: i
     109     INTEGER :: i, ij
     110     INTEGER :: jj_para_begin(0:mpi_size-1)
     111     INTEGER :: jj_para_end(0:mpi_size-1)
    114112       
    115113      do i=0,mpi_size-1
     
    118116      enddo
    119117         
    120 #ifdef CPP_PHYS
    121       do i=0,MPI_Size-1
     118      jj_para_begin(0)=1
     119      ij=distrib_phys(0)+iim-1
     120      jj_para_end(0)=((ij-1)/iim)+1
     121     
     122      DO i=1,mpi_Size-1
     123        ij=ij+1
     124        jj_para_begin(i)=((ij-1)/iim)+1
     125        ij=ij+distrib_phys(i)-1
     126        jj_para_end(i)=((ij-1)/iim)+1
     127      ENDDO
     128 
     129       do i=0,MPI_Size-1
    122130        jj_Nb_physic(i)=jj_para_end(i)-jj_para_begin(i)+1
    123131        if (i/=0) then
     
    139147        endif
    140148      enddo
    141 #endif     
     149
    142150      CALL create_distrib(jj_Nb_Caldyn,distrib_caldyn)
    143151      CALL create_distrib(jj_Nb_vanleer,distrib_vanleer)
     
    479487 
    480488 
     489
  • LMDZ5/trunk/libf/dyn3dmem/gcm.F90

    r2347 r2351  
    1010  USE parallel_lmdz
    1111  USE infotrac
    12 #ifdef CPP_PHYS
    13   USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys
    14 #endif
     12!#ifdef CPP_PHYS
     13!  USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys
     14!#endif
    1515  USE mod_hallo
    1616  USE Bands
     
    152152  call Read_Distrib
    153153
    154 #ifdef CPP_PHYS
    155   CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)
     154!#ifdef CPP_PHYS
     155!  CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)
    156156  !#endif
    157157  !      CALL set_bands
    158158  !#ifdef CPP_PHYS
    159   CALL Init_interface_dyn_phys
    160 #endif
     159!  CALL Init_interface_dyn_phys
     160!#endif
    161161  CALL barrier
    162162
     
    397397     ! Physics:
    398398#ifdef CPP_PHYS
    399      CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys, &
     399     CALL iniphysiq(iim,jjm,llm, &
     400          distrib_phys(mpi_rank),comm_lmdz, &
     401          daysec,day_ini,dtphys/nsplit_phys, &
    400402          rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, &
    401403          iflag_phys)
Note: See TracChangeset for help on using the changeset viewer.