[1047] | 1 | module dimradmars_mod |
---|
| 2 | ! Declaration and settings for radiative transfer calculations |
---|
[1224] | 3 | ! Initializations and allocations are done in phys_state_var_init |
---|
[1047] | 4 | implicit none |
---|
| 5 | ! nflev: number of vertical layer |
---|
| 6 | ! ndlon,ndlo2: number of horizontal points |
---|
| 7 | ! Splitting of horizontal grid |
---|
| 8 | ! NDLO2 and ndomainsz for the splitting in the physics call |
---|
[1112] | 9 | ! WARNING: One must have 1 < ndomainsz =< ngrid |
---|
[1266] | 10 | integer,save :: NFLEV !=nlayer ! with splitting |
---|
[1112] | 11 | integer,save :: ndomainsz !=(ngrid-1)/20 + 1 |
---|
[1047] | 12 | integer,save :: NDLON !=ndomainsz ! with splitting |
---|
| 13 | integer,save :: NDLO2 !=NDLON |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | ! Number of kind of tracer radiative properties |
---|
| 17 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[1246] | 18 | ! naerkind is set by reading callphys.def |
---|
| 19 | ! -- see conf_phys |
---|
| 20 | ! -- value of nsizemax below is comfortably high |
---|
| 21 | ! but beware in case you add a lot of scatterers |
---|
| 22 | INTEGER, SAVE :: naerkind |
---|
[1047] | 23 | |
---|
[1246] | 24 | ! AS: previously in aerkind.h |
---|
| 25 | character*20, SAVE, ALLOCATABLE :: name_iaer(:) ! name of the scatterers |
---|
| 26 | integer iaer_dust_conrath ! Typical dust profiles using a |
---|
| 27 | ! Conrath type analytical equation |
---|
| 28 | integer iaer_dust_doubleq ! Dust profile is given by the |
---|
| 29 | ! mass mixing ratio of the two- |
---|
| 30 | ! moment scheme method (doubleq) |
---|
| 31 | integer iaer_dust_submicron ! Dust profile is given by a |
---|
| 32 | ! submicron population of dust |
---|
| 33 | ! particles |
---|
| 34 | integer iaer_h2o_ice ! Water ice particles |
---|
[1047] | 35 | |
---|
[1246] | 36 | ! AS: was in aeropacity |
---|
| 37 | INTEGER,SAVE,ALLOCATABLE :: iaerdust(:) |
---|
| 38 | |
---|
| 39 | ! AS: was in suaer |
---|
| 40 | CHARACTER(LEN=30), SAVE, ALLOCATABLE :: file_id(:,:) |
---|
| 41 | |
---|
[1047] | 42 | ! Reference wavelengths used to compute reference optical depth (m) |
---|
| 43 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[1246] | 44 | REAL,SAVE,ALLOCATABLE :: longrefir(:),longrefvis(:) |
---|
[1047] | 45 | |
---|
| 46 | ! Definition of spectral intervals at thermal infrared wavelengths (LW) |
---|
| 47 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 48 | integer,parameter :: nir=4 ! Total number of thermal IR bands |
---|
| 49 | integer,parameter :: nuco2=2 ! number of bands in CO2 bands |
---|
| 50 | real,parameter :: long1ir=5.E-6 , long2ir=200.E-6 |
---|
| 51 | real,parameter :: long1co2=1.E+0 / 865.E+2 , long2co2=1.E+0 / 500.E+2 |
---|
| 52 | |
---|
| 53 | ! Warning : the "nir" thermal IR bands are not ordered by wavelength: |
---|
| 54 | ! iir=1 : central 15um CO2 bands |
---|
| 55 | ! iir=2 : CO2 band wings [long1co2-long2co2] MINUS central band |
---|
| 56 | ! iir=3 : 9 um band [long1ir - long1co2] |
---|
| 57 | ! iir=4 : Far IR [long2co2 - long2ir] |
---|
| 58 | |
---|
| 59 | ! Definition of spectral interval at solar wavelengths (SW) |
---|
| 60 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 61 | integer,parameter :: NSUN=2 ! do not change that ! |
---|
| 62 | ! Boundaries of spectral intervals (m) : |
---|
| 63 | real,parameter :: long1vis=0.1E-6 , long2vis=0.5E-6 , long3vis=5.E-6 |
---|
| 64 | ! Fraction of solar energy in solar band #1 [long1vis-long2vis] : 0.274490 |
---|
| 65 | ! Fraction of solar energy in solar band #2 [long2vis-long3vis] : 0.725509 |
---|
| 66 | real,save :: sunfr(2) = (/ 0.274490 , 0.725509 /) |
---|
| 67 | |
---|
| 68 | ! Maximum number of grain size classes |
---|
| 69 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 70 | ! This parameter has to be set to the maximum number of particle |
---|
| 71 | ! sizes contained in the optical parameter database; For example, |
---|
| 72 | ! if only one grain size is used to describe dust, and 30 are used |
---|
| 73 | ! to describe water-ice crystals in the visible and 15 in the IR, |
---|
| 74 | ! nsizemax has to be set to 30. |
---|
| 75 | ! If only one grain size is considered for all the aerosols, set |
---|
| 76 | ! this parameter to 1 and convolution will be turned off during |
---|
| 77 | ! the radiative calculations. |
---|
| 78 | |
---|
| 79 | integer, parameter :: nsizemax = 60 |
---|
| 80 | ! integer, parameter :: nsizemax = 1 |
---|
| 81 | |
---|
| 82 | ! Various initialisation for LW radiative code |
---|
| 83 | ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 84 | ! npademx : number of Pade coefficients |
---|
| 85 | ! nabsmx : ? |
---|
| 86 | ! nt_pademx : number of temperature intervals for Pade |
---|
| 87 | |
---|
| 88 | integer,parameter :: npademx=4 |
---|
| 89 | integer,parameter :: nabsmx=2 |
---|
| 90 | integer,parameter :: nt_pademx=19 |
---|
| 91 | |
---|
[1224] | 92 | !! |
---|
| 93 | !! variables |
---|
| 94 | !! |
---|
| 95 | REAL,SAVE,ALLOCATABLE :: dtrad(:,:) ! Net atm. radiative heating rate (K.s-1) |
---|
| 96 | REAL,SAVE,ALLOCATABLE :: fluxrad_sky(:) ! rad. flux from sky absorbed by surface (W.m-2) |
---|
| 97 | REAL,SAVE,ALLOCATABLE :: fluxrad(:) ! Net radiative surface flux (W.m-2) |
---|
| 98 | REAL,SAVE,ALLOCATABLE :: albedo(:,:) ! Surface albedo in each solar band |
---|
| 99 | REAL,SAVE,ALLOCATABLE :: tauscaling(:) ! Convertion factor for qdust and Ndust |
---|
| 100 | ! aerosol (dust or ice) extinction optical depth at reference wavelength |
---|
| 101 | ! "longrefvis" set in dimradmars_mod , for one of the "naerkind" kind of |
---|
| 102 | ! aerosol optical properties : |
---|
| 103 | REAL,SAVE,ALLOCATABLE :: aerosol(:,:,:) |
---|
| 104 | REAL,SAVE,ALLOCATABLE :: nueffdust(:,:) ! Dust effective variance |
---|
| 105 | |
---|
[1246] | 106 | !! ------------------------------------------------------ |
---|
| 107 | !! AS: what was previously in yomaer |
---|
| 108 | ! Shortwave |
---|
| 109 | ! ~~~~~~~~~ |
---|
| 110 | ! |
---|
| 111 | ! tauvis: dust optical depth at reference wavelength ("longrefvis" set |
---|
| 112 | ! in dimradmars_mod : typically longrefvis = 0.67E-6 m, as measured by Viking ) |
---|
| 113 | |
---|
| 114 | ! For the "naerkind" kind of aerosol radiative properties : |
---|
| 115 | ! QVISsQREF : Qext / Qext("longrefvis") <--- For both solar bands |
---|
| 116 | ! omegavis : sinle scattering albedo <--- For both solar bands |
---|
| 117 | ! gvis : assymetry factor <--- For both solar bands |
---|
| 118 | ! |
---|
| 119 | ! Longwave |
---|
| 120 | ! ~~~~~~~~ |
---|
| 121 | ! |
---|
| 122 | ! For the "naerkind" kind of aerosol radiative properties : |
---|
| 123 | ! QIRsQREF : Qext / Qext("longrefvis") <--- For the nir bandes IR |
---|
| 124 | ! omegaIR : mean single scattering albedo <--- For the nir bandes IR |
---|
| 125 | ! gIR : mean assymetry factor <--- For the nir bandes IR |
---|
| 126 | ! |
---|
| 127 | real,save :: tauvis |
---|
| 128 | real,save,allocatable :: QVISsQREF(:,:,:) |
---|
| 129 | real,save,allocatable :: omegavis(:,:,:) |
---|
| 130 | real,save,allocatable :: gvis(:,:,:) |
---|
| 131 | real,save,allocatable :: QIRsQREF(:,:,:) |
---|
| 132 | real,save,allocatable :: omegaIR(:,:,:) |
---|
| 133 | real,save,allocatable :: gIR(:,:,:) |
---|
| 134 | ! Actual number of grain size classes in each domain for a |
---|
| 135 | ! given aerosol: |
---|
| 136 | integer,save,allocatable :: nsize(:,:) |
---|
| 137 | ! Particle size axis (depend on the kind of aerosol and the |
---|
| 138 | ! radiation domain) |
---|
| 139 | real,save,allocatable :: radiustab(:,:,:) |
---|
| 140 | ! Extinction coefficient at reference wavelengths; |
---|
| 141 | ! These wavelengths are defined in dimradmars_mod, and called |
---|
| 142 | ! longrefvis and longrefir. |
---|
| 143 | real,save,allocatable :: QREFvis(:,:) |
---|
| 144 | real,save,allocatable :: QREFir(:,:) |
---|
| 145 | real,save,allocatable :: omegaREFvis(:,:) |
---|
| 146 | real,save,allocatable :: omegaREFir(:,:) |
---|
| 147 | !! ------------------------------------------------------ |
---|
| 148 | |
---|
[1047] | 149 | contains |
---|
[1246] | 150 | |
---|
[1047] | 151 | subroutine ini_dimradmars_mod(ngrid,nlayer) |
---|
| 152 | |
---|
| 153 | implicit none |
---|
| 154 | |
---|
| 155 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
| 156 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
[1224] | 157 | |
---|
[1047] | 158 | nflev=nlayer |
---|
| 159 | ! ndomainsz=ngrid |
---|
| 160 | ndomainsz=(ngrid-1)/20 + 1 |
---|
| 161 | ! ndomainsz=(ngrid-1)/5 + 1 |
---|
| 162 | ndlon=ndomainsz |
---|
| 163 | ndlo2=ndlon |
---|
| 164 | |
---|
[1224] | 165 | allocate(albedo(ngrid,2)) |
---|
| 166 | allocate(dtrad(ngrid,nlayer)) |
---|
| 167 | allocate(fluxrad_sky(ngrid)) |
---|
| 168 | allocate(fluxrad(ngrid)) |
---|
| 169 | allocate(tauscaling(ngrid)) |
---|
| 170 | allocate(nueffdust(ngrid,nlayer)) |
---|
| 171 | |
---|
[1047] | 172 | end subroutine ini_dimradmars_mod |
---|
[1246] | 173 | |
---|
| 174 | subroutine ini_scatterers(ngrid,nlayer) |
---|
| 175 | |
---|
| 176 | implicit none |
---|
| 177 | |
---|
| 178 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
| 179 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
| 180 | |
---|
| 181 | allocate(name_iaer(naerkind)) |
---|
| 182 | allocate(aerosol(ngrid,nlayer,naerkind)) |
---|
| 183 | allocate(longrefir(naerkind)) |
---|
| 184 | allocate(longrefvis(naerkind)) |
---|
| 185 | allocate(iaerdust(naerkind)) |
---|
| 186 | allocate(file_id(naerkind,2)) |
---|
| 187 | |
---|
| 188 | allocate(QVISsQREF(nsun,naerkind,nsizemax)) |
---|
| 189 | allocate(omegavis(nsun,naerkind,nsizemax)) |
---|
| 190 | allocate(gvis(nsun,naerkind,nsizemax)) |
---|
| 191 | allocate(QIRsQREF(nir,naerkind,nsizemax)) |
---|
| 192 | allocate(omegaIR(nir,naerkind,nsizemax)) |
---|
| 193 | allocate(gIR(nir,naerkind,nsizemax)) |
---|
| 194 | allocate(nsize(naerkind,2)) |
---|
| 195 | allocate(radiustab(naerkind,2,nsizemax)) |
---|
| 196 | allocate(QREFvis(naerkind,nsizemax)) |
---|
| 197 | allocate(QREFir(naerkind,nsizemax)) |
---|
| 198 | allocate(omegaREFvis(naerkind,nsizemax)) |
---|
| 199 | allocate(omegaREFir(naerkind,nsizemax)) |
---|
| 200 | |
---|
| 201 | end subroutine ini_scatterers |
---|
| 202 | |
---|
[1047] | 203 | end module dimradmars_mod |
---|