| 1 | MODULE phys_state_var_init_mod |
|---|
| 2 | |
|---|
| 3 | CONTAINS |
|---|
| 4 | |
|---|
| 5 | SUBROUTINE phys_state_var_init(ngrid,nlayer,nq,tname, & |
|---|
| 6 | day_ini,day_end,hour_ini,pdaysec,ptimestep, & |
|---|
| 7 | prad,pg,pr,pcpp, & |
|---|
| 8 | dyn_nqperes,dyn_nqfils)! MVals: variables isotopes |
|---|
| 9 | |
|---|
| 10 | !======================================================================= |
|---|
| 11 | ! |
|---|
| 12 | ! purpose: |
|---|
| 13 | ! ------- |
|---|
| 14 | ! |
|---|
| 15 | ! Allocate arrays in modules |
|---|
| 16 | ! Fill geometrical arrays |
|---|
| 17 | ! Fill a first set of physical constants |
|---|
| 18 | ! -- was done previously in inifis |
|---|
| 19 | ! |
|---|
| 20 | !======================================================================= |
|---|
| 21 | ! |
|---|
| 22 | ! authors: Ehouarn Millour and Aymeric Spiga |
|---|
| 23 | ! 14/04/2014 |
|---|
| 24 | ! |
|---|
| 25 | ! arguments: |
|---|
| 26 | ! ---------- |
|---|
| 27 | ! |
|---|
| 28 | ! input: |
|---|
| 29 | ! ------ |
|---|
| 30 | ! |
|---|
| 31 | ! ngrid Size of the horizontal grid. |
|---|
| 32 | ! nlayer Number of vertical layers. |
|---|
| 33 | ! nq Number of tracers. |
|---|
| 34 | ! |
|---|
| 35 | !======================================================================= |
|---|
| 36 | |
|---|
| 37 | use init_print_control_mod, only: init_print_control |
|---|
| 38 | use slope_mod, only: ini_slope_mod,end_slope_mod |
|---|
| 39 | use comsaison_h, only: ini_comsaison_h,end_comsaison_h |
|---|
| 40 | use surfdat_h, only: ini_surfdat_h,end_surfdat_h |
|---|
| 41 | use comgeomfi_h, only: ini_comgeomfi_h,end_comgeomfi_h |
|---|
| 42 | use comsoil_h, only: ini_comsoil_h,end_comsoil_h |
|---|
| 43 | use dimradmars_mod, only: ini_dimradmars_mod,end_dimradmars_mod |
|---|
| 44 | use yomlw_h, only: ini_yomlw_h,end_yomlw_h |
|---|
| 45 | use conc_mod, only: ini_conc_mod,end_conc_mod |
|---|
| 46 | use turb_mod, only: ini_turb_mod,end_turb_mod |
|---|
| 47 | use comcstfi_h, only: pi,rad,cpp,g,r,rcp |
|---|
| 48 | use tracer_mod, only: ini_tracer_mod,end_tracer_mod |
|---|
| 49 | use time_phylmdz_mod, only: init_time |
|---|
| 50 | use compute_dtau_mod, only: ini_compute_dtau_mod, & |
|---|
| 51 | end_compute_dtau_mod |
|---|
| 52 | use rocketduststorm_mod, only: ini_rocketduststorm_mod, & |
|---|
| 53 | end_rocketduststorm_mod |
|---|
| 54 | use topmons_mod, only: ini_topmons_mod, & |
|---|
| 55 | end_topmons_mod |
|---|
| 56 | use calchim_mod, only: ini_calchim_mod,end_calchim_mod |
|---|
| 57 | use watercloud_mod, only: ini_watercloud_mod, & |
|---|
| 58 | end_watercloud_mod |
|---|
| 59 | use nonoro_gwd_ran_mod, only: ini_nonoro_gwd_ran, & |
|---|
| 60 | end_nonoro_gwd_ran |
|---|
| 61 | use dust_param_mod, only: ini_dust_param_mod, & |
|---|
| 62 | end_dust_param_mod |
|---|
| 63 | use dust_rad_adjust_mod, only: ini_dust_rad_adjust_mod, & |
|---|
| 64 | end_dust_rad_adjust_mod |
|---|
| 65 | IMPLICIT NONE |
|---|
| 66 | |
|---|
| 67 | INTEGER,INTENT(IN) :: ngrid,nlayer,nq |
|---|
| 68 | CHARACTER(len=*),INTENT(IN) :: tname(nq) |
|---|
| 69 | INTEGER,INTENT(IN) :: day_ini, day_end |
|---|
| 70 | REAL,INTENT(IN) :: hour_ini |
|---|
| 71 | REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp |
|---|
| 72 | !MVals isotopes |
|---|
| 73 | INTEGER,INTENT(in) :: dyn_nqperes |
|---|
| 74 | INTEGER,INTENT(in) :: dyn_nqfils(nq) |
|---|
| 75 | |
|---|
| 76 | ! set dimension and allocate arrays in tracer_mod |
|---|
| 77 | call end_tracer_mod |
|---|
| 78 | call ini_tracer_mod(nq,tname,dyn_nqperes,dyn_nqfils)! MVals: variables isotopes |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | ! initialize "print_control" constants/flags ("prt_level","lunout", etc.) |
|---|
| 82 | call init_print_control |
|---|
| 83 | |
|---|
| 84 | ! set parameters in comcstfi_h |
|---|
| 85 | pi=2.*asin(1.) |
|---|
| 86 | rad=prad |
|---|
| 87 | cpp=pcpp |
|---|
| 88 | g=pg |
|---|
| 89 | r=pr |
|---|
| 90 | rcp=r/cpp |
|---|
| 91 | |
|---|
| 92 | ! Initialize some "temporal and calendar" related variables |
|---|
| 93 | call init_time(day_ini,day_end,hour_ini,pdaysec,ptimestep) |
|---|
| 94 | |
|---|
| 95 | ! allocate "slope_mod" arrays |
|---|
| 96 | call end_slope_mod |
|---|
| 97 | call ini_slope_mod(ngrid) |
|---|
| 98 | |
|---|
| 99 | ! allocate "comsaison_h" arrays |
|---|
| 100 | call end_comsaison_h |
|---|
| 101 | call ini_comsaison_h(ngrid) |
|---|
| 102 | |
|---|
| 103 | ! allocate "surfdat_h" arrays |
|---|
| 104 | call end_surfdat_h |
|---|
| 105 | call ini_surfdat_h(ngrid,nq) |
|---|
| 106 | |
|---|
| 107 | ! allocate "comgeomfi_h" arrays |
|---|
| 108 | call end_comgeomfi_h |
|---|
| 109 | call ini_comgeomfi_h(ngrid) |
|---|
| 110 | |
|---|
| 111 | ! allocate "comsoil_h" arrays |
|---|
| 112 | call end_comsoil_h |
|---|
| 113 | call ini_comsoil_h(ngrid) |
|---|
| 114 | |
|---|
| 115 | ! set some variables in "dimradmars_mod" |
|---|
| 116 | call end_dimradmars_mod |
|---|
| 117 | call ini_dimradmars_mod(ngrid,nlayer) |
|---|
| 118 | |
|---|
| 119 | ! allocate arrays in "yomlw_h" |
|---|
| 120 | call end_yomlw_h |
|---|
| 121 | call ini_yomlw_h(ngrid) |
|---|
| 122 | |
|---|
| 123 | ! allocate arrays in "conc_mod" (aeronomars) |
|---|
| 124 | call end_conc_mod |
|---|
| 125 | call ini_conc_mod(ngrid,nlayer) |
|---|
| 126 | |
|---|
| 127 | ! allocate arrays in "turb_mod" |
|---|
| 128 | call end_turb_mod |
|---|
| 129 | call ini_turb_mod(ngrid,nlayer) |
|---|
| 130 | |
|---|
| 131 | ! allocate arrays in "compute_dtau_mod": |
|---|
| 132 | call end_compute_dtau_mod |
|---|
| 133 | call ini_compute_dtau_mod(ngrid) |
|---|
| 134 | |
|---|
| 135 | ! allocate arrays in "rocketduststorm_mod": |
|---|
| 136 | call end_rocketduststorm_mod |
|---|
| 137 | call ini_rocketduststorm_mod(ngrid) |
|---|
| 138 | |
|---|
| 139 | ! allocate arrays in "topmons_mod": |
|---|
| 140 | call end_topmons_mod |
|---|
| 141 | call ini_topmons_mod(ngrid,nlayer) |
|---|
| 142 | |
|---|
| 143 | ! allocate arrays in "calchim_mod" (aeronomars) |
|---|
| 144 | call end_calchim_mod |
|---|
| 145 | call ini_calchim_mod(ngrid,nlayer,nq) |
|---|
| 146 | |
|---|
| 147 | ! allocate arrays in "watercloud_mod" |
|---|
| 148 | call end_watercloud_mod |
|---|
| 149 | call ini_watercloud_mod(ngrid,nlayer,nq) |
|---|
| 150 | |
|---|
| 151 | ! allocate arrays in "nonoro_gwd_ran_mod" |
|---|
| 152 | call end_nonoro_gwd_ran |
|---|
| 153 | call ini_nonoro_gwd_ran(ngrid,nlayer) |
|---|
| 154 | |
|---|
| 155 | ! allocate arrays in "dust_param_mod" |
|---|
| 156 | call end_dust_param_mod |
|---|
| 157 | call ini_dust_param_mod(ngrid) |
|---|
| 158 | |
|---|
| 159 | ! allocate arrays in "dust_rad_adjust_mod" |
|---|
| 160 | call end_dust_rad_adjust_mod |
|---|
| 161 | call ini_dust_rad_adjust_mod(ngrid) |
|---|
| 162 | |
|---|
| 163 | END SUBROUTINE phys_state_var_init |
|---|
| 164 | |
|---|
| 165 | END MODULE phys_state_var_init_mod |
|---|