-
Notifications
You must be signed in to change notification settings - Fork 170
/
aermass_container_mod.F90
726 lines (657 loc) · 22.1 KB
/
aermass_container_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
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !MODULE: aermass_container_mod.F90
!
! !DESCRIPTION: Module AERMASS\_CONTAINER\_MOD contains the derived type used
! to store aerosol data used for computing optical depths and diagnostics.
!\\
!\\
! !INTERFACE:
!
MODULE AerMass_Container_Mod
!
! USES:
!
USE ErrCode_Mod
USE Precision_Mod
IMPLICIT NONE
PRIVATE
!
! !PUBLIC MEMBER FUNCTIONS:
!
PUBLIC :: Init_AerMass_Container
PUBLIC :: Cleanup_AerMass_Container
!
! !PUBLIC DATA MEMBERS:
!
!=========================================================================
! Derived type for aerosol data container
!=========================================================================
TYPE, PUBLIC :: AerMassContainer
! Arrays
!========================================================================
! OCFPOA : OM/OC for POA [unitless] - used in carbon_mod
! OCFOPOA : OM/OC for OPOA, OCPI, OCPO [unitless] - used in carbon_mod
! BCPI : Hydrophilic black carbon aerosol [kg/m3]
! BCPO : Hydrophobic black carbon aerosol [kg/m3]
! OCPI : Hydrophilic organic carbon aerosol [kg/m3]
! OCPO : Hydrophobic organic carbon aerosol [kg/m3]
! OCPISOA : Hydrophilic OC + SOA aerosol [kg/m3]
! SALA : Accumulation mode seasalt aerosol [kg/m3]
! ACL : Accumulation mode Cl aerosol [kg/m3]
! SALC : Coarse mode seasalt aerosol [kg/m3]
! SO4_NH4_NIT : Lumped SO4-NH4-NIT aerosol [kg/m3]
! SO4 : Sulfate aerosol [kg/m3]
! HMS : Hydroxymethane sulfonate aerosol [kg/m3]
! NH4 : Ammonium aerosol [kg/m3]
! NIT : Inorganic nitrate aerosol [kg/m3]
! SLA : Stratospheric liquid aerosol [kg/m3]
! SPA : Stratospheric particulate aerosol [kg/m3]
! TSOA : Terpene SOA [kg/m3]
! ASOA : Aromatic + IVOC SOA [kg/m3]
! OPOA : Aerosol product of SVOC oxidation [kg/m3]
! SOAGX : SOA product of GLYX [kg/m3]
! SOAIE : SOA product of IEPOX & HMML [kg/m3]
! PM25 : Particulate matter < 2.5 um [kg/m3]
! PM10 : Particulate matter < 10 um [kg/m3]
! PDER : Parameterized effective Radius for SNA and OM [nm] - used for AOD calcualtion (H. Zhu)
! ISOAAQ : Isoprene SOA (aqueous formation) [kg/m3]
! SOAS : Simple SOA [kg/m3]
! FRAC_SNA :
! DAERSL : Mass of hydrophobic aerosol (Mian Chin)
! WAERSL : Mass of hydrophilic aerosol (Mian Chin)
!========================================================================
REAL(fp), POINTER :: OCFPOA (:,:)
REAL(fp), POINTER :: OCFOPOA (:,:)
REAL(fp), POINTER :: BCPI (:,:,:)
REAL(fp), POINTER :: BCPO (:,:,:)
REAL(fp), POINTER :: OCPI (:,:,:)
REAL(fp), POINTER :: OCPO (:,:,:)
REAL(fp), POINTER :: OCPISOA (:,:,:)
REAL(fp), POINTER :: SALA (:,:,:)
REAL(fp), POINTER :: ACL (:,:,:)
REAL(fp), POINTER :: SALC (:,:,:)
REAL(fp), POINTER :: SO4_NH4_NIT(:,:,:)
REAL(fp), POINTER :: SO4 (:,:,:)
REAL(fp), POINTER :: HMS (:,:,:)
REAL(fp), POINTER :: NH4 (:,:,:)
REAL(fp), POINTER :: NIT (:,:,:)
REAL(fp), POINTER :: SLA (:,:,:)
REAL(fp), POINTER :: SPA (:,:,:)
REAL(fp), POINTER :: TSOA (:,:,:)
REAL(fp), POINTER :: ASOA (:,:,:)
REAL(fp), POINTER :: OPOA (:,:,:)
REAL(fp), POINTER :: SOAGX (:,:,:)
REAL(fp), POINTER :: PM25 (:,:,:)
REAL(fp), POINTER :: PM10 (:,:,:)
REAL(fp), POINTER :: PDER (:,:,:) !H. Zhu
REAL(fp), POINTER :: SNAOM (:,:,:) !H. Zhu
REAL(fp), POINTER :: R_OMSNA (:,:,:) !H. Zhu
REAL(fp), POINTER :: ISOAAQ (:,:,:)
REAL(fp), POINTER :: SOAS (:,:,:)
REAL(fp), POINTER :: FRAC_SNA (:,:,:,:)
REAL(fp), POINTER :: DAERSL (:,:,:,:)
REAL(fp), POINTER :: WAERSL (:,:,:,:)
END TYPE AerMassContainer
!
! !REMARKS:
!
! !REVISION HISTORY:
! 28 Mar 2023 - E. Lundgren- Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
CONTAINS
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: Init_AerMass_Container
!
! !DESCRIPTION: Subroutine INIT\_AER\_Container allocates and initializes
! the Aer container object.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE Init_AerMass_Container( Input_Opt, State_Grid, Aer, RC )
!
! !USES:
!
USE CMN_Size_Mod, ONLY : NAER
USE Input_Opt_Mod, ONLY : OptInput
USE State_Grid_Mod, ONLY : GrdState
!
! !INPUT PARAMETERS:
!
TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object
TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid object
!
! !INPUT/OUTPUT PARAMETERS:
!
TYPE(AerMassContainer), POINTER :: Aer ! Aerosol data container
!
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Success or failure?
!
! !REVISION HISTORY:
! 28 Mar 2023 - E. Lundgren- Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES:
!
CHARACTER(LEN=255) :: errMsg, thisLoc
INTEGER :: NX, NY, NZ
!======================================================================
! Init_AerMass_Container starts here
!======================================================================
! Initialize local variables
RC = GC_SUCCESS
thisLoc = ' -> at Init_AerMass_Container (in module Headers/aermass_container_mod.F90)'
NX = State_Grid%NX
NY = State_Grid%NY
NZ = State_Grid%NZ
! Exit immediately if this is a dry-run
IF ( Input_Opt%DryRun ) RETURN
!======================================================================
! Initialize arrays
!======================================================================
! OM/OC for POA
ALLOCATE( Aer%OCFPOA( NX, NY ), STAT=RC )
CALL GC_CheckVar( 'OCFPOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OCFPOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OCFPOA = 0.0_fp
! OM/OC for OPOA, OCPI, OCPO
ALLOCATE( Aer%OCFOPOA( NX, NY ), STAT=RC )
CALL GC_CheckVar( 'OCFOPOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OCFOPOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OCFOPOA = 0.0_fp
ALLOCATE( Aer%BCPI( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'BCPI', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array BCPI!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%BCPI = 0.0_fp
ALLOCATE( Aer%BCPO( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'BCPO', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array BCPO!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%BCPO = 0.0_fp
ALLOCATE( Aer%OCPI( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'OCPI', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OCPI!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OCPI = 0.0_fp
ALLOCATE( Aer%OCPO( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'OCPO', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OCPO!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OCPO = 0.0_fp
ALLOCATE( Aer%OCPISOA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'OCPISOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OCPISOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OCPISOA = 0.0_fp
ALLOCATE( Aer%SALA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SALA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SALA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SALA = 0.0_fp
ALLOCATE( Aer%SALC( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SALC', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SALC!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SALC = 0.0_fp
ALLOCATE( Aer%ACL( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'ACL', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array ACL!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%ACL = 0.0_fp
ALLOCATE( Aer%SO4_NH4_NIT( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SO4_NH4_NIT', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SO4_NH4_NIT!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SO4_NH4_NIT = 0.0_fp
ALLOCATE( Aer%SO4( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SO4', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SO4!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SO4 = 0.0_fp
! (jmm, 06/30/18)
ALLOCATE( Aer%HMS( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'HMS', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array HMS!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%HMS = 0.0_fp
ALLOCATE( Aer%NH4( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'NH4', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array NH4!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%NH4 = 0.0_fp
ALLOCATE( Aer%NIT( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'NIT', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array NIT!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%NIT = 0.0_fp
ALLOCATE( Aer%SLA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SLA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SLA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SLA = 0.0_fp
ALLOCATE( Aer%SPA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SPA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SPA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SPA = 0.0_fp
ALLOCATE( Aer%TSOA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'TSOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array TSOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%TSOA = 0.0_fp
ALLOCATE( Aer%ASOA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'ASOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array ASOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%ASOA = 0.0_fp
ALLOCATE( Aer%OPOA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'OPOA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array OPOA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%OPOA = 0.0_fp
ALLOCATE( Aer%PM25( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'PM25', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array PM25!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%PM25 = 0.0_fp
!zhaisx
ALLOCATE( Aer%PM10( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'PM10', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array PM10!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%PM10 = 0.0_fp
! H. Zhu
ALLOCATE( Aer%PDER( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'PDER', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array PDER!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%PDER = 0.0_fp
! H. Zhu
ALLOCATE( Aer%SNAOM( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SNAOM', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SNAOM!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SNAOM = 0.0_fp
! H. Zhu
ALLOCATE( Aer%R_OMSNA( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'R_OMSNA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array R_OMSNA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%R_OMSNA = 0.0_fp
ALLOCATE( Aer%SOAGX( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SOAGX', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SOAGX!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SOAGX = 0.0_fp
! Mechanistic isoprene SOA (eam, 2014):
ALLOCATE( Aer%ISOAAQ( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'ISOAAQ', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array ISOAAQ!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%ISOAAQ = 0.0_fp
! Simple SOA
ALLOCATE( Aer%SOAS( NX, NY, NZ ), STAT=RC )
CALL GC_CheckVar( 'SOAS', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array SOAS!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%SOAS = 0.0_fp
ALLOCATE( Aer%FRAC_SNA( NX, NY, NZ, 3 ), STAT=RC )
CALL GC_CheckVar( 'FRAC_SNA', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array FRAC_SNA!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%FRAC_SNA = 0.0_fp
! Mass of hydrophobic aerosol from Mian Chin
ALLOCATE( Aer%DAERSL( NX, NY, NZ, 2 ), STAT=RC )
CALL GC_CheckVar( 'DAERSL', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array DAERSL!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%DAERSL = 0.0_fp
! Mass of hydrophilic aerosol from Mian Chin
ALLOCATE( Aer%WAERSL( NX, NY, NZ, NAER ), STAT=RC )
CALL GC_CheckVar( 'WAERSL', 0, RC )
IF ( RC /= GC_SUCCESS ) THEN
errMsg = 'Error allocating array WAERSL!'
CALL GC_Error( errMsg, RC, thisLoc )
RETURN
ENDIF
Aer%WAERSL = 0.0_fp
END SUBROUTINE Init_AerMass_Container
!EOC
!------------------------------------------------------------------------------
! GEOS-Chem Global Chemical Transport Model !
!------------------------------------------------------------------------------
!BOP
!
! !IROUTINE: Cleanup_AerMass_Container
!
! !DESCRIPTION: Subroutine CLEANUP\_AER\_CONTAINER deallocates all fields
! of the aer container object.
!\\
!\\
! !INTERFACE:
!
SUBROUTINE Cleanup_AerMass_Container( Aer, RC )
!
! !INPUT/OUTPUT PARAMETERS:
!
TYPE(AerMassContainer), POINTER :: Aer ! Aer data container
!
! !OUTPUT PARAMETERS:
!
INTEGER, INTENT(OUT) :: RC ! Return code
!
! !REVISION HISTORY:
! 28 Mar 2023 - E. Lundgren- Initial version
! See https://github.com/geoschem/geos-chem for complete history
!EOP
!------------------------------------------------------------------------------
!BOC
!======================================================================
! Cleanup_AerMass_Container starts here
!======================================================================
! Assume success
RC = GC_SUCCESS
! Deallocate arrays and nullify pointer
IF ( ASSOCIATED( Aer%OCFPOA ) ) THEN
DEALLOCATE( Aer%OCFPOA, STAT=RC )
CALL GC_CheckVar( 'Aer%OCFPOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OCFPOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%OCFOPOA ) ) THEN
DEALLOCATE( Aer%OCFOPOA, STAT=RC )
CALL GC_CheckVar( 'Aer%OCFOPOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OCFOPOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%BCPI ) ) THEN
DEALLOCATE( Aer%BCPI, STAT=RC )
CALL GC_CheckVar( 'Aer%BCPI', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%BCPI => NULL()
ENDIF
IF ( ASSOCIATED( Aer%BCPO ) ) THEN
DEALLOCATE( Aer%BCPO, STAT=RC )
CALL GC_CheckVar( 'Aer%BCPO', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%BCPO => NULL()
ENDIF
IF ( ASSOCIATED( Aer%OCPI ) ) THEN
DEALLOCATE( Aer%OCPI, STAT=RC )
CALL GC_CheckVar( 'Aer%OCPI', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OCPI => NULL()
ENDIF
IF ( ASSOCIATED( Aer%OCPO ) ) THEN
DEALLOCATE( Aer%OCPO, STAT=RC )
CALL GC_CheckVar( 'Aer%OCPO', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OCPO => NULL()
ENDIF
IF ( ASSOCIATED( Aer%OCPISOA ) ) THEN
DEALLOCATE( Aer%OCPISOA, STAT=RC )
CALL GC_CheckVar( 'Aer%OCPISOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OCPISOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SALA ) ) THEN
DEALLOCATE( Aer%SALA, STAT=RC )
CALL GC_CheckVar( 'Aer%SALA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SALA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%ACL ) ) THEN
DEALLOCATE( Aer%ACL, STAT=RC )
CALL GC_CheckVar( 'Aer%ACL', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%ACL => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SALC ) ) THEN
DEALLOCATE( Aer%SALC, STAT=RC )
CALL GC_CheckVar( 'Aer%SALC', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SALC => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SO4_NH4_NIT ) ) THEN
DEALLOCATE( Aer%SO4_NH4_NIT, STAT=RC )
CALL GC_CheckVar( 'Aer%SO4_NH4_NIT', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SO4_NH4_NIT => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SO4 ) ) THEN
DEALLOCATE( Aer%SO4, STAT=RC )
CALL GC_CheckVar( 'Aer%SO4', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SO4 => NULL()
ENDIF
IF ( ASSOCIATED( Aer%HMS ) ) THEN
DEALLOCATE( Aer%HMS, STAT=RC )
CALL GC_CheckVar( 'Aer%HMS', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%HMS => NULL()
ENDIF
IF ( ASSOCIATED( Aer%NH4 ) ) THEN
DEALLOCATE( Aer%NH4, STAT=RC )
CALL GC_CheckVar( 'Aer%NH4', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%NH4 => NULL()
ENDIF
IF ( ASSOCIATED( Aer%NIT ) ) THEN
DEALLOCATE( Aer%NIT, STAT=RC )
CALL GC_CheckVar( 'Aer%NIT', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%NIT => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SLA ) ) THEN
DEALLOCATE( Aer%SLA, STAT=RC )
CALL GC_CheckVar( 'Aer%SLA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SLA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SPA ) ) THEN
DEALLOCATE( Aer%SPA, STAT=RC )
CALL GC_CheckVar( 'Aer%SPA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SPA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%TSOA ) ) THEN
DEALLOCATE( Aer%TSOA, STAT=RC )
CALL GC_CheckVar( 'Aer%TSOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%TSOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%ASOA ) ) THEN
DEALLOCATE( Aer%ASOA, STAT=RC )
CALL GC_CheckVar( 'Aer%ASOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%ASOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%OPOA ) ) THEN
DEALLOCATE( Aer%OPOA, STAT=RC )
CALL GC_CheckVar( 'Aer%OPOA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%OPOA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SOAGX ) ) THEN
DEALLOCATE( Aer%SOAGX, STAT=RC )
CALL GC_CheckVar( 'Aer%SOAGX', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SOAGX => NULL()
ENDIF
IF ( ASSOCIATED( Aer%PM25 ) ) THEN
DEALLOCATE( Aer%PM25, STAT=RC )
CALL GC_CheckVar( 'Aer%PM25', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%PM25 => NULL()
ENDIF
IF ( ASSOCIATED( Aer%PM10 ) ) THEN
DEALLOCATE( Aer%PM10, STAT=RC )
CALL GC_CheckVar( 'Aer%PM10', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%PM10 => NULL()
ENDIF
! H. Zhu
IF ( ASSOCIATED( Aer%PDER ) ) THEN
DEALLOCATE( Aer%PDER, STAT=RC )
CALL GC_CheckVar( 'Aer%PDER', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%PDER => NULL()
ENDIF
! H. Zhu
IF ( ASSOCIATED( Aer%SNAOM ) ) THEN
DEALLOCATE( Aer%SNAOM, STAT=RC )
CALL GC_CheckVar( 'Aer%SNAOM', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SNAOM => NULL()
ENDIF
! H. Zhu
IF ( ASSOCIATED( Aer%R_OMSNA ) ) THEN
DEALLOCATE( Aer%R_OMSNA, STAT=RC )
CALL GC_CheckVar( 'Aer%R_OMSNA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%R_OMSNA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%ISOAAQ ) ) THEN
DEALLOCATE( Aer%ISOAAQ, STAT=RC )
CALL GC_CheckVar( 'Aer%ISOAAQ', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%ISOAAQ => NULL()
ENDIF
IF ( ASSOCIATED( Aer%SOAS ) ) THEN
DEALLOCATE( Aer%SOAS, STAT=RC )
CALL GC_CheckVar( 'Aer%SOAS', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%SOAS => NULL()
ENDIF
IF ( ASSOCIATED( Aer%FRAC_SNA ) ) THEN
DEALLOCATE( Aer%FRAC_SNA, STAT=RC )
CALL GC_CheckVar( 'Aer%FRAC_SNA', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%FRAC_SNA => NULL()
ENDIF
IF ( ASSOCIATED( Aer%DAERSL ) ) THEN
DEALLOCATE( Aer%DAERSL, STAT=RC )
CALL GC_CheckVar( 'Aer%DAERSL', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%DAERSL => NULL()
ENDIF
IF ( ASSOCIATED( Aer%WAERSL ) ) THEN
DEALLOCATE( Aer%WAERSL, STAT=RC )
CALL GC_CheckVar( 'Aer%WAERSL', 2, RC )
IF ( RC /= GC_SUCCESS ) RETURN
Aer%WAERSL => NULL()
ENDIF
END SUBROUTINE Cleanup_AerMass_Container
!EOC
END MODULE AerMass_Container_Mod