[1523] | 1 | MODULE iniphysiq_mod |
---|
| 2 | |
---|
| 3 | CONTAINS |
---|
| 4 | |
---|
[1543] | 5 | subroutine iniphysiq(ii,jj,nlayer, & |
---|
| 6 | nbp, communicator, & |
---|
| 7 | punjours, pdayref,ptimestep, & |
---|
| 8 | rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, & |
---|
| 9 | airedyn,cudyn,cvdyn, & |
---|
[1216] | 10 | prad,pg,pr,pcpp,iflag_phys) |
---|
| 11 | |
---|
[1525] | 12 | use control_mod, only: nday |
---|
[3100] | 13 | !use surf_heat_transp_mod, only: ini_surf_heat_transp |
---|
| 14 | USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom |
---|
[1216] | 15 | use infotrac, only : nqtot ! number of advected tracers |
---|
[1308] | 16 | use planete_mod, only: ini_planete_mod |
---|
[1422] | 17 | USE comvert_mod, ONLY: ap,bp,preff |
---|
[1524] | 18 | use inifis_mod, only: inifis |
---|
[1529] | 19 | use ioipsl_getin_p_mod, only: getin_p |
---|
[1216] | 20 | |
---|
[1564] | 21 | use inigeomphy_mod, only: inigeomphy |
---|
[1563] | 22 | use geometry_mod, only: cell_area, & ! physics grid area (m2) |
---|
| 23 | longitude, & ! longitudes (rad) |
---|
| 24 | latitude ! latitudes (rad) |
---|
| 25 | ! necessary to get klon_omp |
---|
| 26 | USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid) |
---|
[1573] | 27 | USE dimphy, ONLY: init_dimphy |
---|
[1563] | 28 | |
---|
[1216] | 29 | implicit none |
---|
[1308] | 30 | include "dimensions.h" |
---|
[1529] | 31 | include "paramet.h" |
---|
| 32 | include "comgeom.h" |
---|
[1395] | 33 | include "iniprint.h" |
---|
[1216] | 34 | |
---|
| 35 | real,intent(in) :: prad ! radius of the planet (m) |
---|
| 36 | real,intent(in) :: pg ! gravitational acceleration (m/s2) |
---|
| 37 | real,intent(in) :: pr ! ! reduced gas constant R/mu |
---|
| 38 | real,intent(in) :: pcpp ! specific heat Cp |
---|
| 39 | real,intent(in) :: punjours ! length (in s) of a standard day |
---|
| 40 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
[1395] | 41 | integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes |
---|
| 42 | integer,intent(in) :: jj ! number of atompsheric columns along latitudes |
---|
[1543] | 43 | integer,intent(in) :: nbp ! number of physics columns for this MPI process |
---|
| 44 | integer,intent(in) :: communicator ! MPI communicator |
---|
[1529] | 45 | real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid |
---|
| 46 | real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid |
---|
| 47 | real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid |
---|
| 48 | real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid |
---|
| 49 | real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2) |
---|
| 50 | real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u) |
---|
| 51 | real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v) |
---|
[1216] | 52 | integer,intent(in) :: pdayref ! reference day of for the simulation |
---|
| 53 | real,intent(in) :: ptimestep !physics time step (s) |
---|
| 54 | integer,intent(in) :: iflag_phys ! type of physics to be called |
---|
| 55 | |
---|
[1529] | 56 | logical :: ok_slab_ocean |
---|
[1216] | 57 | |
---|
[1563] | 58 | ! the common part for all planetary physics |
---|
| 59 | !------------------------------------------ |
---|
| 60 | ! --> initialize physics distribution, global fields and geometry |
---|
[1573] | 61 | ! (i.e. things in phy_common or dynphy_lonlat) |
---|
[1564] | 62 | CALL inigeomphy(ii,jj,nlayer, & |
---|
[1563] | 63 | nbp, communicator, & |
---|
| 64 | rlatudyn,rlatvdyn, & |
---|
| 65 | rlonudyn,rlonvdyn, & |
---|
| 66 | airedyn,cudyn,cvdyn) |
---|
[1395] | 67 | |
---|
[1573] | 68 | ! the distinct part for all planetary physics (ie. things in phystd) |
---|
[1563] | 69 | !------------------------------------------ |
---|
[1395] | 70 | |
---|
[1563] | 71 | !$OMP PARALLEL |
---|
[1543] | 72 | |
---|
[1563] | 73 | ! copy some fundamental parameters to physics |
---|
| 74 | ! and do some initializations |
---|
[1523] | 75 | |
---|
[1682] | 76 | ! Initialize dimphy module => Now done in physics_distribution_mod |
---|
| 77 | ! call init_dimphy(klon_omp,nlayer) |
---|
[1573] | 78 | |
---|
[1308] | 79 | ! copy over preff , ap() and bp() |
---|
| 80 | call ini_planete_mod(nlayer,preff,ap,bp) |
---|
| 81 | |
---|
[1529] | 82 | ! for slab ocean, copy over some arrays |
---|
| 83 | ok_slab_ocean=.false. ! default value |
---|
| 84 | call getin_p("ok_slab_ocean",ok_slab_ocean) |
---|
| 85 | if (ok_slab_ocean) then |
---|
[3100] | 86 | ! call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, & |
---|
| 87 | ! cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, & |
---|
| 88 | ! aireu,airev) |
---|
| 89 | CALL ini_slab_transp_geom(ip1jm,ip1jmp1,unsairez,fext,unsaire,& |
---|
| 90 | cu,cuvsurcv,cv,cvusurcu, & |
---|
| 91 | aire,apoln,apols, & |
---|
| 92 | aireu,airev,rlatvdyn) |
---|
[1529] | 93 | endif |
---|
| 94 | |
---|
[1525] | 95 | call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, & |
---|
[1542] | 96 | latitude,longitude,cell_area,prad,pg,pr,pcpp) |
---|
[1216] | 97 | |
---|
[1563] | 98 | |
---|
[1216] | 99 | !$OMP END PARALLEL |
---|
| 100 | |
---|
| 101 | end subroutine iniphysiq |
---|
[1523] | 102 | |
---|
| 103 | |
---|
| 104 | END MODULE iniphysiq_mod |
---|