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

Ignore:
Timestamp:
2007-02-27T15:46:47+01:00 (17 years ago)
Author:
opalod
Message:

nemo_v2_bugfix_025:RB: suppress hard-coded logical units except for dimg and coupled

File:
1 edited

Legend:

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

    r392 r624  
    1515      USE Agrif_Util 
    1616#endif 
     17      USE in_out_manager 
    1718      IMPLICIT NONE 
    1819 
     20      INTEGER, INTENT( out ) ::   & 
     21         knum      ! logical unit to open 
    1922      INTEGER, INTENT( in ) ::   & 
    20 #if !defined key_agrif 
    21          knum,     & ! logical unit to open 
    22 #endif 
    2323         krequ,    & ! =1 file required (stop if not exist) 
    2424         !           ! =0 file not required (create the file if does not exist) 
    2525         kout,     & ! number of logical units for write 
    2626         klengh      ! record length 
    27  
    28       INTEGER ::   iost 
    2927      CHARACTER (len=* ), INTENT( in ) ::   & 
    3028         cdacce,   & ! access specifier 
     
    3432      CHARACTER (len=* ), INTENT( in ) ::   & 
    3533         cdfile      ! file name to open 
    36 #endif 
    37  
    38       LOGICAL ::  ldwp   ! boolean term for print 
    39  
    40 #if defined key_agrif 
    41       LOGICAL :: op 
    42       INTEGER, INTENT( inout ) ::   & 
    43          knum      ! logical unit to open 
     34#else 
    4435      CHARACTER (len=* ), INTENT( inout ) ::   & 
    4536         cdfile      ! file name to open 
    4637#endif 
     38 
     39      INTEGER ::   iost 
     40      LOGICAL ::  ldwp   ! boolean term for print 
     41 
    4742      !!---------------------------------------------------------------------- 
    4843      !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     
    5550         cdfile= TRIM(Agrif_CFixed())//'_'//TRIM(cdfile) 
    5651      endif 
    57       INQUIRE(UNIT=knum,OPENED=op) 
    58       IF (op) THEN 
    5952        knum=Agrif_Get_Unit() 
    60       ENDIF 
     53#else 
     54        knum=getunit() 
    6155#endif 
    6256 
Note: See TracChangeset for help on using the changeset viewer.