[1523] | 1 | MODULE iniphysiq_mod |
---|
| 2 | |
---|
| 3 | CONTAINS |
---|
| 4 | |
---|
[3316] | 5 | subroutine iniphysiq(ii,jj,nlayer, & |
---|
[3305] | 6 | nbp, communicator, & |
---|
| 7 | punjours, pdayref,ptimestep, & |
---|
[1563] | 8 | rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, & |
---|
[3305] | 9 | airedyn,cudyn,cvdyn, & |
---|
[1130] | 10 | prad,pg,pr,pcpp,iflag_phys) |
---|
| 11 | |
---|
[3094] | 12 | ! Modules from the dynamics: |
---|
[3305] | 13 | use infotrac, only : nqtot, & ! number of advected tracers |
---|
| 14 | tname, & ! tracer names |
---|
| 15 | nqperes, nqfils ! MVals: variables isotopes |
---|
[2511] | 16 | use temps_mod, only: day_ini, day_end, hour_ini |
---|
[3094] | 17 | |
---|
| 18 | ! Modules from the dynamics-physics interface: |
---|
[1564] | 19 | use inigeomphy_mod, only: inigeomphy |
---|
[3094] | 20 | |
---|
| 21 | ! Modules from the physics: |
---|
| 22 | use comgeomfi_h, only: ini_fillgeom |
---|
[1563] | 23 | use geometry_mod, only: cell_area, & ! physics grid area (m2) |
---|
| 24 | longitude, & ! longitudes (rad) |
---|
[3305] | 25 | latitude ! latitudes (rad) |
---|
[3094] | 26 | use phys_state_var_init_mod, only: phys_state_var_init |
---|
| 27 | use mod_phys_lmdz_para, only: klon_omp ! number of columns (on local omp grid) |
---|
| 28 | use conf_phys_mod, only: conf_phys |
---|
[1563] | 29 | |
---|
[1130] | 30 | implicit none |
---|
| 31 | |
---|
[1395] | 32 | include "iniprint.h" |
---|
| 33 | |
---|
[1130] | 34 | real,intent(in) :: prad ! radius of the planet (m) |
---|
| 35 | real,intent(in) :: pg ! gravitational acceleration (m/s2) |
---|
| 36 | real,intent(in) :: pr ! ! reduced gas constant R/mu |
---|
| 37 | real,intent(in) :: pcpp ! specific heat Cp |
---|
| 38 | real,intent(in) :: punjours ! length (in s) of a standard day |
---|
| 39 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
[1395] | 40 | integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes |
---|
| 41 | integer,intent(in) :: jj ! number of atompsheric columns along latitudes |
---|
[1543] | 42 | integer,intent(in) :: nbp ! number of physics columns for this MPI process |
---|
| 43 | integer,intent(in) :: communicator ! MPI communicator |
---|
[1563] | 44 | real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid |
---|
| 45 | real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid |
---|
| 46 | real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid |
---|
| 47 | real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid |
---|
| 48 | real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2) |
---|
| 49 | real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u) |
---|
| 50 | real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v) |
---|
[1130] | 51 | integer,intent(in) :: pdayref ! reference day of for the simulation |
---|
| 52 | real,intent(in) :: ptimestep !physics time step (s) |
---|
| 53 | integer,intent(in) :: iflag_phys ! type of physics to be called |
---|
| 54 | |
---|
[1563] | 55 | ! the common part for all planetary physics |
---|
| 56 | !------------------------------------------ |
---|
| 57 | ! --> initialize physics distribution, global fields and geometry |
---|
[1573] | 58 | ! (i.e. things in phy_common or dynphy_lonlat) |
---|
[3305] | 59 | CALL inigeomphy(ii,jj,nlayer, & |
---|
| 60 | nbp, communicator, & |
---|
| 61 | rlatudyn,rlatvdyn, & |
---|
| 62 | rlonudyn,rlonvdyn, & |
---|
| 63 | airedyn,cudyn,cvdyn) |
---|
[1130] | 64 | |
---|
[1573] | 65 | ! the distinct part for all planetary physics (ie. things in phymars) |
---|
[1563] | 66 | !------------------------------------------ |
---|
[1395] | 67 | |
---|
[1130] | 68 | ! copy some fundamental parameters to physics |
---|
| 69 | ! and do some initializations |
---|
[3094] | 70 | ! Note that for OpenMP threadprivate variables a COPYIN clause is required |
---|
| 71 | !$OMP PARALLEL COPYIN(day_ini,day_end,hour_ini) |
---|
[1543] | 72 | |
---|
[3316] | 73 | call phys_state_var_init(klon_omp,nlayer,nqtot,tname, & |
---|
| 74 | day_ini,day_end,hour_ini, & |
---|
| 75 | punjours,ptimestep, & |
---|
| 76 | prad,pg,pr,pcpp, & |
---|
[2332] | 77 | nqperes,nqfils) ! MVals: variables isotopes |
---|
[1563] | 78 | call ini_fillgeom(klon_omp,latitude,longitude,cell_area) |
---|
| 79 | ! work is needed to put what is in comgeomfi_h in geometry_mod? |
---|
| 80 | |
---|
[1257] | 81 | call conf_phys(klon_omp,nlayer,nqtot) |
---|
[1130] | 82 | |
---|
| 83 | !$OMP END PARALLEL |
---|
| 84 | |
---|
| 85 | end subroutine iniphysiq |
---|
[1523] | 86 | |
---|
| 87 | |
---|
| 88 | END MODULE iniphysiq_mod |
---|