-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy pathdrydep_mod.F90
5092 lines (4516 loc) · 199 KB
/
drydep_mod.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !MODULE: drydep_mod.F90
!
! !DESCRIPTION: Module DRYDEP\_MOD contains variables and routines for the
! GEOS-Chem dry deposition scheme.
!\\
!\\
! !INTERFACE:
!
MODULE DRYDEP_MOD
!
! !USES:
!
USE CMN_SIZE_Mod, ONLY : NPOLY, NSURFTYPE
USE ERROR_MOD ! Error handling routines
#ifdef TOMAS
USE TOMAS_MOD ! For TOMAS microphysics
#endif
USE PhysConstants ! Physical constants
USE PRECISION_MOD ! For GEOS-Chem Precision (fp)
USE TIME_MOD
IMPLICIT NONE
PRIVATE
!
! !PUBLIC MEMBER FUNCTIONS:
!
PUBLIC :: CLEANUP_DRYDEP
PUBLIC :: DO_DRYDEP
PUBLIC :: INIT_DRYDEP
PUBLIC :: INIT_WEIGHTSS
#if defined( MODEL_CESM )
PUBLIC :: UPDATE_DRYDEPFREQ
#else
!
! !PRIVATE MEMBER FUNCTIONS:
!
PRIVATE :: UPDATE_DRYDEPFREQ
#endif
!
! !PUBLIC DATA MEMBERS:
!
PUBLIC :: DEPNAME
PUBLIC :: NUMDEP
PUBLIC :: NTRAIND
PUBLIC :: IDEP, IRGSS, IRAC, IRCLS
PUBLIC :: IRGSO, IRLU, IRI, IRCLO, DRYCOEFF
#if defined( MODEL_CESM )
PUBLIC :: NDVZIND
#endif
!
! !REMARKS:
! References:
! ============================================================================
! (1 ) Baldocchi, D.D., B.B. Hicks, and P. Camara, "A canopy stomatal
! resistance model for gaseous deposition to vegetated surfaces",
! Atmos. Environ. 21, 91-101, 1987.
! (2 ) Brutsaert, W., "Evaporation into the Atmosphere", Reidel, 1982.
! (3 ) Businger, J.A., et al., "Flux-profile relationships in the atmospheric
! surface layer", J. Atmos. Sci., 28, 181-189, 1971.
! (4 ) Dwight, H.B., "Tables of integrals and other mathematical data",
! MacMillan, 1957.
! (5 ) Guenther, A., and 15 others, A global model of natural volatile
! organic compound emissions, J. Geophys. Res., 100, 8873-8892, 1995.
! (6 ) Hicks, B.B., and P.S. Liss, "Transfer of SO2 and other reactive
! gases across the air-sea interface", Tellus, 28, 348-354, 1976.
! (7 ) Jacob, D.J., and S.C. Wofsy, "Budgets of reactive nitrogen,
! hydrocarbons, and ozone over the Amazon forest during the wet season",
! J. Geophys. Res., 95, 16737-16754, 1990.
! (8 ) Jacob, D.J., et al, "Deposition of ozone to tundra", J. Geophys. Res.,
! 97, 16473-16479, 1992.
! (9 ) Levine, I.N., "Physical Chemistry, 3rd ed.", McGraw-Hill,
! New York, 1988.
! (10) Munger, J.W., et al, "Atmospheric deposition of reactive nitrogen
! oxides and ozone in a temperate deciduous forest and a sub-arctic
! woodland", J. Geophys. Res., in press, 1996.
! (11) Walcek, C.J., R.A. Brost, J.S. Chang, and M.L. Wesely, "SO2, sulfate,
! and HNO3 deposition velocities computed using regional landuse and
! meteorological data", Atmos. Environ., 20, 949-964, 1986.
! (12) Wang, Y.H., paper in preparation, 1996.
! (13) Wesely, M.L, "Improved parameterizations for surface resistance to
! gaseous dry deposition in regional-scale numerical models",
! Environmental Protection Agency Report EPA/600/3-88/025,
! Research Triangle Park (NC), 1988.
! (14) Wesely, M. L., Parameterization of surface resistance to gaseous dry
! deposition in regional-scale numerical models. Atmos. Environ., 23
! 1293-1304, 1989.
! (15) Price, H., L. Jaeglé, A. Rice, P. Quay, P.C. Novelli, R. Gammon,
! Global Budget of Molecular Hydrogen and its Deuterium Content:
! Constraints from Ground Station, Cruise, and Aircraft Observations,
! submitted to J. Geophys. Res., 2007.
! (16) Karl, T., Harley, P., Emmons, L., Thornton, B., Guenther, A., Basu, C.,
! Turnipseed, A., and Jardine, K.: Efficient Atmospheric Cleansing of
! Oxidized Organic Trace Gases by Vegetation, Science, 330, 816-819,
! 10.1126/science.1192534, 2010.
! (17) Jaeglé, L., Shah, V.,et al (2018). Nitrogen oxides emissions, chemistry,
! deposition,and export over the Northeast United States during the
! WINTER aircraft campaign. J Geophys Res: Atmospheres, 123.
! https://doi.org/10.1029/2018JD029133
!
! !REVISION HISTORY:
! 27 Jan 2003 - R. Yantosca - Moved standalone routines into this module
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !DEFINED PARAMETERS:
!
INTEGER, PARAMETER :: NR_MAX = 200 ! # of seasalt bins
INTEGER, PARAMETER :: NDRYDTYPE = 11 ! # of drydep land types
REAL(f8), PARAMETER :: TWO_THIRDS = 2.0_fp / 3.0_fp
!
! PRIVATE TYPES:
!
!========================================================================
! MODULE VARIABLES:
!
! DRYDHNO3 : Internal flag for location of HNO3 in DEPVEL
! DRYDNO2 : Internal flag for location of NO2 in DEPVEL
! DRYDPAN : Internal flag for location of PAN in DEPVEL
! NUMDEP : Actual number of drydep species
! NWATER : Number of Olson's surface types that are water
! AIROSOL : Array flags to denote aerosol drydep species
! IDEP : ID #'s for dry deposition surface types
! IRAC : ??? resistance for drydep land type
! IRCLO : ??? resistance for drydep land type
! IRCLS : ??? resistance for drydep land type
! IRGSO : ??? resistance for drydep land type
! IRGSS : ??? resistance for drydep land type
! IRI : Internal resistance for drydep land types
! IRLU : Cuticular resistance for drydep land types
! IVSMAX : ??? resistance for drydep land type
! IWATER : ID #'s for Olson surface types that are water
! IZO : Roughness heights for each Olson surface type
! NDVZIND : Index array for ordering drydep species in DEPVEL
! NTRAIND : Stores species numbers of drydep species
! PBLFRAC : Array for multiplicative factor for drydep freq
! DRYCOEFF : Polynomial coefficients for dry deposition
! HSTAR : Henry's law constant
! F0 : Reactivity factor for biological oxidation
! XMW : Molecular weight of drydep species [kg]
! A_RADI : Radius of aerosol for size-resolved drydep [um]
! A_DEN : Density of aerosol for size-res'd drydep [kg/m3]
! DEPNAME : Names of dry deposition species
!
! NOTE: these variables are defined in CMN_SIZE_mod.F
! NTYPE : Max # of landtypes / grid box
! NPOLY : Number of drydep polynomial coefficients
! NSURFTYPE : Number of Olson land types
!========================================================================
! Scalars
INTEGER :: NUMDEP, NWATER
INTEGER :: DRYHg0, DRYHg2, DryHgP
INTEGER :: id_ACET, id_ALD2, id_O3
INTEGER :: id_MENO3, id_ETNO3, id_MOH
INTEGER :: id_NK01, id_Hg0
INTEGER :: id_HNO3, id_PAN, id_IHN1
INTEGER :: id_H2O2, id_SO2, id_NH3
INTEGER :: idd_BCPO, idd_BCPI, idd_BrSALC
INTEGER :: idd_BrSALA, idd_DST1, idd_DST2
INTEGER :: idd_DST3, idd_DST4, idd_DSTAL1
INTEGER :: idd_DSTAL2, idd_DSTAL3, idd_DSTAL4
INTEGER :: idd_ISALA, idd_ISALC, idd_NH4
INTEGER :: idd_NIT, idd_NITD1, idd_NITD2
INTEGER :: idd_NITD3, idd_NITD4, idd_NITs
INTEGER :: idd_SALA, idd_SALC, idd_SO4
INTEGER :: idd_SO4D1, idd_SO4D2, idd_SO4D3
INTEGER :: idd_SO4D4, idd_SO4s
! Arrays for Baldocchi drydep polynomial coefficients
REAL(fp), TARGET :: DRYCOEFF(NPOLY ) = 0.0_fp
! Arrays that hold information for each of the 74 Olson land types
INTEGER :: INDOLSON(NSURFTYPE )
INTEGER :: IDEP (NSURFTYPE )
INTEGER :: IZO (NSURFTYPE )
INTEGER :: IWATER (NSURFTYPE )
! Arrays that hold information for each of the 11 drydep land types
INTEGER :: IDRYDEP (NDRYDTYPE)
INTEGER :: IRAC (NDRYDTYPE)
INTEGER :: IRCLO (NDRYDTYPE)
INTEGER :: IRCLS (NDRYDTYPE)
INTEGER :: IRGSS (NDRYDTYPE)
INTEGER :: IRGSO (NDRYDTYPE)
INTEGER :: IRI (NDRYDTYPE)
INTEGER :: IRLU (NDRYDTYPE)
INTEGER :: IVSMAX (NDRYDTYPE)
! Arrays that hold information about the dry-depositing species
LOGICAL, ALLOCATABLE :: AIROSOL (: ) ! Is Aerosol? (T/F)
INTEGER, ALLOCATABLE :: NDVZIND (: ) ! Drydep index
INTEGER, ALLOCATABLE :: FLAG (: ) ! Drydep scaling flag
INTEGER, ALLOCATABLE :: NTRAIND (: ) ! Species index
REAL(f8), ALLOCATABLE :: HSTAR (: ) ! Henry's K0 [M/atm]
REAL(f8), ALLOCATABLE :: KOA (: ) ! POP's KOA
REAL(f8), ALLOCATABLE :: F0 (: ) ! Reactivity factor [1]
REAL(f8), ALLOCATABLE :: XMW (: ) ! Mol wt. [kg/mol]
REAL(f8), ALLOCATABLE :: A_RADI (: ) ! Aer radius [m]
REAL(f8), ALLOCATABLE :: A_DEN (: ) ! Aer density [kg/m3]
CHARACTER(LEN=14), ALLOCATABLE :: DEPNAME (: ) ! Species name
! Allocatable arrays
REAL(f8), ALLOCATABLE :: DMID (: )
REAL(f8), ALLOCATABLE :: SALT_V (: )
!=================================================================
! MODULE ROUTINES -- follow below the "CONTAINS" statement
!=================================================================
CONTAINS
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: do_drydep
!
! !DESCRIPTION: Subroutine DO\_DRYDEP is the driver for the GEOS-CHEM dry
! deposition scheme. DO\_DRYDEP calls DEPVEL to compute deposition velocities
! [m/s], which are then converted to [cm/s]. Drydep frequencies are also
! computed. (lwh, gmg, djj, 1989, 1994; bmy, 2/11/03, 5/25/05)
!\\
!\\
! !INTERFACE:
!
SUBROUTINE DO_DRYDEP( Input_Opt, State_Chm, State_Diag, &
State_Grid, State_Met, RC )
!
! !USES:
!
USE ErrCode_Mod
USE Input_Opt_Mod, ONLY : OptInput
USE Species_Mod, ONLY : Species
USE State_Chm_Mod, ONLY : ChmState
USE State_Diag_Mod, ONLY : DgnState
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
USE Time_Mod, ONLY : Get_Ts_Chem
USE UnitConv_Mod
!
! !INPUT PARAMETERS:
!
TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object
TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object
TYPE(MetState), INTENT(IN) :: State_Met ! Meteorology State object
!
! !INPUT/OUTPUT PARAMETERS:
!
TYPE(ChmState), INTENT(INOUT) :: State_Chm ! Chemistry State object
TYPE(DgnState), INTENT(INOUT) :: State_Diag ! Diagnostics State object
!
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Success or failure?
!
! !REMARKS:
! NOTE: Modeled aerosol dry deposition velocities over snow and ice surfaces
! in the Arctic are much higher than estimated from measured values (e.g.,
! Ibrahim et al. [1983]; Duan et al. [1988]; Nilsson and Rannik [2001]).
! We will impose a dry deposition velocity of 0.03 cm/s for all aerosols
! over snow and ice surfaces. (Jenny Fisher, 01 Aug 2011)
!
! References (see full citations above):
! ============================================================================
! (1 ) Wesely, M. L., 1989
! (2 ) Jacob, D.J., and S.C. Wofsy, 1990
!
! !REVISION HISTORY:
! 19 Nov 2002 - R. Yantosca - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
! Scalars
INTEGER :: I, J, L, D, N, NDVZ, A, S
REAL(f8) :: DVZ, THIK
CHARACTER(LEN=255) :: ErrMsg, ThisLoc
! Arrays
REAL(f8) :: CZ1 (State_Grid%NX,State_Grid%NY) ! Midpt ht of 1st level [m]
REAL(f8) :: TC0 (State_Grid%NX,State_Grid%NY) ! Grid box sfc temp [K]
REAL(f8) :: ZH (State_Grid%NX,State_Grid%NY) ! PBL height [m]
REAL(f8) :: OBK (State_Grid%NX,State_Grid%NY) ! Monin-Obhukov Length [m]
REAL(f8) :: CFRAC (State_Grid%NX,State_Grid%NY) ! Column cld frac [unitless]
REAL(f8) :: RADIAT(State_Grid%NX,State_Grid%NY) ! Solar radiation [W/m2]
REAL(f8) :: USTAR (State_Grid%NX,State_Grid%NY) ! Gridbox friction vel [m/s]
REAL(f8) :: RHB (State_Grid%NX,State_Grid%NY) ! Rel. humidity [unitless]
REAL(f8) :: PRESSU(State_Grid%NX,State_Grid%NY) ! Local sfc pressure [Pa]
REAL(f8) :: W10 (State_Grid%NX,State_Grid%NY) ! 10m windspeed [m/s]
REAL(f8) :: AZO (State_Grid%NX,State_Grid%NY) ! Z0, per (I,J) square
REAL(f8) :: SUNCOS_MID(State_Grid%NX,State_Grid%NY) ! COS(SZA) @ midt of
! current chem timestep
!=================================================================
! DO_DRYDEP begins here!
!=================================================================
! Assume success
RC = GC_SUCCESS
! Initialize
ErrMsg = ''
ThisLoc = ' -> at Do_DryDep (in module GeosCore/drydep_mod.F90)'
! Call METERO to obtain meteorological fields (all 1-D arrays)
! Added sfc pressure as PRESSU and 10m windspeed as W10
! (jaegle 5/11/11, mpayer 1/10/12)
CALL METERO( State_Grid, State_Met, CZ1, TC0, OBK, CFRAC, &
RADIAT, AZO, USTAR, ZH, RHB, &
PRESSU, W10, SUNCOS_MID )
! Call DEPVEL to compute dry deposition velocities [m/s]
CALL DEPVEL( Input_Opt, State_Chm, State_Diag, State_Grid, &
State_Met, RADIAT, TC0, SUNCOS_MID, &
F0, HSTAR, XMW, AIROSOL, &
USTAR, CZ1, OBK, CFRAC, &
ZH, AZO, RHB, PRESSU, &
W10, RC )
! Trap potential errors
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Error encountered in call to "DEPVEL!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF
#if !defined( MODEL_CESM )
! Call UPDATE_DRYDEPFREQ to update dry deposition frequencies [s-1]
! from dry deposition velocities [m/s].
CALL UPDATE_DRYDEPFREQ( Input_Opt, State_Chm, State_Diag, State_Grid, &
State_Met, RC )
! Trap potential errors
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Error encountered in call to "UPDATE_DRYDEPFREQ!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF
#endif
!### Debug
IF ( Input_Opt%Verbose ) THEN
CALL DEBUG_MSG( '### DO_DRYDEP: after dry dep' )
ENDIF
END SUBROUTINE DO_DRYDEP
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: update_DryDepFreq
!
! !DESCRIPTION: Subroutine UPDATE\_DRYDEPFREQ updates dry deposition
! frequencies from dry deposition velocities
!\\
!\\
! !INTERFACE:
!
SUBROUTINE UPDATE_DRYDEPFREQ( Input_Opt, State_Chm, State_Diag, State_Grid, &
State_Met, RC )
!
! !USES:
!
USE ErrCode_Mod
USE Input_Opt_Mod, ONLY : OptInput
USE Species_Mod, ONLY : Species
USE State_Chm_Mod, ONLY : ChmState
USE State_Diag_Mod, ONLY : DgnState
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
!
! !INPUT PARAMETERS:
!
TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object
TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object
TYPE(MetState), INTENT(IN) :: State_Met ! Meteorology State object
!
! !INPUT/OUTPUT PARAMETERS:
!
TYPE(ChmState), INTENT(INOUT) :: State_Chm ! Chemistry State object
TYPE(DgnState), INTENT(INOUT) :: State_Diag ! Diagnostics State object
!
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Success or failure?
!
!
! !REMARKS:
! 02 Mar 2020 - T. M. Fritz - Separate DO_DRYDEP into two calls. The first
! call updates dry deposition velocities. The
! second call computes dry deposition frequencies.
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
! Scalars
INTEGER :: I, J, L, D, N, NDVZ, A, S
REAL(f8) :: DVZ, THIK
CHARACTER(LEN=255) :: ErrMsg, ThisLoc
! Objects
TYPE(Species), POINTER :: SpcInfo
!=================================================================
! UPDATE_DRYDEPFREQ begins here!
!=================================================================
! Assume success
RC = GC_SUCCESS
! Initialize
SpcInfo => NULL()
!=================================================================
! Compute dry deposition frequencies; archive diagnostics
!=================================================================
!$OMP PARALLEL DO &
!$OMP DEFAULT( SHARED ) &
!$OMP PRIVATE( I, J, THIK, D, N, NDVZ, DVZ, SpcInfo )
DO J = 1, State_Grid%NY
DO I = 1, State_Grid%NX
! THIK = thickness of surface layer [m]
THIK = State_Met%BXHEIGHT(I,J,1)
! Now we calculate drydep throughout the entire PBL.
! Make sure that the PBL depth is greater than or equal
! to the thickness of the 1st layer (rjp, bmy, 7/21/03)
! Add option for non-local PBL mixing scheme: THIK must
! be the first box height. (Lin, 03/31/09)
! Now use PBL_DRYDEP instead of LNLPBL (ckeller, 3/5/15).
IF (Input_Opt%PBL_DRYDEP) THIK = MAX( State_Met%PBL_TOP_m(I,J), THIK )
! Loop over drydep species
DO D = 1, State_Chm%nDryDep
! GEOS-CHEM species number
N = State_Chm%Map_DryDep(D)
! Get info about this species from the database
SpcInfo => State_Chm%SpcData(N)%Info
! Index of drydep species in the State_Chm%DryDepVel array
! as passed back from subroutine DEPVEL
NDVZ = NDVZIND(D)
! Dry deposition velocity [cm/s]
DVZ = State_Chm%DryDepVel(I,J,NDVZ) * 100.e+0_f8
! Scale relative to specified species (krt, 3/1/15)
IF ( FLAG(D) .eq. 1 ) THEN
! Scale species to HNO3
DVZ = DVZ * sqrt(State_Chm%SpcData(id_HNO3)%Info%MW_g) &
/ sqrt(SpcInfo%MW_g)
ELSE IF ( FLAG(D) .eq. 2 ) THEN
! Scale species to PAN
DVZ = DVZ * sqrt(State_Chm%SpcData(id_PAN)%Info%MW_g) &
/ sqrt(SpcInfo%MW_g)
ELSE IF ( FLAG(D) .eq. 3 ) THEN
! Scale species to ISOPN
DVZ = DVZ * sqrt(State_Chm%SpcData(id_IHN1)%Info%MW_g) &
/ sqrt(SpcInfo%MW_g)
ENDIF
!-----------------------------------------------------------
! Special treatment for snow and ice
!-----------------------------------------------------------
IF ( (State_Met%isSnow(I,J)) .OR. (State_Met%isIce(I,J))) THEN
!-------------------------------------
! %%% SURFACE IS SNOW OR ICE %%%
!-------------------------------------
IF ( SpcInfo%DD_DvzAerSnow > 0.0_fp ) THEN
! For most aerosol species (basically everything
! except sea salt and dust species), we just set
! the deposition velocity over snow to a fixed value.
! (Modification by Jenny Fisher, dated 8/1/11)
DVZ = DBLE( SpcInfo%DD_DvzAerSnow )
ELSE
! Otherwise, enforce a minimum drydep velocity over snow
! (cf. the GOCART model). NOTE: In practice this will
! only apply to the species SO2, SO4, MSA, NH3, NH4, NIT.
DVZ = MAX( DVZ, DBLE( SpcInfo%DD_DvzMinVal(1) ) )
#ifdef LUO_WETDEP
IF ( DBLE( SpcInfo%DD_DvzMinVal(1) ) > 0.0_fp ) THEN
IF ( State_Met%TS(I,J) < 253.0_fp ) THEN
DVZ = DBLE( SpcInfo%DD_DvzMinVal(1) )
ENDIF
ENDIF
#endif
ENDIF
ELSE
!-------------------------------------
! %%% SURFACE IS NOT SNOW OR ICE %%%
!-------------------------------------
! Enforce a minimum drydep velocity over land (cf. the
! GOCART model). NOTE: In practice this will only apply
! to the species SO2, SO4, MSA, NH3, NH4, NIT.
DVZ = MAX( DVZ, DBLE( SpcInfo%DD_DvzMinVal(2) ) )
ENDIF
!-----------------------------------------------------------
! Special treatment for ACETONE
!-----------------------------------------------------------
! For ACET, we need to only do drydep over the land
! and not over the oceans.
IF ( N == id_ACET ) THEN
IF ( State_Met%IsLand(I,J) ) THEN
DVZ = 0.1e+0_f8
ELSE
DVZ = 0e+0_f8
ENDIF
ENDIF
!-----------------------------------------------------------
! Special treatment for ALD2
!-----------------------------------------------------------
! For ALD2, we need to only do drydep over the land
! and not over the oceans.
IF ( N == id_ALD2 ) THEN
IF ( .not. State_Met%IsLand(I,J) ) THEN
DVZ = 0e+0_f8
ENDIF
ENDIF
!-----------------------------------------------------------
! Special treatment for MENO3
!-----------------------------------------------------------
! For MENO3, we need to only do drydep over the land
! and not over the oceans.
IF ( N == id_MENO3 ) THEN
IF ( .not. State_Met%IsLand(I,J) ) THEN
DVZ = 0e+0_f8
ENDIF
ENDIF
!-----------------------------------------------------------
! Special treatment for ETNO3
!-----------------------------------------------------------
! For ETNO3, we need to only do drydep over the land
! and not over the oceans.
IF ( N == id_ETNO3 ) THEN
IF ( .not. State_Met%IsLand(I,J) ) THEN
DVZ = 0e+0_f8
ENDIF
ENDIF
!-----------------------------------------------------------
! Special treatment for MOH
!-----------------------------------------------------------
! For MOH, we need to only do drydep over the land
! and not over the oceans.
IF ( N == id_MOH ) THEN
IF ( .not. State_Met%IsLand(I,J) ) THEN
DVZ = 0e+0_f8
ENDIF
ENDIF
!-----------------------------------------------------------
! Compute drydep velocity and frequency
!-----------------------------------------------------------
! Dry deposition velocities [m/s]
State_Chm%DryDepVel(I,J,NDVZ) = DVZ / 100.e+0_f8
! Dry deposition frequency [1/s]
State_Chm%DryDepFreq(I,J,D) = State_Chm%DryDepVel(I,J,NDVZ) / THIK
! Free pointer
SpcInfo => NULL()
ENDDO
ENDDO
ENDDO
!$OMP END PARALLEL DO
! Set diagnostics - cnsider moving?
IF ( State_Diag%Archive_DryDepVel .or. &
State_Diag%Archive_DryDepVelForALT1 .or. &
State_Diag%Archive_SatDiagnDryDepVel ) THEN
!$OMP PARALLEL DO &
!$OMP DEFAULT( SHARED )&
!$OMP PRIVATE( D, S, N, A, NDVZ )
DO D = 1, State_Chm%nDryDep
! Point to State_Chm%DryDepVel [m/s]
NDVZ = NDVZIND(D)
! Dry dep velocity [cm/s]
IF ( State_Diag%Archive_DryDepVel ) THEN
S = State_Diag%Map_DryDepVel%id2slot(D)
IF ( S > 0 ) THEN
State_Diag%DryDepVel(:,:,S) = &
State_Chm%DryDepVel(:,:,NDVZ) * 100.0_f4
ENDIF
ENDIF
! Satellite diagnostic: Dry dep velocity [cm/s]
IF ( State_Diag%Archive_SatDiagnDryDepVel ) THEN
S = State_Diag%Map_SatDiagnDryDepVel%id2slot(D)
IF ( S > 0 ) THEN
State_Diag%SatDiagnDryDepVel(:,:,S) = &
State_Chm%DryDepVel(:,:,NDVZ) * 100.0_f4
ENDIF
ENDIF
! Dry dep velocity [cm/s] for species at altitude (e.g. 10m)
IF ( State_Diag%Archive_DryDepVelForALT1 ) THEN
! Get the "DryAltID" index, that is used to archive species
! concentrations at a user-defined altitude above the surface
! GEOS-CHEM species number
N = State_Chm%Map_DryDep(D)
A = State_Chm%SpcData(N)%Info%DryAltID
IF ( A > 0 ) THEN
State_Diag%DryDepVelForALT1(:,:,A) = &
State_Chm%DryDepVel(:,:,NDVZ) * 100._f4
ENDIF
ENDIF
ENDDO
!$OMP END PARALLEL DO
ENDIF
END SUBROUTINE UPDATE_DRYDEPFREQ
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: OceanO3
!
! !DESCRIPTION: Function OCEANO3 calculates the dry deposition velocity of O3
! to the ocean using method described in Pound et.al (2019)
! currently under discussion in ACPD.
! Accounts for the turbulence of the ocean surface,Iodide concentration
! and surface temperature effects on the dry deposition velocity of
! ozone to the ocean.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE OCEANO3( TEMPK, USTAR, IODIDE_IN, I, J, DEPV )
!
! !USES:
!
USE Input_Opt_Mod, ONLY : OptInput
USE State_Met_Mod, ONLY : MetState
!
! !INPUT PARAMETERS:
!
REAL(f8), INTENT(IN) :: TEMPK ! Temperature [K]
REAL(f8), INTENT(IN) :: USTAR ! Fictional Velocity [m/s]
REAL(fp), INTENT(IN) :: IODIDE_IN ! Surface iodide concentration [nM]
INTEGER, INTENT(IN) :: I,J
REAL(f8), INTENT(OUT) :: DEPV ! the new deposition vel [cm/s]
!
! !REVISION HISTORY:
! 21 Aug 2018 - R. Pound - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
REAL(f8) :: a,D,DelM,b,PSI,LAM,EP,USTARWater,K0,K1,Iodide
!=================================================================
! OCEANO3 begins here!
!=================================================================
USTARWater = 0.0345_f8*USTAR !waterside friction velocity
Iodide = IODIDE_IN*1.0E-9_f8 ! Convert from nM to M
a = Iodide*EXP((-8772.2/TEMPK)+51.5) !chemical reactivity
D = 1.1E-6*EXP(-1896.0/TEMPK) ! diffusivity
DelM = SQRT(D/a) ! reaction-diffusion length
b = 2.0_f8/(0.4_f8*USTARWater)
LAM = DelM*SQRT(a/D) ! this cancels to 1 but here for completeness
! of equations
EP = SQRT(2.0_f8*a*b*(DelM+(b*D/2.0_f8)))
PSI = EP/SQRT(a*b**2*D)
CALL K0K1_APROX(EP,K0,K1)
DEPV = SQRT(a*D)*((PSI*K1*COSH(LAM)+K0*SINH(LAM))/(PSI*K1* &
SINH(LAM)+K0*COSH(LAM)))
END SUBROUTINE OCEANO3
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: K0K1_APROX
!
! !DESCRIPTION: Function to estimate the modified Bessel functions of
! the second kind order zero and one (K0,K1). Approach initially based on
! that described in Numerical Recipes in Fortran 90 second edition
! (1996). This implementation is designed to be specific to the use
! case required for calculating oceanic deposition velocity. Uses a
! polynomial fit of each type of modified bessel function to
! estimate the value of the function for each input.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE K0K1_APROX( input_arg, K0, K1 )
!
! !INPUT PARAMETERS:
!
REAL(f8), INTENT(IN) :: input_arg !the value we want the soln for
REAL(f8), INTENT(OUT) :: K0,K1 !the values of the modified bessel fncs
!
! !REVISION HISTORY:
! 21 Aug 2018 - R. Pound - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
REAL(f8), DIMENSION(7) :: coeff !coefficients for polynomial fit
! of each bessel function
REAL(f8) :: I0,I1 !modified bessel functions of
! first kind order 0 and 1
! determine which fit method is best for the bessel functions
IF (input_arg <= 2.0_f8) THEN
! begin the calculation of k0 by estimating i0
coeff = (/1.0,3.5156229,3.0899424,1.2067492,0.2659732, &
0.360768e-1,0.45813e-2/)
I0 = poly_fit((input_arg/3.75_f8)**2,coeff)
!now we can use this estimate of i0 to calculate k0
coeff = (/-0.57721566,0.42278420,0.23069756,0.3488590e-1, &
0.262698e-2,0.10750e-3,0.74e-5/)
K0 = (-LOG(0.5_f8*input_arg)*I0)+ &
poly_fit(0.25_f8*input_arg**2,coeff)
!begin the calculation of k0 by estimating i1
coeff = (/0.5,0.87890594,0.51498869,0.15084934,0.2658733e-1, &
0.301532e-2,0.32411e-3/)
I1 = input_arg*poly_fit((input_arg/3.75_f8)**2,coeff)
! now we can use this to estimate to get a value for k1
coeff = (/1.0,0.15443144,-0.67278579,-0.18156897, &
-0.1919402e-1,-0.110404e-2,-0.4686e-4/)
K1 = (LOG(0.5_f8*input_arg)*I1)+(1.0_f8/input_arg)* &
poly_fit(0.25_f8*input_arg**2,coeff)
ELSE !use a different approximation that doesn't need I0/I1
coeff = (/1.25331414,-0.7832358e-1,0.2189568e-1,-0.1062446e-1, &
0.587872e-2,-0.251540e-2,0.53208e-3/)
K0 = (EXP(-input_arg)/SQRT(input_arg))* &
poly_fit((2.0_f8/input_arg),coeff)
coeff = (/1.25331414,0.23498619,-0.3655620e-1,0.1504268e-1, &
-0.780353e-2,0.325614e-2,-0.68245e-3/)
K1 = (EXP(-input_arg)/SQRT(input_arg))* &
poly_fit((2.0_f8/input_arg),coeff)
ENDIF
END SUBROUTINE K0K1_APROX
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: poly_fit
!
! !DESCRIPTION: Function to calculate the value of a polynomial fit,
! used in the K0K1_APPROX function in estimating the values of a
! modified bessel function.
!\\
!\\
! !INTERFACE:
!
FUNCTION poly_fit ( input, coeffs )
!
! !INPUT PARAMETERS:
!
REAL(f8), INTENT(IN) :: input
REAL(f8), DIMENSION(:), INTENT(IN) :: coeffs
!
! !REVISION HISTORY:
! 21 Aug 2018 - R. Pound - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
REAL(f8) :: poly_fit
INTEGER :: i
poly_fit = 0
DO i = 1,7,1
poly_fit = poly_fit+coeffs(i)*input**i
ENDDO
END FUNCTION poly_fit
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: metero
!
! !DESCRIPTION: Subroutine METERO calculates meteorological constants needed
! for the dry deposition velocity module. (lwh, gmg, djj, 1989, 1994; bmy,
! 10/3/05)
!\\
!\\
! !INTERFACE:
!
SUBROUTINE METERO( State_Grid, State_Met, CZ1, TC0, OBK, CFRAC, &
RADIAT, AZO, USTR, ZH, RHB, &
PRESSU, W10, SUNCOS_MID )
!
! !USES:
!
USE Calc_Met_Mod, ONLY : GET_OBK
USE State_Grid_Mod, ONLY : GrdState
USE State_Met_Mod, ONLY : MetState
!
! !INPUT PARAMETERS:
!
TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object
TYPE(MetState), INTENT(IN) :: State_Met ! Meteorology State object
!
! !OUTPUT PARAMETERS:
!
REAL(f8), INTENT(OUT) :: CZ1 (State_Grid%NX,State_Grid%NY) ! Midpt ht of 1st model lev [m]
REAL(f8), INTENT(OUT) :: TC0 (State_Grid%NX,State_Grid%NY) ! Grid box sfc temp [K]
REAL(f8), INTENT(OUT) :: OBK (State_Grid%NX,State_Grid%NY) ! Monin-Obhukov length [m]
REAL(f8), INTENT(OUT) :: CFRAC (State_Grid%NX,State_Grid%NY) ! Column cloud fraction [unitless]
REAL(f8), INTENT(OUT) :: RADIAT(State_Grid%NX,State_Grid%NY) ! Solar radiation @ ground [W/m2]
REAL(f8), INTENT(OUT) :: RHB (State_Grid%NX,State_Grid%NY) ! Rel humidity at sfc [unitless]
REAL(f8), INTENT(OUT) :: USTR (State_Grid%NX,State_Grid%NY) ! Friction velocity [m/s]
REAL(f8), INTENT(OUT) :: ZH (State_Grid%NX,State_Grid%NY) ! PBL height [m]
REAL(f8), INTENT(OUT) :: PRESSU(State_Grid%NX,State_Grid%NY) ! Local surface press [Pa]
REAL(f8), INTENT(OUT) :: W10 (State_Grid%NX,State_Grid%NY) ! 10 meter windspeed [m/s]
REAL(f8), INTENT(OUT) :: SUNCOS_MID(State_Grid%NX,State_Grid%NY) ! COS(SZA) @ midpt of current chem timestep
REAL(f8), INTENT(OUT) :: AZO(State_Grid%NX,State_Grid%NY) ! Roughness heights, by grid box
!
! !REMARKS:
! .
! References (see full citations above):
! ============================================================================
! (1 ) Wesely, M. L., 1989.
! (2 ) Jacob, D.J., and S.C. Wofsy, 1990
!
! !REVISION HISTORY:
! 20 Nov 2002 - R. Yantosca - Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
INTEGER :: I, J
REAL(f8) :: THIK
REAL(f8) :: SP
REAL(f8) :: SFCWINDSQR
!========================================================================
! METERO begins here!
!========================================================================
! Loop over surface grid boxes
!$OMP PARALLEL DO &
!$OMP DEFAULT( SHARED )&
!$OMP PRIVATE( I, J, THIK, SP, SFCWINDSQR )&
!$OMP COLLAPSE( 2 )
DO J = 1, State_Grid%NY
DO I = 1, State_Grid%NX
! THIK = thickness of layer 1 [m]
THIK = State_Met%BXHEIGHT(I,J,1)
! Midpoint height of first model level [m]
CZ1(I,J) = THIK / 2.0e+0_f8
! Local surface pressure [hPa] (mpayer, 1/10/12)
! Use moist air pressure for mean free path (ewl, 3/2/15)
SP = State_Met%PEDGE(I,J,1)
! Convert from hPa to Pa for SFCPRESS
PRESSU(I,J) = SP * 1.e+2_f8
!==============================================================
! Return meterological quantities for DEPVEL
!==============================================================
! Roughness height [m]
AZO(I,J) = State_Met%Z0(I,J)
! Column cloud fraction [unitless]
CFRAC(I,J) = State_Met%CLDFRC(I,J)
! Monin-Obhukov length [m]
OBK(I,J) = GET_OBK( I, J, State_Met )
! Solar insolation @ ground [W/m2]
RADIAT(I,J) = State_Met%SWGDN(I,J)
! Surface temperature [K]
TC0(I,J) = State_Met%TS(I,J)
! Friction velocity [m/s]
USTR(I,J) = State_Met%USTAR(I,J)
! Mixed layer depth [m]
ZH(I,J) = State_Met%PBL_TOP_m(I,J)
! Relative humidity @ surface [unitless] (bec, bmy, 4/13/05)
!RHB(I,J) = MIN( 0.99e+0_f8, RH(I,J,1) * 1.d-2 )
! changed to 98% due to vapor pressure lowering above sea water
! (Lewis & Schwartz, 2004)
! jaegle (5/11/11)
RHB(I,J) = MIN( 0.98_f8, State_Met%RH(I,J,1) * 1.0e-2_f8 )
! 10m windspeed [m/s] (jaegle 5/11/11)
SFCWINDSQR = State_Met%U10M(I,J)**2 + State_Met%V10M(I,J)**2
W10(I,J) = SQRT( SFCWINDSQR )
! Cosine of solar zenith angle at midpoint
! of the current chemistry timestep.
SUNCOS_MID(I,J) = State_Met%SUNCOSmid(I,J)
ENDDO
ENDDO
!$OMP END PARALLEL DO
END SUBROUTINE METERO
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: depvel
!
! !DESCRIPTION: Subroutine DEPVEL computes the dry deposition velocities using
! a resistance-in-series model.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE DEPVEL( Input_Opt, State_Chm, State_Diag, State_Grid, &