Changeset 1932 for IOIPSL


Ignore:
Timestamp:
11/28/12 10:56:17 (12 years ago)
Author:
jgipsl
Message:

Added possibility to read a scalar variable with one dimension if this dimension has lenght equal one.

N.Vuichard/JG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/flincom.f90

    r1898 r1932  
    16861686!- 
    16871687  LOGICAL :: l_dbg 
     1688  INTEGER :: lll 
    16881689!--------------------------------------------------------------------- 
    16891690  CALL ipsldbg (old_status=l_dbg) 
     
    17141715        iret = NF90_INQUIRE_VARIABLE (fid, vid, & 
    17151716             ndims=ndims, dimids=dimids, nAtts=nb_atts) 
    1716         IF ( (ndims == 0) .AND. (nb_atts >= 0) ) THEN 
     1717        IF (ndims == 1) THEN 
     1718           iret = NF90_INQUIRE_DIMENSION (fid, dimids(1), len=lll) 
     1719        ENDIF 
     1720 
     1721        IF ( ((ndims == 0) .OR. ((ndims == 1).AND.(lll == 1))) .AND. (nb_atts >= 0) ) THEN 
    17171722           iret = NF90_GET_VAR(fid, vid, var) 
    17181723        ELSE 
Note: See TracChangeset for help on using the changeset viewer.