emission_dust.F90 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015
  1. !
  2. #define TRACEBACK write (gol,'("in ",a," (",a,", line",i5,")")') rname, __FILE__, __LINE__; call goErr
  3. #define IF_NOTOK_RETURN(action) if (status/=0) then; TRACEBACK; action; return; end if
  4. #define IF_ERROR_RETURN(action) if (status> 0) then; TRACEBACK; action; return; end if
  5. #define IF_NOTOK_MDF(action) if (status/=0) then; TRACEBACK; action; call MDF_CLose(dust_FileID,status); status=1; return; end if
  6. !
  7. #include "tm5.inc"
  8. !
  9. !-----------------------------------------------------------------------------
  10. ! TM5 !
  11. !-----------------------------------------------------------------------------
  12. !BOP
  13. !
  14. ! !MODULE: EMISSION_DUST
  15. !
  16. ! !DESCRIPTION:
  17. !\\
  18. !
  19. ! AEROCOM emissions
  20. ! -----------------
  21. !
  22. ! Example of file content:
  23. !
  24. ! netcdf dust200001 {
  25. ! dimensions:
  26. ! longitude = 360 ;
  27. ! latitude = 180 ;
  28. ! time = 31 ;
  29. !
  30. ! variables:
  31. ! float longitude(longitude) ;
  32. ! longitude:TITLE = "longitude" ;
  33. ! longitude:UNITS = "degrees_east" ;
  34. ! float latitude(latitude) ;
  35. ! latitude:TITLE = "latitude" ;
  36. ! latitude:UNITS = "degrees_north" ;
  37. ! float time(time) ;
  38. ! time:TITLE = "day in Jan" ;
  39. ! float gridbox_area(latitude, longitude) ;
  40. ! gridbox_area:TITLE = "total area in gridbox" ;
  41. ! gridbox_area:UNITS = "m2/gridbox" ;
  42. ! float total_flux(time, latitude, longitude) ;
  43. ! total_flux:TITLE = "total daily_dust_flux" ;
  44. ! total_flux:UNITS = "kg/gridbox" ;
  45. ! float mode2_radius(time, latitude, longitude) ;
  46. ! mode2_radius:TITLE = "number mode-radius for log-normal distr. (std.dev=1.59) for accumu mode" ;
  47. ! mode2_radius:UNITS = "um" ;
  48. ! float mode3_radius(time, latitude, longitude) ;
  49. ! mode3_radius:TITLE = "number mode-radius for log-normal distr. (std.dev=2.00) for coarse mode" ;
  50. ! mode3_radius:UNITS = "um" ;
  51. ! float mode2_number(time, latitude, longitude) ;
  52. ! mode2_number:TITLE = "daily dust particles in accumu mode (.1-1um)" ;
  53. ! mode2_number:UNITS = "number/gridbox" ;
  54. ! float mode3_number(time, latitude, longitude) ;
  55. ! mode3_number:TITLE = "daily dust particles in coarse mode (1-6um)" ;
  56. ! mode3_number:UNITS = "number/gridbox" ;
  57. ! float mode2_flux(time, latitude, longitude) ;
  58. ! mode2_flux:TITLE = "daily dust flux in accumu mode (0.1-1um sizes)" ;
  59. ! mode2_flux:UNITS = "kg/gridbox" ;
  60. ! float mode3_flux(time, latitude, longitude) ;
  61. ! mode3_flux:TITLE = "daily dust flux in coarse mode (1-6um sizes)" ;
  62. ! mode3_flux:UNITS = "kg/gridbox" ;
  63. !
  64. ! // global attributes:
  65. ! :filename = "ginoux2000_dust.nc" ;
  66. ! :title = "daily dust fluxes for Jan 2000" ;
  67. ! :history = "created by S.Kinne Nov/2003" ;
  68. ! :institution = "MPI-Meteorology, Hamburg" ;
  69. ! }
  70. !
  71. !
  72. ! Dust emissions Tegen/Vignati
  73. ! ----------------------------
  74. !
  75. ! From the 'readme.txt' that accompanies the files:
  76. !
  77. ! "Dust emission fields are prepared using an application of the
  78. ! Ina Tegen model (Tegen et al. JGR 107, D21, 2002),
  79. ! extended by B. Heinhold (JGR, 112, 2007)
  80. ! and adapted by E. Vignati using the ECMWF fields as input,
  81. ! so they are coherent with the TM5 input.
  82. !
  83. ! The work of Tegen et al. (2002) is heavily based on
  84. ! Marticorena and Bergametti (JGR, 1995) - MB95
  85. !
  86. ! The fields are prepared without the soil moisture because
  87. ! it was not trivial to use the proper fields available in the
  88. ! TM5 ECMWF fields.
  89. !
  90. ! Please contact Elisabetta Vignati (elisabetta.vignati@jrc.it)
  91. ! for a proper ackowlegment to use in case the fields are used
  92. ! for publication."
  93. !
  94. ! Example of file content:
  95. !
  96. ! netcdf dust200201 {
  97. ! dimensions:
  98. ! lon = 360 ;
  99. ! lat = 180 ;
  100. ! time = 31 ;
  101. ! nmonth = 1 ;
  102. !
  103. ! variables:
  104. ! float mode2_mass(time, lat, lon) ;
  105. ! float mode2_number(time, lat, lon) ;
  106. ! float mode3_mass(time, lat, lon) ;
  107. ! float mode3_number(time, lat, lon) ;
  108. ! float lon(lon) ;
  109. ! lon:units = "[degrees from -180]" ;
  110. ! float lat(lat) ;
  111. ! lat:units = "[degrees from -90]" ;
  112. ! float gridbox_area(lat, lon) ;
  113. ! gridbox_area:units = "[square m]" ;
  114. ! float days(time) ;
  115. ! days:units = "[day/month]" ;
  116. !
  117. ! // global attributes:
  118. ! :filename = "E:\\global_emissions\\dust_online\\dust200201.nc" ;
  119. ! :lat = 180 ;
  120. ! :lon = 360 ;
  121. ! :nmonth = 1 ;
  122. ! :days = 31 ;
  123. ! :message = "dust for each mode mass in kg/gridbox and number in number/gridbox daily fields" ;
  124. ! }
  125. !
  126. !
  127. !
  128. ! Online dust emissions based on Tegen/Vignati/Strunk
  129. ! ---------------------------------------------------
  130. !
  131. ! Please read the section above for background information about the underlying
  132. ! approach. An improved and modified online implementation has been accomplished
  133. ! from which. It can be activated by setting
  134. !
  135. ! input.emis.dust : ONLINE
  136. !
  137. ! in the rc-file. An additional netcdf file is needed for some input parameters.
  138. ! The path to which needs to be defined in the key
  139. !
  140. ! input.emis.dust.dir : /ms_perm/TM/TM5/emissions/other/Dust_online/onlinedust.nc
  141. !
  142. ! For every time step there will be particles emitted, scaled to monthly
  143. ! amounts (both mass and numbers) in order to keep compliance with assumptions
  144. ! about the aerosol emissions in sedimentation.F90.
  145. !
  146. !-----------------------------------------------------------------------
  147. !\\
  148. ! !INTERFACE:
  149. !
  150. MODULE EMISSION_DUST
  151. !
  152. ! !USES:
  153. !
  154. USE dims, ONLY : okdebug, nlon360, nlat180
  155. USE GO, ONLY : gol, goErr, goPr
  156. USE global_types, ONLY : d3_data, emis_data
  157. USE tm5_distgrid, ONLY : dgrid, get_distgrid, scatter, gather
  158. USE partools, ONLY : isRoot
  159. USE mo_aero_m7, ONLY : ddust
  160. USE emission_data, ONLY : emis_input_dir_dust, emis_input_dust
  161. USE meteodata, ONLY : tv_dat, sd_dat, lsmask_dat
  162. USE meteodata, ONLY : wspd_dat, nveg
  163. USE meteodata, ONLY : spm_dat, t2m_dat
  164. IMPLICIT NONE
  165. PRIVATE
  166. !
  167. ! !PUBLIC MEMBER FUNCTIONS:
  168. !
  169. PUBLIC :: calc_emission_dust ! online computation
  170. PUBLIC :: emission_dust_declare !
  171. PUBLIC :: emission_dust_init
  172. PUBLIC :: emission_dust_done
  173. PUBLIC :: read_emission_dust
  174. !
  175. ! !PRIVATE DATA MEMBERS:
  176. !
  177. CHARACTER(len=*), PARAMETER :: mname = 'emission_dust'
  178. INTEGER :: dust_FileID ! file id for input parameters
  179. ! parameters for online emission input file ("onlinedust.nc")
  180. ! fields on 1x1 deg grid
  181. INTEGER, PARAMETER :: nsoilph = 5, &
  182. nfpar = 12, &
  183. nz0 = 13 ! number of {soilph, par, z0} fields
  184. ! entry nz0 indicates the annual mean.
  185. REAL, DIMENSION(:,:), ALLOCATABLE :: soil_type, pot_source, cult
  186. REAL, DIMENSION(:,:,:), ALLOCATABLE :: z0, fpar, soilph
  187. ! local arrays during runtime
  188. REAL, DIMENSION(:), ALLOCATABLE :: Uth
  189. REAL, DIMENSION(:,:), ALLOCATABLE :: srel, srelV, su_srelV
  190. REAL, DIMENSION(:,:), ALLOCATABLE :: snowcover, desert, umin2, alpha, c_eff, area, lai_eff
  191. REAL, DIMENSION(:,:), ALLOCATABLE :: fnum_ai, flux_ai, fnum_ci, flux_ci
  192. !REAL, DIMENSION(:), ALLOCATABLE :: fluxtyp, dpk
  193. REAL, DIMENSION(:), ALLOCATABLE :: fluxtyp
  194. !REAL, DIMENSION(:), ALLOCATABLE :: dbmin, dbmax, fluxtot, fdust
  195. REAL, DIMENSION(:), ALLOCATABLE :: fluxtot, fdust
  196. !
  197. ! !REVISION HISTORY:
  198. ! 2005 - Elisabetta Vignati - changed for coupling with M7
  199. ! 1 Oct 2010 - Achim Strunk - added Tegen-Vignati option
  200. ! Nov 2011 - Achim Strunk - included online dust emissions
  201. ! 26 Jun 2012 - Ph. Le Sager - adapted for lon-lat MPI domain decomposition
  202. ! 1 Jul 2013 - Ph. Le Sager - added init routine
  203. ! April 2015 - T. van Noije - corrections in online dust emissions
  204. !
  205. ! !REMARKS:
  206. !
  207. !EOP
  208. !------------------------------------------------------------------------
  209. CONTAINS
  210. !--------------------------------------------------------------------------
  211. ! TM5 !
  212. !--------------------------------------------------------------------------
  213. !BOP
  214. !
  215. ! !IROUTINE: EMISSION_DUST_INIT
  216. !
  217. ! !DESCRIPTION:
  218. !\\
  219. !\\
  220. ! !INTERFACE:
  221. !
  222. SUBROUTINE EMISSION_DUST_INIT( status )
  223. !
  224. ! !USES:
  225. !
  226. USE dims, ONLY : iglbsfc
  227. USE meteo, ONLY : Set
  228. !
  229. ! !OUTPUT PARAMETERS:
  230. !
  231. INTEGER, INTENT(out) :: status
  232. !
  233. ! !REVISION HISTORY:
  234. ! 1 Jul 2013 - Ph Le Sager - v0
  235. !
  236. ! !REMARKS:
  237. !
  238. !EOP
  239. !------------------------------------------------------------------------
  240. !BOC
  241. integer :: iveg
  242. CALL set( lsmask_dat(iglbsfc), status, used=.TRUE. )
  243. CALL set( spm_dat(iglbsfc), status, used=.TRUE. )
  244. CALL set( t2m_dat(iglbsfc), status, used=.TRUE. )
  245. CALL set( sd_dat(iglbsfc), status, used=.TRUE. )
  246. CALL set( wspd_dat(iglbsfc), status, used=.TRUE. )
  247. DO iveg = 1, nveg
  248. CALL set( tv_dat(iglbsfc,iveg), status, used=.TRUE. )
  249. END DO
  250. END SUBROUTINE EMISSION_DUST_INIT
  251. !EOC
  252. !--------------------------------------------------------------------------
  253. ! TM5 !
  254. !--------------------------------------------------------------------------
  255. !BOP
  256. !
  257. ! !IROUTINE: CALC_EMISSION_DUST
  258. !
  259. ! !DESCRIPTION: online dust computation. See module !DESCRIPTION above.
  260. !\\
  261. !\\
  262. ! !INTERFACE:
  263. !
  264. SUBROUTINE CALC_EMISSION_DUST( status )
  265. !
  266. ! !USES:
  267. !
  268. USE dims, ONLY : newday, idate, iglbsfc, sec_month, im, jm, lm, nregions
  269. USE toolbox, ONLY : coarsen_emission
  270. USE partools, ONLY : localComm, MPI_INFO_NULL
  271. USE chem_param, ONLY : mode_aci, mode_coi
  272. USE emission_data, ONLY : emis_mass, emis_number, emis_temp, msg_emis
  273. USE emission_data, ONLY : vd_class_name_len, emission_vdist_by_sector
  274. USE binas, ONLY : rgas, xmair
  275. USE binas, ONLY : grav, vkarman, pi
  276. USE MDF, ONLY : MDF_Open, MDF_Close, MDF_Inq_VarID
  277. USE MDF, ONLY : MDF_Get_Var, MDF_READ, MDF_NETCDF4
  278. USE mo_aero_m7, ONLY : iacci, icoai, sigma
  279. !
  280. ! !OUTPUT PARAMETERS:
  281. !
  282. INTEGER, INTENT(out) :: status
  283. !
  284. ! !REVISION HISTORY:
  285. ! Nov 2011 - Achim Strunk - v0
  286. ! 5 Jul 2012 - Ph. Le Sager - adapted for lon-lat MPI domain decomposition
  287. !
  288. ! !REMARKS:
  289. ! (1) this routine is basically the "declare" routine for the ONLINE case.
  290. !
  291. !EOP
  292. !------------------------------------------------------------------------
  293. !BOC
  294. CHARACTER(len=*), PARAMETER :: rname = mname//'/calc_emission_dust'
  295. ! --- local ----------------------------------------
  296. REAL, DIMENSION(:,:), ALLOCATABLE :: glb_arr
  297. TYPE(d3_data), DIMENSION(nregions) :: emis3d
  298. TYPE(emis_data), DIMENSION(nregions) :: emis_glb
  299. CHARACTER(len=vd_class_name_len) :: splittype
  300. INTEGER :: imr, jmr, lmr, imode
  301. !INTEGER, PARAMETER :: amonth = 2
  302. ! parameters for online dust calculations
  303. INTEGER, PARAMETER :: ntraced=8 ! number of coarse-grained bins
  304. ! in the original emission model
  305. INTEGER, PARAMETER :: nbin=24 ! number of discretization points per bin
  306. INTEGER, PARAMETER :: nclass=ntraced*nbin ! total number of discretization points
  307. INTEGER, PARAMETER :: nats=12 ! number of soil types
  308. INTEGER, PARAMETER :: nmode=4 ! number of particle size distributions in soils,
  309. ! which distinguishes between clay, silt,
  310. ! medium/fine sand, and coarse sand
  311. INTEGER, PARAMETER :: nspe=nmode*3+2 ! for explanation, see below
  312. ! Constants used in the parameterization of the efficient friction velocity ratio,
  313. ! see Eqs. (17-20) in MB95:
  314. REAL, PARAMETER :: aeff=0.35
  315. REAL, PARAMETER :: xeff=10.
  316. !
  317. ! -- scaling factor for threshold friction velocity
  318. ! u1fac is a tuning parameter necessary to obtain a reasonable global annual
  319. ! emission amount. u1fac < 1 is used to reduce the threshold friction
  320. ! velocity. In ECHAM-HAM simulations at T63 values of 0.86 and 0.56 were
  321. ! used by Cheng et al. (ACP, 2008). The lower value was introduced to
  322. ! increase emissions when surface roughness lengths were increased from a
  323. ! constant value of 0.001 cm to values based on satellite measurements from
  324. ! Prigent et al. (JGR, 2005). It is unclear where the value 0.66 specified
  325. ! below is based on. In ECHAM-HAM2 (Zhang et al., ACP, 2012) the satellite
  326. ! based surface roughness values were abandoned again.
  327. REAL, PARAMETER :: u1fac=0.6 ! 0.7 in EC-Earth 3.2.3
  328. REAL, PARAMETER :: cd=1.2507E-06 ! flux dimensioning parameter [g s^2/cm^4]
  329. !<<< TvN ! (=roa/(grav*1.e2))
  330. ! ustar_min is not used:
  331. !REAL, PARAMETER :: ustar_min=5. ! min. fricton velocity (cm/s)
  332. ! minimum surface roughness length z0 (cm)
  333. ! The minimum value in the data set
  334. ! from Prigent et al. is 1e-3 cm.
  335. ! but that seems very low.
  336. ! For instance, the minimum value in the
  337. ! measurements used in the regression
  338. ! in that study is 2.3e-3 cm.
  339. ! Also, at very low z0, volume scattering
  340. ! of the microwave radiation will take place
  341. ! that can significantly decrease the radar
  342. ! backscatter coefficient (p. 8).
  343. ! Furthermore, using 1e-3 cm leads to
  344. ! an overestimation of AOD (compared to MODIS)
  345. ! in the areas concerned,
  346. ! in particular around the dust hot spots
  347. ! of the Sahara (using current u1fac value).
  348. ! For these reasons the minimum value
  349. ! has been increased.
  350. !REAL, PARAMETER :: z0_min=1.e-3
  351. !REAL, PARAMETER :: z0_min=5.e-3
  352. REAL, PARAMETER :: z0_min=1.e-2
  353. !REAL, PARAMETER :: z0_min=2.e-2
  354. !<<< TvN
  355. REAL, PARAMETER :: lai_lim=0.25
  356. REAL, PARAMETER :: lai_lim2=0.5
  357. ! d_thrsld [cm^2.5] = 0.006/(ddust * grav*1.e2) with ddust = 2.65 g/cm^3,
  358. ! see Eq. (4) in MB95:
  359. REAL, PARAMETER :: d_thrsld=2.31e-6 ! threshold value
  360. !>>> TvN
  361. ! There are eight coarse-grained size bins,
  362. ! of which only the first four are used here.
  363. ! According to Tegen et al., Heinold et al.,
  364. ! the radius boundaries of the first seven bins are
  365. ! at 0.1, 0.3, 0.9, 2.6, 8.0, 24, 72, and 220 um.
  366. ! However, these number don't seem to be exact.
  367. ! Since there is a constant ratio between the right
  368. ! and low boundaries, it seems this ratio is 3.0.
  369. ! Indeed, in Laurent et al. (JGR, 2010),
  370. ! 2.6 is corrected to 2.7, which would be consistent
  371. ! with 8.0/3.0 = 2.67.
  372. ! This would imply that the radius boundaries are at
  373. ! 0.0987654 = 72./(3.^6), 0.296296, 0.889, 2.67, 8.0, 24, 72, 216,
  374. ! and 648 um.
  375. ! Next, each bin is discretized with 24 size points,
  376. ! where d(n+1) = d(n) * exp(Dstep).
  377. ! Thus, Dstep = ln(3.)/24 = 0.04577551202.
  378. ! Dmin is the diameter of the first size point,
  379. ! given by 2* 72./(3.^6)) * exp(0.5*Dstep) = 0.20210403762 um.
  380. ! Similarly, the last size point is at a diameter
  381. ! 2* 648. * exp(-0.5*Dstep) = 1266.67434757 um.
  382. !
  383. ! With the original bin settings,
  384. ! the number of size points is 191 not 192 (=8*24).
  385. !
  386. !REAL, PARAMETER :: Dmin=0.00002 ! minimum partic. diameter (cm)
  387. !REAL, PARAMETER :: Dmax=0.130 ! maximum partic. diameter (cm)
  388. !REAL, PARAMETER :: Dstep=0.0460517018598807 ! diameter increment
  389. REAL, PARAMETER :: Dmin=2.0210403762e-5 ! diameter (cm) at first discretization point
  390. REAL, PARAMETER :: Dmax=0.126667434757 ! diameter (cm) at last discretization point
  391. REAL, PARAMETER :: Dstep=0.04577551202 ! diameter increment in log-space
  392. !<<< TvN
  393. ! Constants in the parameterization of the Reynolds number,
  394. ! see Eq. (5) in MB95:
  395. REAL, PARAMETER :: a_rnolds=1331.647 ! Reynolds constant
  396. REAL, PARAMETER :: b_rnolds=0.38194 ! Reynolds constant
  397. REAL, PARAMETER :: x_rnolds=1.561228 ! Reynolds constant
  398. !
  399. ! Air density has been made variable,
  400. ! to account for orographic effects.
  401. ! Previously, a global value for the
  402. ! threshold friction velocity Uth was calculated.
  403. ! To keep its unit the same,
  404. ! roa is kept as a reference value,
  405. ! but its exact value is not important anymore.
  406. REAL, PARAMETER :: roa=0.001227 ! reference air density (g/cm^3)
  407. REAL :: rho_air ! variable air density (g/cm^3)
  408. REAL, PARAMETER :: airfac=1./rgas*xmair*1.e-6 ! factor for rho_air
  409. REAL :: airdens_ratio, airdens_ratio2
  410. !<<< TvN
  411. REAL, PARAMETER :: umin=13.75 ! minimum threshold friction velocity (cm/s)
  412. REAL, PARAMETER :: ZZ=1000. ! wind measurement height (cm)
  413. ! parameters for the grouping in 2 modes
  414. ! The code follows the ECHAM-HAM implementation
  415. ! of Stier et al. (JGR, 2005),
  416. ! where the emission distribution is
  417. ! fitted onto three log-normal modes
  418. ! corresponding to the accumulation, coarse and super-coarse mode.
  419. ! (see presentation E. Vignati, TM meeting, 6 June 2008).
  420. !
  421. ! According to Heinold et al.,
  422. ! the three largest dust bins
  423. ! are less important for long-range transport,
  424. ! so particles with radius larger than 24 um
  425. ! can safely be neglected.
  426. ! However, a substantial part of the emitted mass
  427. ! is carried by particles with a radius larger than 10 um
  428. ! (see Tegen et al., Table 5).
  429. !
  430. ! The amounts of mass emitted in the accumulation and coarse modes
  431. ! are calculated from the masses emitted in the bin model,
  432. ! using two size ranges:
  433. ! r1 from 0.0987654 to 0.296296 um, and
  434. ! r2 from 0.296296 to 8.0 um.
  435. !
  436. ! Boundaries for Acc. mode
  437. INTEGER, PARAMETER :: min_ai=1
  438. INTEGER, PARAMETER :: max_ai=1
  439. ! Boundaries for Coa. mode
  440. INTEGER, PARAMETER :: min_ci=2
  441. INTEGER, PARAMETER :: max_ci=4
  442. !
  443. ! These size ranges include only part of
  444. ! the mass in the accumulation and coarse modes.
  445. ! The corresponding mass fractions are given by
  446. ! mf(rmin,rmax) = 0.5*(
  447. ! erf(ln(rmax/mmr)/(sqrt(2)*ln(sigma)))-
  448. ! erf(ln(rmin/mmr)/(sqrt(2)*ln(sigma))) ),
  449. ! where mmr is the mass median radius.
  450. ! Applying this formula,
  451. ! we find the following numbers:
  452. ! mf_acc(0,0.0987654)=0.00219913
  453. ! mf_acc_r1=mf_acc(0.0987654,0.296296)=0.313758
  454. ! mf_acc_r2=mf_acc(0.296296,8.0)=0.684043
  455. ! mf_acc(0.296296,inf)=0.684043
  456. !
  457. ! mf_coa(0,0.296296)=0.00519991
  458. ! mf_coa_r1=mf_coa(0.0987654,0.296296)=0.00518309
  459. ! mf_coa_r2=mf_coa(0.296296,8.0)=0.980634
  460. ! mf_coa(8.0,inf)=0.0141665
  461. !
  462. REAL, PARAMETER :: mf_acc_r1 = 0.313758
  463. REAL, PARAMETER :: mf_acc_r2 = 0.684043
  464. REAL, PARAMETER :: mf_coa_r1 = 0.00518309
  465. REAL, PARAMETER :: mf_coa_r2 = 0.980634
  466. !
  467. ! Most importantly, r1 contains only about 31.4%
  468. ! of the mass in the accumulation mode!
  469. ! This implies that we cannot just put the emissions
  470. ! from r1 to the accumulation mode,
  471. ! and those from r2 to the coarse mode!
  472. !
  473. ! Instead, the modal emissions are determined
  474. ! by the following system of linear equations:
  475. ! mf_acc_r1 * flux_ai + mf_coa_r1 * flux_ci = flux_r1
  476. ! mf_acc_r2 * flux_ai + mf_coa_r2 * flux_ci = flux_r2,
  477. ! which relates the mass emitted in the ranges r1 and r2
  478. ! to the mass emitted in the accumulation and coarse modes.
  479. ! The solution is expressed using
  480. ! the following parameters:
  481. !
  482. REAL, PARAMETER :: ratio_coa = mf_coa_r1/mf_coa_r2
  483. REAL, PARAMETER :: ratio_acc = mf_acc_r2/mf_acc_r1
  484. REAL, PARAMETER :: denom_acc_inv = 1./(mf_acc_r1-ratio_coa*mf_acc_r2)
  485. REAL, PARAMETER :: denom_coa_inv = 1./(mf_coa_r2-ratio_acc*mf_coa_r1)
  486. REAL, PARAMETER :: mf_acc_r12_inv = 1./(mf_acc_r1+mf_acc_r2)
  487. REAL, PARAMETER :: mf_coa_r12_inv = 1./(mf_coa_r1+mf_coa_r2)
  488. !
  489. ! Source mass median radius (cm)
  490. ! Stier et al. (2005) uses very similar numbers
  491. ! for mass median radii,
  492. ! but uses 0.37 um for the accumulation mode.
  493. ! Thus, it seems these numbers are not mass mean,
  494. ! but mass median radii.
  495. !
  496. ! The super-coarse mode has
  497. ! a mass median radius of 15.0 and sigma=2.0,
  498. ! but is not included.
  499. !
  500. ! The AeroCom recommendation of Dentener et al. (ACP, 2006)
  501. ! is to use a number median radius
  502. ! of 0.65 um for the coarse mode,
  503. ! which corresponds to mass median radius of 2.75 um
  504. ! (the conversion factor is exp(3.0*ln(sigma)^2),
  505. ! see Zender, Particle Size Distributions:
  506. ! Theory and Application to Aerosols, Clouds, and Soils, 2002).
  507. !
  508. !REAL, PARAMETER :: mmr_ai=0.35E-4
  509. REAL, PARAMETER :: mmr_ai=0.37E-4
  510. REAL, PARAMETER :: mmr_ci=1.75E-4
  511. !<<< TvN
  512. !----------------------------------------------------------------
  513. ! SOIL CARACTERISTICS:
  514. ! ZOBLER texture classes
  515. !----------------------------------------------------------------
  516. INTEGER :: jp
  517. ! solspe includes for each soil type (first dimension)
  518. ! the mass median diameter (cm) and standard deviation (see Table 1, MB95)
  519. ! and the relative contribution (Table 2, MP95) for the four size populations.
  520. ! The two additional entries describe the saltation efficiency alpha (cm^-1),
  521. ! and the residual moisture, which is currently not used.
  522. ! Efficiencies are calculated as averages over the four populations
  523. ! (as in Eq. (8) in Marticorena et al. (JGR, 1997),
  524. ! where 1e-7, 1e-6 and 1e-5 cm^-1 is used for coarse sand,
  525. ! medium/fine sand and silt, respectively,
  526. ! and 1e-6 for clay for soils with clay fractions below 45%
  527. ! and 1e-7 for clay for soils with clay fractions above 45%.
  528. ! (Tegen et al.).
  529. DOUBLE PRECISION, DIMENSION(nats,nspe) :: solspe
  530. !-- soil type 1 : Coarse
  531. DATA (solspe(1,jp),jp=1,nspe)/ &
  532. 0.0707, 2., 0.43 , &
  533. 0.0158, 2., 0.4 , &
  534. 0.0015, 2., 0.17 , &
  535. 0.0002 ,2., 0. , &
  536. 2.1E-06, 0.2/
  537. !-- soil type 2 : Medium
  538. DATA (solspe(2,jp),jp=1,nspe)/ &
  539. 0.0707, 2., 0. , &
  540. 0.0158, 2., 0.37 , &
  541. 0.0015, 2., 0.33 , &
  542. 0.0002, 2., 0.3 , &
  543. 4.0e-6, 0.25/
  544. !-- soil type 3 : Fine
  545. DATA (solspe(3,jp),jp=1,nspe)/ &
  546. 0.0707, 2., 0. , &
  547. 0.0158, 2., 0. , &
  548. 0.0015, 2., 0.33 , &
  549. 0.0002, 2., 0.67 , &
  550. !>>> TvN
  551. ! 33% x 1e-5 + 67% x 1e-7 = 3.367e-6 cm^-1
  552. !1.E-07, 0.5/
  553. 3.4e-6, 0.5/
  554. !<<< TvN
  555. !-- soil type 4 : Coarse Medium
  556. DATA (solspe(4,jp),jp=1,nspe)/ &
  557. 0.0707, 2., 0.1 , &
  558. 0.0158, 2., 0.5 , &
  559. 0.0015, 2., 0.2 , &
  560. 0.0002, 2., 0.2 , &
  561. 2.7E-06, 0.23/
  562. !-- soil type 5 : Coarse Fine
  563. DATA (solspe(5,jp),jp=1,nspe)/ &
  564. 0.0707, 2., 0. , &
  565. 0.0158, 2., 0.5 , &
  566. 0.0015, 2., 0.12 , &
  567. 0.0002, 2., 0.38 , &
  568. !>>> TvN
  569. ! 50% x 1e-6 + 12% x 1e-5 + 38% x 1e-6 = 2.08e-6 cm^-1
  570. !2.8E-06, 0.25/
  571. 2.1e-6, 0.25/
  572. !<<< TvN
  573. !-- soil type 6 : Medium Fine
  574. DATA (solspe(6,jp),jp=1,nspe)/ &
  575. 0.0707, 2., 0. , &
  576. 0.0158, 2., 0.27 , &
  577. 0.0015, 2., 0.25 , &
  578. 0.0002, 2., 0.48 , &
  579. !>>> TvN
  580. ! 27% x 1e-6 + 25% x 1e-5 + 48% x 1e-7 = 2.818e-6 cm^-1
  581. !1e-07, 0.36/
  582. 2.8e-6, 0.36/
  583. !<<< TvN
  584. !-- soil type 7 : Coarse, Medium, Fine
  585. DATA (solspe(7,jp),jp=1,nspe)/ &
  586. 0.0707, 2., 0.23 , &
  587. 0.0158, 2., 0.23 , &
  588. 0.0015, 2., 0.19 , &
  589. 0.0002, 2., 0.35 , &
  590. 2.5E-06, 0.25/
  591. !-- soil type 8 : Organic
  592. DATA (solspe(8,jp),jp=1,nspe)/ &
  593. 0.0707, 2., 0.25 , &
  594. 0.0158, 2., 0.25 , &
  595. 0.0015, 2., 0.25 , &
  596. 0.0002, 2., 0.25 , &
  597. 0., 0.5/
  598. !-- soil type 9 : Ice
  599. DATA (solspe(9,jp),jp=1,nspe)/ &
  600. 0.0707, 2., 0.25 , &
  601. 0.0158, 2., 0.25 , &
  602. 0.0015, 2., 0.25 , &
  603. 0.0002, 2., 0.25 , &
  604. 0., 0.5/
  605. !-- soil type 10 : Potential Lakes (additional)
  606. ! GENERAL CASE
  607. DATA (solspe(10,jp),jp=1,nspe)/ &
  608. 0.0707, 2., 0. , &
  609. 0.0158, 2., 0. , &
  610. 0.0015, 2., 1. , &
  611. 0.0002, 2., 0. , &
  612. 1.E-05, 0.25/
  613. !-- soil type 11 : Potential Lakes (clay)
  614. ! GENERAL CASE
  615. DATA (solspe(11,jp),jp=1,nspe)/ &
  616. 0.0707, 2., 0. , &
  617. 0.0158, 2., 0. , &
  618. 0.0015, 2., 0. , &
  619. 0.0002, 2., 1. , &
  620. 1.E-05, 0.25/
  621. !-- soil type 12 : Potential Lakes Australia
  622. DATA (solspe(12,jp),jp=1,nspe)/ &
  623. 0.0707, 2., 0. , &
  624. 0.0158, 2., 0. , &
  625. 0.0027, 2., 1. , &
  626. 0.0002, 2., 0. , &
  627. 1.E-05, 0.25/
  628. INTEGER, PARAMETER :: add_field = 0
  629. REAL :: veget, lai_max, lai_avg, lai_cur, z0s, dpd, flux_diam, cultfac1, dlast
  630. REAL :: aaa, bb, ccc, ff, feff, dbstart, dp, uthp, wind10m, ustar
  631. REAL :: xk, ddd, ee, stotal, stotalV, fdp1, fdp2
  632. REAL :: su, suV, su_loc, su_locV, xl, xm, xn, xnv
  633. REAL :: flux_r1, flux_r2
  634. INTEGER :: istat, nd, nsi, nm, np, ns, region, var_id, sds_id
  635. INTEGER :: i, j, i_s1, i_s11, i_s111, idust, lai_flag, month, kk, iveg
  636. INTEGER :: kkk, kfirst, kkmin, nn
  637. INTEGER :: i01, j01, i02, j02
  638. INTEGER :: i1, j1, i2, j2, access_mode
  639. ! for newsrun
  640. CHARACTER(len=200) :: dust_filename, var_name
  641. REAL, DIMENSION(:), ALLOCATABLE :: su_class, su_classv, utest
  642. REAL, DIMENSION(:,:,:), ALLOCATABLE :: global_3d
  643. REAL, DIMENSION(:,:), ALLOCATABLE :: global_2d
  644. ! saving the status of being called
  645. LOGICAL, SAVE :: initial = .TRUE.
  646. ! ------------ start ------------------------------
  647. ! only valid for online method
  648. IF( TRIM( emis_input_dust ) /= 'ONLINE' ) RETURN
  649. ! MPI tile bounds of 1x1
  650. CALL get_distgrid( dgrid(iglbsfc), I_STRT=i01, I_STOP=i02, J_STRT=j01, J_STOP=j02 )
  651. ! =========================== INIT
  652. IF( initial ) THEN
  653. ! global fields, which have to be available throughout the whole
  654. ! online emission procedure
  655. ALLOCATE( uth( nclass ) )
  656. ALLOCATE( srel ( nats, nclass ) )
  657. ALLOCATE( srelV( nats, nclass ) )
  658. ALLOCATE( su_srelV( nats, nclass ) )
  659. ! gridded 1x1 fields from input file
  660. ALLOCATE( soil_type ( i01:i02, j01:j02 ) )
  661. ALLOCATE( pot_source( i01:i02, j01:j02 ) )
  662. ALLOCATE( cult ( i01:i02, j01:j02 ) )
  663. ALLOCATE( area ( i01:i02, j01:j02 ) )
  664. ALLOCATE( z0 ( i01:i02, j01:j02, nz0 ) )
  665. ALLOCATE( fpar ( i01:i02, j01:j02, nfpar ) )
  666. ALLOCATE( soilph ( i01:i02, j01:j02, nsoilph ) )
  667. ! additional 1x1 fields
  668. ALLOCATE( snowcover( i01:i02, j01:j02 ) )
  669. ALLOCATE( desert ( i01:i02, j01:j02 ) )
  670. ALLOCATE( umin2 ( i01:i02, j01:j02 ) )
  671. ALLOCATE( alpha ( i01:i02, j01:j02 ) )
  672. ALLOCATE( c_eff ( i01:i02, j01:j02 ) )
  673. ALLOCATE( lai_eff ( i01:i02, j01:j02 ) )
  674. ! only needed within "initial"
  675. ALLOCATE( su_class ( nclass ) )
  676. ALLOCATE( su_classv( nclass ) )
  677. ALLOCATE( utest ( nats ) )
  678. ! ---------------------------------------------
  679. ! read input file
  680. ! ---------------------------------------------
  681. dust_filename = TRIM(emis_input_dir_dust)//'/onlinedust_4.nc'
  682. WRITE(gol,'("Opening dust emission input file for ONLINE option: ",a)') dust_filename; CALL goPr
  683. IF (isRoot) THEN
  684. ! open file as source for information on 1x1 grid
  685. CALL MDF_Open( TRIM(dust_fileName), MDF_NETCDF4, MDF_READ, dust_FileID, status )
  686. IF_NOTOK_RETURN(status=1)
  687. ELSE
  688. ALLOCATE( global_3d(1,1,1) )
  689. ENDIF
  690. ! --- surface roughness (3d)
  691. IF (isRoot) THEN
  692. ALLOCATE( global_3d( nlon360, nlat180, nz0) )
  693. CALL MDF_Inq_VarID ( dust_FileID, 'z0', var_id, status ) ; IF_NOTOK_MDF()
  694. CALL MDF_Get_Var ( dust_FileID, var_id, global_3d, status ) ; IF_NOTOK_MDF()
  695. ENDIF
  696. CALL SCATTER ( dgrid(iglbsfc), z0, global_3d, 0, status)
  697. IF_NOTOK_RETURN(status=1)
  698. if (isRoot) DEALLOCATE( global_3d )
  699. ! --- soilph (3d)
  700. IF (isRoot) THEN
  701. ALLOCATE( global_3d( nlon360, nlat180, nsoilph) )
  702. CALL MDF_Inq_VarID ( dust_FileID, 'soilph', var_id, status ) ; IF_NOTOK_MDF()
  703. CALL MDF_Get_Var ( dust_FileID, var_id, global_3d, status ) ; IF_NOTOK_MDF()
  704. ENDIF
  705. CALL SCATTER ( dgrid(iglbsfc), soilph, global_3d, 0, status)
  706. IF_NOTOK_RETURN(status=1)
  707. if (isRoot) DEALLOCATE( global_3d )
  708. ! --- fpar (3d)
  709. IF (isRoot) THEN
  710. ALLOCATE( global_3d( nlon360, nlat180, nfpar) )
  711. CALL MDF_Inq_VarID ( dust_FileID, 'fpar', var_id, status ) ; IF_NOTOK_MDF()
  712. CALL MDF_Get_Var ( dust_FileID, var_id, global_3d, status ) ; IF_NOTOK_MDF()
  713. ENDIF
  714. CALL SCATTER ( dgrid(iglbsfc), fpar, global_3d, 0, status)
  715. IF_NOTOK_RETURN(status=1)
  716. DEALLOCATE( global_3d ) ! done for all
  717. ! -- other fields are 2D
  718. IF (isRoot) THEN
  719. ALLOCATE( global_2d( nlon360, nlat180) )
  720. ELSE
  721. ALLOCATE( global_2d(1,1) )
  722. ENDIF
  723. ! soiltype (2d)
  724. IF (isRoot) THEN
  725. CALL MDF_Inq_VarID ( dust_FileID, 'soiltype', var_id, status ) ; IF_NOTOK_MDF()
  726. CALL MDF_Get_Var ( dust_FileID, var_id, global_2d, status ) ; IF_NOTOK_MDF()
  727. ENDIF
  728. CALL SCATTER ( dgrid(iglbsfc), soil_type, global_2d, 0, status)
  729. IF_NOTOK_RETURN(status=1)
  730. ! potsrc
  731. IF (isRoot) THEN
  732. CALL MDF_Inq_VarID ( dust_FileID, 'potsrc', var_id, status ) ; IF_NOTOK_MDF()
  733. CALL MDF_Get_Var ( dust_FileID, var_id, global_2d, status ) ; IF_NOTOK_MDF()
  734. ENDIF
  735. CALL SCATTER ( dgrid(iglbsfc), pot_source, global_2d, 0, status)
  736. IF_NOTOK_RETURN(status=1)
  737. ! cult
  738. IF (isRoot) THEN
  739. CALL MDF_Inq_VarID ( dust_FileID, 'cult', var_id, status ) ; IF_NOTOK_MDF()
  740. CALL MDF_Get_Var ( dust_FileID, var_id, global_2d, status ) ; IF_NOTOK_MDF()
  741. ENDIF
  742. CALL SCATTER ( dgrid(iglbsfc), cult, global_2d, 0, status)
  743. IF_NOTOK_RETURN(status=1)
  744. ! grid area
  745. IF (isRoot) THEN
  746. CALL MDF_Inq_VarID ( dust_FileID, 'area', var_id, status ) ; IF_NOTOK_MDF()
  747. CALL MDF_Get_Var ( dust_FileID, var_id, global_2d, status ) ; IF_NOTOK_MDF()
  748. ENDIF
  749. CALL SCATTER ( dgrid(iglbsfc), area, global_2d, 0, status)
  750. IF_NOTOK_RETURN(status=1)
  751. DEALLOCATE( global_2d ) ! done for all
  752. IF (isRoot) THEN
  753. CALL MDF_Close( dust_FileID, status )
  754. IF_NOTOK_RETURN(status=1)
  755. endif
  756. WRITE(gol,'("Closing dust emission input file")'); CALL goPr
  757. !---------------------------------------------------------------------------------------
  758. ! initializations
  759. !---------------------------------------------------------------------------------------
  760. uth = 0.
  761. srel = 0. ! fraction of the grid area correspondent to each soil population
  762. srelV = 0. ! fraction of volume
  763. su_srelV = 0.
  764. utest = 0.
  765. !---------------------------------------------------------------------------------------
  766. ! Uth calculation
  767. ! Threshold friction velocity dependent on the particle diameter
  768. ! following Eqs. (3-5) in MB95.
  769. !---------------------------------------------------------------------------------------
  770. nn = 0
  771. dp = Dmin
  772. DO WHILE( dp <= Dmax + 1E-05 )
  773. nn = nn + 1
  774. BB = a_rnolds * (dp ** x_rnolds) + b_rnolds
  775. XK = SQRT(ddust * grav*100. * dp / roa) ! grav should be in cm s-2
  776. CCC = SQRT(1. + d_thrsld /(dp ** 2.5))
  777. IF( BB < 10. ) THEN
  778. DDD = SQRT(1.928 * (BB ** 0.092) - 1.)
  779. Uth(nn) = 0.129 * XK * CCC / DDD
  780. ELSE
  781. EE = -0.0617 * (BB - 10.)
  782. FF = 1. -0.0858 * EXP(EE)
  783. Uth(nn) = 0.12 * XK * CCC * FF
  784. END IF
  785. dp = dp * EXP(Dstep)
  786. END DO
  787. !---------------------------------------------------------------------------------------
  788. ! surface calculation - calculation of the soil size distribution
  789. ! Through all soil particle diameter the calculation of the relative contribution
  790. ! in surface and volume of the soil population independently of the grid
  791. !---------------------------------------------------------------------------------------
  792. DO ns = 1, nats ! soil types
  793. Stotal = 0.
  794. StotalV = 0.
  795. su_class = 0.
  796. su_classV = 0.
  797. kk = 0
  798. dp = Dmin
  799. DO WHILE( dp <= Dmax + 1.0E-5 )
  800. kk = kk + 1
  801. su = 0.
  802. suV = 0.
  803. DO nm = 1, Nmode ! particle size populations in soils
  804. nd = ((nm - 1) *3 ) + 1 ! index to mass median diameter
  805. nsi = nd + 1 ! index to standard deviation
  806. np = nd + 2 ! index to relative contribution
  807. !
  808. ! based on soil type and contribution of population of the soil type the soil size
  809. ! distribution population is calculated
  810. !
  811. !>>> TvN
  812. ! Bug in the original code: nd should be np
  813. ! Since solspe(ns,nd) is never zero
  814. ! and the final result is proportional to solspe(ns,np),
  815. ! the bug has no impact on the results.
  816. !IF (solspe(ns,nd).EQ.0.) THEN
  817. IF (solspe(ns,np).EQ.0.) THEN
  818. !<<< TvN
  819. su_loc = 0.
  820. su_locV=0.
  821. ELSE
  822. xk = solspe(ns,np)/(SQRT(2.* pi)*LOG(solspe(ns,nsi)))
  823. xl = ( (LOG(dp) - LOG( solspe(ns,nd ) ))**2 ) / &
  824. (2.*(LOG( solspe(ns,nsi) ))**2 )
  825. xm = xk * EXP(-xl) ! value of the lognormal mass size distribution
  826. ! dM/dln(dp) in Eq. (29) in MB95
  827. ! (Aerosol Sci. Technol., 1994)
  828. xn = ddust*(2./3.)*(dp/2.) ! surface
  829. ! cf. the denominator in Eq. (30) in MB95
  830. ! The factor 2 difference is irrelevant,
  831. ! since only relative contributions are used.
  832. xnV = 1. !volume
  833. su_loc = (xm*Dstep/xn) ! Eq. (30) in MB95
  834. su_locV = (xm*Dstep/xnV)
  835. END IF !
  836. su = su + su_loc
  837. suV = suV + su_locV
  838. END DO !Nmode
  839. su_class(kk) = su
  840. su_classV(kk) = suV
  841. Stotal = Stotal + su
  842. StotalV = StotalV + suV
  843. dp = dp * EXP(Dstep)
  844. END DO !dp
  845. DO nn = 1,Nclass
  846. IF (Stotal.EQ.0.)THEN
  847. srel (ns,nn) = 0.
  848. srelV(ns,nn) = 0.
  849. ELSE
  850. srel (ns,nn) = su_class(nn)/Stotal
  851. srelV (ns,nn) = su_classV(nn)/StotalV
  852. utest (ns ) = utest(ns)+srelV(ns,nn)
  853. su_srelV(ns,nn) = utest(ns)
  854. END IF
  855. END DO !j=1,nclass
  856. END DO !ns (soil type)
  857. DEALLOCATE( su_class, su_classV, utest )
  858. ! reset initial
  859. initial = .FALSE.
  860. END IF ! =========================== INIT
  861. ! only once per day
  862. IF( newday ) THEN
  863. ! calculation of snow cover from snow dept
  864. ! Tegen et al. fraction (0-1)
  865. snowcover = sd_dat(iglbsfc)%data(:,:,1) / 0.015
  866. WHERE( snowcover > 1. ) snowcover = 1.
  867. !---------------------------------------------------------------------------------------
  868. ! Prepare the flux calculation
  869. !---------------------------------------------------------------------------------------
  870. !
  871. ! Calculations done on monthly fields
  872. ! default: no dust source due to
  873. ! - vegetation
  874. ! - not a desert pixel or
  875. ! - no pure land grid cell
  876. lai_eff = 0.
  877. ! per grid box
  878. DO j=j01, j02
  879. DO i=i01, i02
  880. !---------------------------------------------------------------------------------------
  881. ! Selection of potential dust sources areas
  882. !---------------------------------------------------------------------------------------
  883. ! Preferential Sources = Potential lakes
  884. !>>> TvN
  885. ! If monthly surface roughness is not available
  886. ! use the annual mean value, if available.
  887. ! Since the annual mean is calculated
  888. ! based on all available months,
  889. ! it has a much better spatial coverage
  890. ! than the individual months.
  891. IF( z0(i,j,idate(2)) <= 0. .AND. z0(i,j,nz0) > 0. ) THEN
  892. z0(i,j,idate(2)) = z0(i,j,nz0)
  893. ENDIF
  894. !<<< TvN
  895. IF( pot_source(i,j) > 0.5 ) THEN
  896. ! if the potential lake area is > 50%, it is a pot. lake grid
  897. soil_type(i,j) = 10.
  898. !>>> TvN
  899. ! Use minimum value for roughness length.
  900. ! Since there are only few potential source areas
  901. ! where the annual mean is not available,
  902. ! this will only have a limited impact.
  903. !IF( z0(i,j,idate(2)) <= 0. ) z0(i,j,idate(2)) = 0.001 !! if z0 is not valid or missing (cm), PhD thesis Marticorena p.85
  904. IF( z0(i,j,idate(2)) <= 0. ) z0(i,j,idate(2)) = z0_min
  905. !<<< TvN
  906. END IF
  907. !---------------------------------------------------------------------------------------
  908. ! Calculation of the ratio: horizontal/vertical flux (alpha)
  909. !---------------------------------------------------------------------------------------
  910. !---------------------------------------------------------------------------------------
  911. ! Test on the vegetation type
  912. !---------------------------------------------------------------------------------------
  913. ! When cult=0, the cultivation field info is not used. Otherwise: cult(i,j)=3
  914. !!$ cult(i,j) = 0.
  915. desert(i,j) = soilph(i,j,3) + soilph(i,j,4)
  916. veget=0.
  917. DO iveg=1,nveg
  918. veget = veget + tv_dat(iglbsfc,iveg)%data(i,j,1)
  919. END DO
  920. ! default: no dust emissions
  921. idust = 0
  922. ! dust emissions only when
  923. ! 1) there is only land (almost)
  924. ! 2) 'desert' is positive or vegetation active
  925. IF( lsmask_dat(iglbsfc)%data(i,j,1) >= 99. .AND. (desert(i,j) > 0. .OR. veget > TINY(veget)) ) &
  926. idust = 1
  927. ! here is dust uptake possible
  928. IF( idust == 1 ) THEN
  929. !---------------------------------------------------------------------------------------
  930. !-- Calculate effective surface for fpar < lai_lim (as proxy for
  931. !-- veg. cover), shrubby vegetation is determined by max
  932. !-- annual fpar, grassy by monthly fpar (Tegen et al.2002)
  933. !---------------------------------------------------------------------------------------
  934. ! so we start with no vegetation --> full area available
  935. lai_eff(i,j) = 1.
  936. !-- get max/mean fpar of the full year --> needed for shrub land
  937. lai_max = MAXVAL(fpar(i,j,1:12))
  938. lai_avg = SUM(fpar(i,j,1:12)) / 12.
  939. lai_cur = fpar(i,j,idate(2))
  940. ! ---------------------------------------------
  941. ! 3 classes: grass, shrub, mixed{grass,shrub}
  942. ! ---------------------------------------------
  943. ! first: grass dominated (tv(2) and tv(7))
  944. ! current fpar determines available area
  945. IF( (tv_dat(iglbsfc,2)%data(i,j,1) + tv_dat(iglbsfc,7)%data(i,j,1)) > 50 ) THEN
  946. lai_eff (i,j) = 1. - lai_cur / lai_lim
  947. ! second: shrub dominated (tv(16) and tv(17))
  948. ! if max(fpar) > 0.25 --> no dust
  949. ! else max(fpar) determines area
  950. ELSEIF( (tv_dat(iglbsfc,16)%data(i,j,1) + tv_dat(iglbsfc,17)%data(i,j,1)) > 50 ) THEN
  951. ! lai_eff is zero for lai_max > lai_min and
  952. ! [0,1] for lai_max < lai_lim
  953. lai_eff (i,j) = 1. - lai_max / lai_lim
  954. ! third: mixtures of grass and shrub land
  955. ! if mean(fpar) > 0.5 --> shrub dominated --> use max(fpar) for scaling
  956. ! else grass dominated --> use current(fpar) for scaling
  957. ELSE
  958. IF( lai_avg > lai_lim2 ) THEN
  959. lai_eff (i,j) = 1. - lai_max / lai_lim
  960. ELSE
  961. lai_eff (i,j) = 1. - lai_cur / lai_lim
  962. END IF
  963. END IF
  964. ! limit to valid range [0,1]
  965. lai_eff(i,j) = MAX( 0., MIN( 1., lai_eff(i,j) ) )
  966. !!$ ............... !!!!hier ist das AND falsch!!!! ..................
  967. !!$ DO month = 1, 12
  968. !!$ IF( ( tv_dat(i,j,16) > 50 ) .OR. ( tv_dat(i,j,17) > 50 ) .AND. ( lai_flag == 0 ) ) then
  969. !!$ lai_eff(i,j,month) = 1. - fpar(i,j,month) / lai_lim !lai_lim=0.25
  970. !!$ ELSEIF( ( tv_dat(i,j, 2) > 50 ) .OR. ( tv_dat(i,j, 7) > 50 ) .OR. ( desert(i,j) > 0.) ) then
  971. !!$ lai_eff(i,j,month) = 1. - fpar(i,j,month) / lai_lim !lai_lim=0.25
  972. !!$ ELSE
  973. !!$ lai_eff(i,j,month) = 1. - lai_max / lai_lim !shrubs=1
  974. !!$ END IF
  975. !!$ ! original formulation
  976. !!$ ! lai_eff(j,i,1,month)=1.-(lai(j,i,1,month) &
  977. !!$ ! *(1.-shrub(int(sp(j,i,1,5)))) &
  978. !!$ ! +lai_max*shrub(int(sp(j,i,1,5))) &
  979. !!$ ! )*1./lai_lim
  980. !!$ IF( lai_eff(i,j,month) <= 0 ) lai_eff(i,j,month) = 0
  981. !!$ IF( lai_eff(i,j,month) > 1 ) lai_eff(i,j,month) = 1
  982. !!$ END DO !month
  983. END IF ! if idust=1
  984. ! print *, 'lai_eff=1 everywhere'
  985. !---------------------------------------------------------------------------------------
  986. ! Lowering the threshold friction velocity depending on the presence of cultivations
  987. !---------------------------------------------------------------------------------------
  988. ! Factors according to dsf increase seen in data **
  989. !---------------------------------------------------------------------------------------
  990. umin2(i,j) = umin
  991. !
  992. !---------------------------------------------------------------------------------------
  993. IF( cult(i,j) <= 0.5 .AND. cult(i,j) > 0.08 ) THEN
  994. IF( desert(i,j) > 0. .OR. tv_dat(iglbsfc,16)%data(i,j,1) > 50 .OR. tv_dat(iglbsfc,17)%data(i,j,1) > 50 ) &
  995. umin2(i,j) = umin * 0.93
  996. !
  997. !---------------------------------------------------------------------------------------
  998. IF( tv_dat(iglbsfc,2)%data(i,j,1) > 50 .OR. tv_dat(iglbsfc,7)%data(i,j,1) > 50 ) &
  999. umin2(i,j) = umin * 0.99
  1000. END IF !cult=2
  1001. !
  1002. !---------------------------------------------------------------------------------------
  1003. IF( cult(i,j) > 0.5 ) THEN
  1004. IF( ( desert(i,j) > 0 ) .OR. ( tv_dat(iglbsfc,16)%data(i,j,1) > 50 ) .OR. ( tv_dat(iglbsfc,17)%data(i,j,1) > 50 ) ) &
  1005. umin2(i,j) = umin * 0.73
  1006. END IF !cult=1
  1007. !---------------------------------------------------------------------------------------
  1008. ! Daily z0 and efficient fraction feff
  1009. !---------------------------------------------------------------------------------------
  1010. i_s1 = INT( soil_type(i,j) ) ! soil type index for the calcl. of horiz. dust flux
  1011. IF( i_s1 == 0 ) i_s1 = 9 ! set it the same as ice if the soil type is not defined
  1012. ! Roughness length [cm] of the surface without obstacles, i.e. of the smooth surface:
  1013. Z0S = 0.001 !! en cm, these Marticorena p.85 ! optimum value for the calculation of energy loss
  1014. ! Soil-type dependent saltation efficiency,
  1015. ! i.e. the ratio between vertical and horizontal fluxes,
  1016. ! (see Eq. (42) in MB95; Eq. (3) in Heinold et al.):
  1017. alpha(i,j) = solspe(i_s1,nmode*3+1)
  1018. ! for now moist is not included but when it is done then:
  1019. !---------------------------------------------------------------------------------------
  1020. ! Calculation of the threshold soil moisture (w') [Fecan, F. et al., 1999]
  1021. !---------------------------------------------------------------------------------------
  1022. ! when moist is included !!!!!!!!!!!!!!!!!!
  1023. ! w_str(j,i,1) = 0.0014*(solspe(i_s1,nmode*3)*100)**2 + 0.17*(solspe(i_s1,nmode*3)*100)
  1024. ! W0 = 0.99 ! used by Bernd solspe(i_s1,nmode*3+2)
  1025. feff = 0.
  1026. ! * partition of energy between the surface and the elements of rugosity *
  1027. ! these pp 111-112
  1028. IF( z0(i,j,idate(2) ) <= 0. ) THEN ! if there are no info on z0 and no potential sources
  1029. z0(i,j,idate(2)) = 1. ! then z0 is set to 1 and no dust can be produced
  1030. feff = 0.
  1031. ELSE
  1032. !>>> TvN
  1033. ! Use minimum value for roughness length.
  1034. z0(i,j,idate(2)) = max(z0_min,z0(i,j,idate(2)) )
  1035. !<<< TvN
  1036. ! Eq. (20) in MB95:
  1037. AAA = LOG( z0(i,j,idate(2)) / Z0S )
  1038. BB = LOG( aeff * (xeff / Z0S)**0.8)
  1039. CCC = 1. - AAA/BB
  1040. ! * partition between Z01 and Z02 * which are z0 of larger stone which cannot be mobilized
  1041. FF = 1. ! we do not separate roughness length between soil which
  1042. ! gives dust and solid material which is not mobilised
  1043. ! total efficient friction velocity ratio:
  1044. feff = FF * CCC
  1045. ! restrict to [0,1]
  1046. feff = MIN( 1., feff )
  1047. feff = MAX( 0., feff )
  1048. END IF
  1049. c_eff(i,j) = feff ! scaling parameter for the threshold friction velocity
  1050. ! due to energy loss
  1051. !---------------------------------------------------------------------------------------
  1052. END DO ! j
  1053. END DO ! i
  1054. !---------------------------------------------------------------------------------------
  1055. ! End of daily base calculations
  1056. END IF ! newday
  1057. ! additional fields
  1058. ALLOCATE( fluxtyp (nclass ) )
  1059. !ALLOCATE( dpk (nclass ) )
  1060. !ALLOCATE( dbmin (ntraced ) )
  1061. !ALLOCATE( dbmax (ntraced ) )
  1062. ALLOCATE( fluxtot (ntraced ) )
  1063. ALLOCATE( fdust (ntraced ) )
  1064. ! 1x1 flux mass and numbers
  1065. ALLOCATE( fnum_ai ( i01:i02,j01:j02 ) )
  1066. ALLOCATE( flux_ai ( i01:i02,j01:j02 ) )
  1067. ALLOCATE( fnum_ci ( i01:i02,j01:j02 ) )
  1068. ALLOCATE( flux_ci ( i01:i02,j01:j02 ) )
  1069. ! reset flux masses
  1070. flux_ai = 0.
  1071. flux_ci = 0.
  1072. DO j = j01, j02
  1073. DO i = i01, i02
  1074. !-- initialisation of the fields
  1075. ! size: ntraced
  1076. fluxtot = 0.
  1077. fdust = 0.
  1078. !----- --------------------------------------------------------------------------
  1079. ! Calculation of dust emission flux
  1080. ! dependent on the 3 hourly wind fields
  1081. !----------------------------------------------------------------------
  1082. IF( c_eff(i,j) > 0. ) THEN
  1083. ! Calculation of ustar
  1084. ! AS: initialise ustar (for those cases where if statement(s) are not fulfilled)
  1085. ustar = 0.
  1086. IF( lsmask_dat(iglbsfc)%data(i,j,1) > 0. ) THEN
  1087. wind10m = wspd_dat(iglbsfc)%data(i,j,1) * 100. ! cm/s
  1088. ustar = (vKarman * wind10m) / ( alog( ZZ / z0(i,j,idate(2)) ) ) ! cm/s
  1089. ENDIF
  1090. IF( Ustar > 0 .AND. (Ustar > umin2(i,j) / c_eff(i,j)) ) THEN
  1091. !>>> TvN
  1092. rho_air = spm_dat(iglbsfc)%data(i,j,1)/t2m_dat(iglbsfc)%data(i,j,1)*airfac ! g/cm3
  1093. airdens_ratio = rho_air/roa
  1094. airdens_ratio2 = sqrt(roa/rho_air)
  1095. !<<< TvN
  1096. !-- initialisation of the fields
  1097. ! size: ntraced
  1098. !dbmin = 0.
  1099. !dbmax = 0.
  1100. ! size: nclass
  1101. fluxtyp = 0.
  1102. ! soil type index for the calcl. of horiz. dust flux
  1103. i_s1 = INT( soil_type(i,j) )
  1104. ! set it the same as ice
  1105. IF( i_s1 == 0 ) i_s1 = 9
  1106. ! to separate from now on between saltation and mobilisation
  1107. i_s11 = i_s1
  1108. ! to separate between mobilisation and saltation and dust particles
  1109. IF( i_s1 == 10 .OR. i_s1 == 12 ) i_s11 = 11
  1110. kk = 0
  1111. dp = Dmin
  1112. DO WHILE( dp <= Dmax+1E-5)
  1113. kk = kk+1
  1114. uthp = uth(kk) * umin2(i,j) / umin * u1fac !reduce saltation threshold for cultivated soils
  1115. !>>> TvN
  1116. ! Include correction factor for variable air density
  1117. uthp = uthp * airdens_ratio2
  1118. !<<< TvN
  1119. ! See Eq. (28) in MB95; Eq. (6) in Tegen et al.; Eq. (2) in Heinold et al.
  1120. ! Note that (1+R)^2 * (1-R) = (1+R) * (1-R^2)
  1121. fdp1 = (1.-(Uthp/(c_eff(i,j) * Ustar))) ! component of the horiz. flux
  1122. fdp2 = (1.+(Uthp/(c_eff(i,j) * Ustar)))**2. !
  1123. IF( fdp1 > 0 .AND. fdp2 > 0) THEN
  1124. ! vertical flux dust weighted by the surface area relative to each soil type
  1125. flux_diam = srel(i_s1,kk) * fdp1 * fdp2 * cd * Ustar**3 * alpha(i,j)
  1126. !>>> TvN
  1127. ! Include correction factor for variable air density
  1128. flux_diam = flux_diam * airdens_ratio
  1129. !<<< TvN
  1130. !----------------------------------------------------------------------
  1131. ! all particles even the small ones can be mobilised by saltation
  1132. !----------------------------------------------------------------------
  1133. dbstart = dmin
  1134. IF( dbstart >= dp ) THEN
  1135. fluxtyp(kk) = fluxtyp(kk) + flux_diam
  1136. ELSE
  1137. !----------------------------------------------------------------------
  1138. ! loop over dislocated dust particle sizes
  1139. !----------------------------------------------------------------------
  1140. dpd = dmin
  1141. kkk = 0
  1142. kfirst = 0
  1143. DO WHILE( dpd <= dp+1e-5 )
  1144. kkk = kkk + 1
  1145. IF( dpd >= dbstart ) THEN ! the particles produced by saltation are put
  1146. IF( kfirst == 0 ) kkmin = kkk ! in finer bins
  1147. kfirst = 1
  1148. !----------------------------------------------------------------------
  1149. ! scaling with relative contribution of dust size fraction
  1150. ! we take into account the volume contribution of the particle types:
  1151. ! all the particles from soil type 10 are put into the 11 soil type when
  1152. ! we are in the production region
  1153. !----------------------------------------------------------------------
  1154. IF( kk > kkmin ) THEN
  1155. ! remember: i_s11 puts the mobilised
  1156. fluxtyp(kkk) = fluxtyp(kkk) + flux_diam * srelV(i_s11,kkk) / &
  1157. (su_srelV(i_s11,kk) - su_srelV(i_s11,kkmin) )
  1158. ! particles in smaller bins
  1159. END IF !kk.gt.kmin
  1160. END IF !dpd.gt.dbstart
  1161. dpd = dpd * EXP(dstep)
  1162. END DO !dpd
  1163. !----------------------------------------------------------------------
  1164. ! end of saltation loop
  1165. !----------------------------------------------------------------------
  1166. END IF !dbstart.lt.dp
  1167. END IF !fdp1
  1168. dp = dp * EXP(Dstep)
  1169. END DO !dp
  1170. !----------------------------------------------------------------------
  1171. ! assign fluxes to bins: flux is in g cm-2 s-1 for each bin
  1172. ! 192 sub-bins are put into 8 bins
  1173. !----------------------------------------------------------------------
  1174. dp = dmin
  1175. dlast = dmin
  1176. nn = 1
  1177. kk = 0
  1178. DO WHILE( dp <= dmax+1e-5 )
  1179. kk = kk+1
  1180. ! add to total
  1181. IF( nn <= ntraced ) fluxtot(nn) = fluxtot(nn) + fluxtyp(kk)
  1182. IF( MOD(kk,nbin) == 0 ) THEN
  1183. !dbmax(nn) = dp * 10000. * 0.5 !radius in um
  1184. !dbmin(nn) = dlast * 10000. * 0.5
  1185. !dpk(nn) = SQRT( dbmax(nn) * dbmin(nn) )
  1186. nn = nn+1
  1187. dlast = dp
  1188. END IF
  1189. dp = dp * EXP(Dstep)
  1190. END DO !dp
  1191. END IF !ustar
  1192. END IF !c_eff
  1193. ! Masking the area covered by snow, vegetation and [...?...]
  1194. cultfac1 = 1.
  1195. DO nn = 1, ntraced
  1196. ! fluxtot: g/cm2/sec
  1197. ! MASK: Effective area determined by cultfac1/snow
  1198. fdust(nn) = fluxtot(nn) * cultfac1 * (1.-snowcover(i,j))
  1199. ! MASK: Effective area determined by fpar:
  1200. fdust(nn) = fdust(nn) * lai_eff(i,j) ! turn off vegetation limitation here!
  1201. ! TvN: an alternative approach based on surface roughness
  1202. ! is applied by Laurent et al. (JGR, 2006).
  1203. ! MASK: Soil moisture threshold, using w0
  1204. ! when moisture is included !!!!!!!!!!!!!!!!!!
  1205. ! IF(qrsur(i,j).GE.w0) THEN
  1206. ! fdust(i,j,nn)=0.
  1207. ! END IF
  1208. END DO
  1209. ! ------------------------------------------------------------------------------
  1210. ! Grouping into 2 modes: 1sec accumulation
  1211. !
  1212. !>>> TvN
  1213. ! Accumulation
  1214. flux_r1 = 0.
  1215. DO nn = min_ai, max_ai
  1216. !flux_ai(i,j) = flux_ai(i,j) + fdust(nn)
  1217. flux_r1 = flux_r1 + fdust(nn)
  1218. END DO
  1219. ! Coarse
  1220. flux_r2 = 0.
  1221. DO nn = min_ci, max_ci
  1222. !flux_ci(i,j) = flux_ci(i,j) + fdust(nn)
  1223. flux_r2 = flux_r2 + fdust(nn)
  1224. END DO
  1225. ! The solution of the system of linear equations
  1226. ! (see comments above).
  1227. ! For special conditions,
  1228. ! the solution can give a negative mass flux
  1229. ! in either the accumulation or coarse mode.
  1230. ! In those case, all mass is put into
  1231. ! the other mode.
  1232. flux_ai(i,j) = flux_r1 - ratio_coa * flux_r2
  1233. flux_ci(i,j) = flux_r2 - ratio_acc * flux_r1
  1234. IF (flux_ai(i,j) .gt. 0. .AND. flux_ci(i,j) .gt. 0.) THEN
  1235. flux_ai(i,j) = flux_ai(i,j) * denom_acc_inv
  1236. flux_ci(i,j) = flux_ci(i,j) * denom_coa_inv
  1237. ELSEIF (flux_ai(i,j) .lt. 0.) THEN
  1238. flux_ai(i,j) = 0.
  1239. flux_ci(i,j) = (flux_r1 + flux_r2) * mf_coa_r12_inv
  1240. ELSEIF (flux_ci(i,j) .lt. 0.) THEN
  1241. flux_ai(i,j) = (flux_r1 + flux_r2) * mf_acc_r12_inv
  1242. flux_ci(i,j) = 0.
  1243. ENDIF
  1244. !<<< TvN
  1245. ! now scale the emissions
  1246. ! convert from g/cm2/s to g/grid_cell/month (area is in m2)
  1247. flux_ai(i,j) = flux_ai(i,j) * sec_month * 1.E4 * area(i,j)
  1248. flux_ci(i,j) = flux_ci(i,j) * sec_month * 1.E4 * area(i,j)
  1249. !-------------------------------------------------------------------------------
  1250. ! Calculating number flux (#/grid_cell/month)
  1251. !
  1252. ! Accumulation
  1253. fnum_ai(i,j) = flux_ai(i,j) * 3. / (4.*pi*ddust*mmr_ai**3) * EXP(4.5*LOG(sigma(iacci))**2)
  1254. ! Coarse
  1255. fnum_ci(i,j) = flux_ci(i,j) * 3. / (4.*pi*ddust*mmr_ci**3) * EXP(4.5*LOG(sigma(icoai))**2)
  1256. ! scale the flux from g to kg
  1257. flux_ai(i,j) = flux_ai(i,j) * 1.E-03
  1258. flux_ci(i,j) = flux_ci(i,j) * 1.E-03
  1259. END DO ! j
  1260. END DO ! i
  1261. ! free memory
  1262. !DEALLOCATE( fluxtyp, dpk, dbmin, dbmax, fluxtot, fdust )
  1263. DEALLOCATE( fluxtyp, fluxtot, fdust )
  1264. ! ------------------------------
  1265. ! add sources to emission arrays
  1266. ! ------------------------------
  1267. ! vertical splitting is that class
  1268. splittype = 'nearsurface'
  1269. ! work arrays for gather-coarsen-scatter (skip if region #1 is at 1x1,
  1270. ! assuming that no zoom region then)
  1271. IF ( (iglbsfc /= 1) .OR. okdebug) THEN
  1272. IF (isRoot) THEN
  1273. ALLOCATE(glb_arr(nlon360,nlat180))
  1274. DO region = 1, nregions
  1275. ALLOCATE(emis_glb(region)%surf(im(region), jm(region)))
  1276. END DO
  1277. ELSE
  1278. ALLOCATE(glb_arr(1,1))
  1279. DO region = 1, nregions
  1280. ALLOCATE(emis_glb(region)%surf(1,1))
  1281. END DO
  1282. END IF
  1283. END IF
  1284. ! work array for vertical distribution
  1285. DO region = 1, nregions
  1286. CALL GET_DISTGRID( dgrid(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
  1287. lmr = lm(region)
  1288. ALLOCATE( emis3d(region)%d3(i1:i2, j1:j2, lm(region)) )
  1289. END DO
  1290. ! ------------------------------
  1291. ! accumulation mode
  1292. ! number
  1293. CALL fill_target_array( fnum_ai, 'number acc', 'dust_number' ) ! fill emis_temp(region)
  1294. IF_NOTOK_RETURN(status=1)
  1295. ! vertically distribute according to sector
  1296. DO region = 1, nregions
  1297. emis3d(region)%d3 = 0.0
  1298. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d(region), status )
  1299. emis_number(region,mode_aci)%d4(:,:,:,1) = emis3d(region)%d3
  1300. ENDDO
  1301. ! mass
  1302. CALL fill_target_array( flux_ai, 'mass acc', 'dust_mass' ) ! fill emis_temp(region)
  1303. IF_NOTOK_RETURN(status=1)
  1304. ! vertically distribute according to sector
  1305. DO region = 1, nregions
  1306. emis3d(region)%d3 = 0.0
  1307. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d(region), status )
  1308. emis_mass(region,mode_aci)%d4(:,:,:,1) = emis3d(region)%d3
  1309. ENDDO
  1310. ! ------------------------------
  1311. ! coarse mode
  1312. ! number
  1313. CALL fill_target_array( fnum_ci, 'number coa', 'dust_number' ) ! fill emis_temp(region)
  1314. IF_NOTOK_RETURN(status=1)
  1315. ! vertically distribute according to sector
  1316. DO region = 1, nregions
  1317. emis3d(region)%d3 = 0.0
  1318. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d(region), status )
  1319. emis_number(region,mode_coi)%d4(:,:,:,1) = emis3d(region)%d3
  1320. ENDDO
  1321. ! mass
  1322. CALL fill_target_array( flux_ci, 'mass coa', 'dust_mass' ) ! fill emis_temp(region)
  1323. IF_NOTOK_RETURN(status=1)
  1324. ! vertically distribute according to sector
  1325. DO region = 1, nregions
  1326. emis3d(region)%d3 = 0.0
  1327. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d(region), status )
  1328. emis_mass(region,mode_coi)%d4(:,:,:,1) = emis3d(region)%d3
  1329. ENDDO
  1330. ! free memory
  1331. DEALLOCATE( fnum_ai, flux_ai, fnum_ci, flux_ci )
  1332. DO region = 1, nregions
  1333. IF (ASSOCIATED(emis_glb(region)%surf)) DEALLOCATE(emis_glb(region)%surf)
  1334. DEALLOCATE(emis3d(region)%d3)
  1335. END DO
  1336. IF (ALLOCATED(glb_arr)) DEALLOCATE(glb_arr)
  1337. CONTAINS
  1338. !--------------------------------------------------------------------------
  1339. ! TM5 !
  1340. !--------------------------------------------------------------------------
  1341. !BOP
  1342. !
  1343. ! !IROUTINE: FILL_TARGET_ARRAY
  1344. !
  1345. ! !DESCRIPTION: Convenient internal program to fill EMIS_TEMP - same as routine in emission_ss.F90
  1346. !\\
  1347. !\\
  1348. ! !INTERFACE:
  1349. !
  1350. SUBROUTINE fill_target_array( arr_in, str1, str2 )
  1351. !
  1352. ! !INPUT PARAMETERS:
  1353. !
  1354. REAL, INTENT(in) :: arr_in(i01:,j01:)
  1355. CHARACTER(len=*), INTENT(in) :: str1, str2
  1356. !
  1357. ! !REVISION HISTORY:
  1358. ! 25 Jun 2012 - P. Le Sager - v0
  1359. !
  1360. !EOP
  1361. !------------------------------------------------------------------------
  1362. !BOC
  1363. ! Test for optimization: if region #1 is at 1x1, assume no zoom region
  1364. ! and skip call to coarsen and mpi comm
  1365. IF (iglbsfc == 1) THEN
  1366. emis_temp(1)%surf = arr_in
  1367. IF (okdebug) THEN
  1368. CALL gather(dgrid(iglbsfc), arr_in, glb_arr, 0, status)
  1369. IF_NOTOK_RETURN(status=1)
  1370. !FIXME - really needed? too much messaging
  1371. ! IF (isRoot) THEN
  1372. ! CALL msg_emis( amonth, ' ', TRIM(str1), 'DU', 1., SUM(glb_arr) )
  1373. ! END IF
  1374. END IF
  1375. ELSE
  1376. DO region = 1, nregions
  1377. emis_temp(region)%surf = 0.0
  1378. END DO
  1379. ! gather on 1x1, coarsen to other grid on root, then scatter
  1380. !-----------------------------------------------------------
  1381. ! FIXME-PERF : Need a coarsen that works independtly on each proc, regardless of zooming... :(
  1382. CALL gather(dgrid(iglbsfc), arr_in, glb_arr, 0, status)
  1383. IF_NOTOK_RETURN(status=1)
  1384. IF (isRoot) THEN
  1385. !FIXME - really needed? too much messaging
  1386. ! CALL msg_emis( amonth, ' ', TRIM(str1), 'DU', 1., SUM(glb_arr) )
  1387. CALL coarsen_emission(TRIM(str2), nlon360, nlat180, glb_arr, emis_glb, add_field, status)
  1388. IF_NOTOK_RETURN(status=1)
  1389. END IF
  1390. DO region = 1, nregions
  1391. CALL scatter(dgrid(region), emis_temp(region)%surf, emis_glb(region)%surf, 0, status)
  1392. IF_NOTOK_RETURN(status=1)
  1393. ENDDO
  1394. ENDIF
  1395. status=0
  1396. END SUBROUTINE FILL_TARGET_ARRAY
  1397. !EOC
  1398. END SUBROUTINE CALC_EMISSION_DUST
  1399. !EOC
  1400. !--------------------------------------------------------------------------
  1401. ! TM5 !
  1402. !--------------------------------------------------------------------------
  1403. !BOP
  1404. !
  1405. ! !IROUTINE: EMISSION_DUST_DECLARE
  1406. !
  1407. ! !DESCRIPTION: Open the input file(s), if appropriate.
  1408. !\\
  1409. !\\
  1410. ! !INTERFACE:
  1411. !
  1412. SUBROUTINE EMISSION_DUST_DECLARE( status )
  1413. !
  1414. ! !USES:
  1415. !
  1416. ! !OUTPUT PARAMETERS:
  1417. !
  1418. INTEGER, INTENT(out) :: status
  1419. !
  1420. ! !REVISION HISTORY:
  1421. ! 1 Oct 2010 - Achim Strunk - added TEGEN-VIGNATI and ONLINE options
  1422. !
  1423. !EOP
  1424. !------------------------------------------------------------------------
  1425. !BOC
  1426. CHARACTER(len=*), PARAMETER :: rname = mname//'/emission_dust_declare'
  1427. ! --- begin -----------------------------------------
  1428. ! ok
  1429. status = 0
  1430. END SUBROUTINE emission_dust_declare
  1431. !EOC
  1432. !--------------------------------------------------------------------------
  1433. ! TM5 !
  1434. !--------------------------------------------------------------------------
  1435. !BOP
  1436. !
  1437. ! !IROUTINE: EMISSION_DUST_DONE
  1438. !
  1439. ! !DESCRIPTION: Close open file(s).
  1440. !\\
  1441. !\\
  1442. ! !INTERFACE:
  1443. !
  1444. SUBROUTINE EMISSION_DUST_DONE
  1445. !
  1446. ! !REVISION HISTORY:
  1447. ! 1 Oct 2010 - Achim Strunk - v0
  1448. !
  1449. ! !REMARKS:
  1450. !
  1451. !EOP
  1452. !------------------------------------------------------------------------
  1453. !BOC
  1454. DEALLOCATE( uth )
  1455. DEALLOCATE( srel )
  1456. DEALLOCATE( srelV )
  1457. DEALLOCATE( su_srelV )
  1458. ! gridded 1x1 fields from input file
  1459. DEALLOCATE( soil_type )
  1460. DEALLOCATE( pot_source )
  1461. DEALLOCATE( cult )
  1462. DEALLOCATE( area )
  1463. DEALLOCATE( z0 )
  1464. DEALLOCATE( fpar )
  1465. DEALLOCATE( soilph )
  1466. ! additional 1x1 fields
  1467. DEALLOCATE( snowcover )
  1468. DEALLOCATE( desert )
  1469. DEALLOCATE( umin2 )
  1470. DEALLOCATE( alpha )
  1471. DEALLOCATE( c_eff )
  1472. DEALLOCATE( lai_eff )
  1473. END SUBROUTINE EMISSION_DUST_DONE
  1474. !EOC
  1475. !--------------------------------------------------------------------------
  1476. ! TM5 !
  1477. !--------------------------------------------------------------------------
  1478. !BOP
  1479. !
  1480. ! !IROUTINE: READ_EMISSION_DUST
  1481. !
  1482. ! !DESCRIPTION: Opens, reads and evaluates input files (per month).
  1483. ! Provides emissions on 2d/3d-arrays which are then given
  1484. ! to emis_number and emis_mass, which are used in
  1485. ! sedimentation. (no *_apply!)
  1486. !\\
  1487. !\\
  1488. ! !INTERFACE:
  1489. !
  1490. SUBROUTINE READ_EMISSION_DUST( status )
  1491. !
  1492. ! !USES:
  1493. !
  1494. USE MDF, ONLY : MDF_Open, MDF_Close, MDF_Inq_VarID
  1495. USE MDF, ONLY : MDF_Get_Var, MDF_READ, MDF_NETCDF4
  1496. USE dims, ONLY : newday, nlon360, nlat180, idate, mlen, im, jm, lm, itau, okdebug, nregions
  1497. USE dims, ONLY : iglbsfc
  1498. USE chem_param, ONLY : sigma_lognormal, dust_density, nmodes, mode_aci, mode_coi
  1499. USE chem_param, ONLY : iaci_n, iduaci, icoi_n, iducoi
  1500. USE toolbox, ONLY : coarsen_emission
  1501. USE Binas, ONLY : pi
  1502. USE datetime, ONLY : tau2date
  1503. USE emission_data, ONLY : emis_mass, emis_number, emis_temp
  1504. USE emission_data, ONLY : vd_class_name_len, emission_vdist_by_sector
  1505. !
  1506. ! !OUTPUT PARAMETERS:
  1507. !
  1508. INTEGER, INTENT(out) :: status
  1509. !
  1510. ! !REVISION HISTORY:
  1511. ! 1 Oct 2010 - Achim Strunk - added TEGEN-VIGNATI option
  1512. ! 26 Jun 2012 - P. Le Sager - adapted for lon-lat MPI domain decomposition
  1513. !
  1514. ! !REMARKS:
  1515. ! (1) now read on root, need to switch (FIXME) to MDF
  1516. !
  1517. !EOP
  1518. !------------------------------------------------------------------------
  1519. !BOC
  1520. CHARACTER(len=*), PARAMETER :: rname = mname//'/read_emission_dust'
  1521. REAL(kind=4), DIMENSION(:,:), ALLOCATABLE :: mode_number, mode_radius, mode_mass
  1522. INTEGER :: daynumber, var_id, region, istat, sds_id
  1523. ! INTEGER :: sfn2index,sfselect,sfrdata,sfendacc
  1524. REAL :: ln2s
  1525. CHARACTER(len=20) :: var_name
  1526. CHARACTER(len=1 ) :: modes
  1527. INTEGER, PARAMETER :: add_field = 0
  1528. !INTEGER, PARAMETER :: amonth=2
  1529. INTEGER :: imr, jmr, lmr, imode
  1530. INTEGER, DIMENSION(6) :: idater
  1531. INTEGER :: i, j, i1, i2, j1, j2, i01, i02, j01, j02
  1532. TYPE(emis_data), DIMENSION(nregions) :: emis_glb
  1533. TYPE(d3_data) :: emis3d
  1534. CHARACTER(len=vd_class_name_len) :: splittype
  1535. CHARACTER(len=256) :: dust_filename
  1536. ! --- begin -----------------------------------------
  1537. status = 0
  1538. SELECT CASE( TRIM( emis_input_dust ) )
  1539. CASE( "AEROCOM" )
  1540. WRITE (dust_filename,'(a,"/dust",i4.4,i2.2,".nc")') TRIM(emis_input_dir_dust), 2000, idate(2)
  1541. WRITE (gol,'("WARNING - using dust emissions for 2000 ...")'); CALL goPr
  1542. WRITE (gol,'("Filename for dust fluxes : ",a)') TRIM(dust_filename); CALL goPr
  1543. CASE( "TEGEN-VIGNATI" )
  1544. ! files 'dust200201.nc' etc.
  1545. WRITE (dust_filename,'(a,"/dust",i4.4,i2.2,".nc")') TRIM(emis_input_dir_dust), idate(1), idate(2)
  1546. CASE( "ONLINE" )
  1547. ! handled in *calc
  1548. status=0; RETURN
  1549. CASE default
  1550. WRITE (gol,'("no valid dust emission method provided.")') ; CALL goErr
  1551. TRACEBACK
  1552. status=1; RETURN
  1553. END SELECT
  1554. ! vertical splitting is that class
  1555. splittype = 'nearsurface'
  1556. IF(newday) THEN
  1557. !===================
  1558. ! Work arrays
  1559. !===================
  1560. ! CALL GET_DISTGRID( dgrid(iglbsfc), I_STRT=i01, I_STOP=i02, J_STRT=j01, J_STOP=j02 )
  1561. !
  1562. ! allocate(number(i01:i02,j01:j02))
  1563. ! allocate(mass (i01:i02,j01:j02))
  1564. IF (isRoot) THEN
  1565. CALL MDF_Open( TRIM(dust_fileName), MDF_NETCDF4, MDF_READ, dust_FileID, status )
  1566. IF_NOTOK_RETURN(status=1)
  1567. ENDIF
  1568. IF (isRoot) THEN
  1569. ALLOCATE(mode_number(nlon360,nlat180))
  1570. ALLOCATE(mode_mass (nlon360,nlat180))
  1571. IF( TRIM(emis_input_dust) /= "TEGEN-VIGNATI" ) &
  1572. ALLOCATE(mode_radius(nlon360,nlat180))
  1573. DO region = 1, nregions
  1574. ALLOCATE(emis_glb(region)%surf(im(region), jm(region)))
  1575. END DO
  1576. ELSE
  1577. DO region = 1, nregions
  1578. ALLOCATE(emis_glb(region)%surf(1,1))
  1579. END DO
  1580. END IF
  1581. CALL tau2date(itau-3*3600, idater)
  1582. idater(4) = 21
  1583. daynumber = idate(3)
  1584. !===================
  1585. ! Read accumulation mode
  1586. !===================
  1587. imode = 2
  1588. WRITE(modes,'(i1)') imode
  1589. IF (isRoot) THEN
  1590. IF( TRIM(emis_input_dust) == "TEGEN-VIGNATI" ) THEN
  1591. var_name = 'mode'//modes//'_mass'
  1592. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1593. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1594. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_mass)
  1595. ELSE
  1596. var_name = 'mode'//modes//'_radius'
  1597. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1598. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1599. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_radius)
  1600. END IF
  1601. status=istat
  1602. IF_NOTOK_RETURN(status=1)
  1603. !GO2MDF istat = sfendacc(sds_id)
  1604. var_name = 'mode'//modes//'_number'
  1605. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1606. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1607. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_number)
  1608. status=istat
  1609. IF_NOTOK_RETURN(status=1)
  1610. !GO2MDF istat = sfendacc(sds_id)
  1611. IF( TRIM(emis_input_dust) == "TEGEN-VIGNATI" ) THEN
  1612. mode_number = mode_number * mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1613. mode_mass = mode_mass * mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1614. ELSE
  1615. ln2s = (alog(sigma_lognormal(mode_aci)))**2
  1616. ! transform to #/gridbox kg/gridbox and shift...
  1617. mode_number = CSHIFT(mode_number,nlon360/2,1) ! shift emissions starting at 0 degrees to -180
  1618. mode_radius = CSHIFT(mode_radius,nlon360/2,1)
  1619. mode_number = mode_number*mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1620. ! 1e18: um3 --> m3; exp(9/2...) is for Volume(r_geom^3) to Volume(r_mass^3)
  1621. mode_mass=pi*4./3.*mode_radius**3.*mode_number*EXP(9./2.*ln2s) /1e18*dust_density ! kg/gridbox/month
  1622. END IF
  1623. END IF
  1624. ! Coarsen, scatter, vertical distribution
  1625. ! ----------------------
  1626. IF (isRoot) THEN
  1627. CALL coarsen_emission('dust_number ', nlon360, nlat180, REAL(mode_number) , emis_glb, add_field, status)
  1628. IF_NOTOK_RETURN(status=1)
  1629. END IF
  1630. DO region = 1, nregions
  1631. CALL scatter(dgrid(region), emis_temp(region)%surf, emis_glb(region)%surf, 0, status)
  1632. IF_NOTOK_RETURN(status=1)
  1633. CALL get_distgrid( dgrid(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
  1634. ALLOCATE( emis3d%d3(i1:i2,j1:j2,lm(region)) ) ; emis3d%d3 = 0.0
  1635. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d, status )
  1636. emis_number(region,mode_aci)%d4(:,:,:,1) = emis3d%d3
  1637. DEALLOCATE(emis3d%d3)
  1638. ENDDO
  1639. ! Coarsen, scatter, vertical distribution
  1640. ! ----------------------
  1641. IF (isRoot) THEN
  1642. CALL coarsen_emission('dust_mass ', nlon360, nlat180, REAL(mode_mass) , emis_glb, add_field, status)
  1643. IF_NOTOK_RETURN(status=1)
  1644. END IF
  1645. DO region = 1, nregions
  1646. CALL scatter(dgrid(region), emis_temp(region)%surf, emis_glb(region)%surf, 0, status)
  1647. IF_NOTOK_RETURN(status=1)
  1648. CALL get_distgrid( dgrid(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
  1649. ALLOCATE( emis3d%d3(i1:i2,j1:j2,lm(region)) ) ; emis3d%d3 = 0.0
  1650. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d, status )
  1651. emis_mass(region,mode_aci)%d4(:,:,:,1) = emis3d%d3
  1652. DEALLOCATE(emis3d%d3)
  1653. ENDDO
  1654. !===================
  1655. ! Read coarse mode
  1656. !===================
  1657. imode = 3
  1658. WRITE(modes,'(i1)') imode
  1659. IF (isRoot) THEN
  1660. IF( TRIM(emis_input_dust) == "TEGEN-VIGNATI" ) THEN
  1661. var_name = 'mode'//modes//'_mass'
  1662. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1663. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1664. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_mass)
  1665. ELSE
  1666. var_name = 'mode'//modes//'_radius'
  1667. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1668. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1669. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_radius)
  1670. END IF
  1671. status=istat
  1672. IF_NOTOK_RETURN(status=1)
  1673. !GO2MDF istat = sfendacc(sds_id)
  1674. var_name = 'mode'//modes//'_number'
  1675. !GO2MDF var_id = sfn2index(dust_FileID,TRIM(var_name))
  1676. !GO2MDF sds_id = sfselect (dust_FileID,var_id)
  1677. !GO2MDF istat = sfrdata(sds_id,(/0,0,daynumber-1/), (/1,1,1/), (/nlon360,nlat180,1/),mode_number)
  1678. status=istat
  1679. IF_NOTOK_RETURN(status=1)
  1680. !GO2MDF istat = sfendacc(sds_id)
  1681. IF( TRIM(emis_input_dust) == "TEGEN-VIGNATI" ) THEN
  1682. mode_number = mode_number*mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1683. mode_mass = mode_mass*mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1684. ELSE
  1685. ln2s = (alog(sigma_lognormal(mode_coi)))**2
  1686. ! transform to #/gridbox kg/gridbox and shift...
  1687. mode_number = CSHIFT(mode_number,nlon360/2,1) ! shift emissions starting at 0 degrees to -180
  1688. mode_radius = CSHIFT(mode_radius,nlon360/2,1)
  1689. mode_number = mode_number*mlen(idate(2)) ! #/gridbox/day ---> #/gridbox/month
  1690. ! 1e18: um3 --> m3; exp(9/2...) is for Volume(r_geom^3) to Volume(r_mass^3)
  1691. mode_mass=pi*4./3.*mode_radius**3.*mode_number*EXP(9./2.*ln2s) /1e18*dust_density ! kg/gridbox/month
  1692. END IF
  1693. END IF
  1694. ! Coarsen, scatter, vertical distribution
  1695. ! ----------------------
  1696. IF (isRoot) THEN
  1697. CALL coarsen_emission('dust_number ', nlon360, nlat180, REAL(mode_number) , emis_glb, add_field, status)
  1698. IF_NOTOK_RETURN(status=1)
  1699. END IF
  1700. DO region = 1, nregions
  1701. CALL scatter(dgrid(region), emis_temp(region)%surf, emis_glb(region)%surf, 0, status)
  1702. IF_NOTOK_RETURN(status=1)
  1703. CALL get_distgrid( dgrid(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
  1704. ALLOCATE( emis3d%d3(i1:i2,j1:j2,lm(region)) ) ; emis3d%d3 = 0.0
  1705. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d, status )
  1706. emis_number(region,mode_coi)%d4(:,:,:,1) = emis3d%d3
  1707. DEALLOCATE(emis3d%d3)
  1708. ENDDO
  1709. ! Coarsen, scatter, vertical distribution
  1710. ! ----------------------
  1711. IF (isRoot) THEN
  1712. CALL coarsen_emission('dust_mass ', nlon360, nlat180, REAL(mode_mass) , emis_glb, add_field, status)
  1713. IF_NOTOK_RETURN(status=1)
  1714. END IF
  1715. DO region = 1, nregions
  1716. CALL scatter(dgrid(region), emis_temp(region)%surf, emis_glb(region)%surf, 0, status)
  1717. IF_NOTOK_RETURN(status=1)
  1718. CALL get_distgrid( dgrid(region), I_STRT=i1, I_STOP=i2, J_STRT=j1, J_STOP=j2 )
  1719. ALLOCATE( emis3d%d3(i1:i2,j1:j2,lm(region)) ) ; emis3d%d3 = 0.0
  1720. CALL emission_vdist_by_sector( splittype, 'DUST', region, emis_temp(region), emis3d, status )
  1721. emis_mass(region,mode_coi)%d4(:,:,:,1) = emis3d%d3
  1722. DEALLOCATE(emis3d%d3)
  1723. ENDDO
  1724. !===================
  1725. ! Done
  1726. !===================
  1727. DO region = 1, nregions
  1728. DEALLOCATE(emis_glb(region)%surf)
  1729. END DO
  1730. IF (isRoot) THEN
  1731. DEALLOCATE(mode_number, mode_mass)
  1732. IF( TRIM(emis_input_dust) /= "TEGEN-VIGNATI" ) &
  1733. DEALLOCATE(mode_radius)
  1734. WRITE(gol,*) 'Closing dust emission file', isRoot; CALL goPr
  1735. CALL MDF_Close( dust_FileID, status )
  1736. END IF
  1737. ENDIF ! newday
  1738. END SUBROUTINE READ_EMISSION_DUST
  1739. !EOC
  1740. END MODULE EMISSION_DUST