Ignore:
Timestamp:
May 6, 2015, 12:14:12 PM (10 years ago)
Author:
ymipsl
Message:

Reorganize geometry and grid modules. Prepare physics for unstructutured grid support. Simplify initialization of physics from dynamic.
Compiled only with dynd3dmem, but not tested for moment.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/comgeomphy.F90

    r3816 r3825  
    11module comgeomphy
    2    real,save,allocatable :: airephy(:)
    3    real,save,allocatable :: cuphy(:)
    4    real,save,allocatable :: cvphy(:)
    5    real,save,allocatable :: rlatd(:)
    6    real,save,allocatable :: rlond(:)
    7 !$OMP THREADPRIVATE(airephy,cuphy,cvphy,rlatd,rlond)
     2!   real,save,allocatable :: airephy(:) => transfered in geometry_mod (area)
     3!   real,save,allocatable :: cuphy(:) => transfered in regular_lonlat_mod : dlon_reg
     4!   real,save,allocatable :: cvphy(:) => transfered in regular_lonlat_mod : dlat_reg
     5!   real,save,allocatable :: rlatd(:) => transfered in geometry_mod (longitude)
     6!   real,save,allocatable :: rlond(:) => transfered in geometry_mod (latitude)
     7!!$OMP THREADPRIVATE(airephy,rlatd,rlond)
    88   ! general (over global grid) latitudes and longitudes:
    99   ! useful for outputs
    10    real,save,allocatable :: rlonv(:) ! longitudes (rad)
    11    real,save,allocatable :: rlonu(:) ! longitude boundaries (rad)
    12    real,save,allocatable :: rlatu(:) ! latitudes (rad)
    13    real,save,allocatable :: rlatv(:) ! latitude boundaries (rad)
    14 !$OMP THREADPRIVATE(rlonv,rlonu,rlatu,rlatv)
     10!   real,save,allocatable :: rlonv(:) ! longitudes (rad)           => transfered in regular_lonlat_mod
     11!   real,save,allocatable :: rlonu(:) ! longitude boundaries (rad) => transfered in regular_lonlat_mod
     12!   real,save,allocatable :: rlatu(:) ! latitudes (rad)            => transfered in regular_lonlat_mod
     13!   real,save,allocatable :: rlatv(:) ! latitude boundaries (rad)  => transfered in regular_lonlat_mod
     14!!$OMP THREADPRIVATE(rlonv,rlonu,rlatu,rlatv)
    1515
    1616   ! vertical grid
    17    real,save :: preff  ! reference surface pressure (Pa)
    18    real,save,allocatable :: ap(:)
    19    real,save,allocatable :: bp(:)
    20    real,save,allocatable :: presnivs(:)
    21    real,save,allocatable :: pseudoalt(:)
    22 !$OMP THREADPRIVATE(preff,ap,bp,presnivs,pseudoalt)
     17!   real,save :: preff  ! reference surface pressure (Pa)
     18!   real,save,allocatable :: ap(:)        => transfered in vertical_mod
     19!   real,save,allocatable :: bp(:)        => transfered in vertical_mod
     20!   real,save,allocatable :: presnivs(:)  => transfered in vertical_mod
     21!   real,save,allocatable :: pseudoalt(:) => transfered in vertical_mod
     22!!$OMP THREADPRIVATE(preff,ap,bp,presnivs,pseudoalt)
    2323
    2424contains
     
    2828    integer,intent(in) :: klon_omp ! number of columns (on local omp grid)
    2929 
    30     allocate(airephy(klon_omp))
    31     allocate(cuphy(klon_omp))
    32     allocate(cvphy(klon_omp))
    33     allocate(rlatd(klon_omp))
    34     allocate(rlond(klon_omp))
     30!    allocate(airephy(klon_omp))
     31!    allocate(rlatd(klon_omp))
     32!    allocate(rlond(klon_omp))
    3533
    3634  end subroutine InitComgeomphy
    3735 
    38   subroutine initcomgeomphy_horiz(iim,jjm,rlonu_dyn,rlonv_dyn,&
    39                                   rlatu_dyn,rlatv_dyn)
     36  subroutine initcomgeomphy_horiz(iim,jjm)
    4037    IMPLICIT NONE
    4138    integer,intent(in) :: iim
    4239    integer,intent(in) :: jjm
    43     real,intent(in) :: rlonu_dyn(iim+1) ! dyn grid boundaries (rad)
    44     real,intent(in) :: rlonv_dyn(iim+1) ! dyn grid longitudes (rad)
    45     real,intent(in) :: rlatu_dyn(jjm+1) ! dyn grid latitudes (rad)
    46     real,intent(in) :: rlatv_dyn(jjm)  ! dyn grid boundaries (rad)
    4740   
    48     allocate(rlonu(iim+1))
    49     allocate(rlonv(iim+1))
    50     allocate(rlatu(jjm+1))
    51     allocate(rlatv(jjm))
    52    
    53     rlonu(:)=rlonu_dyn(:)
    54     rlonv(:)=rlonv_dyn(:)
    55     rlatu(:)=rlatu_dyn(:)
    56     rlatv(:)=rlatv_dyn(:)
    57    
     41   
    5842  end subroutine initcomgeomphy_horiz
    5943 
     
    6852    real,intent(in) :: pseudoalt_dyn(nlayer) ! pseudo-altitude of atm. layers (km)
    6953 
    70     allocate(ap(nlayer+1))
    71     allocate(bp(nlayer+1))
    72     allocate(presnivs(nlayer))
    73     allocate(pseudoalt(nlayer))
    74  
    75     preff=preff_dyn
    76     ap(:)=ap_dyn(:)
    77     bp(:)=bp_dyn(:)
    78     presnivs(:)=presnivs_dyn(:)
    79     pseudoalt(:)=pseudoalt_dyn(:)
     54!    allocate(ap(nlayer+1))
     55!    allocate(bp(nlayer+1))
     56!    allocate(presnivs(nlayer))
     57!    allocate(pseudoalt(nlayer))
     58! 
     59!    preff=preff_dyn
     60!    ap(:)=ap_dyn(:)
     61!    bp(:)=bp_dyn(:)
     62!    presnivs(:)=presnivs_dyn(:)
     63!    pseudoalt(:)=pseudoalt_dyn(:)
    8064
    8165  end subroutine initcomgeomphy_vert
Note: See TracChangeset for help on using the changeset viewer.