Skip to content

Commit

Permalink
Additional GTG output "CIT" (#839)
Browse files Browse the repository at this point in the history
* add CIT 

add "CIT" as additional GTG output

* add CIT

additional "CIT" related GTG output changes for the UPP

* add CIT

additional GTG output variable "CIT"

* Update CMakeLists.txt

Add "gtg_interp.F90" per updated GTG_4.15 version that pulls all the interpolation to this file.

* update gtg code revision

* Create gtg_interp.F90

Stub code for GTG protection but to make UPP public to work

* Update MDLFLD.f for GTG special issue

The code change is to speed up and resolved the non-identical UPP outputs when compare  GTG on  & off (used or not used).

* Update MDLFLD.f

Add comments for the change log

* Update MDLFLD.f

correct 470 to 477 to consistent with CITEDR in "post_avblflds.xml"

* Add files via upload

1. update the comments
2.  fix the issue that the last vertical level of CIT in AVIATI10.tm00 of RRFS GTG per MISCLN.f

* Add files via upload

fix the issue that the last vertical level of CIT in AVIATI10.tm00 of RRFS GTG per change in MISCLN.f

* Update MDLFLD.f

 switching GTG max to gtgx3 from gtgx2.

* Update MDLFLD.f

add comment for the change
  • Loading branch information
hsinmulin-NOAA committed Jan 25, 2024
1 parent 775e6ed commit cd58d22
Show file tree
Hide file tree
Showing 10 changed files with 249 additions and 9 deletions.
44 changes: 44 additions & 0 deletions parm/fv3lam_rrfs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3777,4 +3777,48 @@
<level>5000. 10000. 15000. 20000. 25000. 30000. 35000. 40000. 45000. 50000. 55000. 60000. 65000. 70000. 75000. 80000. 85000. 90000. 95000. 100000. 105000. 110000. 115000. 120000. 125000. 130000. 135000. 140000. 145000. 150000. 155000. 160000. 165000. 170000. 175000. 180000. 185000. 190000. 195000. 200000. 205000. 210000. 215000. 220000. 225000. 230000. 235000. 240000. 245000. 250000. 255000. 260000. 265000. 270000. 275000. 280000. 285000. 290000. 295000. 300000.</level>
</param>
</paramset>

<paramset>
<datset>AVIATION</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>rrfs</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>EDPARM_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
<level>30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240. 0.</level>
<scale>3.0</scale>
</param>

<param>
<shortname>CAT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
<level>30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.</level>
<scale>3.0</scale>
</param>

<param>
<shortname>MWTURB_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
<level>30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.</level>
<scale>3.0</scale>
</param>

<param>
<shortname>CIT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
<level>30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.</level>
<scale>3.0</scale>
</param>
</paramset>

</postxml>
1 change: 1 addition & 0 deletions parm/params_grib2_tbl_new
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
2 3 22 0 CISICE
2 3 20 0 CISOILM
2 0 23 0 CISOILW
0 19 50 0 CITEDR
0 19 207 1 CIVIS
3 2 9 0 CLDALB
3 2 10 0 CLDEMISS
Expand Down
2 changes: 2 additions & 0 deletions parm/params_grib2_tbl_new.text
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@
0 19 36 0 PSNOWS
! Added more parameters in 12/03/2019
0 19 37 0 ICESEV
! Added more parameters in 11/01/2023
0 19 50 0 CITEDR
! NCEP Local use
0 19 192 1 MXSALB
0 19 193 1 SNFALB
Expand Down
9 changes: 9 additions & 0 deletions parm/post_avblflds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4146,6 +4146,15 @@
<scale>6.0</scale>
</param>

<!-- 477 EDR on FD_HEIGHT_LVL (for regional model)-->
<param>
<post_avblfldidx>477</post_avblfldidx>
<shortname>CIT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL</shortname>
<pname>CITEDR</pname>
<fixed_sfc1_type>spec_alt_above_mean_sea_lvl</fixed_sfc1_type>
<scale>3.0</scale>
</param>

<param>
<post_avblfldidx>480</post_avblfldidx>
<shortname>ICESEV_ON_ISOBARIC_SFC</shortname>
Expand Down
167 changes: 166 additions & 1 deletion parm/postxconfig-NT-fv3lam_rrfs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
3
4
4
3
247
308
Expand Down Expand Up @@ -20696,3 +20697,167 @@ spec_alt_above_mean_sea_lvl
?
?
?
AVIATION
32769
ncep_nco
v2003
local_tab_yes1
fcst
oper
fcst
fcst
hour
nws_ncep
rrfs
complex_packing_spatial_diff
2nd_ord_sptdiff
fltng_pnt
lossless
467
EDPARM_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL
?
1
tmpl4_0
EDPARM
?
?
spec_alt_above_mean_sea_lvl
0
?
52
30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240. 0.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
3.0
0
0
0
?
?
?
468
CAT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL
?
1
tmpl4_0
CATEDR
?
?
spec_alt_above_mean_sea_lvl
0
?
51
30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
3.0
0
0
0
?
?
?
469
MWTURB_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL
?
1
tmpl4_0
MWTURB
?
?
spec_alt_above_mean_sea_lvl
0
?
51
30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
3.0
0
0
0
?
?
?
477
CIT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL
?
1
tmpl4_0
CITEDR
?
?
spec_alt_above_mean_sea_lvl
0
?
51
30. 304. 609. 914. 1219. 1524. 1828. 2133. 2438. 2743. 3048. 3352. 3657. 3962. 4267. 4572. 4876. 5181. 5486. 5791. 6096. 6400. 6705. 7010. 7315. 7620. 7924. 8229. 8534. 8839. 9144. 9448. 9753. 10058. 10363. 10668. 10972. 11277. 11582. 11887. 12192. 12496. 12801. 13106. 13411. 13716. 14020. 14325. 14630. 14935. 15240.
?
0
?
0
?
?
?
0
0.0
0
0.0
?
0
0.0
0
0.0
1
3.0
0
0
0
?
?
?
1 change: 1 addition & 0 deletions sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ list(APPEND GTG_LIB_SRC
gtg_read_config.F90
gtg_mlmodel.F90
gtg_prob.F90
gtg_interp.F90
gtg_ctlblk.F90
gtg_filter.F90
gtg_indices.F90
Expand Down
9 changes: 6 additions & 3 deletions sorc/ncep_post.fd/MDLFLD.f
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@
!! 23-08-16 | Y Mao | For gtg_algo, add tke as an input and cit as an output
!! 23-08-16 | Y Mao | For GTG, replace iget(ID) with namelist option 'gtg_on'.
!! 23-10-04 | W Meng | Read 3D radar reflectivity from model when GFS use Thmopson MP
!! 23-10-17 | E James | Include hail hydrometeors in VIL computation when available
!! 23-10-17 | E James| Include hail hydrometeors in VIL computation when available
!! 24-01-07 | Y Mao | Add EDPARM IDs to the condition to call gtg_algo()
!! 24-01-24 | H Lin | switching GTG max (gtg) to gtgx3 from gtgx2 per gtg_algo() call
!!
!! USAGE: CALL MDLFLD
!! INPUT ARGUMENT LIST:
!!
Expand Down Expand Up @@ -4205,7 +4208,7 @@ SUBROUTINE MDLFLD
!
!
! COMPUTE NCAR GTG turbulence
IF(gtg_on) then
IF(gtg_on .and. (IGET(464) > 0 .or. IGET(467) > 0 .or. IGET(470) > 0)) then
i=(ista+iend)/2
j=(jsta+jend)/2
! if(me == 0) print*,'sending input to GTG i,j,hgt,gust',i,j,ZINT(i,j,LP1),gust(i,j)
Expand All @@ -4225,7 +4228,7 @@ SUBROUTINE MDLFLD
dx(ista:iend,:),dy(ista:iend,:),u10(ista:iend,:),v10(ista:iend,:),&
GUST(ista:iend,:),avgprec(ista:iend,:),sm(ista:iend,:),sice(ista:iend,:),&
catedr(ista:iend,:,:),mwt(ista:iend,:,:),cit(ista:iend,:,:),&
gtg(ista:iend,:,:),RICHNO(ista:iend,:,:),item)
RICHNO(ista:iend,:,:),gtg(ista:iend,:,:),item)

i=iend
j=jend ! 321,541
Expand Down
19 changes: 15 additions & 4 deletions sorc/ncep_post.fd/MISCLN.f
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
!! 23-04-03 E Colon - Added additional array assignments to resolve SPC fields crashes for RRFS input
!! 23-08-16 Y Mao - Updated interpolation to flight levels for regional GTG fields
!! 23-08-24 Y Mao - Add gtg_on option for GTG interpolation
!! 24-01-07 H LIN - Add CIT output in NCAR GTG turbulence calculation
!! 24-01-09 Y Mao - Correct the height level of EDPARM (ID=467) on 0m to index 52 from the control file, instead of 0.
!! USAGE: CALL MISCLN
!! INPUT ARGUMENT LIST:
!!
Expand Down Expand Up @@ -93,7 +95,7 @@ SUBROUTINE MISCLN
!
!
use vrbls3d, only: pmid, uh, vh, t, zmid, zint, pint, alpint, q, omga
use vrbls3d, only: catedr,mwt,gtg
use vrbls3d, only: catedr,mwt,gtg, cit
use vrbls2d, only: pblh, cprate, fis, T500, T700, Z500, Z700,&
teql,ieql, cape,cin
use masks, only: lmh
Expand Down Expand Up @@ -1200,7 +1202,7 @@ SUBROUTINE MISCLN
!
! ***BLOCK 3-2: FD LEVEL (from control file) GTG
!
IF(gtg_on .and. (IGET(467)>0.or.IGET(468)>0.or.IGET(469)>0)) THEN
IF(gtg_on .and. (IGET(467)>0.or.IGET(468)>0.or.IGET(469)>0.or.IGET(477)>0)) THEN
! MASS FIELDS INTERPOLATION
if(allocated(QIN)) deallocate(QIN)
if(allocated(QTYPE)) deallocate(QTYPE)
Expand Down Expand Up @@ -1228,6 +1230,14 @@ SUBROUTINE MISCLN
QTYPE(nFDS)="O"
end if

IF(IGET(477) > 0) THEN
nFDS = nFDS + 1
IDS(nFDS) = 477
QIN(ISTA:IEND,JSTA:JEND,1:LM,nFDS)=cit(ISTA:IEND,JSTA:JEND,1:LM)
QTYPE(nFDS)="O"
end if


! FOR Regional GTG, ALL LEVLES OF DIFFERENT VARIABLES ARE THE SAME, except for EDPARM
! Use levels of iID=468 for interpolation
iID=468
Expand All @@ -1252,7 +1262,7 @@ SUBROUTINE MISCLN
! Adjust values before output
DO N=1,nFDS
iID=IDS(N)
if(iID==467 .or. iID==468 .or. iID==469) then
if(iID==467 .or. iID==468 .or. iID==469 .or. iID==477) then
DO IFD = 1,NFDCTL
DO J=JSTA,JEND
DO I=ISTA,IEND
Expand All @@ -1272,6 +1282,7 @@ SUBROUTINE MISCLN

! Regional GTG has a legend of special defination
! 0 m holds the max value of the whole vertical column
! 0 m is the last height in the control file
if (iID == 467) then
EGRID1 = SPVAL
DO IFD = 1,NFDCTL
Expand All @@ -1294,7 +1305,7 @@ SUBROUTINE MISCLN
if(grib=='grib2') then
cfld=cfld+1
fld_info(cfld)%ifld=IAVBLFLD(IGET(iID))
fld_info(cfld)%lvl=0.
fld_info(cfld)%lvl=NFDCTL+1
!$omp parallel do private(i,j,ii,jj)
do j=1,jend-jsta+1
jj = jsta+j-1
Expand Down
4 changes: 4 additions & 0 deletions sorc/ncep_post.fd/gtg_interp.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
subroutine gtg_interp()
implicit none
print *, "Stub code for GTG protection but to make UPP public to work"
end subroutine gtg_interp
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/post_gtg.fd

0 comments on commit cd58d22

Please sign in to comment.