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 1581 for trunk/NEMO/OPA_SRC/opa.F90 – NEMO

Ignore:
Timestamp:
2009-08-05T16:53:12+02:00 (15 years ago)
Author:
smasson
Message:

ctlopn cleanup, see ticket:515 and ticket:237

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/opa.F90

    r1579 r1581  
    179179      INTEGER :: localComm 
    180180#endif 
    181       CHARACTER(len=20)               ::   namelistname 
    182       CHARACTER(len=28)               ::   file_out 
    183       CHARACTER(len=80),dimension(10) ::   cltxt 
     181      CHARACTER(len=80),dimension(10) ::   cltxt = '' 
    184182      INTEGER                         :: ji             ! local loop indicees 
    185183      NAMELIST/namctl/ ln_ctl, nprint, nictls, nictle,   & 
     
    187185      !!---------------------------------------------------------------------- 
    188186 
    189       ! Initializations 
    190       ! =============== 
    191       cltxt(:) = '' 
    192       file_out = 'ocean.output' 
    193       namelistname = 'namelist' 
    194        
    195187      ! Namelist namctl : Control prints & Benchmark 
    196       CALL ctlopn( numnam, namelistname, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., 1 ) 
    197       REWIND( numnam )   ! is this really needed? we just open the file... 
     188      CALL ctl_opn( numnam, 'namelist', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    198189      READ  ( numnam, namctl ) 
    199190 
     
    227218      IF( lwp ) THEN 
    228219         ! open listing and namelist units 
    229          IF( narea > 1 )   WRITE(file_out, "(a,'_',i4.4)") TRIM(file_out), narea-1 
    230          CALL ctlopn( numout, file_out, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., 1 ) 
     220         CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE., narea ) 
    231221          
    232222         WRITE(numout,*) 
Note: See TracChangeset for help on using the changeset viewer.