Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for hydrostatic runs - write out Omega and HGT from model output #959

Merged
merged 6 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
!> 2024-04-23 | Eric James | Updating smoke emissions to be 3D variable (ebu_smoke)
!> 2024-05-01 | Eric James | set "prec_acc_dt1" as 15 min for RRFS
!> 2024-05-09 | Eric James | Enable reading of clear-sky downwelling shortwave irradiance
!> 2024-05-10 | Karina Asmar | Read omega from model output and calculate HGT for hydrostatic runs
!>
!> @author Hui-Ya Chuang @date 2016-03-04
!----------------------------------------------------------------------
Expand Down Expand Up @@ -879,20 +880,21 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
spval,recname(9),dpres(ista_2l,jsta_2l,1),lm)
call read_netcdf_3d_para(ncid3d,im,jm,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,recname(10),buf3d(ista_2l,jsta_2l,1),lm)
do l=1,lm
do j=jsta,jend
do i=ista,iend
cwm(i,j,l)=spval
! Asmar - read Omega from model output, otherwise calculate
call read_netcdf_3d_para(ncid3d,im,jm,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,'omga',omga(ista_2l,jsta_2l,1),lm)
do l=lm,1,-1
do j=jsta,jend
do i=ista,iend
cwm(i,j,l)=spval
! dong add missing value
if (wh(i,j,l) < spval) then
omga(i,j,l)=(-1.)*wh(i,j,l)*dpres(i,j,l)/abs(buf3d(i,j,l))
else
omga(i,j,l) = spval
end if
! if(t(i,j,l)>1000.)print*,'bad T ',t(i,j,l)
if(wh(i,j,l) /= spval) then
if (omga(i,j,l) == spval .and. dpres(i,j,l) /= spval .and. buf3d(i,j,l) /=spval) &
omga(i,j,l) = (-1.) * wh(i,j,l) * dpres(i,j,l)/abs(buf3d(i,j,l))
endif
enddo
enddo
enddo
enddo
call read_netcdf_3d_para(ncid3d,im,jm,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
spval,recname(11),qqi(ista_2l,jsta_2l,1),lm)
call read_netcdf_3d_para(ncid3d,im,jm,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, &
Expand Down Expand Up @@ -1180,28 +1182,32 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d)
enddo
enddo

do l=lm,1,-1
do l=lp1,1,-1
do j=jsta,jend
do i=ista,iend
if(zint(i,j,l+1)/=spval .and. buf3d(i,j,l)/=spval)then
!make sure delz is positive
zint(i,j,l)=zint(i,j,l+1)+abs(buf3d(i,j,l))
! if(zint(i,j,l)>1.0E6)print*,'bad H ',i,j,l,zint(i,j,l)
else
zint(i,j,l)=spval
end if
alpint(i,j,l)=log(pint(i,j,l))
end do
end do
if(debugprint)print*,'sample zint= ',isa,jsa,l,zint(isa,jsa,l)
end do

do l=lp1,1,-1
! Asmar - fix HGT for hydrostatic runs
do l=lm,1,-1
do j=jsta,jend
do i=ista,iend
alpint(i,j,l)=log(pint(i,j,l))
end do
end do
end do
if(wh(i,j,l) /= spval) then
! make sure delz is positive
zint(i,j,l) = abs(buf3d(i,j,l)) + zint(i,j,l+1)
else
if(zint(i,j,l+1) /=spval .and. t(i,j,l) /= spval .and. alpint(i,j,l+1) /= spval &
.and. alpint(i,j,l) /=spval .and. q(i,j,l) /= spval) then
zint(i,j,l) = zint(i,j,l+1)+(rgas/grav)*t(i,j,l)*(1.+fv*q(i,j,l))*(alpint(i,j,l+1)-alpint(i,j,l))
else
zint(i,j,l) = spval
endif
endif
enddo
enddo
enddo

do l=lm,1,-1
do j=jsta,jend
Expand Down
132 changes: 76 additions & 56 deletions tests/logs/rt.log.HERA
Original file line number Diff line number Diff line change
@@ -1,69 +1,89 @@
===== Start of UPP Regression Testing Log =====
UPP Hash Tested:
51057edacce7a6696319e9780544a56b0ce5d829
675a5402d26a7c81e19d96c7a04489cdf7710ab1

Submodule hashes:
-1ba8270870947b583cd51bc72ff8960f4c1fb36e sorc/libIFI.fd
-567edcc94bc418d0dcd6cdaafed448eeb5aab570 sorc/ncep_post.fd/post_gtg.fd

Run directory: /scratch2/NAGAPE/epic/Fernando.Andrade-maldonado/regression-tests/upp/963/UPP/ci/rundir/upp-HERA
Run directory: /scratch2/NAGAPE/epic/Fernando.Andrade-maldonado/regression-tests/upp/959/UPP/ci/rundir/upp-HERA
Baseline directory: /scratch2/NAGAPE/epic/UPP/test_suite

Total runtime: 00h:16m:00s
Test Date: 20240529 15:01:26
Total runtime: 01h:44m:54s
Test Date: 20240613 19:13:53
Summary Results:

05/29 14:48:51Z -fv3gefs test: your new post executable generates bit-identical geaer.t00z.master.grb2f060 as the trunk
05/29 14:48:52Z -fv3gefs pe test: your new post executable generates bit-identical geaer.t00z.master.grb2f060 as the trunk
05/29 14:49:31Z -rap test: your new post executable generates bit-identical WRFPRS.GrbF16 as the trunk
05/29 14:49:32Z -rap test: your new post executable generates bit-identical WRFNAT.GrbF16 as the trunk
05/29 14:49:40Z -fv3hafs test: your new post executable generates bit-identical HURPRS09.tm00 as the trunk
05/29 14:50:04Z -fv3hafs pe test: your new post executable generates bit-identical HURPRS09.tm00 as the trunk
05/29 14:50:35Z -rtma pe test: your new post executable generates bit-identical NATLEV00.tm00 as the trunk
05/29 14:50:37Z -rtma pe test: your new post executable generates bit-identical PRSLEV00.tm00 as the trunk
05/29 14:50:37Z -rtma pe test: your new post executable generates bit-identical IFIFIP00.tm00 as the trunk
05/29 14:50:45Z -rap pe test: your new post executable did generate changed results in WRFPRS.GrbF16
05/29 14:50:46Z -rap pe test: your new post executable generates bit-identical WRFNAT.GrbF16 as the trunk
05/29 14:50:55Z -hrrr pe test: your new post executable generates bit-identical WRFTWO.GrbF04 as the trunk
05/29 14:50:57Z -hrrr pe test: your new post executable generates bit-identical WRFPRS.GrbF04 as the trunk
05/29 14:51:00Z -hrrr pe test: your new post executable generates bit-identical WRFNAT.GrbF04 as the trunk
05/29 14:51:01Z -nmmb pe test: your new post executable generates bit-identical BGDAWP03.tm00.Grib2 as the trunk
05/29 14:51:03Z -fv3r test: your new post executable generates bit-identical PRSLEV10.tm00 as the trunk
05/29 14:51:03Z -nmmb pe test: your new post executable generates bit-identical BGRD3D03.tm00.Grib2 as the trunk
05/29 14:51:04Z -nmmb pe test: your new post executable generates bit-identical BGRDSF03.tm00.Grib2 as the trunk
05/29 14:51:05Z -rtma test: your new post executable generates bit-identical NATLEV00.tm00 as the trunk
05/29 14:51:06Z -nmmb test: your new post executable generates bit-identical BGDAWP03.tm00.Grib2 as the trunk
05/29 14:51:08Z -nmmb test: your new post executable generates bit-identical BGRD3D03.tm00.Grib2 as the trunk
05/29 14:51:08Z -fv3r test: your new post executable generates bit-identical NATLEV10.tm00 as the trunk
05/29 14:51:08Z -rtma test: your new post executable generates bit-identical PRSLEV00.tm00 as the trunk
05/29 14:51:09Z -rtma test: your new post executable generates bit-identical IFIFIP00.tm00 as the trunk
05/29 14:51:09Z -nmmb test: your new post executable generates bit-identical BGRDSF03.tm00.Grib2 as the trunk
05/29 14:51:09Z -fv3r pe test: your new post executable generates bit-identical PRSLEV10.tm00 as the trunk
05/29 14:51:14Z -fv3r pe test: your new post executable generates bit-identical NATLEV10.tm00 as the trunk
05/29 14:51:15Z -hrrr test: your new post executable generates bit-identical WRFTWO.GrbF04 as the trunk
05/29 14:51:16Z -hrrr test: your new post executable generates bit-identical WRFPRS.GrbF04 as the trunk
05/29 14:51:18Z -hrrr test: your new post executable generates bit-identical WRFNAT.GrbF04 as the trunk
05/29 15:00:40Z gfs_post_00.1392909-fv3gfs test: your new post executable generates bit-identical gfs.t00z.master.grb2f006 as the trunk
05/29 15:00:41Z gfs_post_00.1392909-fv3gfs test: your new post executable generates bit-identical gfs.t00z.sfluxgrbf006.grib2 as the trunk
05/29 15:00:41Z gfs_post_00.1392909-fv3gfs test: your new post executable generates bit-identical gfs.t00z.special.grb2f006 as the trunk
05/29 15:01:15Z gfs_post_00.30719-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.master.grb2f006 as the trunk
05/29 15:01:15Z gfs_post_00.30719-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.sfluxgrbf006.grib2 as the trunk
05/29 15:01:15Z gfs_post_00.30719-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.special.grb2f006 as the trunk
05/29 14:51:17Z -Runtime: nmmb_test 00:01:24 -- baseline 00:01:00
05/29 14:51:18Z -Runtime: nmmb_pe_test 00:01:22 -- baseline 00:01:00
05/29 14:51:18Z -Runtime: fv3gefs_test 00:00:20 -- baseline 00:40:00
05/29 14:51:18Z -Runtime: fv3gefs_pe_test 00:00:21 -- baseline 00:40:00
05/29 14:51:18Z -Runtime: rap_test 00:01:01 -- baseline 00:02:00
05/29 14:51:19Z -Runtime: rap_pe_test 00:01:12 -- baseline 00:02:00
05/29 14:51:19Z -Runtime: hrrr_test 00:02:26 -- baseline 00:02:00
05/29 14:51:19Z -Runtime: hrrr_pe_test 00:02:13 -- baseline 00:02:00
05/29 15:00:54Z -Runtime: fv3gfs_test 00:11:24 -- baseline 00:15:00
05/29 15:01:24Z -Runtime: fv3gfs_pe_test 00:11:47 -- baseline 00:15:00
05/29 15:01:25Z -Runtime: fv3r_test 00:01:40 -- baseline 00:03:00
05/29 15:01:25Z -Runtime: fv3r_pe_test 00:01:36 -- baseline 00:03:00
05/29 15:01:25Z -Runtime: fv3hafs_test 00:00:37 -- baseline 00:03:00
05/29 15:01:25Z -Runtime: fv3hafs_pe_test 00:00:36 -- baseline 00:03:00
05/29 15:01:26Z -Runtime: rtma_test 00:01:41 -- baseline 00:03:00
05/29 15:01:26Z -Runtime: rtma_test_pe_test 00:01:41 -- baseline
06/13 17:35:28Z -rtma pe test: your new post executable generates bit-identical NATLEV00.tm00 as the trunk
06/13 17:35:31Z -rtma pe test: your new post executable generates bit-identical PRSLEV00.tm00 as the trunk
06/13 17:35:31Z -rtma pe test: your new post executable generates bit-identical IFIFIP00.tm00 as the trunk
06/13 17:43:35Z gfs_post_00.2347069-fv3gfs test: your new post executable generates bit-identical gfs.t00z.master.grb2f006 as the trunk
06/13 17:43:36Z gfs_post_00.2347069-fv3gfs test: your new post executable generates bit-identical gfs.t00z.sfluxgrbf006.grib2 as the trunk
06/13 17:43:36Z gfs_post_00.2347069-fv3gfs test: your new post executable generates bit-identical gfs.t00z.special.grb2f006 as the trunk
06/13 17:43:52Z -hrrr test: your new post executable generates bit-identical WRFTWO.GrbF04 as the trunk
06/13 17:43:53Z -hrrr test: your new post executable generates bit-identical WRFPRS.GrbF04 as the trunk
06/13 17:43:55Z -hrrr test: your new post executable generates bit-identical WRFNAT.GrbF04 as the trunk
06/13 17:44:03Z gfs_post_00.3285752-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.master.grb2f006 as the trunk
06/13 17:44:04Z gfs_post_00.3285752-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.sfluxgrbf006.grib2 as the trunk
06/13 17:44:04Z gfs_post_00.3285752-fv3gfs pe test: your new post executable generates bit-identical gfs.t00z.special.grb2f006 as the trunk
06/13 17:56:04Z -fv3gefs test: your new post executable generates bit-identical geaer.t00z.master.grb2f060 as the trunk
06/13 17:56:04Z -fv3gefs pe test: your new post executable generates bit-identical geaer.t00z.master.grb2f060 as the trunk
06/13 17:56:16Z -fv3hafs test: your new post executable generates bit-identical HURPRS09.tm00 as the trunk
06/13 17:56:18Z -fv3hafs pe test: your new post executable generates bit-identical HURPRS09.tm00 as the trunk
06/13 17:56:43Z -rap test: your new post executable generates bit-identical WRFPRS.GrbF16 as the trunk
06/13 17:56:44Z -rap test: your new post executable generates bit-identical WRFNAT.GrbF16 as the trunk
06/13 17:56:53Z -nmmb pe test: your new post executable generates bit-identical BGDAWP03.tm00.Grib2 as the trunk
06/13 17:56:55Z -nmmb pe test: your new post executable generates bit-identical BGRD3D03.tm00.Grib2 as the trunk
06/13 17:56:56Z -nmmb pe test: your new post executable generates bit-identical BGRDSF03.tm00.Grib2 as the trunk
06/13 17:56:59Z -nmmb test: your new post executable generates bit-identical BGDAWP03.tm00.Grib2 as the trunk
06/13 17:57:01Z -nmmb test: your new post executable generates bit-identical BGRD3D03.tm00.Grib2 as the trunk
06/13 17:57:01Z -nmmb test: your new post executable generates bit-identical BGRDSF03.tm00.Grib2 as the trunk
06/13 17:57:17Z -fv3r test: your new post executable generates bit-identical PRSLEV10.tm00 as the trunk
06/13 17:57:22Z -fv3r test: your new post executable generates bit-identical NATLEV10.tm00 as the trunk
06/13 17:57:31Z -rtma test: your new post executable generates bit-identical NATLEV00.tm00 as the trunk
06/13 17:57:35Z -rtma test: your new post executable generates bit-identical PRSLEV00.tm00 as the trunk
06/13 17:57:35Z -rtma test: your new post executable generates bit-identical IFIFIP00.tm00 as the trunk
06/13 17:57:44Z -hrrr pe test: your new post executable generates bit-identical WRFTWO.GrbF04 as the trunk
06/13 17:57:45Z -hrrr pe test: your new post executable generates bit-identical WRFPRS.GrbF04 as the trunk
06/13 17:57:47Z -hrrr pe test: your new post executable generates bit-identical WRFNAT.GrbF04 as the trunk
06/13 17:57:59Z -rap pe test: your new post executable did generate changed results in WRFPRS.GrbF16
06/13 17:57:59Z -rap pe test: your new post executable generates bit-identical WRFNAT.GrbF16 as the trunk
06/13 17:57:12Z -Runtime: nmmb_test 00:01:20 -- baseline 00:01:00
06/13 17:57:12Z -Runtime: nmmb_pe_test 00:01:15 -- baseline 00:01:00
06/13 17:57:12Z -Runtime: fv3gefs_test 00:00:23 -- baseline 00:40:00
06/13 17:57:13Z -Runtime: fv3gefs_pe_test 00:00:23 -- baseline 00:40:00
06/13 17:57:13Z -Runtime: rap_test 00:01:03 -- baseline 00:02:00
06/13 17:58:14Z -Runtime: rap_pe_test 00:01:14 -- baseline 00:02:00
06/13 17:58:14Z -Runtime: hrrr_test 00:02:31 -- baseline 00:02:00
06/13 17:58:14Z -Runtime: hrrr_pe_test 00:02:06 -- baseline 00:02:00
06/13 17:58:15Z -Runtime: fv3gfs_test 00:11:25 -- baseline 00:15:00
06/13 17:58:15Z -Runtime: fv3gfs_pe_test 00:11:45 -- baseline 00:15:00
06/13 17:58:15Z -Runtime: fv3r_test 00:01:41 -- baseline 00:03:00
06/13 19:13:52Z -Runtime: fv3hafs_test 00:00:35 -- baseline 00:03:00
06/13 19:13:52Z -Runtime: fv3hafs_pe_test 00:00:37 -- baseline 00:03:00
06/13 19:13:53Z -Runtime: rtma_test 00:01:54 -- baseline 00:03:00
06/13 19:13:53Z -Runtime: rtma_test_pe_test 00:01:43 -- baseline
No changes in test results detected.
===== End of UPP Regression Testing Log =====
===== Start of UPP Regression Testing Log =====
UPP Hash Tested:
2d086ec0580a345c5b4067fdaa0ce6efc135f25d

Submodule hashes:
-1ba8270870947b583cd51bc72ff8960f4c1fb36e sorc/libIFI.fd
-567edcc94bc418d0dcd6cdaafed448eeb5aab570 sorc/ncep_post.fd/post_gtg.fd

Run directory: /scratch2/NAGAPE/epic/Fernando.Andrade-maldonado/regression-tests/upp/959/UPP/ci/rundir/upp-HERA
Baseline directory: /scratch2/NAGAPE/epic/UPP/test_suite

Total runtime: 00h:02m:20s
Test Date: 20240613 20:59:44
Summary Results:

06/13 20:59:23Z -fv3r pe test: your new post executable generates bit-identical PRSLEV10.tm00 as the trunk
06/13 20:59:28Z -fv3r pe test: your new post executable generates bit-identical NATLEV10.tm00 as the trunk
06/13 20:59:35Z -fv3r test: your new post executable generates bit-identical PRSLEV10.tm00 as the trunk
06/13 20:59:39Z -fv3r test: your new post executable generates bit-identical NATLEV10.tm00 as the trunk
06/13 20:59:43Z -Runtime: fv3r_test 00:01:32 -- baseline 00:03:00
06/13 20:59:44Z -Runtime: fv3r_pe_test 00:01:46 -- baseline 00:03:00
No changes in test results detected.
===== End of UPP Regression Testing Log =====
Loading
Loading