From 6be6119aa273d25f656d906ea824b68806d3a38d Mon Sep 17 00:00:00 2001
From: hsinmulin-NOAA <48441737+hsinmulin-NOAA@users.noreply.github.com>
Date: Tue, 10 Aug 2021 15:51:04 -0400
Subject: [PATCH] Code and parm modification for the RRFS-CMAQ chemistry
calciulation (#346)
* New modification for the RRFS-CMAQ PMTF (PM2.5)
New modification for the RRFS-CMAQ
* Modification to include necessary variables for the RRFS-CMAQ
Modification to include necessary variables for the RRFS-CMAQ
* Delete fv3lam_cmaq_post_avblflds.xml-org
* Delete fv3lam_cmaq.xml-org
* Delete fv3lam_cmaq.xml-pmtf_only
* Delete fv3lam_cmaq_post_avblflds.xml-new
* Delete makefile-cmaq
* Delete makefile-org
* Delete ALLOCATE_ALL.f-org
* Delete ALLOCATE_ALL.f-pmtf
* Delete DEALLOCATE.f-org
* Delete DEALLOCATE.f-pmtf
* Delete INITPOST_NETCDF.f-org
* Delete INITPOST_NETCDF.f-pmtf
* Delete MDLFLD.f-org
* Delete MDLFLD.f-pmtf
* Delete MDLFLD.f-pmtf-unit
* Delete RQSTFLD.F-org
* Delete RQSTFLD.F-pmtf
* Delete VRBLS3D_mod.f-org
* Delete VRBLS3D_mod.f-pmtf
* unified "post_avblflds.xml" related change
Update files according to the removal of "fv3lam_cmaq_post_avblflds.xml" to a unified "post_avblflds.xml"
* Delete fv3lam_cmaq_post_avblflds.xml
to an unified "post_avblflds.xml"
* remove variables do not in the GRIB2 TABLE
Update the file for variables used in the output and defined in GRIB2 TABLE
* Update codes to consistent with changes in parm
Remove variables that will not be used in UPP output.
* Remove O3MR
Remove O3MR that has been processed in the original code
The removal of O3MR in both codes also eliminate the duplicated "O3MR" in UPP output
* Change the allocation
Add "aqfcmaq_on" as the itag for the conditional allocation for the input variables. Only variables in the output are set in the main allocation, the rest are set as local in the "INITPOST_NETCDF" and will only be used when "aqfcmaq_on=.true."
* Initialize the AQF related variables to be "0." instead of "spval"
The purpose for the initialization is for run without itag "aqfcmaq_on=.true." (default is "aqfcmaq_on=.false."). The value of PMTF & OZCON shown in the output will be "0" instead of misled value related to the calculation from "spval". O3MR is the tracer also in FV3GFS, the process is outside the "aqfcmaq_on" itag control.
* renew file
Reload the file to eliminate the "block & spacce" (-b) difference from the code diff
* Further limit the allociation of AQF UPP output
Further limit the allocation of AQF UPP output variables only exist when itag "aqfcmaq_on=.true." (default .false.). With itag "aqfcmaq=.true." , the UPP output will contains the allocated variables (currently, OZCON, PMTF). Without the itag (default .false.), the UPP output will return to original non-CMAQ version (no OZCON & PMTF)
* Remove O3MR
Remove O3mr that has been coded in the original code as "O3" from related codes
* change makefile
comment out the RRFS-CMAQ related process currently for it is not in the RRFS prallel run
* New NT file for chemistry only
file contains only chemical species that have been added to the source code "initpost_netcdf".
* Revert makefile to original
exclude the generation of RRFS-CMAQ control file related changes until parallel setup.
---
parm/fv3lam_cmaq.xml | 53 ++
parm/post_avblflds.xml | 15 +
parm/postxconfig-NT-fv3lam_cmaq.txt | 129 +++++
sorc/ncep_post.fd/ALLOCATE_ALL.f | 22 +-
sorc/ncep_post.fd/CTLBLK.f | 2 +-
sorc/ncep_post.fd/DEALLOCATE.f | 8 +-
sorc/ncep_post.fd/INITPOST_NETCDF.f | 764 +++++++++++++++++++++++++++-
sorc/ncep_post.fd/MDLFLD.f | 75 ++-
sorc/ncep_post.fd/RQSTFLD.F | 40 +-
sorc/ncep_post.fd/VRBLS3D_mod.f | 5 +-
sorc/ncep_post.fd/WRFPOST.f | 5 +-
11 files changed, 1090 insertions(+), 28 deletions(-)
create mode 100644 parm/fv3lam_cmaq.xml
create mode 100644 parm/postxconfig-NT-fv3lam_cmaq.txt
diff --git a/parm/fv3lam_cmaq.xml b/parm/fv3lam_cmaq.xml
new file mode 100644
index 000000000..4ef8bd0e9
--- /dev/null
+++ b/parm/fv3lam_cmaq.xml
@@ -0,0 +1,53 @@
+
+
+
+
+ CMAQ
+ 32769
+ ncep_nco
+ v2003
+ local_tab_yes1
+ fcst
+ oper
+ fcst
+ fcst
+ hour
+ nws_ncep
+ nmm_8km
+ complex_packing_spatial_diff
+ 2nd_ord_sptdiff
+ fltng_pnt
+ lossless
+
+
+ PM25TOT_ON_HYBRID_LVL
+ PMTF
+ NCEP
+ 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.
+ 7.0
+
+
+
+ O3MR_ON_HYBRID_LVL
+ O3MR
+ NCEP
+ 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.
+ 7.0
+
+
+
+ OZCON_ON_HYBRID_LVL
+ OZCON
+ NCEP
+ 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.
+ 7.0
+
+
+
+
diff --git a/parm/post_avblflds.xml b/parm/post_avblflds.xml
index 2bdb0f090..bcca03e07 100755
--- a/parm/post_avblflds.xml
+++ b/parm/post_avblflds.xml
@@ -7709,6 +7709,21 @@
6.0
+
+ 994
+ OZCON_ON_HYBRID_LVL
+ OZCON
+ hybrid_lvl
+ 7.0
+
+
+
+ 995
+ PM25TOT_ON_HYBRID_LVL
+ PMTF
+ hybrid_lvl
+ 7.0
+
diff --git a/parm/postxconfig-NT-fv3lam_cmaq.txt b/parm/postxconfig-NT-fv3lam_cmaq.txt
new file mode 100644
index 000000000..1eec84111
--- /dev/null
+++ b/parm/postxconfig-NT-fv3lam_cmaq.txt
@@ -0,0 +1,129 @@
+1
+3
+CMAQ
+32769
+ncep_nco
+v2003
+local_tab_yes1
+fcst
+oper
+fcst
+fcst
+hour
+nws_ncep
+nmm_8km
+complex_packing_spatial_diff
+2nd_ord_sptdiff
+fltng_pnt
+lossless
+995
+PM25TOT_ON_HYBRID_LVL
+?
+1
+tmpl4_0
+PMTF
+NCEP
+?
+hybrid_lvl
+0
+?
+64
+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.
+?
+0
+?
+0
+?
+?
+?
+0
+0.0
+0
+0.0
+?
+0
+0.0
+0
+0.0
+1
+7.0
+0
+0
+0
+?
+?
+?
+267
+O3MR_ON_HYBRID_LVL
+?
+1
+tmpl4_0
+O3MR
+NCEP
+?
+hybrid_lvl
+0
+?
+64
+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.
+?
+0
+?
+0
+?
+?
+?
+0
+0.0
+0
+0.0
+?
+0
+0.0
+0
+0.0
+1
+7.0
+0
+0
+0
+?
+?
+?
+994
+OZCON_ON_HYBRID_LVL
+?
+1
+tmpl4_0
+OZCON
+NCEP
+?
+hybrid_lvl
+0
+?
+64
+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.
+?
+0
+?
+0
+?
+?
+?
+0
+0.0
+0
+0.0
+?
+0
+0.0
+0
+0.0
+1
+7.0
+0
+0
+0
+?
+?
+?
diff --git a/sorc/ncep_post.fd/ALLOCATE_ALL.f b/sorc/ncep_post.fd/ALLOCATE_ALL.f
index 322ccb8ad..f615db747 100644
--- a/sorc/ncep_post.fd/ALLOCATE_ALL.f
+++ b/sorc/ncep_post.fd/ALLOCATE_ALL.f
@@ -1291,5 +1291,25 @@ SUBROUTINE ALLOCATE_ALL()
uuavg(i,j)=spval
enddo
enddo
-!
+
+! AQF
+ if (me == 0) print *,'aqfcmaq_on= ', aqfcmaq_on
+ if (aqfcmaq_on) then
+
+ allocate(ozcon(im,jsta_2l:jend_2u,lm))
+ allocate(pmtf(im,jsta_2l:jend_2u,lm))
+
+!Initialization
+!$omp parallel do private(i,j,l)
+ do l=1,lm
+ do j=jsta_2l,jend_2u
+ do i=1,im
+ ozcon(i,j,l)=0.
+ pmtf(i,j,l)=0.
+ enddo
+ enddo
+ enddo
+
+ endif
+!
end
diff --git a/sorc/ncep_post.fd/CTLBLK.f b/sorc/ncep_post.fd/CTLBLK.f
index 74e48a718..df647f1dd 100644
--- a/sorc/ncep_post.fd/CTLBLK.f
+++ b/sorc/ncep_post.fd/CTLBLK.f
@@ -41,7 +41,7 @@ module CTLBLK_mod
real*8 :: gdsdegr
real,allocatable :: datapd(:,:,:)
!
- logical :: gocart_on, d3d_on, hyb_sigp, rdaod
+ logical :: gocart_on, d3d_on, hyb_sigp, rdaod, aqfcmaq_on
logical :: SIGMA,RUN,FIRST,RESTRT
logical :: global
logical :: SMFLAG
diff --git a/sorc/ncep_post.fd/DEALLOCATE.f b/sorc/ncep_post.fd/DEALLOCATE.f
index bb80f4496..fd3eef1be 100644
--- a/sorc/ncep_post.fd/DEALLOCATE.f
+++ b/sorc/ncep_post.fd/DEALLOCATE.f
@@ -552,5 +552,11 @@ SUBROUTINE DE_ALLOCATE
deallocate(ddvdx)
deallocate(ddudy)
deallocate(uuavg)
-
+
+! AQF
+ if (aqfcmaq_on) then
+ deallocate(ozcon)
+ deallocate(pmtf)
+ endif
+
end
diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f
index 891893c7b..090f266f0 100644
--- a/sorc/ncep_post.fd/INITPOST_NETCDF.f
+++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f
@@ -45,7 +45,8 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
o3vdiff, o3prod, o3tndy, mwpv, unknown, vdiffzacce, zgdrag,cnvctummixing, &
vdiffmacce, mgdrag, cnvctvmmixing, ncnvctcfrac, cnvctumflx, cnvctdmflx, &
cnvctzgdrag, sconvmois, cnvctmgdrag, cnvctdetmflx, duwt, duem, dusd, dudp, &
- wh, qqg, ref_10cm
+ wh, qqg, ref_10cm, pmtf, ozcon
+
use vrbls2d, only: f, pd, fis, pblh, ustar, z0, ths, qs, twbs, qwbs, avgcprate, &
cprate, avgprec, prec, lspa, sno, si, cldefi, th10, q10, tshltr, pshltr, &
tshltr, albase, avgalbedo, avgtcdc, czen, czmean, mxsnal, radot, sigt4, &
@@ -78,7 +79,7 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
ardsw, asrfc, avrain, avcnvc, theat, gdsdegr, spl, lsm, alsl, im, jm, im_jm, lm, &
jsta_2l, jend_2u, nsoil, lp1, icu_physics, ivegsrc, novegtype, nbin_ss, nbin_bc, &
nbin_oc, nbin_su, gocart_on, pt_tbl, hyb_sigp, filenameFlux, fileNameAER, &
- iSF_SURFACE_PHYSICS,rdaod
+ iSF_SURFACE_PHYSICS,rdaod, aqfcmaq_on
use gridspec_mod, only: maptype, gridtype, latstart, latlast, lonstart, lonlast, cenlon, &
dxval, dyval, truelat2, truelat1, psmapf, cenlat,lonstartv, lonlastv, cenlonv, &
latstartv, latlastv, cenlatv,latstart_r,latlast_r,lonstart_r,lonlast_r, STANDLON
@@ -182,6 +183,192 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
real(kind=4),allocatable :: vcrd(:,:)
real :: dum_const
+! AQF
+
+ real, allocatable :: aacd(:,:,:), aalj(:,:,:) &
+ ,aalk1j(:,:,:), aalk2j(:,:,:) &
+ ,abnz1j(:,:,:), abnz2j(:,:,:), abnz3j(:,:,:) &
+ ,acaj(:,:,:), acet(:,:,:) &
+ ,acli(:,:,:), aclj(:,:,:), aclk(:,:,:) &
+ ,acors(:,:,:), acro_primary(:,:,:) &
+ ,acrolein(:,:,:), aeci(:,:,:) &
+ ,aecj(:,:,:), afej(:,:,:) &
+ ,aglyj(:,:,:) &
+ ,ah2oi(:,:,:), ah2oj(:,:,:), ah2ok(:,:,:) &
+ ,ah3opi(:,:,:), ah3opj(:,:,:), ah3opk(:,:,:) &
+ ,aiso1j(:,:,:), aiso2j(:,:,:), aiso3j(:,:,:) &
+ ,aivpo1j(:,:,:), akj(:,:,:) &
+ ,ald2(:,:,:), ald2_primary(:,:,:) &
+ ,aldx(:,:,:) &
+ ,alvoo1i(:,:,:), alvoo1j(:,:,:) &
+ ,alvoo2i(:,:,:), alvoo2j(:,:,:) &
+ ,alvpo1i(:,:,:), alvpo1j(:,:,:) &
+ ,amgj(:,:,:), amnj(:,:,:) &
+ ,amgk(:,:,:), akk(:,:,:), acak(:,:,:) &
+ ,anai(:,:,:), anaj(:,:,:), anak(:,:,:) &
+ ,anh4i(:,:,:), anh4j(:,:,:), anh4k(:,:,:) &
+ ,ano3i(:,:,:), ano3j(:,:,:), ano3k(:,:,:) &
+ ,aolgaj(:,:,:), aolgbj(:,:,:), aorgcj(:,:,:) &
+ ,aomi(:,:,:), aomj(:,:,:) &
+ ,aothri(:,:,:), aothrj(:,:,:) &
+ ,apah1j(:,:,:), apah2j(:,:,:), apah3j(:,:,:) &
+ ,apomi(:,:,:), apomj(:,:,:) &
+ ,apcsoj(:,:,:), aseacat(:,:,:), asij(:,:,:) &
+ ,aso4i(:,:,:), aso4j(:,:,:), aso4k(:,:,:) &
+ ,asoil(:,:,:), asqtj(:,:,:) &
+ ,asomi(:,:,:), asomj(:,:,:) &
+ ,asvoo1i(:,:,:), asvoo1j(:,:,:) &
+ ,asvoo2i(:,:,:), asvoo2j(:,:,:) &
+ ,asvoo3j(:,:,:) &
+ ,asvpo1i(:,:,:), asvpo1j(:,:,:) &
+ ,asvpo2i(:,:,:), asvpo2j(:,:,:) &
+ ,asvpo3j(:,:,:) &
+ ,atij(:,:,:) &
+ ,atol1j(:,:,:), atol2j(:,:,:), atol3j(:,:,:) &
+ ,atoti(:,:,:), atotj(:,:,:), atotk(:,:,:) &
+ ,atrp1j(:,:,:), atrp2j(:,:,:) &
+ ,axyl1j(:,:,:), axyl2j(:,:,:), axyl3j(:,:,:) &
+ ,pm25ac(:,:,:), pm25at(:,:,:), pm25co(:,:,:)
+
+
+ if (me == 0) print *,' aqfcmaq_on=', aqfcmaq_on
+
+ if (aqfcmaq_on) then
+
+ allocate(aacd(im,jsta_2l:jend_2u,lm))
+ allocate(aalj(im,jsta_2l:jend_2u,lm))
+ allocate(aalk1j(im,jsta_2l:jend_2u,lm))
+ allocate(aalk2j(im,jsta_2l:jend_2u,lm))
+
+ allocate(abnz1j(im,jsta_2l:jend_2u,lm))
+ allocate(abnz2j(im,jsta_2l:jend_2u,lm))
+ allocate(abnz3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(acaj(im,jsta_2l:jend_2u,lm))
+ allocate(acet(im,jsta_2l:jend_2u,lm))
+
+ allocate(acli(im,jsta_2l:jend_2u,lm))
+ allocate(aclj(im,jsta_2l:jend_2u,lm))
+ allocate(aclk(im,jsta_2l:jend_2u,lm))
+
+ allocate(acors(im,jsta_2l:jend_2u,lm))
+ allocate(acro_primary(im,jsta_2l:jend_2u,lm))
+ allocate(acrolein(im,jsta_2l:jend_2u,lm))
+ allocate(aeci(im,jsta_2l:jend_2u,lm))
+ allocate(aecj(im,jsta_2l:jend_2u,lm))
+ allocate(afej(im,jsta_2l:jend_2u,lm))
+ allocate(aglyj(im,jsta_2l:jend_2u,lm))
+
+ allocate(ah2oi(im,jsta_2l:jend_2u,lm))
+ allocate(ah2oj(im,jsta_2l:jend_2u,lm))
+ allocate(ah2ok(im,jsta_2l:jend_2u,lm))
+
+ allocate(ah3opi(im,jsta_2l:jend_2u,lm))
+ allocate(ah3opj(im,jsta_2l:jend_2u,lm))
+ allocate(ah3opk(im,jsta_2l:jend_2u,lm))
+
+ allocate(aiso1j(im,jsta_2l:jend_2u,lm))
+ allocate(aiso2j(im,jsta_2l:jend_2u,lm))
+ allocate(aiso3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(aivpo1j(im,jsta_2l:jend_2u,lm))
+ allocate(akj(im,jsta_2l:jend_2u,lm))
+
+ allocate(ald2(im,jsta_2l:jend_2u,lm))
+ allocate(ald2_primary(im,jsta_2l:jend_2u,lm))
+
+ allocate(aldx(im,jsta_2l:jend_2u,lm))
+
+ allocate(alvoo1i(im,jsta_2l:jend_2u,lm))
+ allocate(alvoo1j(im,jsta_2l:jend_2u,lm))
+ allocate(alvoo2i(im,jsta_2l:jend_2u,lm))
+ allocate(alvoo2j(im,jsta_2l:jend_2u,lm))
+ allocate(alvpo1i(im,jsta_2l:jend_2u,lm))
+ allocate(alvpo1j(im,jsta_2l:jend_2u,lm))
+
+ allocate(amgj(im,jsta_2l:jend_2u,lm))
+ allocate(amnj(im,jsta_2l:jend_2u,lm))
+
+ allocate(anai(im,jsta_2l:jend_2u,lm))
+ allocate(anaj(im,jsta_2l:jend_2u,lm))
+ allocate(anak(im,jsta_2l:jend_2u,lm))
+
+ allocate(anh4i(im,jsta_2l:jend_2u,lm))
+ allocate(anh4j(im,jsta_2l:jend_2u,lm))
+ allocate(anh4k(im,jsta_2l:jend_2u,lm))
+
+ allocate(ano3i(im,jsta_2l:jend_2u,lm))
+ allocate(ano3j(im,jsta_2l:jend_2u,lm))
+ allocate(ano3k(im,jsta_2l:jend_2u,lm))
+
+ allocate(aolgaj(im,jsta_2l:jend_2u,lm))
+ allocate(aolgbj(im,jsta_2l:jend_2u,lm))
+
+ allocate(aomi(im,jsta_2l:jend_2u,lm))
+ allocate(aomj(im,jsta_2l:jend_2u,lm))
+
+ allocate(aorgcj(im,jsta_2l:jend_2u,lm))
+
+ allocate(aothri(im,jsta_2l:jend_2u,lm))
+ allocate(aothrj(im,jsta_2l:jend_2u,lm))
+
+ allocate(apah1j(im,jsta_2l:jend_2u,lm))
+ allocate(apah2j(im,jsta_2l:jend_2u,lm))
+ allocate(apah3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(apcsoj(im,jsta_2l:jend_2u,lm))
+
+ allocate(apomi(im,jsta_2l:jend_2u,lm))
+ allocate(apomj(im,jsta_2l:jend_2u,lm))
+
+ allocate(aseacat(im,jsta_2l:jend_2u,lm))
+ allocate(asij(im,jsta_2l:jend_2u,lm))
+
+ allocate(aso4i(im,jsta_2l:jend_2u,lm))
+ allocate(aso4j(im,jsta_2l:jend_2u,lm))
+ allocate(aso4k(im,jsta_2l:jend_2u,lm))
+ allocate(asoil(im,jsta_2l:jend_2u,lm))
+
+ allocate(asomi(im,jsta_2l:jend_2u,lm))
+ allocate(asomj(im,jsta_2l:jend_2u,lm))
+
+ allocate(asqtj(im,jsta_2l:jend_2u,lm))
+
+ allocate(asvoo1i(im,jsta_2l:jend_2u,lm))
+ allocate(asvoo1j(im,jsta_2l:jend_2u,lm))
+ allocate(asvoo2i(im,jsta_2l:jend_2u,lm))
+ allocate(asvoo2j(im,jsta_2l:jend_2u,lm))
+ allocate(asvoo3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(asvpo1i(im,jsta_2l:jend_2u,lm))
+ allocate(asvpo1j(im,jsta_2l:jend_2u,lm))
+ allocate(asvpo2i(im,jsta_2l:jend_2u,lm))
+ allocate(asvpo2j(im,jsta_2l:jend_2u,lm))
+ allocate(asvpo3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(atij(im,jsta_2l:jend_2u,lm))
+
+ allocate(atol1j(im,jsta_2l:jend_2u,lm))
+ allocate(atol2j(im,jsta_2l:jend_2u,lm))
+ allocate(atol3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(atoti(im,jsta_2l:jend_2u,lm))
+ allocate(atotj(im,jsta_2l:jend_2u,lm))
+ allocate(atotk(im,jsta_2l:jend_2u,lm))
+
+ allocate(atrp1j(im,jsta_2l:jend_2u,lm))
+ allocate(atrp2j(im,jsta_2l:jend_2u,lm))
+
+ allocate(axyl1j(im,jsta_2l:jend_2u,lm))
+ allocate(axyl2j(im,jsta_2l:jend_2u,lm))
+ allocate(axyl3j(im,jsta_2l:jend_2u,lm))
+
+ allocate(pm25ac(im,jsta_2l:jend_2u,lm))
+ allocate(pm25at(im,jsta_2l:jend_2u,lm))
+ allocate(pm25co(im,jsta_2l:jend_2u,lm))
+
+ endif
+
!***********************************************************************
! START INIT HERE.
!
@@ -863,6 +1050,579 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
cwm(isa,jsa,l)
end do
+!=============================
+! For AQF Chemical species
+!=============================
+
+ if (aqfcmaq_on) then
+
+ ! *********** VarName need to be in lower case ************
+ ! === It will cause problem if not use the lower case =====
+ ! *********************************************************
+
+ !--------------------------------------------------------------
+ !-- rename input o3 to NCO grib2 name ozcon -------------------
+
+ VarName='o3'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ozcon(1,jsta_2l,1))
+
+ !--------------------------------------------------------------
+
+ VarName='aacd'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aacd(1,jsta_2l,1))
+
+ VarName='aalj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aalj(1,jsta_2l,1))
+
+ VarName='aalk1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aalk1j(1,jsta_2l,1))
+
+ VarName='aalk2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aalk2j(1,jsta_2l,1))
+
+ VarName='abnz1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,abnz1j(1,jsta_2l,1))
+
+ VarName='abnz2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,abnz2j(1,jsta_2l,1))
+
+ VarName='abnz3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,abnz3j(1,jsta_2l,1))
+
+ VarName='acaj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acaj(1,jsta_2l,1))
+
+ VarName='acet'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acet(1,jsta_2l,1))
+
+ VarName='acli'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acli(1,jsta_2l,1))
+
+ VarName='aclj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aclj(1,jsta_2l,1))
+
+ VarName='aclk'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aclk(1,jsta_2l,1))
+
+ VarName='acors'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acors(1,jsta_2l,1))
+
+ VarName='acro_primary'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acro_primary(1,jsta_2l,1))
+
+ VarName='acrolein'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,acrolein(1,jsta_2l,1))
+
+ VarName='aeci'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aeci(1,jsta_2l,1))
+
+ VarName='aecj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aecj(1,jsta_2l,1))
+
+ VarName='afej'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,afej(1,jsta_2l,1))
+
+ VarName='aglyj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aglyj(1,jsta_2l,1))
+
+ VarName='ah2oi'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah2oi(1,jsta_2l,1))
+
+ VarName='ah2oj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah2oj(1,jsta_2l,1))
+
+ VarName='ah2ok'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah2ok(1,jsta_2l,1))
+
+ VarName='ah3opi'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah3opi(1,jsta_2l,1))
+
+ VarName='ah3opj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah3opj(1,jsta_2l,1))
+
+ VarName='ah3opk'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ah3opk(1,jsta_2l,1))
+
+ VarName='aiso1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aiso1j(1,jsta_2l,1))
+
+ VarName='aiso2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aiso2j(1,jsta_2l,1))
+
+ VarName='aiso3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aiso3j(1,jsta_2l,1))
+
+ VarName='aivpo1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aivpo1j(1,jsta_2l,1))
+
+ VarName='akj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,akj(1,jsta_2l,1))
+
+ VarName='ald2'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ald2(1,jsta_2l,1))
+
+ VarName='ald2_primary'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ald2_primary(1,jsta_2l,1))
+
+ VarName='aldx'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aldx(1,jsta_2l,1))
+
+ VarName='alvoo1i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvoo1i(1,jsta_2l,1))
+
+ VarName='alvoo1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvoo1j(1,jsta_2l,1))
+
+ VarName='alvoo2i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvoo2i(1,jsta_2l,1))
+
+ VarName='alvoo2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvoo2j(1,jsta_2l,1))
+
+ VarName='alvpo1i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvpo1i(1,jsta_2l,1))
+
+ VarName='alvpo1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,alvpo1j(1,jsta_2l,1))
+
+ VarName='amgj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,amgj(1,jsta_2l,1))
+
+ VarName='amnj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,amnj(1,jsta_2l,1))
+
+ VarName='anai'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,anai(1,jsta_2l,1))
+
+ VarName='anaj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,anaj(1,jsta_2l,1))
+
+ VarName='anh4i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,anh4i(1,jsta_2l,1))
+
+ VarName='anh4j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,anh4j(1,jsta_2l,1))
+
+ VarName='anh4k'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,anh4k(1,jsta_2l,1))
+
+ VarName='ano3i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ano3i(1,jsta_2l,1))
+
+ VarName='ano3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ano3j(1,jsta_2l,1))
+
+ VarName='ano3k'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,ano3k(1,jsta_2l,1))
+
+ VarName='aolgaj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aolgaj(1,jsta_2l,1))
+
+ VarName='aolgbj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aolgbj(1,jsta_2l,1))
+
+ VarName='aorgcj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aorgcj(1,jsta_2l,1))
+
+ VarName='aothri'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aothri(1,jsta_2l,1))
+
+ VarName='aothrj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aothrj(1,jsta_2l,1))
+
+ VarName='apah1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,apah1j(1,jsta_2l,1))
+
+ VarName='apah2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,apah2j(1,jsta_2l,1))
+
+ VarName='apah3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,apah3j(1,jsta_2l,1))
+
+ VarName='apcsoj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,apcsoj(1,jsta_2l,1))
+
+ VarName='aseacat'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aseacat(1,jsta_2l,1))
+
+ VarName='asij'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asij(1,jsta_2l,1))
+
+ VarName='aso4i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aso4i(1,jsta_2l,1))
+
+ VarName='aso4j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aso4j(1,jsta_2l,1))
+
+ VarName='aso4k'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,aso4k(1,jsta_2l,1))
+
+ VarName='asoil'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asoil(1,jsta_2l,1))
+
+ VarName='asqtj'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asqtj(1,jsta_2l,1))
+
+ VarName='asvoo1i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvoo1i(1,jsta_2l,1))
+
+ VarName='asvoo1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvoo1j(1,jsta_2l,1))
+
+ VarName='asvoo2i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvoo2i(1,jsta_2l,1))
+
+ VarName='asvoo2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvoo2j(1,jsta_2l,1))
+
+ VarName='asvoo3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvoo3j(1,jsta_2l,1))
+
+ VarName='asvpo1i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvpo1i(1,jsta_2l,1))
+
+ VarName='asvpo1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvpo1j(1,jsta_2l,1))
+
+ VarName='asvpo2i'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvpo2i(1,jsta_2l,1))
+
+ VarName='asvpo2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvpo2j(1,jsta_2l,1))
+
+ VarName='asvpo3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,asvpo3j(1,jsta_2l,1))
+
+ VarName='atij'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atij(1,jsta_2l,1))
+
+ VarName='atol1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atol1j(1,jsta_2l,1))
+
+ VarName='atol2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atol2j(1,jsta_2l,1))
+
+ VarName='atol3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atol3j(1,jsta_2l,1))
+
+ VarName='atrp1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atrp1j(1,jsta_2l,1))
+
+ VarName='atrp2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,atrp2j(1,jsta_2l,1))
+
+ VarName='axyl1j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,axyl1j(1,jsta_2l,1))
+
+ VarName='axyl2j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,axyl2j(1,jsta_2l,1))
+
+ VarName='axyl3j'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,axyl3j(1,jsta_2l,1))
+
+ VarName='pm25ac'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,pm25ac(1,jsta_2l,1))
+
+ VarName='pm25at'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,pm25at(1,jsta_2l,1))
+
+ VarName='pm25co'
+ call read_netcdf_3d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
+ ,jend_2u,MPI_COMM_COMP,icnt,idsp,spval,VarName &
+ ,lm,pm25co(1,jsta_2l,1))
+
+!=========================
+! PM2.5 SPECIES
+!=========================
+
+ ! do l=1,lm
+ ! do j=jsta,jend
+ ! do i=1,im
+ ! pm25hp(i,j,l) = ( ah3opi(i,j,l)*pm25at(i,j,l) &
+ ! + ah3opj(i,j,l)*pm25ac(i,j,l) &
+ ! + ah3opk(i,j,l)*pm25co(i,j,l) ) / 19.0
+
+ ! pm25cl(i,j,l) = acli(i,j,l)*pm25at(i,j,l) &
+ ! + aclj(i,j,l)*pm25ac(i,j,l) &
+ ! + aclk(i,j,l)*pm25co(i,j,l)
+
+ ! pm25ec(i,j,l) = aeci(i,j,l)*pm25at(i,j,l) &
+ ! + aecj(i,j,l)*pm25ac(i,j,l)
+ ! enddo
+ ! enddo
+ ! enddo
+
+
+ ! do l=1,lm
+ ! do j=jsta,jend
+ ! do i=1,im
+
+ ! anak(i,j,l) = 0.8373 * aseacat(i,j,l) &
+ ! + 0.0626 * asoil(i,j,l) &
+ ! + 0.0023 * acors(i,j,l)
+
+ ! pm25na(i,j,l) = anai(i,j,l)*pm25at(i,j,l) &
+ ! + anaj(i,j,l)*pm25ac(i,j,l) &
+ ! + anak(i,j,l)*pm25co(i,j,l)
+ ! enddo
+ ! enddo
+ ! enddo
+
+ do l=1,lm
+ do j=jsta,jend
+ do i=1,im
+
+ apomi(i,j,l) = alvpo1i(i,j,l) &
+ +asvpo1i(i,j,l) + asvpo2i(i,j,l)
+
+ apomj(i,j,l) = alvpo1j(i,j,l) &
+ +asvpo1j(i,j,l) + asvpo2j(i,j,l) + asvpo3j(i,j,l) &
+ +aivpo1j(i,j,l)
+
+ asomi(i,j,l) = alvoo1i(i,j,l) + alvoo2i(i,j,l) &
+ +asvoo1i(i,j,l) + asvoo2i(i,j,l)
+
+ asomj(i,j,l) = axyl1j(i,j,l) + axyl2j(i,j,l) + axyl3j(i,j,l) &
+ +atol1j(i,j,l) + atol2j(i,j,l) + atol3j(i,j,l) &
+ +abnz1j(i,j,l) + abnz2j(i,j,l) + abnz3j(i,j,l) &
+ +aiso1j(i,j,l) + aiso2j(i,j,l) + aiso3j(i,j,l) &
+ +atrp1j(i,j,l) + atrp2j(i,j,l) + asqtj(i,j,l) &
+ +aalk1j(i,j,l) + aalk2j(i,j,l) &
+ +apah1j(i,j,l) + apah2j(i,j,l) + apah3j(i,j,l) &
+ +aorgcj(i,j,l) + aolgbj(i,j,l) + aolgaj(i,j,l) &
+ +alvoo1j(i,j,l) + alvoo2j(i,j,l) &
+ +asvoo1j(i,j,l) + asvoo2j(i,j,l) + asvoo3j(i,j,l) &
+ +apcsoj(i,j,l)
+
+ aomi(i,j,l) = apomi(i,j,l) + asomi(i,j,l)
+ aomj(i,j,l) = apomj(i,j,l) + asomj(i,j,l)
+
+ atoti(i,j,l) = aso4i(i,j,l) + ano3i(i,j,l) + anh4i(i,j,l) &
+ + anai(i,j,l) + acli(i,j,l) + aeci(i,j,l) &
+ + aomi(i,j,l) +aothri(i,j,l)
+
+ atotj(i,j,l) = aso4j(i,j,l) + ano3j(i,j,l) + anh4j(i,j,l) &
+ + anaj(i,j,l) + aclj(i,j,l) + aecj(i,j,l) &
+ + aomj(i,j,l) +aothrj(i,j,l) &
+ + afej(i,j,l) + asij(i,j,l) + atij(i,j,l) &
+ + acaj(i,j,l) + amgj(i,j,l) + amnj(i,j,l) &
+ + aalj(i,j,l) + akj(i,j,l)
+
+ atotk(i,j,l) = asoil(i,j,l) + acors(i,j,l) + aseacat(i,j,l)&
+ + aclk(i,j,l) &
+ +aso4k(i,j,l) + ano3k(i,j,l) + anh4k(i,j,l)
+
+ pmtf(i,j,l) = atoti(i,j,l)*pm25at(i,j,l) &
+ + atotj(i,j,l)*pm25ac(i,j,l) &
+ + atotk(i,j,l)*pm25co(i,j,l)
+ enddo
+ enddo
+ enddo
+
+ deallocate (aacd, aalj, aalk1j, aalk2j, abnz1j, abnz2j, abnz3j)
+ deallocate (acaj, acet, acli, aclj, aclk)
+ deallocate (acors, acro_primary, acrolein)
+
+ deallocate (aeci, aecj, afej, aglyj, ah2oi, ah2oj, ah2ok)
+ deallocate (ah3opi, ah3opj, ah3opk, aiso1j, aiso2j, aiso3j)
+
+ deallocate (aivpo1j, akj, ald2, ald2_primary, aldx)
+ deallocate (alvoo1i, alvoo1j, alvoo2i, alvoo2j, alvpo1i, alvpo1j)
+
+ deallocate (amgj, amnj, anai, anaj, anak)
+ deallocate (anh4i, anh4j, anh4k, ano3i, ano3j, ano3k)
+
+ deallocate (aolgaj, aolgbj, aomi, aomj)
+ deallocate (aorgcj, aothri, aothrj, apah1j, apah2j, apah3j)
+
+ deallocate (apcsoj, apomi, apomj, aseacat, asij)
+ deallocate (aso4i, aso4j, aso4k, asoil, asomi, asomj, asqtj)
+
+ deallocate (asvoo1i, asvoo1j, asvoo2i, asvoo2j, asvoo3j)
+ deallocate (asvpo1i, asvpo1j, asvpo2i, asvpo2j, asvpo3j)
+
+ deallocate (atij, atol1j, atol2j, atol3j, atrp1j, atrp2j)
+ deallocate (atoti, atotj, atotk, axyl1j, axyl2j, axyl3j)
+
+ deallocate (pm25ac, pm25at, pm25co)
+
+ endif ! -- aqfcmaq_on
+!============================
+
! max hourly updraft velocity
VarName='upvvelmax'
call read_netcdf_2d_scatter(me,ncid3d,1,im,jm,jsta,jsta_2l &
diff --git a/sorc/ncep_post.fd/MDLFLD.f b/sorc/ncep_post.fd/MDLFLD.f
index b85e17a11..fba6eb383 100644
--- a/sorc/ncep_post.fd/MDLFLD.f
+++ b/sorc/ncep_post.fd/MDLFLD.f
@@ -85,7 +85,8 @@ SUBROUTINE MDLFLD
qqr, qqs, cfr, cfr_raw, dbz, dbzr, dbzi, dbzc, qqw, nlice, nrain, qqg, zint, qqni,&
qqnr, qqnw, qqnwfa, qqnifa, uh, vh, mcvg, omga, wh, q2, ttnd, rswtt, &
rlwtt, train, tcucn, o3, rhomid, dpres, el_pbl, pint, icing_gfip, icing_gfis, &
- catedr,mwt,gtg, REF_10CM
+ catedr,mwt,gtg, REF_10CM, pmtf, ozcon
+
use vrbls2d, only: slp, hbot, htop, cnvcfr, cprate, cnvcfr, sfcshx,sfclhx,ustar,z0,&
sr, prec, vis, czen, pblh, pblhgust, u10, v10, avgprec, avgcprate, &
REF1KM_10CM,REF4KM_10CM,REFC_10CM,REFD_MAX
@@ -96,7 +97,7 @@ SUBROUTINE MDLFLD
tops, dsnow, drain,const_ng1, const_ng2, gon, topg, dgraupel
use ctlblk_mod, only: jsta_2l, jend_2u, lm, jsta, jend, grib, cfld, datapd,&
fld_info, modelname, imp_physics, dtq2, spval, icount_calmict,&
- me, dt, avrain, theat, ifhr, ifmin, avcnvc, lp1, im, jm
+ me, dt, avrain, theat, ifhr, ifmin, avcnvc, lp1, im, jm, aqfcmaq_on
use rqstfld_mod, only: iget, id, lvls, iavblfld, lvlsxml
use gridspec_mod, only: gridtype,maptype,dxval
use upp_physics, only: CALRH, CALCAPE
@@ -906,8 +907,9 @@ SUBROUTINE MDLFLD
(IGET(774)>0).OR.(IGET(747)>0).OR. &
(IGET(464)>0).OR.(IGET(467)>0).OR. &
(IGET(629)>0).OR.(IGET(630)>0).OR. &
- (IGET(470)>0).OR. &
- (IGET(909)>0).OR.(IGET(737)>0) ) THEN
+ (IGET(470)>0).OR. &
+ (IGET(909)>0).OR.(IGET(737)>0).OR. &
+ (IGET(994)>0).OR.(IGET(995)>0) ) THEN
DO 190 L=1,LM
@@ -2180,6 +2182,71 @@ SUBROUTINE MDLFLD
endif
END IF
ENDIF
+
+!===============
+! AQF
+!===============
+
+ if (aqfcmaq_on) then
+
+ IF (IGET(994)>0) THEN
+ IF (LVLS(L,IGET(994))>0) THEN
+ LL=LM-L+1
+!$omp parallel do private(i,j)
+ DO J=JSTA,JEND
+ DO I=1,IM
+ GRID1(I,J) = OZCON(I,J,LL)*1000. ! convert ppm to ppb
+ ENDDO
+ ENDDO
+
+ if(grib=="grib2") then
+ cfld=cfld+1
+ fld_info(cfld)%ifld=IAVBLFLD(IGET(994))
+ fld_info(cfld)%lvl=LVLSXML(L,IGET(994))
+!$omp parallel do private(i,j,jj)
+ do j=1,jend-jsta+1
+ jj = jsta+j-1
+ do i=1,im
+ datapd(i,j,cfld) = GRID1(i,jj)
+ enddo
+ enddo
+ endif
+ END IF
+ ENDIF
+
+
+ !---- PM25 ----
+
+ IF (IGET(995)>0) THEN
+ IF (LVLS(L,IGET(995))>0) THEN
+ LL=LM-L+1
+!$omp parallel do private(i,j)
+ DO J=JSTA,JEND
+ DO I=1,IM
+ DENS=PMID(I,J,LL)/(RD*T(I,J,LL)*(Q(I,J,LL)*D608+1.0)) ! DENSITY
+ GRID1(I,J) = PMTF(I,J,LL)*DENS ! ug/kg-->ug/m3
+ ENDDO
+ ENDDO
+
+ if(grib=="grib2") then
+ cfld=cfld+1
+ fld_info(cfld)%ifld=IAVBLFLD(IGET(995))
+ fld_info(cfld)%lvl=LVLSXML(L,IGET(995))
+!$omp parallel do private(i,j,jj)
+ do j=1,jend-jsta+1
+ jj = jsta+j-1
+ do i=1,im
+ datapd(i,j,cfld) = GRID1(i,jj)
+ enddo
+ enddo
+ endif
+ END IF
+ ENDIF
+
+ endif ! -- aqfcmaq_on
+
+!===================================
+
!
! E. James - 8 Dec 2017: SMOKE from WRF-CHEM
! SMOKE
diff --git a/sorc/ncep_post.fd/RQSTFLD.F b/sorc/ncep_post.fd/RQSTFLD.F
index 6e06972eb..d1af714d5 100644
--- a/sorc/ncep_post.fd/RQSTFLD.F
+++ b/sorc/ncep_post.fd/RQSTFLD.F
@@ -25,7 +25,7 @@ module RQSTFLD_mod
implicit none
!
! increase MXFLD each time you add a new field
- INTEGER, PARAMETER :: MXFLD=999
+ INTEGER, PARAMETER :: MXFLD=1200
#ifdef COMMCODE
INTEGER, PARAMETER :: MXLVL=70
#else
@@ -2660,51 +2660,59 @@ module RQSTFLD_mod
& /1,'HIM-8 AHI CH16 NNADR',118,109, & !table 130
& 'HIM-8 AHI CH16 NON-NADIR BRTEMP'/
DATA IFILV(979),AVBL(979),IQ(979),IS(979),AVBLGRB2(979) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'EFSH ON effbot_lvl'/
DATA IFILV(980),AVBL(980),IQ(980),IS(980),AVBLGRB2(980) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'EFSH ON efftop_lvl'/
DATA IFILV(981),AVBL(981),IQ(981),IS(981),AVBLGRB2(981) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'ELMELT ON effbot_lvl'/
DATA IFILV(982),AVBL(982),IQ(982),IS(982),AVBLGRB2(982) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'ELMELT ON efftop_lvl'/
DATA IFILV(983),AVBL(983),IQ(983),IS(983),AVBLGRB2(983) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'ESHR ON effbot_lvl'/
DATA IFILV(984),AVBL(984),IQ(984),IS(984),AVBLGRB2(984) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'UESH ON effbot_lvl'/
DATA IFILV(985),AVBL(985),IQ(985),IS(985),AVBLGRB2(985) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(986),AVBL(986),IQ(986),IS(986),AVBLGRB2(986) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(987),AVBL(987),IQ(987),IS(987),AVBLGRB2(987) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(988),AVBL(988),IQ(988),IS(988),AVBLGRB2(988) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(989),AVBL(989),IQ(989),IS(989),AVBLGRB2(989) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(990),AVBL(990),IQ(990),IS(990),AVBLGRB2(990) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(991),AVBL(991),IQ(991),IS(991),AVBLGRB2(991) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(992),AVBL(992),IQ(992),IS(992),AVBLGRB2(992) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
DATA IFILV(993),AVBL(993),IQ(993),IS(993),AVBLGRB2(993) &
- & /1,'EFFECTIVE LEVEL BOT',205,217, &
+ & /1,'EFFECTIVE LEVEL BOT',205,217, &
& 'VESH ON effbot_lvl'/
+! AQF
+ DATA IFILV(994),AVBL(994),IQ(994),IS(994), AVBLGRB2(994) &
+ & /1,'OZCON ',167,109, &
+ & 'OZCON ON hybrid_lvl'/
+
+ DATA IFILV(995),AVBL(995),IQ(995),IS(995), AVBLGRB2(995) &
+ & /1,'PMTF ',167,109, & !table 141
+ & 'PM25TOT ON Hybrid level'/
!end initialization
!
diff --git a/sorc/ncep_post.fd/VRBLS3D_mod.f b/sorc/ncep_post.fd/VRBLS3D_mod.f
index 715b91017..f27428f3a 100644
--- a/sorc/ncep_post.fd/VRBLS3D_mod.f
+++ b/sorc/ncep_post.fd/VRBLS3D_mod.f
@@ -79,6 +79,9 @@ module vrbls3d
! Add NCAR GFIP ICING
,icing_gfip(:,:,:),icing_gfis(:,:,:) &
! Add NCAR GTG turbulence
- ,catedr(:,:,:),mwt(:,:,:),gtg(:,:,:)
+ ,catedr(:,:,:),mwt(:,:,:),gtg(:,:,:) &
+
+! AQF
+ ,ozcon(:,:,:),pmtf(:,:,:)
end module vrbls3d
diff --git a/sorc/ncep_post.fd/WRFPOST.f b/sorc/ncep_post.fd/WRFPOST.f
index d6caabadf..c7c7c3d45 100644
--- a/sorc/ncep_post.fd/WRFPOST.f
+++ b/sorc/ncep_post.fd/WRFPOST.f
@@ -145,7 +145,7 @@ PROGRAM WRFPOST
lsm, fld_info, etafld2_tim, eta2p_tim, mdl2sigma_tim, cldrad_tim, miscln_tim, &
mdl2agl_tim, mdl2std_tim, mdl2thandpv_tim, calrad_wcloud_tim, &
fixed_tim, time_output, imin, surfce2_tim, komax, ivegsrc, d3d_on, gocart_on,rdaod, &
- readxml_tim, spval, fullmodelname, submodelname, hyb_sigp, filenameflat
+ readxml_tim, spval, fullmodelname, submodelname, hyb_sigp, filenameflat, aqfcmaq_on
use grib2_module, only: gribit2,num_pset,nrecout,first_grbtbl,grib_info_finalize
use sigio_module, only: sigio_head
use sigio_r_module, only: sigio_rropen, sigio_rrhead
@@ -174,7 +174,7 @@ PROGRAM WRFPOST
integer :: kpo,kth,kpv
real,dimension(komax) :: po,th,pv
namelist/nampgb/kpo,po,kth,th,kpv,pv,fileNameAER,d3d_on,gocart_on,popascal &
- ,hyb_sigp,rdaod
+ ,hyb_sigp,rdaod,aqfcmaq_on
character startdate*19,SysDepInfo*80,IOWRFNAME*3,post_fname*255
character cgar*1,cdum*4,line*10
@@ -305,6 +305,7 @@ PROGRAM WRFPOST
hyb_sigp = .true.
d3d_on = .false.
gocart_on = .false.
+ aqfcmaq_on = .false.
popascal = .false.
fileNameAER = ''
rdaod = .false.