[4601] | 1 | MODULE strataer_emiss_mod |
---|
[4763] | 2 | ! This module contains information about strato microphysic model emission parameters |
---|
| 3 | |
---|
[4601] | 4 | CONTAINS |
---|
[4763] | 5 | |
---|
[4601] | 6 | SUBROUTINE strataer_emiss_init() |
---|
[4763] | 7 | |
---|
[4601] | 8 | USE strataer_local_var_mod |
---|
| 9 | USE ioipsl_getin_p_mod, ONLY : getin_p |
---|
| 10 | USE print_control_mod, ONLY : lunout |
---|
| 11 | USE mod_phys_lmdz_para, ONLY : is_master |
---|
[4763] | 12 | |
---|
[4601] | 13 | ! Local variables |
---|
| 14 | INTEGER :: ispec |
---|
[4763] | 15 | |
---|
[4601] | 16 | WRITE(lunout,*) 'IN STRATAER_EMISS INIT WELCOME!' |
---|
[4763] | 17 | |
---|
[4601] | 18 | IF (flag_emit.EQ.1 .OR. flag_emit.EQ.4) THEN ! Volcano |
---|
| 19 | CALL getin_p('nErupt',nErupt) !eruption nb |
---|
| 20 | CALL getin_p('injdur',injdur) !injection duration |
---|
[4763] | 21 | |
---|
[4601] | 22 | IF (flag_emit==1) THEN |
---|
| 23 | CALL getin_p('nAerErupt', nAerErupt) !sulfur aer nb |
---|
| 24 | ELSEIF (flag_emit==4) THEN |
---|
| 25 | CALL getin_p('nSpeciesErupt', nSpeciesErupt) !chimical species nb |
---|
| 26 | ENDIF |
---|
[4763] | 27 | |
---|
[4601] | 28 | IF (nErupt.GT.0) THEN |
---|
| 29 | ALLOCATE(year_emit_vol(nErupt),mth_emit_vol(nErupt),day_emit_vol(nErupt)) |
---|
[4764] | 30 | year_emit_vol=0 ; mth_emit_vol=0 ; day_emit_vol=0 |
---|
[4601] | 31 | ALLOCATE(altemiss_vol(nErupt),sigma_alt_vol(nErupt)) |
---|
| 32 | ALLOCATE(xlat_min_vol(nErupt),xlon_min_vol(nErupt)) |
---|
| 33 | ALLOCATE(xlat_max_vol(nErupt),xlon_max_vol(nErupt)) |
---|
[4764] | 34 | altemiss_vol=0. ; sigma_alt_vol=0. |
---|
| 35 | xlon_min_vol=0. ; xlon_max_vol=0. |
---|
| 36 | xlat_min_vol=0. ; xlat_max_vol=0. |
---|
[4765] | 37 | ! injection params (dates, loc, injections params) |
---|
| 38 | CALL getin_p('year_emit_vol',year_emit_vol) |
---|
| 39 | CALL getin_p('mth_emit_vol',mth_emit_vol) |
---|
| 40 | CALL getin_p('day_emit_vol',day_emit_vol) |
---|
| 41 | CALL getin_p('altemiss_vol',altemiss_vol) |
---|
| 42 | CALL getin_p('sigma_alt_vol',sigma_alt_vol) |
---|
| 43 | CALL getin_p('xlon_min_vol',xlon_min_vol) |
---|
| 44 | CALL getin_p('xlon_max_vol',xlon_max_vol) |
---|
| 45 | CALL getin_p('xlat_min_vol',xlat_min_vol) |
---|
| 46 | CALL getin_p('xlat_max_vol',xlat_max_vol) |
---|
[4601] | 47 | IF (flag_emit==1) THEN |
---|
| 48 | ALLOCATE(m_sulf_emiss_vol(nErupt)) |
---|
| 49 | ALLOCATE(m_aer_emiss_vol(nErupt,nAerErupt)) |
---|
[4764] | 50 | m_aer_emiss_vol=0. ; m_sulf_emiss_vol=0. |
---|
[4601] | 51 | IF (ok_qemiss) then |
---|
| 52 | ALLOCATE(m_H2O_emiss_vol(nErupt)) |
---|
| 53 | ALLOCATE(m_H2O_emiss_vol_daily(nErupt)) |
---|
[4763] | 54 | ! ALLOCATE(d_q_emiss(klon,klev)) |
---|
[4601] | 55 | ALLOCATE(budg_emi(klon,nAerErupt+1)) |
---|
| 56 | m_H2O_emiss_vol(:)=0. |
---|
| 57 | m_H2O_emiss_vol_daily(:)=0. |
---|
[4763] | 58 | ! d_q_emiss(:,:)=0. |
---|
[4601] | 59 | ELSE |
---|
| 60 | ALLOCATE(budg_emi(klon,nAerErupt)) |
---|
| 61 | ENDIF |
---|
| 62 | budg_emi(:,:)=0. |
---|
| 63 | ELSEIF (flag_emit==4) THEN |
---|
| 64 | ALLOCATE(m_Chlore_emiss_vol(nErupt)) |
---|
[4763] | 65 | ALLOCATE(id_HCl) |
---|
[4601] | 66 | ALLOCATE(m_Brome_emiss_vol(nErupt)) |
---|
| 67 | ALLOCATE(id_HBr) |
---|
| 68 | ALLOCATE(id_species(nSpeciesErupt)) |
---|
[4768] | 69 | id_species = 0 |
---|
[4601] | 70 | ALLOCATE(m_species_emiss_vol(nErupt,nSpeciesErupt)) |
---|
[4764] | 71 | m_species_emiss_vol=0. |
---|
[4601] | 72 | ALLOCATE(m_NOx_emiss_vol(nErupt)) |
---|
| 73 | ALLOCATE(m_H2O_emiss_vol(nErupt)) |
---|
[4764] | 74 | m_Chlore_emiss_vol=0. ; m_Brome_emiss_vol=0. |
---|
| 75 | m_NOx_emiss_vol=0. ; m_H2O_emiss_vol=0. |
---|
[4601] | 76 | ALLOCATE(id_NOx) |
---|
| 77 | ALLOCATE(id_H2O) |
---|
| 78 | ALLOCATE(budg_emi(klon,nSpeciesErupt)) |
---|
| 79 | budg_emi(:,:)=0. |
---|
| 80 | ENDIF |
---|
| 81 | ELSE |
---|
| 82 | WRITE(lunout,*) 'ERROR : Using flag_emit=1 or 4 (ie Volcanic eruption) but nErupt (',nErupt,') <=0 !' |
---|
| 83 | CALL abort_physic('strataer_emiss_mod', & |
---|
| 84 | 'No eruption define in physiq_def (nErupt=0). Add at one eruption or use background condition.',1) |
---|
| 85 | ENDIF ! fin if nerupt |
---|
[4763] | 86 | |
---|
[4601] | 87 | IF (flag_emit==1) THEN |
---|
| 88 | CALL getin_p('m_sulf_emiss_vol',m_sulf_emiss_vol) |
---|
[4763] | 89 | if (ok_qemiss) then |
---|
| 90 | CALL getin_p('m_H2O_emiss_vol',m_H2O_emiss_vol) |
---|
| 91 | endif |
---|
[4601] | 92 | ELSEIF (flag_emit==4) THEN |
---|
| 93 | CALL getin_p('id_species',id_species) |
---|
[4763] | 94 | CALL getin_p('m_Chlore_emiss_vol',m_Chlore_emiss_vol) |
---|
[4601] | 95 | CALL getin_p('id_HCl',id_HCl) |
---|
| 96 | CALL getin_p('m_Brome_emiss_vol',m_Brome_emiss_vol) |
---|
| 97 | CALL getin_p('id_HBr',id_HBr) |
---|
| 98 | CALL getin_p('m_NOx_emiss_vol',m_NOx_emiss_vol) |
---|
| 99 | CALL getin_p('id_NOx',id_NOx) |
---|
| 100 | CALL getin_p('m_H2O_emiss_vol',m_H2O_emiss_vol) |
---|
| 101 | CALL getin_p('id_H2O',id_H2O) |
---|
| 102 | ENDIF |
---|
[4763] | 103 | |
---|
[4601] | 104 | ELSEIF (flag_emit == 2) THEN ! SAI |
---|
| 105 | CALL getin_p('m_aer_emiss_sai',m_aer_emiss_sai) |
---|
| 106 | CALL getin_p('altemiss_sai',altemiss_sai) |
---|
| 107 | CALL getin_p('sigma_alt_sai',sigma_alt_sai) |
---|
| 108 | CALL getin_p('xlat_sai',xlat_sai) |
---|
| 109 | CALL getin_p('xlon_sai',xlon_sai) |
---|
[4625] | 110 | CALL getin_p('year_emit_sai_start',year_emit_sai_start) |
---|
| 111 | CALL getin_p('year_emit_sai_end',year_emit_sai_end) |
---|
| 112 | CALL getin_p('mth_emit_sai_start',mth_emit_sai_start) |
---|
| 113 | CALL getin_p('mth_emit_sai_end',mth_emit_sai_end) |
---|
| 114 | CALL getin_p('day_emit_sai_start',day_emit_sai_start) |
---|
| 115 | CALL getin_p('day_emit_sai_end',day_emit_sai_end) |
---|
[4763] | 116 | |
---|
[4601] | 117 | ELSEIF (flag_emit == 3) THEN ! SAI between latitudes |
---|
| 118 | CALL getin_p('m_aer_emiss_sai',m_aer_emiss_sai) |
---|
| 119 | CALL getin_p('altemiss_sai',altemiss_sai) |
---|
| 120 | CALL getin_p('sigma_alt_sai',sigma_alt_sai) |
---|
| 121 | CALL getin_p('xlon_sai',xlon_sai) |
---|
| 122 | CALL getin_p('xlat_max_sai',xlat_max_sai) |
---|
| 123 | CALL getin_p('xlat_min_sai',xlat_min_sai) |
---|
| 124 | ENDIF |
---|
[4763] | 125 | |
---|
[4601] | 126 | IF (flag_emit == 1) THEN |
---|
| 127 | DO ispec=1,nAerErupt |
---|
| 128 | m_aer_emiss_vol(:,ispec) = m_sulf_emiss_vol(:) |
---|
| 129 | ENDDO |
---|
| 130 | ELSEIF (flag_emit== 4) THEN |
---|
| 131 | DO ispec=1,nSpeciesErupt |
---|
| 132 | IF(id_species(ispec) == id_HCl) THEN |
---|
| 133 | m_species_emiss_vol(:,ispec) = m_Chlore_emiss_vol(:) |
---|
| 134 | ENDIF |
---|
[4763] | 135 | IF (id_species(ispec) == id_HBr) THEN |
---|
[4601] | 136 | m_species_emiss_vol(:,ispec) = m_Brome_emiss_vol(:) |
---|
| 137 | ENDIF |
---|
| 138 | IF (id_species(ispec) == id_NOx) THEN |
---|
| 139 | m_species_emiss_vol(:,ispec) = m_NOx_emiss_vol(:) |
---|
| 140 | ENDIF |
---|
| 141 | IF (id_species(ispec) == id_H2O) THEN |
---|
| 142 | m_species_emiss_vol(:,ispec) = m_H2O_emiss_vol(:) |
---|
| 143 | ENDIF |
---|
| 144 | ENDDO |
---|
| 145 | ENDIF |
---|
[4763] | 146 | |
---|
[4601] | 147 | !============= Injection ponderation ============= |
---|
| 148 | IF (flag_emit > 0) THEN |
---|
| 149 | CALL strataer_ponde_init |
---|
| 150 | WRITE(lunout,*) 'IN STRATAER INIT : ponde_lonlat_vol',ponde_lonlat_vol |
---|
| 151 | ENDIF |
---|
[4763] | 152 | |
---|
[4601] | 153 | !============= Print params ============= |
---|
| 154 | IF (is_master) THEN |
---|
[4766] | 155 | IF (nErupt > 0) then |
---|
| 156 | if (flag_emit == 1 .OR. flag_emit == 4) THEN |
---|
| 157 | WRITE(lunout,*) 'IN STRATAER nErupt: ',nErupt |
---|
| 158 | WRITE(lunout,*) 'IN STRATAER injdur: ',injdur |
---|
| 159 | WRITE(lunout,*) 'IN STRATAER nAerErupt: ',nAerErupt |
---|
[4763] | 160 | |
---|
[4766] | 161 | WRITE(lunout,*) 'IN STRATAER : year_emit_vol',year_emit_vol |
---|
| 162 | WRITE(lunout,*) 'IN STRATAER : mth_emit_vol',mth_emit_vol |
---|
| 163 | WRITE(lunout,*) 'IN STRATAER : day_emit_vol',day_emit_vol |
---|
| 164 | WRITE(lunout,*) 'IN STRATAER : altemiss_vol',altemiss_vol |
---|
| 165 | WRITE(lunout,*) 'IN STRATAER : sigma_alt_vol',sigma_alt_vol |
---|
| 166 | WRITE(lunout,*) 'IN STRATAER : xlat_min_vol',xlat_min_vol |
---|
| 167 | WRITE(lunout,*) 'IN STRATAER : xlat_max_vol',xlat_max_vol |
---|
| 168 | WRITE(lunout,*) 'IN STRATAER : xlon_min_vol',xlon_min_vol |
---|
| 169 | WRITE(lunout,*) 'IN STRATAER : xlon_max_vol',xlon_max_vol |
---|
| 170 | IF (flag_emit==1) THEN |
---|
| 171 | WRITE(lunout,*) 'IN STRATAEREMISS : m_sulf_emiss_vol',m_sulf_emiss_vol |
---|
| 172 | WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_vol',m_aer_emiss_vol |
---|
| 173 | IF (ok_qemiss) then |
---|
| 174 | WRITE(lunout,*) 'IN STRATAEREMISS : m_H2O_emiss_vol',m_H2O_emiss_vol |
---|
| 175 | ENDIF |
---|
[4601] | 176 | ENDIF |
---|
[4766] | 177 | ELSEIF (flag_emit == 2) THEN |
---|
| 178 | WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai |
---|
| 179 | WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai |
---|
| 180 | WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai |
---|
| 181 | WRITE(lunout,*) 'IN STRATAER : xlat_sai',xlat_sai |
---|
| 182 | WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai |
---|
| 183 | ELSEIF (flag_emit == 3) THEN |
---|
| 184 | WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai |
---|
| 185 | WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai |
---|
| 186 | WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai |
---|
| 187 | WRITE(lunout,*) 'IN STRATAER : year_emit_sai start/end',year_emit_sai_start,year_emit_sai_end |
---|
| 188 | WRITE(lunout,*) 'IN STRATAER : mth_emit_sai start/end',mth_emit_sai_start,mth_emit_sai_end |
---|
| 189 | WRITE(lunout,*) 'IN STRATAER : day_emit_sai start/end',day_emit_sai_start,day_emit_sai_end |
---|
| 190 | WRITE(lunout,*) 'IN STRATAER : xlat_min_sai',xlat_min_sai |
---|
| 191 | WRITE(lunout,*) 'IN STRATAER : xlat_max_sai',xlat_max_sai |
---|
| 192 | WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai |
---|
[4601] | 193 | ENDIF |
---|
[4766] | 194 | IF(flag_emit == 4) THEN |
---|
| 195 | WRITE(lunout,*) 'IN STRATAER : nSpeciesErupt: ',nSpeciesErupt |
---|
| 196 | WRITE(lunout,*) 'IN STRATAER : id_species = ',id_species |
---|
| 197 | WRITE(lunout,*) 'IN STRATAER : id_HCl = ',id_HCl |
---|
| 198 | WRITE(lunout,*) 'IN STRATAER : id_HBr = ',id_HBr |
---|
| 199 | WRITE(lunout,*) 'IN STRATAER : id_NOx = ',id_NOx |
---|
| 200 | WRITE(lunout,*) 'IN STRATAER : id_H2O = ',id_H2O |
---|
| 201 | WRITE(lunout,*) 'IN STRATAER : m_Chlore_emiss_vol = ',m_Chlore_emiss_vol |
---|
| 202 | WRITE(lunout,*) 'IN STRATAER : m_Brome_emiss_vol = ',m_Brome_emiss_vol |
---|
| 203 | WRITE(lunout,*) 'IN STRATAER : m_NOx_emiss_vol = ',m_NOx_emiss_vol |
---|
| 204 | WRITE(lunout,*) 'IN STRATAER : m_H2O_emiss_vol = ',m_H2O_emiss_vol |
---|
| 205 | ENDIF |
---|
| 206 | endif |
---|
[4601] | 207 | ENDIF ! if master |
---|
[4763] | 208 | |
---|
[4601] | 209 | WRITE(lunout,*) 'IN STRATAER_EMISS END' |
---|
| 210 | END SUBROUTINE strataer_emiss_init |
---|
[4763] | 211 | |
---|
[4601] | 212 | ! Compute the ponderation to applicate in each grid point for all eruptions and init |
---|
| 213 | ! dlat & dlon variables |
---|
| 214 | SUBROUTINE strataer_ponde_init() |
---|
[4763] | 215 | |
---|
[5285] | 216 | USE yomcst_mod_h |
---|
[5274] | 217 | USE regular_lonlat_mod, ONLY: lon_reg, lat_reg |
---|
[4601] | 218 | USE dimphy, ONLY: klon |
---|
| 219 | USE mod_grid_phy_lmdz, ONLY: nbp_lat, nbp_lon |
---|
| 220 | USE print_control_mod, ONLY : lunout |
---|
| 221 | USE strataer_local_var_mod |
---|
[4763] | 222 | |
---|
[5274] | 223 | !--RPI |
---|
[4763] | 224 | |
---|
[4601] | 225 | ! local var |
---|
| 226 | REAL :: lat_reg_deg,lon_reg_deg ! lat and lon of grid points in degree |
---|
| 227 | INTEGER :: ieru, i, j |
---|
[4763] | 228 | |
---|
[4601] | 229 | ALLOCATE(ponde_lonlat_vol(nErupt)) |
---|
[4763] | 230 | |
---|
[4601] | 231 | !Compute lon/lat ponderation for injection |
---|
| 232 | dlat=180./2./FLOAT(nbp_lat) ! d latitude in degree |
---|
| 233 | dlon=360./2./FLOAT(nbp_lon) ! d longitude in degree |
---|
| 234 | WRITE(lunout,*) 'IN STRATAER_INIT dlat=',dlat,'dlon=',dlon |
---|
| 235 | WRITE(lunout,*) 'IN STRATAER_INIT nErupt=',nErupt |
---|
| 236 | WRITE(lunout,*) 'IN STRATAER_INIT xlat_min=',xlat_min_vol,'xlat_max=',xlat_max_vol |
---|
| 237 | WRITE(lunout,*) 'IN STRATAER_INIT xlon_min=',xlon_min_vol,'xlon_max=',xlon_max_vol |
---|
[4763] | 238 | |
---|
[4601] | 239 | DO ieru=1, nErupt |
---|
| 240 | ponde_lonlat_vol(ieru) = 0 |
---|
| 241 | DO i=1,nbp_lon |
---|
| 242 | lon_reg_deg = lon_reg(i)*180./RPI |
---|
| 243 | DO j=1,nbp_lat |
---|
| 244 | lat_reg_deg = lat_reg(j)*180./RPI |
---|
| 245 | IF ( lat_reg_deg.GE.xlat_min_vol(ieru)-dlat .AND. lat_reg_deg.LT.xlat_max_vol(ieru)+dlat .AND. & |
---|
| 246 | lon_reg_deg.GE.xlon_min_vol(ieru)-dlon .AND. lon_reg_deg.LT.xlon_max_vol(ieru)+dlon ) THEN |
---|
| 247 | ponde_lonlat_vol(ieru) = ponde_lonlat_vol(ieru) + 1 |
---|
| 248 | ENDIF |
---|
| 249 | ENDDO |
---|
| 250 | ENDDO |
---|
| 251 | IF(ponde_lonlat_vol(ieru) == 0) THEN |
---|
| 252 | WRITE(lunout,*) 'STRATAER_INIT ERROR: no grid point found for eruption ieru=',ieru |
---|
| 253 | ENDIF |
---|
| 254 | ENDDO !ieru |
---|
[4763] | 255 | |
---|
[4601] | 256 | WRITE(lunout,*) 'IN STRATAER_PONDE_INIT ponde_lonlat: ', ponde_lonlat_vol |
---|
[4763] | 257 | |
---|
[4601] | 258 | END SUBROUTINE strataer_ponde_init |
---|
[4763] | 259 | |
---|
[4601] | 260 | END MODULE strataer_emiss_mod |
---|