- Timestamp:
- 2010-09-15T09:39:38+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1986_BDY_updates/NEMO/OPA_SRC/BDY/bdytides.F90
r1715 r2093 7 7 !! 2.3 ! 2008-01 (J.Holt) Add date correction. Origins POLCOMS v6.3 2007 8 8 !! 3.0 ! 2008-04 (NEMO team) add in the reference version 9 !! 3.3 ! 2010-09 (D.Storkey and E.O'Dea) bug fixes 9 10 !!---------------------------------------------------------------------- 10 11 #if defined key_bdy … … 31 32 USE bdy_par ! Unstructured boundary parameters 32 33 USE bdy_oce ! ocean open boundary conditions 34 USE daymod ! calendar 33 35 34 36 IMPLICIT NONE … … 41 43 LOGICAL, PUBLIC :: ln_tide_date !: =T correct tide phases and amplitude for model start date 42 44 43 INTEGER, PARAMETER :: jptides_max = 15 !: Max number of tidal contituents44 INTEGER :: ntide !: Actual number of tidal constituents45 INTEGER, PARAMETER,PUBLIC :: jptides_max = 15 !: Max number of tidal contituents 46 INTEGER, PUBLIC :: ntide !: Actual number of tidal constituents 45 47 46 48 CHARACTER(len=80), PUBLIC :: filtide !: Filename root for tidal input files 47 49 CHARACTER(len= 4), PUBLIC, DIMENSION(jptides_max) :: tide_cpt !: Names of tidal components used. 48 50 49 INTEGER , DIMENSION(jptides_max) :: nindx !: ???50 REAL(wp), DIMENSION(jptides_max) :: tide_speed !: Phase speed of tidal constituent (deg/hr)51 INTEGER , DIMENSION(jptides_max), PUBLIC :: nindx !: ??? 52 REAL(wp), DIMENSION(jptides_max), PUBLIC :: tide_speed !: Phase speed of tidal constituent (deg/hr) 51 53 52 54 REAL(wp), DIMENSION(jpbdim,jptides_max) :: ssh1, ssh2 !: Tidal constituents : SSH … … 86 88 READ ( numnam, nambdy_tide ) 87 89 ! ! Count number of components specified 88 ntide = jptides_max 89 itide = 1 90 DO WHILE( tide_cpt(itide) /= '' ) 91 ntide = itide 92 itide = itide + 1 93 END DO 90 ntide=jptides_max 91 do itide = 1, jptides_max 92 if ( tide_cpt(itide) == '' ) then 93 ntide = itide-1 94 exit 95 endif 96 enddo 97 94 98 ! ! find constituents in standard list 95 99 DO itide = 1, ntide … … 145 149 CHARACTER(len=80) :: clfile ! full file name for tidal input file 146 150 INTEGER :: ipi, ipj, inum, idvar ! temporary integers (netcdf read) 147 INTEGER, DIMENSION( 3) :: lendta=0 ! length of data in the file (note may be different from nblendta!)151 INTEGER, DIMENSION(6) :: lendta=0 ! length of data in the file (note may be different from nblendta!) 148 152 REAL(wp) :: z_arg, z_atde, z_btde, z1t, z2t 149 153 REAL(wp), DIMENSION(jpbdta,1) :: zdta ! temporary array for data fields … … 161 165 IF(lwp) WRITE(numout,*) 'Reading data from file ', clfile 162 166 CALL iom_open( clfile, inum ) 163 igrd = 1167 igrd = 4 164 168 IF( nblendta(igrd) <= 0 ) THEN 165 169 idvar = iom_varid( inum,'z1' ) … … 183 187 IF(lwp) WRITE(numout,*) 'Reading data from file ', clfile 184 188 CALL iom_open( clfile, inum ) 185 igrd = 2189 igrd = 5 186 190 IF( lendta(igrd) <= 0 ) THEN 187 191 idvar = iom_varid( inum,'u1' ) … … 204 208 if(lwp) write(numout,*) 'Reading data from file ', clfile 205 209 CALL iom_open( clfile, inum ) 206 igrd = 3210 igrd = 6 207 211 IF( lendta(igrd) <= 0 ) THEN 208 212 idvar = iom_varid( inum,'v1' ) … … 252 256 ENDIF 253 257 ! ! elevation 254 igrd = 1258 igrd = 4 255 259 DO ib = 1, nblenrim(igrd) 256 260 z1t = z_atde * ssh1(ib,itide) + z_btde * ssh2(ib,itide) … … 260 264 END DO 261 265 ! ! u 262 igrd = 2266 igrd = 5 263 267 DO ib = 1, nblenrim(igrd) 264 268 z1t = z_atde * u1(ib,itide) + z_btde * u2(ib,itide) … … 268 272 END DO 269 273 ! ! v 270 igrd = 3274 igrd = 6 271 275 DO ib = 1, nblenrim(igrd) 272 276 z1t = z_atde * v1(ib,itide) + z_btde * v2(ib,itide) … … 320 324 ! 321 325 DO itide = 1, ntide 322 igrd= 1! SSH on tracer grid.326 igrd=4 ! SSH on tracer grid. 323 327 DO ib = 1, nblenrim(igrd) 324 328 sshtide(ib) =sshtide(ib)+ ssh1(ib,itide)*z_cost(itide) + ssh2(ib,itide)*z_sist(itide) 325 329 ! if(lwp) write(numout,*) 'z',ib,itide,sshtide(ib), ssh1(ib,itide),ssh2(ib,itide) 326 330 END DO 327 igrd= 2! U grid331 igrd=5 ! U grid 328 332 DO ib=1, nblenrim(igrd) 329 333 utide(ib) = utide(ib)+ u1(ib,itide)*z_cost(itide) + u2(ib,itide)*z_sist(itide) 330 334 ! if(lwp) write(numout,*) 'u',ib,itide,utide(ib), u1(ib,itide),u2(ib,itide) 331 335 END DO 332 igrd= 3! V grid336 igrd=6 ! V grid 333 337 DO ib=1, nblenrim(igrd) 334 338 vtide(ib) = vtide(ib)+ v1(ib,itide)*z_cost(itide) + v2(ib,itide)*z_sist(itide)
Note: See TracChangeset
for help on using the changeset viewer.