Changeset 367 for IOIPSL/trunk/src
- Timestamp:
- 07/28/08 10:28:22 (16 years ago)
- Location:
- IOIPSL/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
IOIPSL/trunk/src/flincom.f90
r11 r367 368 368 !- 369 369 INTEGER :: iret, vid, fid, nbdim, i, iilast, jjlast 370 INTEGER :: it, len,gdtt_id, old_id, iv, gdtmaf_id370 INTEGER :: gdtt_id, old_id, iv, gdtmaf_id 371 371 CHARACTER(LEN=250) :: name 372 372 CHARACTER(LEN=80) :: units, calendar … … 391 391 iideb, iilen, iilast, jjdeb, jjlen, jjlast 392 392 !- 393 ! 1.0 get all infos on the file we if it is not yet opened393 ! 1.0 get all infos on the file 394 394 !- 395 395 ! Either the fid_out has not been initialized (0 or very large) … … 599 599 !--- 600 600 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 /)) 603 602 itaus(1:ttm) = NINT(vec_tmp(1:ttm)) 604 603 DEALLOCATE(vec_tmp) … … 609 608 !--- 610 609 !-- 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) 615 613 ENDIF 616 614 !-- 617 615 units = '' 618 iret = NF90_GET_ATT (fid, vid, 'units',units)616 iret = NF90_GET_ATT (fid,vid,'units',units) 619 617 IF (gdtt_id > 0) THEN 620 618 units = units(INDEX(units,'since')+6:LEN_TRIM(units)) … … 1629 1627 LOGICAL :: check = .FALSE. 1630 1628 !--------------------------------------------------------------------- 1629 IF (check) THEN 1630 WRITE (*,*) 'flinget_scal in file with id ',fid_in 1631 ENDIF 1632 !- 1631 1633 fid = ncids(fid_in) 1632 1634 !- -
IOIPSL/trunk/src/restcom.f90
r335 r367 658 658 ! Get the calendar if possible. Else it will be gregorian. 659 659 !- 660 IF (tax_size_in(nb_fi) > 0 ) THEN 661 calendar = 'XXXXX' 660 IF (tax_size_in(nb_fi) > 0) THEN 662 661 iret = NF90_GET_ATT(ncfid,tax_varid_in(nb_fi),'calendar',calendar) 663 IF ( INDEX(calendar,'XXXXX') < 0) THEN662 IF (iret == NF90_NOERR) THEN 664 663 CALL ioconf_calendar (calendar) 665 664 IF (check) THEN … … 828 827 cal = (/'JAN','FEB','MAR','APR','MAY','JUN', & 829 828 'JUL','AUG','SEP','OCT','NOV','DEC'/) 830 CHARACTER(LEN=30) :: timenow ,conv829 CHARACTER(LEN=30) :: timenow 831 830 LOGICAL :: check = .FALSE. 832 831 !--------------------------------------------------------------------- … … 951 950 ! 5.2 Write global attributes 952 951 !- 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") 955 953 iret = NF90_PUT_ATT(ncfid,NF90_GLOBAL,'file_name',TRIM(fname)) 956 954 !! TO BE DONE LATER … … 2176 2174 iret = NF90_PUT_ATT(ncfid,varid_out(fid,nbvar_out(fid)), & 2177 2175 & 'long_name',TRIM(rest_lname)) 2178 rest_lname 2176 rest_lname = 'XXXXX' 2179 2177 ENDIF 2180 2178 !---
Note: See TracChangeset
for help on using the changeset viewer.