From cd58d226ecde08487bba80caa159e33ad52e3200 Mon Sep 17 00:00:00 2001 From: hsinmulin-NOAA <48441737+hsinmulin-NOAA@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:47:12 -0500 Subject: [PATCH] Additional GTG output "CIT" (#839) * 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 --- parm/fv3lam_rrfs.xml | 44 ++++++++ parm/params_grib2_tbl_new | 1 + parm/params_grib2_tbl_new.text | 2 + parm/post_avblflds.xml | 9 ++ parm/postxconfig-NT-fv3lam_rrfs.txt | 167 +++++++++++++++++++++++++++- sorc/ncep_post.fd/CMakeLists.txt | 1 + sorc/ncep_post.fd/MDLFLD.f | 9 +- sorc/ncep_post.fd/MISCLN.f | 19 +++- sorc/ncep_post.fd/gtg_interp.F90 | 4 + sorc/ncep_post.fd/post_gtg.fd | 2 +- 10 files changed, 249 insertions(+), 9 deletions(-) create mode 100644 sorc/ncep_post.fd/gtg_interp.F90 diff --git a/parm/fv3lam_rrfs.xml b/parm/fv3lam_rrfs.xml index 8017cfa25..3985377f0 100755 --- a/parm/fv3lam_rrfs.xml +++ b/parm/fv3lam_rrfs.xml @@ -3777,4 +3777,48 @@ 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. + + + 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 + + + EDPARM_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL + 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. + 3.0 + + + + CAT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL + 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. + 3.0 + + + + MWTURB_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL + 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. + 3.0 + + + + CIT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL + 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. + 3.0 + + + diff --git a/parm/params_grib2_tbl_new b/parm/params_grib2_tbl_new index 26a83ac3a..c3cdd17de 100755 --- a/parm/params_grib2_tbl_new +++ b/parm/params_grib2_tbl_new @@ -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 diff --git a/parm/params_grib2_tbl_new.text b/parm/params_grib2_tbl_new.text index f5ef8d2e2..5059b025c 100755 --- a/parm/params_grib2_tbl_new.text +++ b/parm/params_grib2_tbl_new.text @@ -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 diff --git a/parm/post_avblflds.xml b/parm/post_avblflds.xml index a1c42093d..974f6ce1e 100755 --- a/parm/post_avblflds.xml +++ b/parm/post_avblflds.xml @@ -4146,6 +4146,15 @@ 6.0 + + + 477 + CIT_GTG_ON_SPEC_ALT_ABOVE_MEAN_SEA_LVL + CITEDR + spec_alt_above_mean_sea_lvl + 3.0 + + 480 ICESEV_ON_ISOBARIC_SFC diff --git a/parm/postxconfig-NT-fv3lam_rrfs.txt b/parm/postxconfig-NT-fv3lam_rrfs.txt index a8c5eebfd..fb1741805 100644 --- a/parm/postxconfig-NT-fv3lam_rrfs.txt +++ b/parm/postxconfig-NT-fv3lam_rrfs.txt @@ -1,4 +1,5 @@ -3 +4 +4 3 247 308 @@ -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 +? +? +? diff --git a/sorc/ncep_post.fd/CMakeLists.txt b/sorc/ncep_post.fd/CMakeLists.txt index 8a8b6da26..1968280b3 100644 --- a/sorc/ncep_post.fd/CMakeLists.txt +++ b/sorc/ncep_post.fd/CMakeLists.txt @@ -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 diff --git a/sorc/ncep_post.fd/MDLFLD.f b/sorc/ncep_post.fd/MDLFLD.f index 1cdfbef23..375da5f15 100644 --- a/sorc/ncep_post.fd/MDLFLD.f +++ b/sorc/ncep_post.fd/MDLFLD.f @@ -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: !! @@ -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) @@ -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 diff --git a/sorc/ncep_post.fd/MISCLN.f b/sorc/ncep_post.fd/MISCLN.f index e1b8b897a..1362b372d 100644 --- a/sorc/ncep_post.fd/MISCLN.f +++ b/sorc/ncep_post.fd/MISCLN.f @@ -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: !! @@ -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 @@ -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) @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/sorc/ncep_post.fd/gtg_interp.F90 b/sorc/ncep_post.fd/gtg_interp.F90 new file mode 100644 index 000000000..57147900b --- /dev/null +++ b/sorc/ncep_post.fd/gtg_interp.F90 @@ -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 diff --git a/sorc/ncep_post.fd/post_gtg.fd b/sorc/ncep_post.fd/post_gtg.fd index a9828705b..333bd604c 160000 --- a/sorc/ncep_post.fd/post_gtg.fd +++ b/sorc/ncep_post.fd/post_gtg.fd @@ -1 +1 @@ -Subproject commit a9828705b587c451fc2a7267d1c374d737be425b +Subproject commit 333bd604ca59f5914ab8d91fe4b66452418f16ee