File: C:\NOAA\NEMS_11731\src\atmos\gfs\dyn\hyb2press.f

```1           subroutine hyb2press(njeff,nsize_ar, pgr,prsl,dprs)
2
3           use gfs_dyn_machine , only : kind_grid
4
5
6           use gfs_dyn_resol_def
7           use gfs_dyn_coordinate_def
8           use gfs_dyn_physcons, rk => con_rocp
9           implicit none
10
11
12           real (kind=kind_grid), parameter :: rk1 = rk + 1.0, rkr = 1.0/rk
13          &,                                   R100=100.0, PT01=0.01
14           integer njeff,nsize_ar
15           real(kind=kind_grid) pgr(nsize_ar)
16           real(kind=kind_grid) prsl(nsize_ar,levs), dprs(nsize_ar,levs)
17           real(kind=kind_grid) tem,pressfc
18
19           real(kind=kind_grid) ppi(njeff,levs+1),ppik(njeff,levs+1)
20           integer iq,ilat,me
21           integer i,k
22
23           do k=1,levp1
24             do i=1,njeff
25               pressfc = exp(pgr(i))
26               ppi(i,levs+2-k) = ak5(k) + bk5(k)*pressfc ! prsi are now pressures
27             enddo
28           enddo
29
30           do i=1,njeff
31             ppik(i,1) = (ppi(i,1)*PT01) ** rk
32           enddo
33           do k=1,levs
34             do i=1,njeff
35               ppik(i,k+1) = (ppi(i,k+1)*PT01) ** rk
36               tem         = rk1 * (ppi(i,k) - ppi(i,k+1))
37               ppik(i,k)   = (ppik(i,k)*ppi(i,k)-ppik(i,k+1)*ppi(i,k+1))
38          &                 / tem
39               prsl(i,k)    = R100 * ppik(i,k) ** rkr
40               dprs(i,k)    = ppi(i,k) - ppi(i,k+1)
41             enddo
42           enddo
43
44           return
45           end
46     ```