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

chgres_cube grib2 GFS data support #48

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
2396483
chgres_cube_grib2_atmos: This commit references #66221
LarissaReames-NOAA Jul 18, 2019
736b24f
chgres_cube_grib2_atmos: This commit references #66221
LarissaReames-NOAA Jul 19, 2019
9e437ee
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 18, 2019
94cc0fe
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 19, 2019
5b1dfa5
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Jul 21, 2019
44ea443
Merge branch 'feature/chgres_cube_grib2_atmos' of gerrit:UFS_UTILS in…
LarissaReames-NOAA Jul 21, 2019
d414c42
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 7, 2019
3521075
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 7, 2019
ae22e22
feature/chgres_cube_grib2_atmos: This commit references #66268.
GeorgeGayno-NOAA Aug 16, 2019
c2adf96
feature/chgres_cube_grib2_atmos: This commit references #66268.
GeorgeGayno-NOAA Aug 16, 2019
ff603b9
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 19, 2019
427061d
Merge branch 'feature/chgres_cube_grib2_atmos' of gerrit:UFS_UTILS in…
LarissaReames-NOAA Aug 19, 2019
591ef88
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 20, 2019
8592b81
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Aug 21, 2019
d6c9b31
chgres_cube_grib2_atmos: This commit references #66268 (#8)
LarissaReames-NOAA Aug 23, 2019
8aa3b63
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 4, 2019
a38b232
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 4, 2019
01c6f1d
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 4, 2019
5a0e912
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 4, 2019
ec327b8
feature/hera_port This commit references issue #1.
GeorgeGayno-NOAA Sep 5, 2019
e2a0aad
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
bae8fea
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
e44ff25
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 6, 2019
00de954
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
3241cfa
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
2044db3
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 9, 2019
e5c508d
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 10, 2019
b1951d1
feature/hera_port This commit references #1.
GeorgeGayno-NOAA Sep 11, 2019
ac49bb5
chgres_cube_grib2_atmos: This commit references #66268
LarissaReames-NOAA Sep 11, 2019
a5dd089
Merge branch 'feature/chgres_cube_grib2_atmos' into feature/chgres_cu…
LarissaReames-NOAA Sep 11, 2019
009496c
Feature/chgres cube grib2 atmos (#13)
LarissaReames-NOAA Sep 12, 2019
7dbe65c
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 12, 2019
ba9d991
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 13, 2019
d88bf1c
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 13, 2019
9381aeb
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 18, 2019
5d68083
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 18, 2019
de48ad1
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 19, 2019
829b1db
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 23, 2019
573bd48
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 26, 2019
5149a88
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Sep 30, 2019
63ee8bd
feature/hera_port: This commit references #1.
GeorgeGayno-NOAA Oct 2, 2019
b799955
Merge branch 'develop' into chgres_cube_grib2_atmos
BinLiu-NOAA Oct 7, 2019
6dd44b8
Merge branch 'hera_port' into chgres_cube_grib2_atmos
BinLiu-NOAA Oct 7, 2019
1c150e9
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 12, 2019
f31a859
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 16, 2019
f819e18
Merge pull request #1 from hafs-community/feature/chgres_cube_grib2_a…
LarissaReames-NOAA Oct 22, 2019
0160f6f
Merge branch 'develop' into feature/chgres_cube_grib2_atmos
BinLiu-NOAA Oct 30, 2019
930ff31
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 30, 2019
76e9bdb
Merge remote-tracking branch 'LarissaFork/feature/chgres_cube_grib2_a…
JiliDong-NOAA Oct 31, 2019
ecec8ef
re-order grib2 isobaric levels
JiliDong-NOAA Oct 31, 2019
332c584
keep grib2 CLWMR name consistent with origional
JiliDong-NOAA Oct 31, 2019
1945269
Replaced namelist option "base_install_dir" with "varmap_file" and
LarissaReames-NOAA Oct 31, 2019
7940d8b
Merge pull request #3 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Oct 31, 2019
8a691d6
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 31, 2019
91fb62e
Merge pull request #2 from hafs-community/feature/chgres_cube_grib2_a…
LarissaReames-NOAA Oct 31, 2019
73d23e8
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Oct 31, 2019
70a44e7
Merge pull request #2 from LarissaReames-NOAA/feature/chgres_cube_gri…
GeorgeGayno-NOAA Nov 1, 2019
b1a1cf3
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 1, 2019
41a3543
Merge pull request #4 from GeorgeGayno-NOAA/feature/chgres_cube_grib2…
LarissaReames-NOAA Nov 4, 2019
0c778e5
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Nov 4, 2019
200e0b8
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 4, 2019
46adf8a
grib2 inventory file for gfs data is now saved in the run directory i…
LarissaReames-NOAA Nov 4, 2019
6ad2789
Jet support for chgres_cube_grib2_atmos
JiliDong-NOAA Nov 5, 2019
4d8c9fb
Removed a few tabs in favor of spaces in model_grid.F90.
LarissaReames-NOAA Nov 6, 2019
0213e8c
Merge pull request #6 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Nov 6, 2019
5fc88c6
feature/chgres_cube_grib2_atmos:
GeorgeGayno-NOAA Nov 6, 2019
aa550f4
Merge remote-tracking branch 'Larissa/feature/chgres_cube_grib2_atmos…
GeorgeGayno-NOAA Nov 6, 2019
0f46d32
fix sorting to handle isobaric levels with decimal (mb)
JiliDong-NOAA Nov 7, 2019
e386583
fix sorting to handle isobaric levels with decimal (mb) cleaning up
JiliDong-NOAA Nov 7, 2019
021e855
All atmospheric variables are now read in from grib2 day based on grib2
LarissaReames-NOAA Nov 7, 2019
f60eb34
Merge pull request #7 from JiliDong-NOAA/feature/chgres_cube_grib2_atmos
LarissaReames-NOAA Nov 7, 2019
d8c2f72
Merge branch 'feature/chgres_cube_grib2_atmos' of https://github.com/…
LarissaReames-NOAA Nov 7, 2019
84c34d4
Merge branch 'feature/chgres_cube_grib2_atmos' into feature/chgres_cu…
LarissaReames-NOAA Nov 7, 2019
14c2644
Merge pull request #5 from GeorgeGayno-NOAA/feature/chgres_cube_grib2…
LarissaReames-NOAA Nov 7, 2019
df374ba
Bug fix for an extraneous line of code left over in last merge.
LarissaReames-NOAA Nov 7, 2019
da078d9
Initial commit with surface code
LarissaReames-NOAA Nov 18, 2019
4112354
Fixed a bug with staggered grid creation which resulted in nonsense i…
LarissaReames-NOAA Nov 20, 2019
be4bd0a
Fixed an indexing bug causing veg_type_input_grid to be 0 everywhere,…
LarissaReames-NOAA Dec 9, 2019
71df253
Ice depth is now filled with a default value of 1.5m if the field is …
LarissaReames-NOAA Dec 16, 2019
47e7da7
Fix to prevent erroneous very large snow depth values stemming from m…
LarissaReames-NOAA Dec 16, 2019
e331712
Look for LANDN for the landmask first, and look for LAND if LANDN isn't
LarissaReames-NOAA Dec 19, 2019
729c6b2
Merge pull request #8 from LarissaReames-NOAA/chgres_cube_grib2_release
LarissaReames-NOAA Dec 19, 2019
5f3f697
Merge branch 'develop' of https://github.com/NOAA-EMC/UFS_UTILS into …
LarissaReames-NOAA Jan 9, 2020
0a08a45
Merge pull request #9 from LarissaReames-NOAA/chgres_cube_grib2_release
LarissaReames-NOAA Jan 9, 2020
f4d814e
Added logic to turn off soil moisture rescaling for grib2 data while …
LarissaReames-NOAA Jan 9, 2020
ba884ab
Merge pull request #3 from LarissaReames-NOAA/feature/chgres_cube_gri…
GeorgeGayno-NOAA Jan 13, 2020
8a74a49
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
26e2aa4
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
85dcf9b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
7185834
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
8905b63
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 13, 2020
df4b273
Port chgres_cube to linux.gnu and linux.intel
DusanJovic-NOAA Jan 14, 2020
fc32eb0
Merge pull request #4 from DusanJovic-NOAA/george_chgres_cube_grib2_r…
GeorgeGayno-NOAA Jan 14, 2020
ec372ba
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
999da97
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
0c1ef8b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
c926a87
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
b9f9ce8
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 14, 2020
12b051b
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
b1f4bf1
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
7f07342
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
0ed5f0c
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 15, 2020
a40c5fc
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 16, 2020
3388d34
feature/chgres_cube_grib2_release This commit references #7.
GeorgeGayno-NOAA Jan 16, 2020
1c2bc99
feature/chgres_cube_grib2_release This commit references #7.
GeorgeGayno-NOAA Jan 17, 2020
cbe8df5
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 17, 2020
7974e17
feature/chgres_cube_grib2_release: This commit references #7.
GeorgeGayno-NOAA Jan 23, 2020
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
Prev Previous commit
Next Next commit
feature/chgres_cube_grib2_atmos:
This commit references #6.

chgres_cube - process gfs grib2 data on its native isobaric
coordinate instead of converting it to a hybrid coordinate.
Remove routines used for this conversion.
  • Loading branch information
GeorgeGayno-NOAA committed Nov 1, 2019
commit b1a1cf3e6d000819a18186c2a0c33b95b87b03ab
237 changes: 2 additions & 235 deletions sorc/chgres_cube.fd/grib2_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,18 @@ module grib2_util
! -------------------
! read_vcoord Reads vertical coordinate data
!
! iso2sig Main code for conversion of isobaric to sigma coordinates
!
! p2hyo, p2hyb Routines for pressure to sigma conversion; used by iso2sig
!--------------------------------------------------------------------------

use esmf
use netcdf

use program_setup, only : tracers_input,num_tracers, external_model, base_install_dir

use model_grid, only : i_input,j_input, ip1_input, jp1_input
use program_setup, only : external_model, base_install_dir

use atmdata_type
use model_grid, only : i_input, j_input

implicit none


contains


subroutine read_vcoord(isnative,vcoordi,vcoordo,lev_input,levp1_input,pt,metadata,iret)

implicit none
Expand Down Expand Up @@ -106,231 +98,6 @@ subroutine read_vcoord(isnative,vcoordi,vcoordo,lev_input,levp1_input,pt,metadat

end subroutine read_vcoord

subroutine iso2sig(pi,sigma,lev_input,levp1_input,psptr,atm,clb,cub,nvars,iret)

implicit none

real(esmf_kind_r8), intent(inout) :: pi(lev_input), &
sigma(levp1_input,2)
integer, intent(inout) :: lev_input, levp1_input, &
clb(3),cub(3)
type(atmdata), intent(inout) :: atm(:)
real(esmf_kind_r8), pointer, intent(inout) :: psptr(:,:)
integer, intent(out) :: iret


real :: msg
integer :: nvars


print*, "in iso2sig"
call p2hyo(pi,atm,psptr,100000.0,sigma(2:levp1_input,1),sigma(2:levp1_input,2), &
lev_input,clb,cub,nvars,msg,4,iret)
if (iret /= 0) call error_handler(" CONVERTING TO SIGMA COORDINATES. ONE OR BOTH PRESSURE &
&ARRAYS ARE NOT IN TOP TO BOTTOM ORDER.", iret)
iret = 0

end subroutine iso2sig

subroutine p2hyo(pi,xi,psfc,p0,hyao,hybo,lev_input,clb,cub,nvars,xmsg,kflag,iret)
implicit none

! this routine interploates constant pres levels to hybrid
! the formula for the pressure of a hybrid surface is;
! phy(k) = pout(k) = hya(k)*p0 + hyb(k)*psfc
!
! input ["i" input ... "o" output]
! pi - pressure level [input]
! psfc - is the surface pressure pa [input]
! mlon - longitude dimension
! nlat - latitude dimension
! hyao - is the "a" or pressure hybrid coef
! hybo - is the "b" or sigma coeficient
! klevo - number of output levels
! kflag - specify how values outside the "pi" will be handled
! by "outside" i mean [pout < pi(1)] or [pout > pi(klevi)]
! extrapolation is via log-linear extrapolation.
! =0 no extrapolation. values set to _fillvalue
! =1 values set to nearest valid value
! =2 values at pout less than pi(1) set to nearest value
! values at pout greater than pi(klevi) are extrapolated
! =3 values at pout less than pi(1) are extrapolated
! values at pout greater than pi(klevi) set to nearest value
! =4 values at pout less than pi(1) are extrapolated
! values at pout greater than pi(klevi) are extrapolated
!
! iret - error code [=0 no error detected]
! [.ne.0 error detected: one or both
! pressure arrays not top->bot order]
! output
! xo - pressure at hybrid levels [pa]

integer, intent(inout) :: lev_input
integer :: kflag,clb(3),cub(3)
real, intent(in) :: p0,xmsg
real, intent(inout) :: pi(lev_input), hyao(lev_input), hybo(lev_input)
type(atmdata), intent(inout):: xi(:)
real(esmf_kind_r8), pointer, intent(inout) :: psfc(:,:)

integer, intent(out) :: iret
integer :: iflag, klevo, nvars

real :: po(lev_input)
print*, "in p2hyo"
iflag = 0
! ! ? input asending order
iret = 0
klevo = lev_input

!print *, hyao(klevo), ' ', hybo(klevo), ' ', psfc(1,1), ' ', p0
! print *, pi

if (pi(1).gt.pi(lev_input)) then
iret = 1
return
end if


po(1) = hyao(1)*p0 + hybo(1)*psfc(clb(1),clb(2))

po(klevo) = hyao(klevo)*p0 + hybo(klevo)*psfc(clb(1),clb(2))
! ! ? output ascending order
if (po(1).gt.po(klevo)) then
iret = 20 + iret
end if

if (iret /= 0) return

call p2hyb(pi,xi,psfc,p0,hyao,hybo,po, lev_input,clb,cub,nvars,iflag, kflag, xmsg)

return
end subroutine p2hyo

subroutine p2hyb(pi,xi,psfc,p0,hyao,hybo,po,lev_input,clb,cub,nvar,iflag, kflag, xmsg)
implicit none

integer, intent(in) :: lev_input,clb(3),cub(3)
integer, intent(inout) :: kflag
real, intent(in) :: p0,pi(lev_input), hyao(lev_input), hybo(lev_input), xmsg
real, intent(inout) :: po(lev_input)
type(atmdata), intent(inout):: xi(:)
real(esmf_kind_r8), pointer, intent(inout) :: psfc(:,:)

integer, intent(out) :: iflag

integer :: nl,nlo,ml,mlo,ki,ko,nv, dims(3),nvar
real :: pimin, pimax, pomin, pomax, dxdp
real, allocatable :: xo(:,:,:,:)

print*, "in p2hyb"
dims = shape(xi(1)%var)
allocate(xo(dims(1),dims(2),dims(3),nvar+1))

pimin = pi(1)
pimax = pi(lev_input)

do nl = clb(2),cub(2)
nlo = nl-clb(2)+1

do ml = clb(1),cub(1)
mlo = ml-clb(1)+1

do ko = clb(3),cub(3)
po(ko) = hyao(ko)*p0 + hybo(ko)*psfc(ml,nl)
xo(mlo,nlo,ko,1) = po(ko)
end do

pomin = po(1)
pomax = po(lev_input)


do ko = 1,lev_input
xo(mlo,nlo,ko,2:nvar) = xmsg

do ki = 1,lev_input-1
if (po(ko) >= pimin .and. po(ko) <= pimax ) then
if (po(ko).ge.pi(ki) .and. po(ko).lt.pi(ki+1)) then
do nv = 2,nvar
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,ki) &
+(xi(nv)%var(ml,nl,ki+1) -xi(nv)%var(ml,nl,ki) )* &
(log(po(ko)) -log(pi(ki)))/ &
(log(pi(ki+1))-log(pi(ki)))
enddo
end if
else
if (kflag == 0) then
iflag = 1
elseif (kflag == 1) then
if (po(ko) < pimin) then
do nv = 2,nvar
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,1)
enddo
elseif (po(ko) > pimax) then
do nv = 2,nvar
xo(mlo,nlo,ko,nv-1) = xi(nv)%var(ml,nl,lev_input)
enddo
end if
elseif (kflag == 2) then
if (po(ko) < pimin) then
do nv = 2,nvar
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,1)
enddo
elseif (po(ko) > pimax) then
do nv = 2,nvar
dxdp = (xi(nv)%var(ml,nl,lev_input) -xi(nv)%var(ml,nl,lev_input-1))* &
(log(pi(lev_input))-log(pi(lev_input-1)))
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,lev_input) &
+ (log(po(ko))-log(pi(lev_input)))*dxdp
enddo

end if
elseif (kflag == 3) then
if (po(ko) < pimin) then
do nv = 2,nvar
dxdp = (xi(nv)%var(ml,nl,2) -xi(nv)%var(ml,nl,1))* &
(log(pi(2))-log(pi(1)))
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,1) &
+ (log(po(ko))-log(pi(1)))*dxdp
enddo

elseif (po(ko) > pimax) then
do nv = 2,nvar
xo(mlo,nlo,ko,nv-1) = xi(nv)%var(ml,nl,lev_input)
enddo
end if
elseif (kflag == 4) then
if (po(ko) < pimin) then
do nv = 2,nvar

dxdp = (xi(nv)%var(ml,nl,2) -xi(nv)%var(ml,nl,1))* &
(log(pi(2))-log(pi(1)))
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,1) &
+ (log(po(ko))-log(pi(1)))*dxdp
enddo
elseif (po(ko) > pimax) then
do nv = 2,nvar
dxdp = (xi(nv)%var(ml,nl,lev_input) -xi(nv)%var(ml,nl,lev_input-1))* &
(log(pi(lev_input))-log(pi(lev_input-1)))
xo(mlo,nlo,ko,nv) = xi(nv)%var(ml,nl,lev_input) &
+ (log(po(ko))-log(pi(lev_input)))*dxdp
enddo
end if
end if !kflag
endif ! outside pi bounds
end do ! loop over klevs input
end do !loop over klevs output
end do !loop over lon
end do !loop over lat

do nv = 1,nvar
xi(nv)%var(clb(1):cub(1),clb(2):cub(2),clb(3):cub(3)) = xo(:,:,lev_input:1:-1,nv)
enddo


deallocate(xo)

end subroutine p2hyb

subroutine rh2spfh(rh_sphum,p,t)

implicit none
Expand Down
15 changes: 3 additions & 12 deletions sorc/chgres_cube.fd/input_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ module input_data
tracers_input, num_tracers, &
input_type, num_tracers_input, &
input_type, external_model, &
get_var_cond, read_from_input, tracers, &
convert_sfc
get_var_cond, read_from_input, tracers

use model_grid, only : input_grid, &
i_input, j_input, &
Expand Down Expand Up @@ -2167,9 +2166,7 @@ subroutine read_input_atm_grib2_file(localpet)

use wgrib2api

use grib2_util, only : read_vcoord, iso2sig, rh2spfh, convert_omega
use model_grid, only : file_is_converted

use grib2_util, only : read_vcoord, rh2spfh, convert_omega

implicit none

Expand Down Expand Up @@ -2221,10 +2218,8 @@ subroutine read_input_atm_grib2_file(localpet)
"rainwat", "snowwat", "graupel", "cld_amt", "ice_nc", &
"rain_nc","water_nc","liq_aero","ice_aero", &
"sgs_tke"/)

the_file = trim(data_dir_input_grid) // "/" // trim(grib2_file_input_grid)
!if (file_is_converted) then
! the_file = "./test.grib2"
!endif

print*,"- READ ATMOS DATA FROM GRIB2 FILE: ", trim(the_file)
print*,"- USE INVENTORY FILE ", inv_file
Expand Down Expand Up @@ -2628,7 +2623,6 @@ subroutine read_input_atm_grib2_file(localpet)
call error_handler("IN FieldGet", rc)
end do

!call iso2sig(rlevs,vcoord,lev_input,levp1_input,psptr,atm,clb,cub,5+num_tracers, iret)
do i = clb(1),cub(1)
do j = clb(2),cub(2)
atm(1)%var(i,j,:) = rlevs(lev_input:1:-1)
Expand Down Expand Up @@ -2737,9 +2731,6 @@ subroutine read_input_atm_grib2_file(localpet)

endif

if (localpet == 0 .and. file_is_converted .and. .not. convert_sfc) &
call system("rm "//trim(the_file))

end subroutine read_input_atm_grib2_file

!---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion sorc/chgres_cube.fd/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ utils.o: utils.f90
atmdata_type.o: atmdata_type.F90
$(FCOMP) $(FFLAGS) -c $(ESMF_F90COMPILEPATHS) atmdata_type.F90

grib2_util.o: model_grid.o program_setup.o atmdata_type.o grib2_util.F90
grib2_util.o: model_grid.o program_setup.o grib2_util.F90
$(FCOMP) $(FFLAGS) -c $(ESMF_F90COMPILEPATHS) grib2_util.F90

program_setup.o: program_setup.f90
Expand Down
1 change: 0 additions & 1 deletion sorc/chgres_cube.fd/model_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ module model_grid
integer, public :: ip1_target, jp1_target
integer, public :: num_tiles_input_grid
integer, public :: num_tiles_target_grid
integer, public :: file_is_converted = 0

type(esmf_grid), public :: input_grid
type(esmf_grid), public :: target_grid
Expand Down