emission_dust.F90 81 KB

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