- Timestamp:
- 2017-10-11T17:41:59+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8612 r8616 739 739 LOGICAL :: lxios 740 740 ! 741 itime = 1 742 IF( PRESENT(ktime) ) itime = ktime 743 ! 744 clname = iom_file(kiomid)%name 745 clinfo = ' iom_g0d, file: '//trim(clname)//', var: '//trim(cdvar) 746 ! 747 IF( kiomid > 0 ) THEN 748 idvar = iom_varid( kiomid, cdvar ) 749 IF( iom_file(kiomid)%nfid > 0 .AND. idvar > 0 ) THEN 750 idmspc = iom_file ( kiomid )%ndims( idvar ) 751 IF( iom_file(kiomid)%luld(idvar) ) idmspc = idmspc - 1 752 WRITE(cldmspc , fmt='(i1)') idmspc 753 IF( idmspc > 0 ) CALL ctl_stop( TRIM(clinfo), 'When reading to a 0D array, we do not accept data', & 754 & 'with 1 or more spatial dimensions: '//cldmspc//' were found.' , & 755 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 756 SELECT CASE (iom_file(kiomid)%iolib) 757 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar, itime ) 758 CASE DEFAULT 759 CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 760 END SELECT 761 ENDIF 741 lxios = .FALSE. 742 IF( PRESENT(lrxios) ) lxios = lrxios 743 744 IF(.NOT.lxios) THEN ! read data using default library 745 itime = 1 746 IF( PRESENT(ktime) ) itime = ktime 747 ! 748 clname = iom_file(kiomid)%name 749 clinfo = ' iom_g0d, file: '//trim(clname)//', var: '//trim(cdvar) 750 ! 751 IF( kiomid > 0 ) THEN 752 idvar = iom_varid( kiomid, cdvar ) 753 IF( iom_file(kiomid)%nfid > 0 .AND. idvar > 0 ) THEN 754 idmspc = iom_file ( kiomid )%ndims( idvar ) 755 IF( iom_file(kiomid)%luld(idvar) ) idmspc = idmspc - 1 756 WRITE(cldmspc , fmt='(i1)') idmspc 757 IF( idmspc > 0 ) CALL ctl_stop( TRIM(clinfo), 'When reading to a 0D array, we do not accept data', & 758 & 'with 1 or more spatial dimensions: '//cldmspc//' were found.' , & 759 & 'Use ncwa -a to suppress the unnecessary dimensions' ) 760 SELECT CASE (iom_file(kiomid)%iolib) 761 CASE (jpnf90 ) ; CALL iom_nf90_get( kiomid, idvar, pvar, itime ) 762 CASE DEFAULT 763 CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 764 END SELECT 765 ENDIF 766 ENDIF 767 ELSE 768 IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 769 CALL iom_swap( TRIM(rxios_context) ) 770 CALL xios_recv_field( trim(cdvar), pvar) 771 CALL iom_swap( TRIM(cxios_context) ) 762 772 ENDIF 763 773 END SUBROUTINE iom_g0d
Note: See TracChangeset
for help on using the changeset viewer.