1- ! <AOD_PM_ml.f90 - A component of the EMEP MSC-W Chemical transport Model, version rv4_10(3282) >
1+ ! <AOD_PM_ml.f90 - A component of the EMEP MSC-W Chemical transport Model, version rv4.15 >
22! *****************************************************************************!
33! *
4- ! * Copyright (C) 2007-2016 met.no
4+ ! * Copyright (C) 2007-2017 met.no
55! *
66! * Contact information:
77! * Norwegian Meteorological Institute
@@ -94,7 +94,7 @@ module AOD_PM_ml
9494 ! assume rho_dry as SO4, Q and GF as SSc
9595type :: ExtEffMap
9696 integer :: itot,cext
97- endtype ExtEffMap
97+ end type ExtEffMap
9898
9999! xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
100100include ' CM_AerExt.inc'
@@ -223,8 +223,8 @@ module AOD_PM_ml
223223 [NUM_CEXT,NumRH,W1020- W340+1 ],order= [2 ,1 ,3 ])
224224
225225real ,parameter ,dimension (NUM_CEXT) :: &
226- Qm_Dabs= & ! (dry) mass absorption efficiency [m?/g] at 550 nm
227- [0.0 ,0.0 ,0.0 ,0.0 ,8.5 ,11.5 ,0.0 ,0.0 ,0.0 ], &
226+ ! Qm_Dabs= & ! (dry) mass absorption efficiency [m?/g] at 550 nm
227+ ! [0.0 ,0.0 ,0.0 ,0.0 ,8.5 ,11.5 ,0.0 ,0.0 ,0.0 ], &
228228 rho_dry= [2.6 ,2.6 ,2.2 ,2.2 ,1.0 ,1.0 ,1.8 ,1.6 ,1.6 ], &
229229 rad_eff= [0.80 ,4.5 ,0.80 ,5.73 ,0.039 ,0.039 ,0.087 ,0.156 ,5.73 ]
230230 ! 1:DDf 2:DDc 3:SSf 4:SSc 5:ECn 6:ECa 7:OC 8:SO4 9:NO3c
@@ -276,11 +276,11 @@ function Qm(mode,rh,wlen,debug) result(Qm_arr)
276276 ExtEff= MATMUL (Qm_ref(:,rh_n-1 :rh_n,wlen),rh_w) ! Extinction efficiencies
277277 if (debug) write (* ,' ((a15,9f10.3))' ) &
278278 ' ## GFs =' ,gf(:),' ## ExtEff=' ,ExtEff(:)
279- endif
279+ end if
280280
281281 case default
282282 call CheckStop(" Unknown extinction mode: " // trim (mode))
283- endselect
283+ end select
284284
285285 ! .. mass extinction efficiency [m2/g]
286286 ! beta = 3/4 * ExtEff/rho_wet/rad_eff * Mwet/Mdry
@@ -311,8 +311,8 @@ function rho_wet(nc)
311311! rho_wet = Vfr_dry*rho_dry + (1-Vfr_dry)*RHO_H2O
312312! = (rho_dry-RHO_H2O)/GF**3 + RHO_H2O
313313 rho_wet = (rho_dry(nc)- RHO_H2O)/ Gf(nc)** 3 + RHO_H2O
314- end function rho_wet
315- end function Qm
314+ end function rho_wet
315+ end function Qm
316316
317317function Qm_grp (gtot ,rh ,debug ) result(Qm_arr)
318318!- ----------------------------------------------------------------------!
@@ -337,14 +337,14 @@ function Qm_grp(gtot,rh,debug) result(Qm_arr)
337337 Qm_aux= Qm(" WET" ,rh ,W550,my_debug)
338338 else
339339 Qm_aux= Qm(" DRY" ,0.0 ,W550,my_debug)
340- endif
340+ end if
341341
342342 Qm_arr(:)= 0
343343 do n= 1 ,size (gtot)
344344 i= find_index(gtot(n),ExtMap(:)% itot,debug= my_debug)
345345 if (i> 0 )Qm_arr(n)= Qm_aux(i)
346- enddo
347- end function Qm_grp
346+ end do
347+ end function Qm_grp
348348
349349subroutine AOD_init (msg ,wlen ,out3d )
350350 character (len=* ), intent (in ) :: msg
@@ -359,22 +359,22 @@ subroutine AOD_init(msg,wlen,out3d)
359359 call CheckStop(n< 1 ,&
360360 trim (msg)// " Unknown AOD/EXT wavelength " // trim (wlen))
361361 wanted_wlen(n)= .true.
362- endif
362+ end if
363363 if (present (out3d))then
364364 wanted_ext3d= wanted_ext3d.or. out3d
365- endif
365+ end if
366366!- ----------------------------------------------------------------------!
367367! Consistency checks for older model versions using AOD_GROUP
368368!- ----------------------------------------------------------------------!
369369 if (.not. associated (aod_grp))then
370370 igrp= find_index(' AOD' ,chemgroups% name)
371371 if (igrp< 1 ) return ! AOD group no longer used... nothing to check
372- aod_grp= >chemgroups(igrp)% ptr
372+ aod_grp= >chemgroups(igrp)% specs
373373 call CheckStop(size (aod_grp),NUM_EXT,&
374374 trim (msg)// " Incompatibe AOD_GROUP size" )
375375 call CheckStop(any (aod_grp/= ExtMap% itot),&
376376 trim (msg)// " Incompatibe AOD_GROUP def." )
377- endif
377+ end if
378378!- ----------------------------------------------------------------------!
379379! Consistency checks for Qm_ref array
380380!- ----------------------------------------------------------------------!
@@ -394,17 +394,17 @@ subroutine AOD_init(msg,wlen,out3d)
394394 if (any (wanted_wlen(:)).and..not. allocated (AOD))then
395395 allocate (AOD(NUM_EXT,LIMAX,LJMAX,W340:W1020))
396396 AOD= 0.0
397- endif
397+ end if
398398 if (wanted_ext3d.and..not. allocated (Extin_coeff))then
399399 allocate (Extin_coeff(NUM_EXT,LIMAX,LJMAX,KMAX_MID,W340:W1020))
400400 Extin_coeff= 0.0
401- endif
401+ end if
402402 if (ANALYSIS.and..not. associated (SpecExtCross))then
403403 ! !wanted_wlen(W550)=.true. ! calculate 550nm for AOD assimilation
404404 allocate (SpecExtCross(NUM_EXT,KMAX_MID,LIMAX,LJMAX,W340:W1020))
405405 SpecExtCross= 0.0
406- endif
407- end subroutine AOD_init
406+ end if
407+ end subroutine AOD_init
408408
409409subroutine AOD_Ext (i ,j ,debug )
410410!- ----------------------------------------------------------------------!
@@ -426,11 +426,11 @@ subroutine AOD_Ext(i,j,debug)
426426 call CheckStop(USE_AOD.and..not. any (wanted_wlen(:)),&
427427 " USE_AOR=T, but no AOD/EXT output. Check config_*.nml" )
428428 first_call= .false.
429- endif
429+ end if
430430 if (debug)then
431431 write (* ,* ) ' #### in AOD module ###'
432432 AOD_cext(:)= 0.0
433- endif
433+ end if
434434
435435 ! ===========================================================================
436436 ! Extinction coefficients:
@@ -464,19 +464,19 @@ subroutine AOD_Ext(i,j,debug)
464464 ! .. Extinction coefficients for diferent optical groups/types
465465 do n = 1 ,NUM_CEXT
466466 kext_cext(n)= sum (kext(:),MASK= (ExtMap(:)% cext== n))
467- enddo
467+ end do
468468 ! .. Aerosol optical depth for individual components
469469 AOD_cext(:)= AOD_cext(:)+ kext_cext(:)* (z_bnd(i,j,k)- z_bnd(i,j,k+1 ))
470470
471471 if ((k== KCHEMTOP+1 ).or. (k== KMAX_MID))&
472472 write (* ," (a8,'(',i3,')=',es10.3,'=',9(es10.3,:,'+'))" ) &
473473 ' EXTINCs' , k, sum (kext(:)),kext_cext(:)
474- endif
475- enddo
476- enddo
474+ end if
475+ end do
476+ end do
477477
478478 if (debug) write (* ," (a24,2i5,es10.3,'=',9(es10.3,:,'+'))" ) &
479479 ' >>> AOD / AODs <<<' , i_fdom(i), j_fdom(j), sum (AOD(:,i,j,W550)), AOD_cext(:)
480- end subroutine AOD_Ext
480+ end subroutine AOD_Ext
481481endmodule AOD_PM_ml
482482
0 commit comments