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 1151 for trunk/NEMO/OPA_SRC/OBC/obcrst.F90 – NEMO

Ignore:
Timestamp:
2008-06-26T14:54:53+02:00 (16 years ago)
Author:
rblod
Message:

Add new OBC, see ticket #224

File:
1 edited

Legend:

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

    r1146 r1151  
    2121 
    2222   !! * Accessibility 
    23    PUBLIC obc_rst_lec        ! routine called by iniobc.F90 
    24    PUBLIC obc_rst_wri        ! routine called by step.F90 
     23   PUBLIC obc_rst_read       ! routine called by obc_ini 
     24   PUBLIC obc_rst_write      ! routine called by step 
    2525 
    2626   !!--------------------------------------------------------------------------------- 
     
    3232CONTAINS 
    3333 
    34    SUBROUTINE obc_rst_wri ( kt ) 
     34   SUBROUTINE obc_rst_write ( kt ) 
    3535      !!-------------------------------------------------------------------------------- 
    36       !!                  ***  SUBROUTINE obc_rst_wri  *** 
     36      !!                  ***  SUBROUTINE obc_rst_write  *** 
    3737      !!                 
    3838      !! ** Purpose :   Write open boundary restart fields in restart.obc.output file  
     
    4141      !!      Each nstock time step , save fields which are necessary for restart. 
    4242      !!      - This routine is called if at least the key_obc is defined. It is called 
    43       !!        at the same time step than rstwri. 
     43      !!        at the same time step than rstwrite. 
    4444      !!      - First record holds OBC parameters nbobc,jpieob,jpiwob,jpjnob,jpjsob and  
    4545      !!        the OBC layout jpjed, jpjef ... for checking purposes. 
     
    8282         IF(lwp) THEN 
    8383              WRITE(numout,*) ' ' 
    84               WRITE(numout,*) 'obcrst: OBC output for restart with obc_rst_wri routine' 
     84              WRITE(numout,*) 'obcrst: OBC output for restart with obc_rst_write routine' 
    8585              WRITE(numout,*) '~~~~~~' 
    8686              WRITE(numout,*) '        output done in restart.obc.output file at it= ', kt, ' date= ', ndastp 
     
    283283            END IF 
    284284         END IF 
    285       END IF 
    286285      CLOSE(inum) 
    287  
    288    END SUBROUTINE obc_rst_wri 
    289  
    290  
    291    SUBROUTINE obc_rst_lec 
     286      END IF 
     287 
     288   END SUBROUTINE obc_rst_write 
     289 
     290 
     291   SUBROUTINE obc_rst_read 
    292292      !!---------------------------------------------------------------------------- 
    293       !!                   ***  SUBROUTINE obc_rst_lec  *** 
     293      !!                   ***  SUBROUTINE obc_rst_read  *** 
    294294      !!                    
    295295      !! ** Purpose :   Read files for restart at open boundaries 
     
    337337  
    338338      IF(lwp) THEN 
    339          WRITE(numout,*) 'obcrst: beginning of restart with obc_rst_lec routine' 
     339         WRITE(numout,*) 'obcrst: beginning of restart with obc_rst_read routine' 
    340340         WRITE(numout,*) '~~~~~~' 
    341341         WRITE(numout,*) ' ' 
     
    348348      ! 0.1 Open files 
    349349      ! --------------- 
    350       CALL ctlopn( inum, 'restart.obc.output', 'UNKNOWN', 'UNFORMATTED', 'DIRECT',   & 
     350      CALL ctlopn( inum, 'restart.obc', 'UNKNOWN', 'UNFORMATTED', 'DIRECT',   & 
    351351         &         nreclo, numout, lwp, 1 ) 
    352352 
     
    370370          CALL ctl_stop( '        ===>>>> : problem with nit000 for the restart',   & 
    371371               &         '        ==============',   & 
    372                &         '        we stop in obc_rst_lec routine. Verify the file or rerun with the value',   & 
     372               &         '        we stop in obc_rst_read routine. Verify the file or rerun with the value',   & 
    373373               &         '        0 for the control of time parameter nrstdt' ) 
    374374              
     
    391391            WRITE(numout,*) '         ' 
    392392            WRITE(numout,*) '        East open boundary' 
    393             IF( jpieob0 /= jpieob1 ) CALL ctl_stop( '         ==>>>> : Problem in obc_rst_lec, jpieob have changed' ) 
     393            IF( jpieob0 /= jpieob1 ) CALL ctl_stop( '         ==>>>> : Problem in obc_rst_read, jpieob have changed' ) 
    394394         END IF 
    395395      END IF 
     
    399399            WRITE(numout,*) '         ' 
    400400            WRITE(numout,*) '        West open boundary' 
    401             IF( jpiwob0 /= jpiwob1 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpiwob has changed' ) 
     401            IF( jpiwob0 /= jpiwob1 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpiwob has changed' ) 
    402402         END IF 
    403403      END IF 
     
    407407            WRITE(numout,*) '         ' 
    408408            WRITE(numout,*) '        North open boundary' 
    409             IF( jpjnob0 /= jpjnob1 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjnob has changed' ) 
     409            IF( jpjnob0 /= jpjnob1 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjnob has changed' ) 
    410410         END IF 
    411411      END IF 
     
    415415            WRITE(numout,*) '         ' 
    416416            WRITE(numout,*) '        South open boundary' 
    417             IF( jpjsob0 /= jpjsob1) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjsob has changed' ) 
     417            IF( jpjsob0 /= jpjsob1) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjsob has changed' ) 
    418418         END IF 
    419419      END IF 
     
    423423      ! ------------------------------------------ 
    424424      IF( lp_obc_east .AND. ( jpieob1 /= 0 ) ) THEN 
    425          IF( ied1 /= ied0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjed has changed' ) 
    426          IF( ief1 /= ief0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjef has changed' ) 
     425         IF( ied1 /= ied0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjed has changed' ) 
     426         IF( ief1 /= ief0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjef has changed' ) 
    427427      END IF 
    428428 
    429429      IF( lp_obc_west .AND. ( jpiwob1 /= 0 ) ) THEN 
    430          IF( iwd1 /= iwd0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjwd has changed' ) 
    431          IF( iwf1 /= iwf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpjwf has changed' ) 
     430         IF( iwd1 /= iwd0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjwd has changed' ) 
     431         IF( iwf1 /= iwf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpjwf has changed' ) 
    432432      END IF 
    433433  
    434434      IF( lp_obc_north .AND. ( jpjnob1 /= 0 ) ) THEN 
    435          IF( ind1 /= ind0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpind has changed' ) 
    436          IF( inf1 /= inf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpinf has changed' ) 
     435         IF( ind1 /= ind0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpind has changed' ) 
     436         IF( inf1 /= inf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpinf has changed' ) 
    437437      END IF 
    438438  
    439439      IF( lp_obc_south .AND. ( jpjsob1 /= 0 ) ) THEN 
    440          IF( isd1 /= isd0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpisd has changed' ) 
    441          IF( isf1 /= isf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_lec, jpisf has changed' ) 
     440         IF( isd1 /= isd0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpisd has changed' ) 
     441         IF( isf1 /= isf0 ) CALL ctl_stop( '        ==>>>> : Problem in obc_rst_read, jpisf has changed' ) 
    442442      END IF 
    443443  
     
    653653      ENDIF 
    654654  
    655    END SUBROUTINE obc_rst_lec 
     655   END SUBROUTINE obc_rst_read 
    656656#else 
    657657   !!================================================================================= 
     
    660660   !!================================================================================= 
    661661CONTAINS 
    662    SUBROUTINE obc_rst_wri( kt )           !  No Open boundary ==> empty routine 
     662   SUBROUTINE obc_rst_write( kt )           !  No Open boundary ==> empty routine 
    663663      INTEGER,INTENT(in) :: kt 
    664       WRITE(*,*) 'obc_rst_wri: You should not have seen this print! error?', kt 
    665    END SUBROUTINE obc_rst_wri 
    666    SUBROUTINE obc_rst_lec                 !  No Open boundary ==> empty routine 
    667    END SUBROUTINE obc_rst_lec 
     664      WRITE(*,*) 'obc_rst_write: You should not have seen this print! error?', kt 
     665   END SUBROUTINE obc_rst_write 
     666   SUBROUTINE obc_rst_read                 !  No Open boundary ==> empty routine 
     667   END SUBROUTINE obc_rst_read 
    668668#endif 
    669669 
Note: See TracChangeset for help on using the changeset viewer.