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 5581 for branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90 – NEMO

Ignore:
Timestamp:
2015-07-10T13:28:53+02:00 (9 years ago)
Author:
timgraham
Message:

Merged head of trunk into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90

    r4292 r5581  
    128128         & zphi, & 
    129129         & zlam 
    130       REAL(dp), DIMENSION(:), ALLOCATABLE :: & 
     130      real(wp), DIMENSION(:), ALLOCATABLE :: & 
    131131         & zdat 
    132132      LOGICAL :: llvalprof 
    133133      TYPE(obfbdata), POINTER, DIMENSION(:) :: & 
    134134         & inpfiles 
    135       REAL(dp), DIMENSION(knumfiles) :: & 
     135      real(wp), DIMENSION(knumfiles) :: & 
    136136         & djulini, & 
    137137         & djulend 
     
    143143      INTEGER :: is3dt 
    144144      INTEGER :: ip3dt 
     145      INTEGER :: ios 
     146      INTEGER :: ioserrcount 
    145147      INTEGER, DIMENSION(kvars) :: & 
    146148         & iv3dt 
     
    280282               &           krefdate = irefdate(jj) ) 
    281283 
     284            ioserrcount=0 
    282285            IF ( ldavtimset ) THEN 
    283286               DO ji = 1, inpfiles(jj)%nobs 
     
    287290                  !  to be the  end of the day 
    288291                  ! 
    289                   READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     292                  READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 900 ) itype 
     293900               IF ( ios /= 0 ) THEN 
     294                     itype = 0         ! Set type to zero if there is a problem in the string conversion 
     295                  ENDIF 
    290296                  IF ( ANY (idailyavtypes == itype ) ) THEN 
    291297                     inpfiles(jj)%ptim(ji) = & 
     
    468474      itypsmpp(:) = 0 
    469475       
    470        
     476      ioserrcount = 0       
    471477      DO jk = 1, iproftot 
    472478          
     
    552558                
    553559               ! Instrument type 
    554                READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     560               READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 901 ) itype 
     561901            IF ( ios /= 0 ) THEN 
     562                  IF (ioserrcount == 0) CALL ctl_warn ( 'Problem converting an instrument type to integer. Setting type to zero' ) 
     563                  ioserrcount = ioserrcount + 1 
     564                  itype = 0 
     565               ENDIF 
     566                
    555567               profdata%ntyp(iprof) = itype 
    556568                
Note: See TracChangeset for help on using the changeset viewer.