| 1 | MODULE iniphysiq_mod |
|---|
| 2 | |
|---|
| 3 | CONTAINS |
|---|
| 4 | |
|---|
| 5 | subroutine iniphysiq(ngrid,nlayer,nq,piphysiq,& |
|---|
| 6 | punjours, pdayref, & |
|---|
| 7 | prad,pg,pr,pcpp,iflag_phys) |
|---|
| 8 | |
|---|
| 9 | !use time_phylmdz_mod, only: iphysiq, day_step, ecritstart,ecritphy,& |
|---|
| 10 | ! dtphys,daysec,day_ini,hour_ini |
|---|
| 11 | use comconst_mod, only : cpp |
|---|
| 12 | use cpdet_phy_mod, only: init_cpdet_phy |
|---|
| 13 | USE control_mod, ONLY: planet_type |
|---|
| 14 | !use surfdat_h, only: ini_surfdat_h |
|---|
| 15 | !use comsoil_h, only: ini_comsoil_h |
|---|
| 16 | !use dimradmars_mod, only: ini_dimradmars_mod |
|---|
| 17 | !use time_phylmdz_mod, only : init_time |
|---|
| 18 | use dimphy, only: init_dimphy |
|---|
| 19 | USE phys_state_var_mod |
|---|
| 20 | use module_model_constants, only : nu, TT00 |
|---|
| 21 | USE variables_mod, only: phour_ini,zdt_split !! zdt_split <> ptimestep |
|---|
| 22 | !real*8,intent(in) :: ptimestep !physics time step (s) [dtphys] |
|---|
| 23 | |
|---|
| 24 | implicit none |
|---|
| 25 | |
|---|
| 26 | REAL,intent(in) :: prad |
|---|
| 27 | REAL,intent(in) :: pg |
|---|
| 28 | REAL,intent(in) :: pr |
|---|
| 29 | REAL,intent(in) :: pcpp |
|---|
| 30 | REAL,intent(in) :: punjours |
|---|
| 31 | !DOUBLE PRECISION,intent(in) :: ptimestep |
|---|
| 32 | |
|---|
| 33 | !real,intent(in) :: prad ! radius of the planet (m) |
|---|
| 34 | !real,intent(in) :: pg ! gravitational acceleration (m/s2) |
|---|
| 35 | !real,intent(in) :: pr ! ! reduced gas constant R/mu |
|---|
| 36 | !real,intent(in) :: pcpp ! specific heat Cp |
|---|
| 37 | !real,intent(in) :: punjours ! length (in s) of a standard day [daysec] |
|---|
| 38 | integer,intent(in) :: pdayref ! reference day of for the simulation [day_ini] |
|---|
| 39 | !real*8,intent(in) :: ptimestep !physics time step (s) [dtphys] |
|---|
| 40 | integer,intent(in) :: iflag_phys ! type of physics to be called |
|---|
| 41 | |
|---|
| 42 | integer,intent(in) :: ngrid ! number of physics columns for this MPI process |
|---|
| 43 | integer,intent(in) :: nlayer ! number of atmospheric layers |
|---|
| 44 | integer,intent(in) :: nq ! number of tracers |
|---|
| 45 | !real,intent(in) :: phour_ini ! start time (fraction of day) of the run 0=<phour_ini<1 |
|---|
| 46 | real,intent(in) :: piphysiq ! call physics every piphysiq dynamical timesteps |
|---|
| 47 | real*8 :: CPPP,nuvenus,T0venus |
|---|
| 48 | |
|---|
| 49 | ! copy some fundamental parameters to physics |
|---|
| 50 | ! and do some initializations |
|---|
| 51 | |
|---|
| 52 | !! Initialize dimphy module |
|---|
| 53 | !call init_dimphy(klon_omp,nlayer) |
|---|
| 54 | !...useless in mesoscale |
|---|
| 55 | |
|---|
| 56 | !! initialize physical constants and arrays |
|---|
| 57 | |
|---|
| 58 | ! Initialize some "temporal and calendar" related variables |
|---|
| 59 | !call init_time(day_ini,hour_ini,pdaysec,ptimestep) |
|---|
| 60 | !call init_time(1,1,1,1,ptimestep) |
|---|
| 61 | !=ptimestep |
|---|
| 62 | call init_dimphy(ngrid,nlayer) |
|---|
| 63 | |
|---|
| 64 | Call phys_state_var_init(nq) |
|---|
| 65 | ! allocate "surfdat_h" arrays |
|---|
| 66 | !call ini_surfdat_h(ngrid,nq) |
|---|
| 67 | |
|---|
| 68 | ! allocate "comgeomfi_h" arrays |
|---|
| 69 | !call ini_comgeomfi_h(ngrid) |
|---|
| 70 | |
|---|
| 71 | ! allocate "comsoil_h" arrays |
|---|
| 72 | !call ini_comsoil_h(ngrid) |
|---|
| 73 | |
|---|
| 74 | ! set some variables in "dimradmars_mod" |
|---|
| 75 | !call ini_dimradmars_mod(ngrid,nlayer) |
|---|
| 76 | |
|---|
| 77 | ! set klon and klev for venus physiq |
|---|
| 78 | !call init_dimphy(ngrid,nlayer) |
|---|
| 79 | |
|---|
| 80 | ! Initialize some physical constants |
|---|
| 81 | call suphec(pcpp) |
|---|
| 82 | |
|---|
| 83 | cpp=pcpp |
|---|
| 84 | planet_type="venus" |
|---|
| 85 | CPPP=pcpp |
|---|
| 86 | nuvenus=nu |
|---|
| 87 | T0venus=TT00 |
|---|
| 88 | call init_cpdet_phy(CPPP,nuvenus,T0venus) |
|---|
| 89 | |
|---|
| 90 | !! a few time constants initialization |
|---|
| 91 | !! not done by init_time in phys_state_var_init |
|---|
| 92 | !! and supposed to be done in conf_phys (but not done in mesoscale) |
|---|
| 93 | !day_step=punjours/ptimestep |
|---|
| 94 | !iphysiq=piphysiq |
|---|
| 95 | !ecritstart=0 !! not used in MESOSCALE |
|---|
| 96 | !ecritphy=0 !! not used in MESOSCALE |
|---|
| 97 | |
|---|
| 98 | !! check |
|---|
| 99 | !PRINT*,'Call to LMD physics:',day_step,' per Martian day' |
|---|
| 100 | !PRINT*,'Call to LMD physics: every',iphysiq,' dynamical timesteps' |
|---|
| 101 | !PRINT*,'Call to LMD physics: every',dtphys,' seconds' |
|---|
| 102 | !PRINT*,'Call to LMD physics: length of day is',daysec,' seconds' |
|---|
| 103 | !PRINT*,'Call to LMD physics: initial day is',day_ini |
|---|
| 104 | !PRINT*,'Call to LMD physics: initial fractional time is',hour_ini |
|---|
| 105 | |
|---|
| 106 | ! Initialize some "temporal and calendar" related variables |
|---|
| 107 | !CALL init_time(day_ini,hour_ini,punjours,ptimestep) |
|---|
| 108 | !...done in phys_state_var_init |
|---|
| 109 | |
|---|
| 110 | end subroutine iniphysiq |
|---|
| 111 | |
|---|
| 112 | END MODULE iniphysiq_mod |
|---|