Skip to content

Commit

Permalink
Post refactor p1 (#196)
Browse files Browse the repository at this point in the history
* 20200820 Jesse Meng refactor branch of remove goto remove grib1

* 20200901 Jesse Meng remove redundant LAI output in SURFCE.f

* 20200901 Jesse Meng continue merging refactor to develop

* 20200911 Jesse Meng add precisions to selected variables

* 20200911 Jesse Meng revert the precision changes

* 20200924 Jesse Meng update with EMC_post/develop

* CALMICT.f: modified, keep using “go to”
CALWXT.f: modified, use “cycle” to replace “go to”, keep several “go to”
CALWXT_RAMER.f: modified, use “cycle” and “exit” to replace “go to, keep several “go to”

* Improve removal of go to statements

* Improve removal of go to statements

* Improve removal of go to statements

* Improve removal of go to statements

* Improve removal of go to statements

* Improve removal of go to statements

* Update code for removing goto in GSL ceiling calculations.
The code tested with a RAPv5 case and can reproduce the results.

* Suggested code for removing goto.

* Improve removal of go to statements

* 20201027 Jesse Meng update remove grib1 based on reviewer's comments

* 20201028 Bo Cui:improve removal of go to and clean code

* 20201028 Bo Cui: improve removal of go to

* Clean up the grib1 routine GRIBIT.

* Add the changes from Huiya in SLP_NMM.f.

* Add the changes from Huiya in SLP_new.f.

* Remove "GO TO 222" in MDL2P.f

* Add some tweakings in TRPAUS.f and TRPAUS_NAM.f.

* Tweaking for WETFRZLVL.f.

* clean code MDLFLD.f SERVER.f SLP_NMM.f WETBULB.f

* Add tweaking in MDLFLD.f.

* 20201102 code clean

* Add tweaking from Ming's comments.

Co-authored-by: wx22mj <Jesse.Meng@m71a1.ncep.noaa.gov>
Co-authored-by: JesseMeng-NOAA <49207433+JesseMeng-NOAA@users.noreply.github.com>
Co-authored-by: wx22mj <Jesse.Meng@m71a3.ncep.noaa.gov>
Co-authored-by: wx22mj <Jesse.Meng@v71a1.ncep.noaa.gov>
Co-authored-by: wx22mj <Jesse.Meng@m71a2.ncep.noaa.gov>
Co-authored-by: Bo Cui <Bo.Cui@noaa.gov>
Co-authored-by: Ming.Hu <Ming.Hu@noaa.gov>
  • Loading branch information
8 people authored Nov 5, 2020
1 parent 30af347 commit eed90f5
Show file tree
Hide file tree
Showing 42 changed files with 1,166 additions and 5,228 deletions.
5 changes: 3 additions & 2 deletions sorc/ncep_post.fd/AVIATION.f
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ SUBROUTINE CALLLWS(U,V,H,LLWS)
! . . .
! SUBPROGRAM: CALLLWS COMPUTES Low Level Wind Shear (0-2000feet)
! PRGRMMR: Binbin Zhou /NCEP/EMC DATE: 2005-08-16
! 19-10-30 Bo CUI - REMOVE "GOTO" STATEMENT

!
! ABSTRACT:
! This program computes the low level wind shear(LLWS) over 0-2000 feet (0-609.5m)
Expand Down Expand Up @@ -127,7 +129,7 @@ SUBROUTINE CALLLWS(U,V,H,LLWS)
U2=U(I,J,LP)+RT*(U(I,J,LP-1)-U(I,J,LP))
V2=V(I,J,LP)+RT*(V(I,J,LP-1)-V(I,J,LP))
K2=LP
GO TO 610
exit
END IF
END DO
END IF
Expand All @@ -136,7 +138,6 @@ SUBROUTINE CALLLWS(U,V,H,LLWS)
610 LLWS(I,J)=SQRT((U2-U10(I,J))**2+(V2-V10(I,J))**2)/ &
609.6 * 1.943*609.6 !unit: knot/2000ft


ENDDO

100 CONTINUE
Expand Down
11 changes: 6 additions & 5 deletions sorc/ncep_post.fd/CALHEL.f
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SUBROUTINE CALHEL(DEPTH,UST,VST,HELI,USHR1,VSHR1,USHR6,VSHR6)
! NMM WRFPOST CODE
! 05=02-25 H CHUANG - ADD COMPUTATION FOR ARW A GRID
! 05-07-07 BINBIN ZHOU - ADD RSM FOR A GRID
! 19-10-30 Bo CUI - REMOVE "GOTO" STATEMENT
!
! USAGE: CALHEL(UST,VST,HELI)
! INPUT ARGUMENT LIST:
Expand Down Expand Up @@ -129,6 +130,7 @@ SUBROUTINE CALHEL(DEPTH,UST,VST,HELI,USHR1,VSHR1,USHR6,VSHR6)
integer ISTART,ISTOP,JSTART,JSTOP
real Z2,DZABV,UMEAN5,VMEAN5,UMEAN1,VMEAN1,UMEAN6,VMEAN6, &
DENOM,Z1,Z3,DZ,DZ1,DZ2,DU1,DU2,DV1,DV2

!
!****************************************************************
! START CALHEL HERE
Expand Down Expand Up @@ -284,11 +286,11 @@ SUBROUTINE CALHEL(DEPTH,UST,VST,HELI,USHR1,VSHR1,USHR6,VSHR6)
ENDDO
!
! CASE WHERE THERE IS NO LEVEL WITH HEIGHT BETWEEN 5500 AND 6000
!

DO J=JSTART,JSTOP
DO I=ISTART,ISTOP
IF (COUNT5(I,J) == 0) THEN
DO L=LM,1,-1
lloop: DO L=LM,1,-1
IE=I+IVE(J)
IW=I+IVW(J)
JN=J+JVN
Expand All @@ -304,11 +306,10 @@ SUBROUTINE CALHEL(DEPTH,UST,VST,HELI,USHR1,VSHR1,USHR6,VSHR6)
UST5(I,J) = UST5(I,J) + UH(I,J,L)
VST5(I,J) = VST5(I,J) + VH(I,J,L)
COUNT5(I,J) = 1
GOTO 30
exit lloop
ENDIF
ENDDO
enddo lloop
ENDIF
30 CONTINUE
ENDDO
ENDDO

Expand Down
5 changes: 4 additions & 1 deletion sorc/ncep_post.fd/CALLCL.f
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SUBROUTINE CALLCL(P1D,T1D,Q1D,PLCL,ZLCL)
! 98-06-16 T BLACK - CONVERSION FROM 1-D TO 2-D
! 00-01-04 JIM TUCCILLO - MPI VERSION
! 02-04-24 MIKE BALDWIN - WRF VERSION
! 19-10-30 Bo CUI - REMOVE "GOTO" STATEMENT
!
! USAGE: CALL CALLCL(P1D,T1D,Q1D,PLCL,ZLCL)
! INPUT ARGUMENT LIST:
Expand Down Expand Up @@ -82,6 +83,8 @@ SUBROUTINE CALLCL(P1D,T1D,Q1D,PLCL,ZLCL)
!
! COMPUTE PRESSURE, TEMPERATURE AND AGL HEIGHT AT LCL.
!
! Bo Cui 10/30/2019, remove "GOTO" statement

DO 30 J=JSTA_M,JEND_M
DO 30 I=2,IM-1
! DO 30 I=1,IM
Expand All @@ -101,7 +104,7 @@ SUBROUTINE CALLCL(P1D,T1D,Q1D,PLCL,ZLCL)
DALP = ALPINT(I,J,L) - ALPINT(I,J,L+1)
DZ = ZINT(I,J,L) - ZINT(I,J,L+1)
ZLCL(I,J) = max(D00, ZINT(I,J,L+1) + DZ*DLPLCL/DALP - ZSFC)
GOTO 30
EXIT
ENDIF
20 CONTINUE
30 CONTINUE
Expand Down
Loading

0 comments on commit eed90f5

Please sign in to comment.