Skip to content

Commit

Permalink
Code and parm modification for the RRFS-CMAQ chemistry calciulation (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
hsinmulin-NOAA authored Aug 10, 2021
1 parent 11b75ff commit 6be6119
Show file tree
Hide file tree
Showing 11 changed files with 1,090 additions and 28 deletions.
53 changes: 53 additions & 0 deletions parm/fv3lam_cmaq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<postxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="EMC_POST_CTRL_Schema.xsd">
<!-- Lin Gan: 20150427 validated -->
<paramset>
<datset>CMAQ</datset>
<grid_num>32769</grid_num>
<sub_center>ncep_nco</sub_center>
<version_no>v2003</version_no>
<local_table_vers_no>local_tab_yes1</local_table_vers_no>
<sigreftime>fcst</sigreftime>
<prod_status>oper</prod_status>
<data_type>fcst</data_type>
<gen_proc_type>fcst</gen_proc_type>
<time_range_unit>hour</time_range_unit>
<orig_center>nws_ncep</orig_center>
<gen_proc>nmm_8km</gen_proc>
<packing_method>complex_packing_spatial_diff</packing_method>
<order_of_sptdiff>2nd_ord_sptdiff</order_of_sptdiff>
<field_datatype>fltng_pnt</field_datatype>
<comprs_type>lossless</comprs_type>

<param>
<shortname>PM25TOT_ON_HYBRID_LVL</shortname>
<pname>PMTF</pname>
<table_info>NCEP</table_info>
<level>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.</level>
<scale>7.0</scale>
</param>

<param>
<shortname>O3MR_ON_HYBRID_LVL</shortname>
<pname>O3MR</pname>
<table_info>NCEP</table_info>
<level>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.</level>
<scale>7.0</scale>
</param>

<param>
<shortname>OZCON_ON_HYBRID_LVL</shortname>
<pname>OZCON</pname>
<table_info>NCEP</table_info>
<level>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.</level>
<scale>7.0</scale>
</param>

</paramset>
</postxml>
15 changes: 15 additions & 0 deletions parm/post_avblflds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7709,6 +7709,21 @@
<scale>6.0</scale>
</param>

<param>
<post_avblfldidx>994</post_avblfldidx>
<shortname>OZCON_ON_HYBRID_LVL</shortname>
<pname>OZCON</pname>
<fixed_sfc1_type>hybrid_lvl</fixed_sfc1_type>
<scale>7.0</scale>
</param>

<param>
<post_avblfldidx>995</post_avblfldidx>
<shortname>PM25TOT_ON_HYBRID_LVL</shortname>
<pname>PMTF</pname>
<fixed_sfc1_type>hybrid_lvl</fixed_sfc1_type>
<scale>7.0</scale>
</param>

</post_avblflds>
</postxml>
129 changes: 129 additions & 0 deletions parm/postxconfig-NT-fv3lam_cmaq.txt
Original file line number Diff line number Diff line change
@@ -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
?
?
?
22 changes: 21 additions & 1 deletion sorc/ncep_post.fd/ALLOCATE_ALL.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/CTLBLK.f
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion sorc/ncep_post.fd/DEALLOCATE.f
Original file line number Diff line number Diff line change
Expand Up @@ -552,5 +552,11 @@ SUBROUTINE DE_ALLOCATE
deallocate(ddvdx)
deallocate(ddudy)
deallocate(uuavg)


! AQF
if (aqfcmaq_on) then
deallocate(ozcon)
deallocate(pmtf)
endif

end
Loading

0 comments on commit 6be6119

Please sign in to comment.