Changeset 367 for IOIPSL/trunk/src


Ignore:
Timestamp:
07/28/08 10:28:22 (16 years ago)
Author:
bellier
Message:

Adapting some tests to be conform with new versions of NETCDF

Location:
IOIPSL/trunk/src
Files:
2 edited

Legend:

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

    r11 r367  
    368368!- 
    369369  INTEGER :: iret, vid, fid, nbdim, i, iilast, jjlast 
    370   INTEGER :: it, len, gdtt_id, old_id, iv, gdtmaf_id 
     370  INTEGER :: gdtt_id, old_id, iv, gdtmaf_id 
    371371  CHARACTER(LEN=250) :: name 
    372372  CHARACTER(LEN=80) :: units, calendar 
     
    391391      iideb, iilen, iilast, jjdeb, jjlen, jjlast 
    392392!- 
    393 ! 1.0 get all infos on the file  we if it is not yet opened 
     393! 1.0 get all infos on the file 
    394394!- 
    395395! Either the fid_out has not been initialized (0 or very large) 
     
    599599!--- 
    600600    ALLOCATE(vec_tmp(ttm)) 
    601     iret = NF90_GET_VAR (fid, vid, vec_tmp, & 
    602              start=(/ 1 /), count=(/ ttm /)) 
     601    iret = NF90_GET_VAR (fid,vid,vec_tmp,start=(/ 1 /),count=(/ ttm /)) 
    603602    itaus(1:ttm) = NINT(vec_tmp(1:ttm)) 
    604603    DEALLOCATE(vec_tmp) 
     
    609608!--- 
    610609!-- Find the calendar 
    611     calendar='XXXX' 
    612     iret = NF90_GET_ATT (fid, gdtmaf_id, 'calendar', calendar) 
    613     IF ( INDEX(calendar,'XXXX') < 1 ) THEN 
    614        CALL ioconf_calendar(calendar) 
     610    iret = NF90_GET_ATT (fid,gdtmaf_id,'calendar',calendar) 
     611    IF (iret == NF90_NOERR) THEN 
     612      CALL ioconf_calendar(calendar) 
    615613    ENDIF 
    616614!-- 
    617615    units = '' 
    618     iret = NF90_GET_ATT (fid, vid, 'units', units) 
     616    iret = NF90_GET_ATT (fid,vid,'units',units) 
    619617    IF (gdtt_id > 0) THEN 
    620618      units = units(INDEX(units,'since')+6:LEN_TRIM(units)) 
     
    16291627  LOGICAL :: check = .FALSE. 
    16301628!--------------------------------------------------------------------- 
     1629  IF (check) THEN 
     1630    WRITE (*,*) 'flinget_scal in file with id ',fid_in 
     1631  ENDIF 
     1632!- 
    16311633  fid = ncids(fid_in) 
    16321634!- 
  • IOIPSL/trunk/src/restcom.f90

    r335 r367  
    658658! Get the calendar if possible. Else it will be gregorian. 
    659659!- 
    660   IF (tax_size_in(nb_fi) > 0 ) THEN 
    661     calendar = 'XXXXX' 
     660  IF (tax_size_in(nb_fi) > 0) THEN 
    662661    iret = NF90_GET_ATT(ncfid,tax_varid_in(nb_fi),'calendar',calendar) 
    663     IF ( INDEX(calendar,'XXXXX') < 0 ) THEN 
     662    IF (iret == NF90_NOERR) THEN 
    664663      CALL ioconf_calendar (calendar) 
    665664      IF (check) THEN 
     
    828827    cal = (/'JAN','FEB','MAR','APR','MAY','JUN', & 
    829828            'JUL','AUG','SEP','OCT','NOV','DEC'/) 
    830   CHARACTER(LEN=30) :: timenow,conv 
     829  CHARACTER(LEN=30) :: timenow 
    831830  LOGICAL :: check = .FALSE. 
    832831!--------------------------------------------------------------------- 
     
    951950!  5.2 Write global attributes 
    952951!- 
    953   conv='GDT 1.2' 
    954   iret = NF90_PUT_ATT(ncfid,NF90_GLOBAL,'Conventions',TRIM(conv)) 
     952  iret = NF90_PUT_ATT(ncfid,NF90_GLOBAL,'Conventions',"CF-1.1") 
    955953  iret = NF90_PUT_ATT(ncfid,NF90_GLOBAL,'file_name',TRIM(fname)) 
    956954!!  TO BE DONE LATER 
     
    21762174      iret =  NF90_PUT_ATT(ncfid,varid_out(fid,nbvar_out(fid)), & 
    21772175 &                         'long_name',TRIM(rest_lname)) 
    2178       rest_lname  = 'XXXXX' 
     2176      rest_lname = 'XXXXX' 
    21792177    ENDIF 
    21802178!--- 
Note: See TracChangeset for help on using the changeset viewer.