Skip to content
Draft
163 changes: 82 additions & 81 deletions GEOS_Shared/G3_MPI_Util_Mod.F90

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion GEOS_Shared/OVP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module OVP

use ESMF
use MAPL
use iso_fortran_env

implicit none
private
Expand Down Expand Up @@ -185,7 +186,7 @@ subroutine OVP_mask ( LONS, DELTA_TIME, OVERPASS_HOUR, MASK )
ALLOCATE( MASK( SIZE(LONS(:,1)), SIZE(LONS(1,:)) ) ) ! RETURN VALUE


SECONDS_AWAY = LONS*(180._8/MAPL_PI_R8)*240. - OVERPASS_HOUR*60*60
SECONDS_AWAY = LONS*(180._REAL64/MAPL_PI_R8)*240. - OVERPASS_HOUR*60*60

CALL RESET_TIME_RANGE(SECONDS_AWAY)

Expand Down
4 changes: 2 additions & 2 deletions GEOS_Shared/calcdbz.F
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ SUBROUTINE CALCDBZ(DBZ,PRS,TMK,QVP,QRA,QSN,QGR,WEDIM,SNDIM,BTDIM,

IF (IVARINT.EQ.1) THEN

TEMP_C = DMIN1(-0.001D0,TMK(I,J,K)-CELKEL)
SONV = DMIN1(2.0D8,2.0D6*EXP(-0.12D0*TEMP_C))
TEMP_C = MIN(-0.001D0,TMK(I,J,K)-CELKEL)
SONV = MIN(2.0D8,2.0D6*EXP(-0.12D0*TEMP_C))

GONV = GON
IF (QGR(I,J,K).GT.R1) THEN
Expand Down
6 changes: 3 additions & 3 deletions GEOS_Util/plots/zonal.f
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ PROGRAM main
real undef, lat0
integer im,jm,lm,tm
integer j,L,n,nt,lrec
integer rc,nargs,iargc
integer rc,nargs

undef = 1e15

nargs = iargc()
nargs = command_argument_count()
if( nargs.ne.0 ) then
allocate( arg(nargs) )
do n=1,nargs
call getarg(n,arg(n))
call get_command_argument(n,arg(n))
enddo
do n=1,nargs
if( trim(arg(n)).eq.'-tag' ) tag = '.' // arg(n+1)
Expand Down
4 changes: 2 additions & 2 deletions GEOS_Util/post/binarytile.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Program binarytile
character(len=128) :: filenameOUT
integer, parameter :: max_rec=2

call getarg(1,filenameIN)
call get_command_argument(1,filenameIN)
if (filenameIN == "") filenameIN = 'input'
call getarg(2,filenameOUT)
call get_command_argument(2,filenameOUT)
if (filenameOUT == "") filenameOUT = 'output'

open(unit=unitR, file=filenameIN, form='FORMATTED')
Expand Down
8 changes: 4 additions & 4 deletions GEOS_Util/post/checkdate.F
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ program main
character*1 char
data output /'eta2prs'/

integer n,m,nargs,iargc,L,nbeg,nfiles,mlev
integer n,m,nargs,L,nbeg,nfiles,mlev
integer ny,nm,nd

real*8 lonbeg
Expand Down Expand Up @@ -121,13 +121,13 @@ end subroutine read_hdf
hdf = .true.
quad = .false.

nargs = iargc()
nargs = command_argument_count()
if( nargs.eq.0 ) then
call usage()
else
allocate ( arg(nargs) )
do n=1,nargs
call getarg(n,arg(n))
call get_command_argument(n,arg(n))
enddo
do n=1,nargs
if( trim(arg(n)).eq.'-im' ) read(arg(n+1),*) im_out
Expand Down Expand Up @@ -600,5 +600,5 @@ subroutine usage()
print *
print *, " -eta eta_fname(s): Filename(s) in eta HDF format"
print *
call exit(7)
error stop 7
end subroutine usage
8 changes: 4 additions & 4 deletions GEOS_Util/post/convert_aerosols.F
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ program convert_aerosols
character*2 time,hour0,mins0
character*1 char

integer n,m,nargs,iargc,L,nbeg,nfiles,npfiles,mlev
integer n,m,nargs,L,nbeg,nfiles,npfiles,mlev

real undef,psmax,psmin
integer i,j,ndt,ks
Expand Down Expand Up @@ -119,13 +119,13 @@ end subroutine read_eta_meta
lmout = -999
psnetcdf = .true.

nargs = iargc()
nargs = command_argument_count()
if( nargs.eq.0 ) then
call usage()
else
allocate ( arg(nargs) )
do n=1,nargs
call getarg(n,arg(n))
call get_command_argument(n,arg(n))
enddo
do n=1,nargs

Expand Down Expand Up @@ -960,7 +960,7 @@ subroutine usage()
. " -tag output_tag: Optional Filename Tag for output: fname(s).tag (default: grid.IMxJM)" ,/
. ,/
. )
call exit(7)
error stop 7
end subroutine usage

subroutine hinterp ( qin,iin,jin,qout,iout,jout,mlev,undef,msgn,norder,check )
Expand Down
26 changes: 15 additions & 11 deletions GEOS_Util/post/convert_eta.F
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
program convert_eta

use iso_fortran_env

implicit none

c **********************************************************************
Expand Down Expand Up @@ -57,7 +59,7 @@ program convert_eta
character*2 hour0,mins0
character*1 char

integer n,m,nargs,iargc,nfiles
integer n,m,nargs,nfiles

real undef
integer ndt
Expand Down Expand Up @@ -107,13 +109,13 @@ end subroutine read_eta_meta

phisname = 'NULL'

nargs = iargc()
nargs = command_argument_count()
if( nargs.eq.0 ) then
call usage()
else
allocate ( arg(nargs) )
do n=1,nargs
call getarg(n,arg(n))
call get_command_argument(n,arg(n))
enddo
do n=1,nargs

Expand Down Expand Up @@ -419,6 +421,7 @@ subroutine convert ( q2d,q3d,name2d,titl2d,unit2d,name3d,titl3d,unit3d,n2d,n3d,u

use MAPL_ConstantsMod
use m_set_eta, only: set_eta
use iso_fortran_env
implicit none

c Input Variables
Expand All @@ -428,6 +431,7 @@ subroutine convert ( q2d,q3d,name2d,titl2d,unit2d,name3d,titl3d,unit3d,n2d,n3d,u
real q2d(im,jm, n2d)
real q3d(im,jm,lm,n3d)

integer imo,jmo,lmo
real phis(imo,jmo)
real ps(imo,jmo)
real dp(imo,jmo,lm)
Expand All @@ -436,7 +440,6 @@ subroutine convert ( q2d,q3d,name2d,titl2d,unit2d,name3d,titl3d,unit3d,n2d,n3d,u
real t(imo,jmo,lm)
real q(imo,jmo,lm,2)

integer imo,jmo,lmo
real z2d(imo,jmo, n2d)
real z3d(imo,jmo,lm,n3d)

Expand Down Expand Up @@ -476,7 +479,7 @@ subroutine convert ( q2d,q3d,name2d,titl2d,unit2d,name3d,titl3d,unit3d,n2d,n3d,u
integer nu,nv,kdum

real undef, pi,dx,dy, qmin, qmax
real*8 ptop, rdum
real(kind=REAL64) ptop, rdum
integer precision,id,timeinc,rc,nhmsf

character*256 title
Expand All @@ -495,8 +498,8 @@ subroutine convert ( q2d,q3d,name2d,titl2d,unit2d,name3d,titl3d,unit3d,n2d,n3d,u
real, allocatable :: ple(:,:,:)
real, allocatable :: logpl(:,:,:)
real, allocatable :: logplo(:,:,:)
real*8, allocatable :: ak(:)
real*8, allocatable :: bk(:)
real(kind=REAL64), allocatable :: ak(:)
real(kind=REAL64), allocatable :: bk(:)

real dpref
dpref(L) = ( ak(L+1)-ak(L) ) + ( bk(L+1)-bk(L) ) * 98400.0
Expand Down Expand Up @@ -1082,7 +1085,7 @@ subroutine usage()
. " -tag output_tag: Optional Filename Tag for output: fname(s).tag (default: grid.IMxJM)" ,/
. ,/
. )
call exit(7)
error stop 7
end subroutine usage

subroutine hinterp ( qin,iin,jin,qout,iout,jout,mlev,undef )
Expand Down Expand Up @@ -2819,6 +2822,7 @@ subroutine remap ( ps1,dp1,u1,v1,thv1,q1,phis1,lm1,

use MAPL_ConstantsMod
use m_set_eta, only: set_eta
use iso_fortran_env
implicit none
integer im,jm,lm1,lm2,nt

Expand Down Expand Up @@ -2852,13 +2856,13 @@ subroutine remap ( ps1,dp1,u1,v1,thv1,q1,phis1,lm1,
real phi2(im,jm,lm2+1)
real ptop1(im,jm)

real*8 rdum
real(kind=REAL64) rdum
real kappa,cp,dum1,dum2
real rgas,eps,rvap,grav
integer i,j,L,kdum

real*8, allocatable :: ak(:)
real*8, allocatable :: bk(:)
real(kind=REAL64), allocatable :: ak(:)
real(kind=REAL64), allocatable :: bk(:)

kappa = MAPL_KAPPA
rgas = MAPL_RGAS
Expand Down
10 changes: 5 additions & 5 deletions GEOS_Util/post/ec_eta2fv.F
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ program main

logical ihavetv,agridw
integer precision
integer L,n,nargs,iargc,lrec
integer L,n,nargs,lrec

character*256 ctlfile,format
integer imncep,jmncep,lmncep,nvncep
Expand All @@ -127,13 +127,13 @@ program main
pbelow = 30.00 ! 30 mb
precision = 0 ! 32-bit

nargs = iargc()
nargs = command_argument_count()
if( nargs.eq.0 ) then
call usage()
else
allocate ( arg(nargs) )
do n=1,nargs
call getarg(n,arg(n))
call get_command_argument(n,arg(n))
enddo
do n=1,nargs
if( trim(arg(n)).eq.'-rslv' ) read(arg(n+1),600) hres,lm
Expand Down Expand Up @@ -684,7 +684,7 @@ subroutine getfile ( ku,filename,irec )
1002 continue
print *, 'ERROR!! File: ',trim(filename)
print *, 'ERROR!! is neither BIG nor LITTLE ENDIAN'
call exit(7)
error stop 7

endif
end
Expand Down Expand Up @@ -1978,7 +1978,7 @@ subroutine usage()
print *, " -tag tag: Optional Prefix tag for output files"
print *, " -ozone Optional Flag to add ozone"
print *
call exit(7)
error stop 7
end

subroutine interp_h ( q_cmp,im,jm,lm,
Expand Down
Loading