1 | subroutine iniphysiq(nlayer, punjours, pdayref,ptimestep, & |
---|
2 | plat,plon,parea, & |
---|
3 | prad,pg,pr,pcpp, & |
---|
4 | preff,ap,bp) |
---|
5 | |
---|
6 | use dimphy, only : klev ! number of atmospheric levels |
---|
7 | use mod_grid_phy_lmdz, only : klon_glo ! number of atmospheric columns |
---|
8 | ! (on full grid) |
---|
9 | use mod_phys_lmdz_para, only : klon_omp, & ! number of columns (on local omp grid) |
---|
10 | klon_omp_begin, & ! start index of local omp subgrid |
---|
11 | klon_omp_end, & ! end index of local omp subgrid |
---|
12 | klon_mpi_begin, & ! start indes of columns (on local mpi grid) |
---|
13 | klon_mpi |
---|
14 | use comgeomphy, only : airephy, & ! physics grid area (m2) |
---|
15 | rlond, & ! longitudes |
---|
16 | rlatd ! latitudes |
---|
17 | use infotrac, only : nqtot ! number of advected tracers |
---|
18 | use planete_mod, only: ini_planete_mod |
---|
19 | |
---|
20 | implicit none |
---|
21 | |
---|
22 | real,intent(in) :: prad ! radius of the planet (m) |
---|
23 | real,intent(in) :: pg ! gravitational acceleration (m/s2) |
---|
24 | real,intent(in) :: pr ! ! reduced gas constant R/mu |
---|
25 | real,intent(in) :: pcpp ! specific heat Cp |
---|
26 | real,intent(in) :: punjours ! length (in s) of a standard day |
---|
27 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
28 | real,intent(in) :: plat(klon_mpi) ! latitudes of the physics grid |
---|
29 | real,intent(in) :: plon(klon_mpi) ! longitudes of the physics grid |
---|
30 | real,intent(in) :: parea(klon_mpi) ! area (m2) |
---|
31 | integer,intent(in) :: pdayref ! reference day of for the simulation |
---|
32 | real,intent(in) :: ptimestep ! physics time step (s) |
---|
33 | real,intent(in) :: preff ! reference surface pressure (Pa) |
---|
34 | real,intent(in) :: ap(nlayer+1) ! hybrid coordinate at interfaces |
---|
35 | real,intent(in) :: bp(nlayer+1) ! hybrid coordinate at interfaces |
---|
36 | |
---|
37 | integer :: offset |
---|
38 | character(len=20) :: modname='iniphysiq' |
---|
39 | character(len=80) :: abort_message |
---|
40 | |
---|
41 | IF (nlayer.NE.klev) THEN |
---|
42 | write(*,*) 'STOP in ',trim(modname) |
---|
43 | write(*,*) 'Problem with dimensions :' |
---|
44 | write(*,*) 'nlayer = ',nlayer |
---|
45 | write(*,*) 'klev = ',klev |
---|
46 | abort_message = '' |
---|
47 | CALL abort_gcm (modname,abort_message,1) |
---|
48 | ENDIF |
---|
49 | |
---|
50 | |
---|
51 | !$OMP PARALLEL SHARED(parea,plon,plat) |
---|
52 | |
---|
53 | offset=0 |
---|
54 | airephy(1:klon_omp)=parea(offset+klon_omp_begin:offset+klon_omp_end) |
---|
55 | rlond(1:klon_omp)=plon(offset+klon_omp_begin:offset+klon_omp_end) |
---|
56 | rlatd(1:klon_omp)=plat(offset+klon_omp_begin:offset+klon_omp_end) |
---|
57 | |
---|
58 | ! copy over preff , ap() and bp() |
---|
59 | call ini_planete_mod(nlayer,preff,ap,bp) |
---|
60 | |
---|
61 | ! copy some fundamental parameters to physics |
---|
62 | ! and do some initializations |
---|
63 | call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,ptimestep, & |
---|
64 | rlatd,rlond,airephy,prad,pg,pr,pcpp) |
---|
65 | |
---|
66 | !$OMP END PARALLEL |
---|
67 | |
---|
68 | |
---|
69 | end subroutine iniphysiq |
---|