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 742 for trunk/NEMO/OPA_SRC – NEMO

Changeset 742 for trunk/NEMO/OPA_SRC


Ignore:
Timestamp:
2007-12-06T11:36:22+01:00 (16 years ago)
Author:
smasson
Message:

bugfix for short filenames in iom_open, see ticket:24

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/IOM/iom.F90

    r719 r742  
    117117      iln = LEN_TRIM(clname) 
    118118      ils = LEN_TRIM(clsuffix) 
    119       IF( INDEX( TRIM(clname), TRIM(clsuffix), back = .TRUE. ) /= iln - ils + 1 ) clname = TRIM(clname)//TRIM(clsuffix) 
     119      IF( iln <= ils .OR. INDEX( TRIM(clname), TRIM(clsuffix), back = .TRUE. ) /= iln - ils + 1 )   & 
     120         &   clname = TRIM(clname)//TRIM(clsuffix) 
    120121      cltmpn = clname   ! store this name 
    121122      ! try to find if the file to be opened already exist 
Note: See TracChangeset for help on using the changeset viewer.