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/SBC/sbcfwb.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/SBC/sbcfwb.F90

    r1573 r1581  
    6666      INTEGER  ::   inum                  ! temporary logical unit 
    6767      INTEGER  ::   ikty, iyear           !  
    68       CHARACTER (len=32) ::   clname  
    6968      REAL(wp) ::   z_emp, z_emp_nsrf       ! temporary scalars 
    7069      REAL(wp) ::   zsurf_neg, zsurf_pos, zsurf_tospread 
     
    115114         IF( kt == nit000 ) THEN 
    116115            ! Read the corrective factor on precipitations (empold) 
    117             clname = 'EMPave_old.dat' 
    118             CALL ctlopn( inum, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   & 
    119                &           1, numout, .FALSE., 1 ) 
    120  
     116            CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    121117            READ ( inum, "(24X,I8,2ES24.16)" ) iyear, a_fwb_b, a_fwb 
    122118            CLOSE( inum ) 
     
    149145         ! save empold value in a file 
    150146         IF( kt == nitend .AND. lwp ) THEN 
    151             clname = 'EMPav.dat'     
    152             CALL ctlopn( inum, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL',   & 
    153                &           1, numout, .FALSE., 0 ) 
    154             WRITE(inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb 
     147            CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 
     148            WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb 
     149            CLOSE( inum ) 
    155150         ENDIF 
    156151         ! 
Note: See TracChangeset for help on using the changeset viewer.