New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 1528 for trunk/NEMO/OPA_SRC/OBC/obcdta.F90 – NEMO

Ignore:
Timestamp:
2009-07-23T16:38:47+02:00 (15 years ago)
Author:
rblod
Message:

Suppress rigid-lid option, see ticket #486

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/OBC/obcdta.F90

    r1241 r1528  
    99  !!------------------------------------------------------------------------------ 
    1010  !!   obc_dta           : read u, v, t, s data along each open boundary 
    11   !!   obc_dta_psi       : read psi data along each open boundary (rigid lid only) 
    1211  !!------------------------------------------------------------------------------ 
    1312  !! * Modules used 
     
    2322  USE ioipsl          ! now only for  ymds2ju function  
    2423  USE iom             !  
    25   USE obccli          ! used when dynspg_rl 
    2624 
    2725  IMPLICIT NONE 
     
    120118 
    121119    !!--------------------------------------------------------------------------- 
    122     IF( lk_dynspg_rl )  THEN 
    123        CALL obc_dta_psi( kt )     ! update bsf data at open boundaries 
    124        IF ( nobc_dta == 1 .AND. kt == nit000 ) CALL ctl_stop( 'obcdta : time-variable psi boundary data not allowed yet' ) 
    125     ENDIF 
    126120 
    127121    ! 0.  initialisation : 
     
    505499  END SUBROUTINE obc_dta_chktime 
    506500 
    507 # if defined key_dynspg_rl 
    508   !!----------------------------------------------------------------------------- 
    509   !!   Rigid-lid 
    510   !!----------------------------------------------------------------------------- 
    511  
    512   SUBROUTINE obc_dta_psi ( kt ) 
    513     !!----------------------------------------------------------------------------- 
    514     !!                       ***  SUBROUTINE obc_dta_psi  *** 
    515     !! 
    516     !! ** Purpose : 
    517     !!      Update the climatological streamfunction OBC at each time step. 
    518     !!      Depends on the user's configuration.  Here data are read only once 
    519     !!      at the beginning of the run. 
    520     !! 
    521     !! ** Method : 
    522     !!      1. initialization 
    523     !!         kbsfstart: number of time steps over which increase bsf 
    524     !!         during initialization. This is provided for a smooth start 
    525     !!         in cases where the transport is large (like on the Antarctic 
    526     !!         continent). also note that when kbfstart=1, the transport 
    527     !!         increases a lot in one time step and the precision usually 
    528     !!         required for the solver may not be enough. 
    529     !!      2. set the time evolution of the climatological barotropic streamfunction 
    530     !!         along the isolated coastlines ( gcbic(jnic) ).  
    531     !!      3. set the climatological barotropic streamfunction at the boundary. 
    532     !! 
    533     !!      The last two steps are done only at first step (nit000) or if kt <= kbfstart 
    534     !! 
    535     !! History : 
    536     !!        ! 97-08 (G. Madec, J.M. Molines) 
    537     !!   8.5  ! 02-10 (C. Talandier, A-M. Treguier) Free surface, F90 
    538     !!---------------------------------------------------------------------------- 
    539     !! * Arguments 
    540     INTEGER, INTENT( in ) ::   kt          ! ocean time-step index 
    541  
    542     !! * Local declarations 
    543     INTEGER ::   ji, jj, jnic, jip         ! dummy loop indices 
    544     INTEGER ::   inum = 11                 ! temporary logical unit 
    545     INTEGER ::   ip, ii, ij, iii, ijj 
    546     INTEGER ::   kbsfstart 
    547     REAL(wp) ::   zsver1, zsver2, zsver3, z2dtr, zcoef 
    548     !!---------------------------------------------------------------------------- 
    549  
    550     ! 1. initialisation 
    551     ! ----------------- 
    552     kbsfstart =  1 
    553     zsver1 =  bsfic0(1) 
    554     zsver2 =  zsver1 
    555     IF( kt <= kbsfstart ) THEN 
    556        zcoef = float(kt)/float(kbsfstart) 
    557     ELSE 
    558        zcoef = 1. 
    559     END IF 
    560     bsfic(1) = zsver1*zcoef 
    561     IF( lwp .AND. ( kt <= kbsfstart ) ) THEN 
    562        IF(lwp) WRITE(numout,*)'            ' 
    563        IF(lwp) WRITE(numout,*)'obcdta: spinup phase in obc_dta_psi routine' 
    564        IF(lwp) WRITE(numout,*)'~~~~~~  it=',kt,'  OBC: spinup coef: ', & 
    565             zcoef, ' and transport: ',bsfic(1) 
    566     END IF 
    567  
    568     zsver2 =  bsfic(1)-bsfic(2) 
    569     zsver3 =  bsfic(2) 
    570  
    571     ! 2. Right hand side of the barotropic elliptic equation (isolated coastlines) 
    572     ! ---------------------------------------------------------------------------- 
    573  
    574     IF( ( neuler == 0 ) .AND. ( kt == nit000 ) ) THEN 
    575        z2dtr = 1./rdt 
    576     ELSE 
    577        z2dtr = 1./2./rdt 
    578     END IF 
    579     ! ... bsfb(ii,ij) should be constant but due to the Asselin filter it 
    580     ! ... converges asymptotically towards bsfic(jnic) 
    581     ! ... However, bsfb(ii,ij) is constant along the same coastlines 
    582     ! ... ---> can be improved using an extra array for storing bsficb (before) 
    583     IF( nbobc > 1 ) THEN 
    584        DO jnic = 1,nbobc - 1 
    585           gcbic(jnic) = 0. 
    586           ip=mnic(0,jnic) 
    587           DO jip = 1,ip 
    588              ii = miic(jip,0,jnic)  
    589              ij = mjic(jip,0,jnic)  
    590              IF( ii >= nldi+ nimpp - 1 .AND. ii <= nlei+ nimpp - 1 .AND. & 
    591                   ij >= nldj+ njmpp - 1 .AND. ij <= nlej+ njmpp - 1 ) THEN 
    592                 iii=ii-nimpp+1 
    593                 ijj=ij-njmpp+1 
    594                 gcbic(jnic) = ( bsfic(jnic) - bsfb(iii,ijj) ) * z2dtr 
    595              END IF 
    596           END DO 
    597        END DO 
    598     END IF 
    599  
    600     IF( lk_mpp )   CALL mpp_isl( gcbic, 3 ) 
    601  
    602     ! 3. Update the climatological barotropic function at the boundary  
    603     ! ---------------------------------------------------------------- 
    604  
    605     IF( lpeastobc ) THEN 
    606  
    607        IF( kt == nit000 .OR. kt <= kbsfstart ) THEN 
    608           OPEN(inum,file='obceastbsf.dta') 
    609           READ(inum,*) 
    610           READ(inum,*) 
    611           READ(inum,*) 
    612           READ(inum,*) 
    613           READ(inum,*) 
    614           READ(inum,*) (bfoe(jj),jj=jpjed, jpjef) 
    615           CLOSE(inum) 
    616        END IF 
    617        DO jj=jpjed, jpjefm1 
    618           bfoe(jj)=bfoe(jj)*zcoef 
    619        END DO 
    620  
    621     END IF 
    622  
    623     IF( lpwestobc) THEN 
    624  
    625        IF( kt == nit000 .OR. kt <= kbsfstart ) THEN 
    626           OPEN(inum,file='obcwestbsf.dta') 
    627           READ(inum,*) 
    628           READ(inum,*) 
    629           READ(inum,*) 
    630           READ(inum,*) 
    631           READ(inum,*) 
    632           READ(inum,*) (bfow(jj),jj=jpjwd, jpjwf) 
    633           CLOSE(inum) 
    634        END IF 
    635        DO jj=jpjwd, jpjwfm1 
    636           bfow(jj)=bfow(jj)*zcoef 
    637        END DO 
    638  
    639     END IF 
    640  
    641     IF( lpsouthobc) THEN 
    642  
    643        IF( kt == nit000.OR.kt <= kbsfstart ) THEN 
    644           OPEN(inum,file='obcsouthbsf.dta') 
    645           READ(inum,*) 
    646           READ(inum,*) 
    647           READ(inum,*) 
    648           READ(inum,*) 
    649           READ(inum,*) 
    650           READ(inum,*) (bfos(jj),jj=jpisd, jpisf) 
    651           CLOSE(inum) 
    652        END IF 
    653        DO ji=jpisd, jpisfm1 
    654           bfos(ji)=bfos(ji)*zcoef 
    655        END DO 
    656  
    657     END IF 
    658  
    659     IF( lpnorthobc) THEN 
    660        IF( kt == nit000.OR.kt <= kbsfstart ) THEN 
    661           OPEN(inum,file='obcnorthbsf.dta') 
    662           READ(inum,*) 
    663           READ(inum,*) 
    664           READ(inum,*) 
    665           READ(inum,*) 
    666           READ(inum,*) 
    667           READ(inum,*) (bfon(jj),jj=jpind, jpinf) 
    668           CLOSE(inum) 
    669        END IF 
    670        DO ji=jpind, jpinfm1 
    671           bfon(ji)=bfon(ji)*zcoef 
    672        END DO 
    673  
    674     END IF 
    675   END SUBROUTINE obc_dta_psi 
    676  
    677 #else 
    678   !!----------------------------------------------------------------------------- 
    679   !!   'key_dynspg_rl not defined ( dynspg_flt or dynspg_exp or dynspg_ts  ) 
    680   !!----------------------------------------------------------------------------- 
    681   SUBROUTINE obc_dta_psi ( kt )       ! Empty routine 
    682     !! * Arguments 
    683     INTEGER,INTENT(in) :: kt  
    684     WRITE(*,*) 'obc_dta_psi: You should not have seen this print! error?', kt 
    685     STOP 
    686   END SUBROUTINE obc_dta_psi 
    687 # endif 
    688501 
    689502#if defined key_dynspg_ts || defined key_dynspg_exp 
Note: See TracChangeset for help on using the changeset viewer.