Changeset 742


Ignore:
Timestamp:
2007-12-06T11:36:22+01:00 (14 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.