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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phy_common/mod_grid_phy_lmdz.F90

    r2326 r2351  
    88             grid2dTo1d_glo_igen, grid2dTo1d_glo_rgen, grid2dTo1d_glo_lgen
    99 
     10  INTEGER,PARAMETER :: unstructured=0
     11  INTEGER,PARAMETER :: regular_lonlat=1
     12
     13  INTEGER,SAVE :: grid_type
     14  INTEGER,SAVE :: nvertex
    1015  INTEGER,SAVE :: nbp_lon  ! == iim
    11   INTEGER,SAVE :: nbp_lat  ! == jjmp1
     16  INTEGER,SAVE :: nbp_lat  ! == jjmp1 (or == 1 if running 1D model)
    1217  INTEGER,SAVE :: nbp_lev  ! == llm
    13   INTEGER,SAVE :: klon_glo
     18  INTEGER,SAVE :: klon_glo ! total number of atmospheric columns
    1419
    1520  INTERFACE grid1dTo2d_glo
     
    3237
    3338
    34   SUBROUTINE Init_grid_phy_lmdz(iim,jjp1,llm)
     39  SUBROUTINE init_grid_phy_lmdz(grid_type_,nvertex_,nbp_lon_,nbp_lat_,nbp_lev_)
    3540  IMPLICIT NONE
    36   INTEGER, INTENT(in) :: iim
    37   INTEGER, INTENT(in) :: jjp1
    38   INTEGER, INTENT(in) :: llm
    39  
    40     nbp_lon=iim
    41     nbp_lat=jjp1
    42     nbp_lev=llm
    43     klon_glo=(iim*jjp1)-2*(iim-1)
    44  
    45   END SUBROUTINE Init_grid_phy_lmdz
     41  INTEGER,INTENT(IN)  :: grid_type_
     42  INTEGER,INTENT(IN)  :: nvertex_
     43  INTEGER, INTENT(IN) :: nbp_lon_
     44  INTEGER, INTENT(IN) :: nbp_lat_
     45  INTEGER, INTENT(IN) :: nbp_lev_
     46 
     47    grid_type = grid_type_
     48    nvertex   = nvertex_
     49    nbp_lon   = nbp_lon_
     50    nbp_lat   = nbp_lat_
     51    nbp_lev   = nbp_lev_
     52   
     53    IF (nbp_lon*nbp_lat==1) THEN
     54      klon_glo=1
     55    ELSE   
     56      klon_glo=(nbp_lon*nbp_lat)-2*(nbp_lon-1)
     57    ENDIF
     58 
     59  END SUBROUTINE init_grid_phy_lmdz
    4660 
    4761 
Note: See TracChangeset for help on using the changeset viewer.