From 68456dea0a42817b0a56b8842f4568395da8c692 Mon Sep 17 00:00:00 2001 From: Saeideh Banihashemi <91982033+sbanihash@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:34:36 -0700 Subject: [PATCH] Fix code stability issue #1173 + Fix build 'remarks' PR #1201 (#1210) Co-authored-by: saeideh banihashemi Co-authored-by: Matthew Masarik <86749872+MatthewMasarik-NOAA@users.noreply.github.com> --- model/src/w3arrymd.F90 | 6 +++--- model/src/w3bullmd.F90 | 12 +++++++----- model/src/w3gridmd.F90 | 2 +- model/src/w3tidemd.F90 | 4 ++-- model/src/ww3_outf.F90 | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/model/src/w3arrymd.F90 b/model/src/w3arrymd.F90 index 600e6f014..845d6ccae 100644 --- a/model/src/w3arrymd.F90 +++ b/model/src/w3arrymd.F90 @@ -2250,10 +2250,10 @@ SUBROUTINE PRT2DS (NDS, NFR0, NFR, NTH, E, FR, UFR, FACSP, FSC, & ! 900 FORMAT (/' Location : ',A/ & ' Spectrum : ',A,' (Normalized) ', & - ' Maximum value : ',E8.3,1X,A/) + ' Maximum value : ',E10.3,1X,A/) 901 FORMAT (/' Location : ',A/ & - ' Spectrum : ',A,' Units : ',E8.3,1X,A, & - ' Maximum value : ',E8.3,1X,A/) + ' Spectrum : ',A,' Units : ',E10.3,1X,A, & + ' Maximum value : ',E10.3,1X,A/) ! 910 FORMAT (5X,' ang.| frequencies (Hz) '/ & 5X,' deg.|',F6.3,15F8.3) diff --git a/model/src/w3bullmd.F90 b/model/src/w3bullmd.F90 index 10301e8ca..af749549a 100644 --- a/model/src/w3bullmd.F90 +++ b/model/src/w3bullmd.F90 @@ -268,8 +268,8 @@ SUBROUTINE W3BULL & ! CSVBLINE = BLANK2 ! + IPG1 = 0 IF (IOUT .EQ. 1) THEN - IPG1 = 0 DO IP=1, NPTAB HST(IP,1) = -99.9 TPT(IP,1) = -99.9 @@ -286,10 +286,12 @@ SUBROUTINE W3BULL & ! HSTOT = XPART(1,0) TP = XPART(2,0) - HSP = XPART(1,1:NPART) - TPP = XPART(2,1:NPART) - WNP = TPI / XPART(3,1:NPART) - DMP = MOD( XPART(4,1:NPART) + 180., 360.) + DO IP=1, NPART + HSP(IP) = XPART(1,IP) + TPP(IP) = XPART(2,IP) + WNP(IP) = TPI / XPART(3,IP) + DMP(IP) = MOD( XPART(4,IP) + 180., 360.) + ENDDO NZERO = 0 NZERO = COUNT( HSP <= BHSMIN .AND. HSP /= 0. ) diff --git a/model/src/w3gridmd.F90 b/model/src/w3gridmd.F90 index 281ed7a3f..5e8ce0609 100644 --- a/model/src/w3gridmd.F90 +++ b/model/src/w3gridmd.F90 @@ -6357,7 +6357,7 @@ SUBROUTINE W3GRID() ' SDSBRF1 = ',F5.2,', SDSBRFDF =',I2,', '/ & ' SDSBM0 = ',F5.2, ', SDSBM1 =',F5.2, & ', SDSBM2 =',F5.2,', SDSBM3 =',F5.2,', SDSBM4 =', & - F5.2,', '/, & + F7.2,', '/, & ' SPMSS = ',F5.2, ', SDKOF =',F5.2, & ', SDSMWD =',F5.2,', SDSFACMTF =',F5.1,', '/ & ' SDSMWPOW =',F3.1,', SDSNMTF =', F5.2, & diff --git a/model/src/w3tidemd.F90 b/model/src/w3tidemd.F90 index 4f58afd4b..00b7b047d 100644 --- a/model/src/w3tidemd.F90 +++ b/model/src/w3tidemd.F90 @@ -823,11 +823,11 @@ SUBROUTINE TIDE_READ_ANAPAR(KR1,LP,filename,KD1,KD2,XLON,XLAT,NDEF,ITREND,ITZ) ! read in inference information now as it will be used in the lsq matrix ! DO K=1,10 - READ(KR1,'(4X,A5,E16.10,i5)')TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k) + READ(KR1,'(4X,A5,E17.10,i5)')TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k) ! write(6,1010)TIDE_KONAN(K),TIDE_SIGAN(K),TIDE_NINF(k) IF (TIDE_KONAN(K).EQ.KBLANK) EXIT do k2=1,TIDE_NINF(k) - read(kr1,'(4X,A5,E16.10,2F10.3)') TIDE_KONIN(K,k2),TIDE_SIGIN(K,k2),TIDE_R(K,k2),TIDE_ZETA(K,k2) + read(kr1,'(4X,A5,E17.10,2F10.3)') TIDE_KONIN(K,k2),TIDE_SIGIN(K,k2),TIDE_R(K,k2),TIDE_ZETA(K,k2) END DO END DO TIDE_NIN=K-1 diff --git a/model/src/ww3_outf.F90 b/model/src/ww3_outf.F90 index e4c1affed..e9437341a 100644 --- a/model/src/ww3_outf.F90 +++ b/model/src/ww3_outf.F90 @@ -2423,7 +2423,7 @@ SUBROUTINE W3EXGO ( NX, NY, NSEA ) OPEN (NDSDAT,FILE=FNMPRE(:JJ)//FNAME,ERR=800, & IOSTAT=IERR) IF (FSC.LT.1E-4) THEN - WRITE(FSCS,'(G7.1)') FSC + WRITE(FSCS,'(G8.1)') FSC ELSE WRITE(FSCS,'(F7.4)') FSC END IF