Skip to content

Commit

Permalink
Change module name machine and physcons to machine_post and physcons_… (
Browse files Browse the repository at this point in the history
#13)

* Change module name machine and physcons to machine_post and physcons_post for solving conflict with FV3 model setting.

* Tweak physcons.f
  • Loading branch information
WenMeng-NOAA authored Oct 29, 2019
1 parent b78469b commit e5163ed
Show file tree
Hide file tree
Showing 19 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/BNDLYR.f
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SUBROUTINE BNDLYR(PBND,TBND,QBND,RHBND,UBND,VBND, &
use params_mod, only: d00, gi, pq0, a2, a3, a4
use ctlblk_mod, only: jsta_2l, jend_2u, lm, jsta, jend, modelname, &
jsta_m, jend_m, im, nbnd
use physcons, only: con_rd, con_rv, con_eps, con_epsm1
use physcons_post, only: con_rd, con_rv, con_eps, con_epsm1
use gridspec_mod, only: gridtype
!
implicit none
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/CLDRAD.f
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ SUBROUTINE CLDRAD
use rqstfld_mod, only: IGET, ID, LVLS, IAVBLFLD
use gridspec_mod, only: dyval, gridtype
use cmassi_mod, only: TRAD_ice
use machine, only: kind_phys
use machine_post, only: kind_phys
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
implicit none
!
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/FRZLVL.f
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SUBROUTINE FRZLVL(ZFRZ,RHFRZ,PFRZL)
use masks, only: lmh
use params_mod, only: gi, d00, capa, d0065, tfrz, pq0, a2, a3, a4
use ctlblk_mod, only: jsta, jend, spval, lm, modelname, im
use physcons, only: con_rd, con_rv, con_eps, con_epsm1
use physcons_post, only: con_rd, con_rv, con_eps, con_epsm1

implicit none

Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/FRZLVL2.f
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SUBROUTINE FRZLVL2(ISOTHERM,ZFRZ,RHFRZ,PFRZL)
use masks, only: lmh, sm
use params_mod, only: gi, d00, capa, d0065, tfrz, pq0, a2, a3, a4, d50
use ctlblk_mod, only: jsta, jend, spval, lm, modelname, im
use physcons, only: con_rd, con_rv, con_eps, con_epsm1
use physcons_post, only: con_rd, con_rv, con_eps, con_epsm1

implicit none

Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/GFIP3.f
Original file line number Diff line number Diff line change
Expand Up @@ -2099,7 +2099,7 @@ subroutine icing_algo(i,j,pres,temp,rh,hgt,omega,wh,&
nz,xlat,xlon,xalt,prate,cprate,&
cape,cin, ice_pot, ice_sev)
use ctlblk_mod, only: imp_physics, SPVAL, DTQ2,me
use physcons,only: G => con_g, FV => con_fvirt, RD => con_rd
use physcons_post,only: G => con_g, FV => con_fvirt, RD => con_rd
use DerivedFields, only : derive_fields
use CloudLayers, only : calc_CloudLayers, clouds_t
Expand Down
12 changes: 6 additions & 6 deletions sorc/ncep_post.fd/GFSPOST.F
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ subroutine pvetc(km,p,px,py,t,tx,ty,h,u,v,av,hm,s,bvf2,pvn,theta,sigma,pvu)
! Language: Fortran 90
!
!$$$
use physcons, only: con_cp, con_g, con_rd, con_rocp
use physcons_post, only: con_cp, con_g, con_rd, con_rocp
!
implicit none
integer,intent(in):: km
Expand Down Expand Up @@ -206,7 +206,7 @@ subroutine p2pv(km,pvu,h,t,p,u,v,kpv,pv,pvpt,pvpb,&
! Language: Fortran 90
!
!$$$
use physcons, only: con_rog
use physcons_post, only: con_rog
implicit none
integer,intent(in):: km,kpv
real,intent(in),dimension(km):: pvu,h,t,p,u,v
Expand Down Expand Up @@ -409,7 +409,7 @@ subroutine tpause(km,p,u,v,t,h,ptp,utp,vtp,ttp,htp,shrtp)
! Language: Fortran 90
!
!$$$
use physcons, only: con_rog
use physcons_post, only: con_rog
implicit none
integer,intent(in):: km
real,intent(in),dimension(km):: p,u,v,t,h
Expand Down Expand Up @@ -509,7 +509,7 @@ subroutine mxwind(km,p,u,v,t,h,pmw,umw,vmw,tmw,hmw)
! Language: Fortran 90
!
!$$$
use physcons, only: con_rog
use physcons_post, only: con_rog
implicit none
integer,intent(in):: km
real,intent(in),dimension(km):: p,u,v,t,h
Expand Down Expand Up @@ -603,7 +603,7 @@ subroutine mptgen(mpirank,mpisize,nd,jt1,jt2,j1,j2,jx,jm,jn)
! Language: Fortran 90
!
!$$$
use machine,only:kint_mpi
use machine_post,only:kint_mpi
implicit none
integer(kint_mpi),intent(in):: mpirank,mpisize,nd,jt1(nd),jt2(nd)
integer(kint_mpi),intent(out):: j1(nd),j2(nd),jx(nd),jm(nd),jn(nd)
Expand Down Expand Up @@ -720,7 +720,7 @@ subroutine mptranr4(mpicomm,mpisize,im,ida,idb,&
! language: fortran 90
!
!$$$
use machine,only:kint_mpi
use machine_post,only:kint_mpi
implicit none
include 'mpif.h'
integer(kint_mpi),intent(in):: mpicomm,mpisize
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/GFSPOSTSIG.F
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ subroutine rtsig(lusig,head,k1,k2,kgds,ijo,levs,ntrac,jcap,lnt2,me, &
!$$$
use sigio_module, only : sigio_intkind, sigio_head
use sigio_r_module, only : sigio_dati, sigio_rrdati
use physcons, only : con_omega, con_fvirt
use physcons_post, only : con_omega, con_fvirt
use omp_lib
implicit none
integer(sigio_intkind),intent(in) :: lusig
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/ICAOHEIGHT.f
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SUBROUTINE ICAOHEIGHT(MAXWP, & !input
! Software Standards: UMDP3 v6

use ctlblk_mod, only: jsta, jend, spval, im
use physcons, only: con_g, con_rd
use physcons_post, only: con_g, con_rd
IMPLICIT None

! Subroutine Arguments:
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/INITPOST_GFS.f
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SUBROUTINE INITPOST_GFS(NREC,iunit,iostatusFlux,iunitd3d,iostatusD3D,gfile)
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use kinds, only: i_llong
use gfsio_module, only: gfsio_gfile, gfsio_getfilehead, gfsio_readrecvw34, gfsio_close
use physcons, only: con_g, con_fvirt, con_rd, con_eps, con_epsm1
use physcons_post, only: con_g, con_fvirt, con_rd, con_eps, con_epsm1
use params_mod, only: erad, dtr, tfrz, p1000, capa
use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, qs0, sqs, sthe, the0, ttblq,&
rdpq, rdtheq, stheq, the0q
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/INITPOST_GFS_NEMS.f
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SUBROUTINE INITPOST_GFS_NEMS(NREC,iostatusFlux,iostatusD3D, &
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
! use kinds, only: i_llong
use nemsio_module, only: nemsio_gfile, nemsio_getfilehead, nemsio_getheadvar, nemsio_close
use physcons, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
use physcons_post, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
eps => con_eps, epsm1 => con_epsm1
use params_mod, only: erad, dtr, tfrz, h1, d608, rd, p1000, capa
use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, qs0, sqs, sthe, &
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/INITPOST_GFS_NEMS_MPIIO.f
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ SUBROUTINE INITPOST_GFS_NEMS_MPIIO(iostatusAER)
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
! use kinds, only: i_llong
! use nemsio_module, only: nemsio_gfile, nemsio_getfilehead, nemsio_getheadvar, nemsio_close
use physcons, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
use physcons_post, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
eps => con_eps, epsm1 => con_epsm1
use params_mod, only: erad, dtr, tfrz, h1, d608, rd, p1000, capa
use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, qs0, sqs, sthe, &
Expand Down
3 changes: 1 addition & 2 deletions sorc/ncep_post.fd/INITPOST_GFS_SIGIO.f
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ SUBROUTINE INITPOST_GFS_SIGIO(lusig,iunit,iostatusFlux,iostatusD3D,idrt,sighead)
CUPPT, THZ0, MAXRHSHLTR, MINRHSHLTR, U10H, V10H
use soil, only: SLDPTH, SH2O, SMC, STC
use masks, only: LMV, LMH, HTM, VTM, GDLAT, GDLON, DX, DY, HBM2, SM, SICE
use physcons, only: CON_G, CON_FVIRT, CON_RD, CON_EPS, CON_EPSM1
use physcons_post, only: CON_G, CON_FVIRT, CON_RD, CON_EPS, CON_EPSM1
use masks, only: LMV, LMH, HTM, VTM, GDLAT, GDLON, DX, DY, HBM2, &
SM, SICE
use physcons, only: CON_G, CON_FVIRT, CON_RD, CON_EPS, CON_EPSM1
use params_mod, only: RTD, ERAD, DTR, TFRZ, P1000, CAPA
use lookup_mod, only: THL, PLQ, PTBL, TTBL, RDQ, RDTH, RDP, RDTHE, PL, &
QS0, SQS, STHE, THE0, TTBLQ, RDPQ, RDTHEQ, STHEQ, &
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SUBROUTINE INITPOST_NETCDF(ncid3d)
alwoutc,alwtoac,aswoutc,aswtoac,alwinc,aswinc,avgpotevp,snoavg
use soil, only: sldpth, sh2o, smc, stc
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use physcons, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
use physcons_post, only: grav => con_g, fv => con_fvirt, rgas => con_rd, &
eps => con_eps, epsm1 => con_epsm1
use params_mod, only: erad, dtr, tfrz, h1, d608, rd, p1000, capa,pi
use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, qs0, sqs, sthe, &
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/LFMFLD.f
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SUBROUTINE LFMFLD(RH3310,RH6610,RH3366,PW3310)
use masks, only: lmh
use params_mod, only: d00, d50, pq0, a2, a3, a4, h1, d01, gi
use ctlblk_mod, only: jsta, jend, modelname, spval, im
use physcons, only: con_rd, con_rv, con_eps, con_epsm1
use physcons_post, only: con_rd, con_rv, con_eps, con_epsm1

implicit none

Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/MDL2P.f
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SUBROUTINE MDL2P(iostatusD3D)
CNVCTDMFLX, ICING_GFIS,GTG,CAT=>CATEDR,MWT
use vrbls2d, only: T500, W_UP_MAX, W_DN_MAX, W_MEAN, PSLP, FIS, Z1000
use masks, only: LMH, SM
use physcons,only: CON_FVIRT, CON_ROG, CON_EPS, CON_EPSM1
use physcons_post,only: CON_FVIRT, CON_ROG, CON_EPS, CON_EPSM1
use params_mod, only: H1M12, DBZMIN, H1, PQ0, A2, A3, A4, RHMIN, G, &
RGAMOG, RD, D608, GI, ERAD, PI, SMALL, H100, &
H99999, GAMMA
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/MDL2THANDPV.f
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ SUBROUTINE MDL2THANDPV(kth,kpv,th,pv)
use vrbls3d, only: pmid, t, uh, q, vh, zmid, omga, pint
use vrbls2d, only: f
use masks, only: gdlat, gdlon, dx, dy
use physcons, only: con_eps, con_epsm1
use physcons_post, only: con_eps, con_epsm1
use params_mod, only: dtr, small, erad, d608, rhmin
use CTLBLK_mod, only: spval, lm, jsta_2l, jend_2u, jsta_2l, grib, cfld, datapd, fld_info,&
im, jm, jsta, jend, jsta_m, jend_m, modelname, global,gdsdegr,me
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/SURFCE.f
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ SUBROUTINE SURFCE
AVGCPRATE_CONT
use soil, only: stc, sllevel, sldpth, smc, sh2o
use masks, only: lmh, sm, sice, htm, gdlat, gdlon
use physcons,only: CON_EPS, CON_EPSM1
use physcons_post,only: CON_EPS, CON_EPSM1
use params_mod, only: p1000, capa, h1m12, pq0, a2,a3, a4, h1, d00, d01,&
eps, oneps, d001, h99999, h100, small, h10e5, &
elocp, g, xlai, tfrz, rd
Expand Down
4 changes: 2 additions & 2 deletions sorc/ncep_post.fd/machine.f
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MODULE MACHINE
MODULE MACHINE_POST

IMPLICIT NONE
SAVE
Expand All @@ -11,4 +11,4 @@ MODULE MACHINE
integer kint_mpi
parameter (kint_mpi = 4)

END MODULE MACHINE
END MODULE MACHINE_POST
45 changes: 23 additions & 22 deletions sorc/ncep_post.fd/physcons.f
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module physcons
use machine,only:kind_phys
module physcons_post
use machine_post,only:kind_phys
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
implicit none
!
Expand All @@ -8,27 +8,28 @@ module physcons
! 1990/04/30: g and rd are made consistent with NWS usage.
! 2001/10/22: g made consistent with SI usage.
! Math constants
real(kind=kind_phys),parameter:: con_pi =3.141593e+0 ! pi
real(kind=kind_phys),parameter:: con_sqrt2 =1.414214e+0 ! square root of 2
real(kind=kind_phys),parameter:: con_sqrt3 =1.732051e+0 ! square root of 3
! real(kind=kind_phys),parameter:: con_pi =3.141593e+0 ! pi
real(kind=kind_phys),parameter:: con_pi =4.0d0*atan(1.0d0)
real(kind=kind_phys),parameter:: con_sqrt2 =1.414214e+0_kind_phys ! square root of 2
real(kind=kind_phys),parameter:: con_sqrt3 =1.732051e+0_kind_phys ! square root of 3
! Primary constants
real(kind=kind_phys),parameter:: con_rerth =6.3712e+6 ! radius of earth (m)
real(kind=kind_phys),parameter:: con_g =9.80665e+0! gravity (m/s2)
real(kind=kind_phys),parameter:: con_omega =7.2921e-5 ! ang vel of earth (1/s)
real(kind=kind_phys),parameter:: con_rd =2.8705e+2 ! gas constant air (J/kg/K)
real(kind=kind_phys),parameter:: con_rv =4.6150e+2 ! gas constant H2O (J/kg/K)
real(kind=kind_phys),parameter:: con_cp =1.0046e+3 ! spec heat air @p (J/kg/K)
real(kind=kind_phys),parameter:: con_cv =7.1760e+2 ! spec heat air @v (J/kg/K)
real(kind=kind_phys),parameter:: con_cvap =1.8460e+3 ! spec heat H2O gas (J/kg/K)
real(kind=kind_phys),parameter:: con_cliq =4.1855e+3 ! spec heat H2O liq (J/kg/K)
real(kind=kind_phys),parameter:: con_csol =2.1060e+3 ! spec heat H2O ice (J/kg/K)
real(kind=kind_phys),parameter:: con_hvap =2.5000e+6 ! lat heat H2O cond (J/kg)
real(kind=kind_phys),parameter:: con_hfus =3.3358e+5 ! lat heat H2O fusion (J/kg)
real(kind=kind_phys),parameter:: con_psat =6.1078e+2 ! pres at H2O 3pt (Pa)
real(kind=kind_phys),parameter:: con_sbc =5.6730e-8 ! stefan-boltzmann (W/m2/K4)
real(kind=kind_phys),parameter:: con_solr =1.3533e+3 ! solar constant (W/m2)
real(kind=kind_phys),parameter:: con_t0c =2.7315e+2 ! temp at 0C (K)
real(kind=kind_phys),parameter:: con_ttp =2.7316e+2 ! temp at H2O 3pt (K)
real(kind=kind_phys),parameter:: con_rerth =6.3712e+6_kind_phys ! radius of earth (m)
real(kind=kind_phys),parameter:: con_g =9.80665e+0_kind_phys! gravity (m/s2)
real(kind=kind_phys),parameter:: con_omega =7.2921e-5_kind_phys ! ang vel of earth (1/s)
real(kind=kind_phys),parameter:: con_rd =2.8705e+2_kind_phys ! gas constant air (J/kg/K)
real(kind=kind_phys),parameter:: con_rv =4.6150e+2_kind_phys ! gas constant H2O (J/kg/K)
real(kind=kind_phys),parameter:: con_cp =1.0046e+3_kind_phys ! spec heat air @p (J/kg/K)
real(kind=kind_phys),parameter:: con_cv =7.1760e+2_kind_phys ! spec heat air @v (J/kg/K)
real(kind=kind_phys),parameter:: con_cvap =1.8460e+3_kind_phys ! spec heat H2O gas (J/kg/K)
real(kind=kind_phys),parameter:: con_cliq =4.1855e+3_kind_phys ! spec heat H2O liq (J/kg/K)
real(kind=kind_phys),parameter:: con_csol =2.1060e+3_kind_phys ! spec heat H2O ice (J/kg/K)
real(kind=kind_phys),parameter:: con_hvap =2.5000e+6_kind_phys ! lat heat H2O cond (J/kg)
real(kind=kind_phys),parameter:: con_hfus =3.3358e+5_kind_phys ! lat heat H2O fusion (J/kg)
real(kind=kind_phys),parameter:: con_psat =6.1078e+2_kind_phys ! pres at H2O 3pt (Pa)
real(kind=kind_phys),parameter:: con_sbc =5.6730e-8_kind_phys ! stefan-boltzmann (W/m2/K4)
real(kind=kind_phys),parameter:: con_solr =1.3533e+3_kind_phys ! solar constant (W/m2)
real(kind=kind_phys),parameter:: con_t0c =2.7315e+2_kind_phys ! temp at 0C (K)
real(kind=kind_phys),parameter:: con_ttp =2.7316e+2_kind_phys ! temp at H2O 3pt (K)
! Secondary constants
real(kind=kind_phys),parameter:: con_rocp =con_rd/con_cp
real(kind=kind_phys),parameter:: con_cpor =con_cp/con_rd
Expand Down

0 comments on commit e5163ed

Please sign in to comment.