New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 6051 for branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90 – NEMO

Ignore:
Timestamp:
2015-12-15T10:46:14+01:00 (8 years ago)
Author:
lovato
Message:

Merge branches/2015/dev_r5056_CMCC4_simplification (see ticket #1456)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_CMCC_merge_2015/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r5836 r6051  
    88   !!            3.0  ! 2007-07  (D. Storkey) Changes to iom_gettime 
    99   !!            3.4  ! 2012-12  (R. Bourdalle-Badie and G. Reffray)  add C1D case   
     10   !!            3.6  ! 2014-15  DIMG format removed 
    1011   !!-------------------------------------------------------------------- 
    1112 
     
    2324   USE lbclnk          ! lateal boundary condition / mpp exchanges 
    2425   USE iom_def         ! iom variables definitions 
    25    USE iom_ioipsl      ! NetCDF format with IOIPSL library 
    2626   USE iom_nf90        ! NetCDF format with native NetCDF library 
    27    USE iom_rstdimg     ! restarts access direct format "dimg" style... 
    2827   USE in_out_manager  ! I/O manager 
    2928   USE lib_mpp           ! MPP library 
     
    246245      CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu] 
    247246      CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode) 
    248       CHARACTER(LEN=10)     ::   clsuffix  ! ".nc" or ".dimg" 
     247      CHARACTER(LEN=10)     ::   clsuffix  ! ".nc"  
    249248      CHARACTER(LEN=15)     ::   clcpu     ! the cpu number (max jpmax_digits digits) 
    250249      CHARACTER(LEN=256)    ::   clinfo    ! info character 
     
    309308      ! which suffix should we use? 
    310309      SELECT CASE (iolib) 
    311       CASE (jpioipsl ) ;   clsuffix = '.nc' 
    312310      CASE (jpnf90   ) ;   clsuffix = '.nc' 
    313       CASE (jprstdimg) ;   clsuffix = '.dimg' 
    314311      CASE DEFAULT     ;   clsuffix = '' 
    315          CALL ctl_stop( TRIM(clinfo), 'accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     312         CALL ctl_stop( TRIM(clinfo), 'accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 
    316313      END SELECT 
    317314      ! Add the suffix if needed 
     
    326323      IF( .NOT.llok ) THEN 
    327324         ! we try to add the cpu number to the name 
    328          IF( iolib == jprstdimg ) THEN   ;   WRITE(clcpu,*) narea 
    329          ELSE                            ;   WRITE(clcpu,*) narea-1 
    330          ENDIF 
     325         WRITE(clcpu,*) narea-1 
     326 
    331327         clcpu  = TRIM(ADJUSTL(clcpu)) 
    332328         iln = INDEX(clname,TRIM(clsuffix), back = .TRUE.) 
     
    375371         END SELECT 
    376372      ENDIF 
    377       ! Open the NetCDF or RSTDIMG file 
     373      ! Open the NetCDF file 
    378374      ! ============= 
    379375      ! do we have some free file identifier? 
     
    399395      IF( istop == nstop ) THEN   ! no error within this routine 
    400396         SELECT CASE (iolib) 
    401          CASE (jpioipsl )   ;   CALL iom_ioipsl_open(  clname, kiomid, llwrt, llok, idompar ) 
    402397         CASE (jpnf90   )   ;   CALL iom_nf90_open(    clname, kiomid, llwrt, llok, idompar ) 
    403          CASE (jprstdimg)   ;   CALL iom_rstdimg_open( clname, kiomid, llwrt, llok, idompar ) 
    404398         CASE DEFAULT 
    405             CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     399            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed) ' ) 
    406400         END SELECT 
    407401      ENDIF 
     
    438432            IF( iom_file(jf)%nfid > 0 ) THEN 
    439433               SELECT CASE (iom_file(jf)%iolib) 
    440                CASE (jpioipsl )   ;   CALL iom_ioipsl_close(  jf ) 
    441434               CASE (jpnf90   )   ;   CALL iom_nf90_close(    jf ) 
    442                CASE (jprstdimg)   ;   CALL iom_rstdimg_close( jf ) 
    443435               CASE DEFAULT 
    444                   CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     436                  CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    445437               END SELECT 
    446438               iom_file(jf)%nfid       = 0          ! free the id  
     
    497489               IF( iiv <= jpmax_vars ) THEN 
    498490                  SELECT CASE (iom_file(kiomid)%iolib) 
    499                   CASE (jpioipsl )   ;   iom_varid = iom_ioipsl_varid( kiomid, cdvar, iiv, kdimsz ) 
    500491                  CASE (jpnf90   )   ;   iom_varid = iom_nf90_varid  ( kiomid, cdvar, iiv, kdimsz, kndims ) 
    501                   CASE (jprstdimg)   ;   iom_varid = -1   ! all variables are listed in iom_file 
    502                   CASE DEFAULT    
    503                      CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     492                  CASE DEFAULT 
     493                     CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    504494                  END SELECT 
    505495               ELSE 
     
    559549                                 &                         'Use ncwa -a to suppress the unnecessary dimensions' ) 
    560550            SELECT CASE (iom_file(kiomid)%iolib) 
    561             CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, pvar, itime ) 
    562551            CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, pvar, itime ) 
    563             CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idvar, pvar ) 
    564             CASE DEFAULT     
    565                CALL ctl_stop( 'iom_g0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     552            CASE DEFAULT 
     553               CALL ctl_stop( 'iom_g0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    566554            END SELECT 
    567555         ENDIF 
     
    694682      IF( luse_jattr ) THEN 
    695683         SELECT CASE (iom_file(kiomid)%iolib) 
    696          CASE (jpioipsl, jprstdimg ) 
    697              CALL ctl_warn(trim(clinfo), 'lrowattr present and true but this only works with netcdf (jpnf90)') 
    698              luse_jattr = .false. 
    699684         CASE (jpnf90   )    
    700685             ! Ok 
    701686         CASE DEFAULT     
    702             CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     687            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    703688         END SELECT 
    704689      ENDIF 
     
    866851       
    867852         SELECT CASE (iom_file(kiomid)%iolib) 
    868          CASE (jpioipsl )   ;   CALL iom_ioipsl_get(  kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   & 
    869             &                                         pv_r1d, pv_r2d, pv_r3d ) 
    870853         CASE (jpnf90   )   ;   CALL iom_nf90_get(    kiomid, idvar, inbdim, istart, icnt, ix1, ix2, iy1, iy2,   & 
    871854            &                                         pv_r1d, pv_r2d, pv_r3d ) 
    872          CASE (jprstdimg)   ;   CALL iom_rstdimg_get( kiomid, idom, idvar, ix1, ix2, iy1, iy2,   & 
    873             &                                         pv_r1d, pv_r2d, pv_r3d ) 
    874          CASE DEFAULT     
    875             CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     855         CASE DEFAULT 
     856            CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    876857         END SELECT 
    877858 
     
    956937                  IF( iom_file(kiomid)%dimsz(1,idvar) <= size(ptime) ) THEN 
    957938                     SELECT CASE (iom_file(kiomid)%iolib) 
    958                      CASE (jpioipsl )   ;   CALL iom_ioipsl_gettime( kiomid, idvar, ptime, cdunits, cdcalendar ) 
    959939                     CASE (jpnf90   )   ;   CALL iom_nf90_gettime(   kiomid, idvar, ptime, cdunits, cdcalendar ) 
    960                      CASE (jprstdimg)   ;   CALL ctl_stop( TRIM(clinfo)//' case IO library == jprstdimg not coded...' ) 
    961                      CASE DEFAULT     
    962                         CALL ctl_stop( TRIM(clinfo)//' accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     940                     CASE DEFAULT 
     941                        CALL ctl_stop( TRIM(clinfo)//' accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    963942                     END SELECT 
    964943                  ELSE 
     
    991970         IF( iom_file(kiomid)%nfid > 0 ) THEN 
    992971            SELECT CASE (iom_file(kiomid)%iolib) 
    993             CASE (jpioipsl )   ;   CALL ctl_stop('iom_getatt: only nf90 available') 
    994972            CASE (jpnf90   )   ;   CALL iom_nf90_getatt( kiomid, cdatt, pvar ) 
    995             CASE (jprstdimg)   ;   CALL ctl_stop('iom_getatt: only nf90 available') 
    996             CASE DEFAULT     
    997                CALL ctl_stop( 'iom_g0d_att: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     973            CASE DEFAULT 
     974               CALL ctl_stop( 'iom_g0d_att: accepted IO library is only jpnf90' ) 
    998975            END SELECT 
    999976         ENDIF 
     
    1017994            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 
    1018995            SELECT CASE (iom_file(kiomid)%iolib) 
    1019             CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 
    1020996            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 
    1021             CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar ) 
    1022             CASE DEFAULT      
    1023                CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     997            CASE DEFAULT 
     998               CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    1024999            END SELECT 
    10251000         ENDIF 
     
    10391014            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 
    10401015            SELECT CASE (iom_file(kiomid)%iolib) 
    1041             CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 
    10421016            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 
    1043             CASE (jprstdimg)   ;   IF( kt == kwrite )    CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar ) 
    1044             CASE DEFAULT      
    1045                CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     1017            CASE DEFAULT 
     1018               CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    10461019            END SELECT 
    10471020         ENDIF 
     
    10611034            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 
    10621035            SELECT CASE (iom_file(kiomid)%iolib) 
    1063             CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 
    10641036            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 
    1065             CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar )  
    1066             CASE DEFAULT      
    1067                CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 
     1037            CASE DEFAULT 
     1038               CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    10681039            END SELECT 
    10691040         ENDIF 
     
    10831054            ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 
    10841055            SELECT CASE (iom_file(kiomid)%iolib) 
    1085             CASE (jpioipsl )   ;   CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 
    10861056            CASE (jpnf90   )   ;   CALL iom_nf90_rstput(   kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 
    1087             CASE (jprstdimg)   ;   IF( kt == kwrite )   CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar ) 
    1088             CASE DEFAULT      
    1089                CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' ) 
     1057            CASE DEFAULT 
     1058               CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 
    10901059            END SELECT 
    10911060         ENDIF 
     
    16451614            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
    16461615            DO WHILE ( idx /= 0 )  
    1647                cldate = iom_sdate( fjulday - rdttra(1) / rday ) 
     1616               cldate = iom_sdate( fjulday - rdt / rday ) 
    16481617               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 
    16491618               idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
     
    16521621            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
    16531622            DO WHILE ( idx /= 0 )  
    1654                cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. ) 
     1623               cldate = iom_sdate( fjulday - rdt / rday, ldfull = .TRUE. ) 
    16551624               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 
    16561625               idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
     
    16591628            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
    16601629            DO WHILE ( idx /= 0 )  
    1661                cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
     1630               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
    16621631               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 
    16631632               idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
     
    16661635            idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
    16671636            DO WHILE ( idx /= 0 )  
    1668                cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
     1637               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
    16691638               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 
    16701639               idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
Note: See TracChangeset for help on using the changeset viewer.