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 4818 – NEMO

Changeset 4818


Ignore:
Timestamp:
2014-10-16T18:01:52+02:00 (10 years ago)
Author:
djlea
Message:

Apply some bug fixes. Have the OBS code deal nicely with observations with a non-integer instrument type. Make sure the namelist is identical for the two OBS sette tests.

Location:
branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_grid.F90

    r2715 r4818  
    412412         ENDIF 
    413413 
    414          IF (MAXVAL(ixpos(ipx1:ipx,ipy1:ipy)) == -1) CYCLE! cycle if no lookup points found 
     414         IF (.NOT. llfourflag) THEN 
     415            IF (MAXVAL(ixpos(ipx1:ipx,ipy1:ipy)) == -1) CYCLE! cycle if no lookup points found 
     416         ENDIF 
    415417          
    416418         jimin = 0 
     
    996998                        df = ABS( iypos(ji+1,jj) - iypos(ji,jj) ) 
    997999                        tmpy1 = df 
    998                         IF ( df < limxdiff ) numy1 = numy1 + 1 
     1000                        IF ( df < limydiff ) numy1 = numy1 + 1 
    9991001                        IF ( df < histsize ) histy1(df+1) = histy1(df+1) + 1 
    10001002                     ENDIF 
     
    10021004                        df = ABS( iypos(ji,jj+1) - iypos(ji,jj) ) 
    10031005                        tmpy2 = df 
    1004                         IF ( df < limxdiff ) numy2 = numy2+1 
     1006                        IF ( df < limydiff ) numy2 = numy2+1 
    10051007                        IF ( df < histsize ) histy2(df+1) = histy2(df+1)+1 
    10061008                     ENDIF 
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90

    r4292 r4818  
    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                
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_seaice.F90

    r3651 r4818  
    120120      INTEGER :: iobs 
    121121      INTEGER :: iobstot 
     122      INTEGER :: ios 
     123      INTEGER :: ioserrcount 
    122124      CHARACTER(len=8) :: cl_refdate 
    123125    
     
    335337      ityp   (:) = 0 
    336338      itypmpp(:) = 0 
    337        
     339 
     340      ioserrcount=0       
     341 
    338342      DO jk = 1, iobstot 
    339343          
     
    382386                
    383387               ! Instrument type 
    384                READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     388               READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 901 ) itype 
     389901            IF ( ios /= 0 ) THEN 
     390                  IF (ioserrcount == 0) CALL ctl_warn ( 'Problem converting an instrument type to integer. Setting type to zero' )  
     391                  ioserrcount = ioserrcount + 1 
     392                  itype = 0 
     393               ENDIF 
    385394               seaicedata%ntyp(iobs) = itype 
    386395               IF ( itype < iseaicemaxtype + 1 ) THEN 
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sla.F90

    r3651 r4818  
    125125      INTEGER :: iobs 
    126126      INTEGER :: iobstot 
     127      INTEGER :: ios 
     128      INTEGER :: ioserrcount 
    127129      CHARACTER(len=8) :: cl_refdate 
    128130    
     
    400402      ityp   (:) = 0 
    401403      itypmpp(:) = 0 
     404 
     405      ioserrcount = 0 
    402406       
    403407      DO jk = 1, iobstot 
     
    451455                
    452456               ! Instrument type 
    453                READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     457               READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 901 ) itype 
     458901            IF ( ios /= 0 ) THEN 
     459                  IF (ioserrcount == 0) CALL ctl_warn ( 'Problem converting an instrument type to integer. Setting type to zero' )  
     460                  ioserrcount = ioserrcount + 1 
     461                  itype = 0 
     462               ENDIF 
    454463               sladata%ntyp(iobs) = itype 
    455464               ityp(itype+1) = ityp(itype+1) + 1 
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sst.F90

    r3651 r4818  
    120120      INTEGER :: iobs 
    121121      INTEGER :: iobstot 
     122      INTEGER :: ios 
     123      INTEGER :: ioserrcount 
    122124      CHARACTER(len=8) :: cl_refdate 
    123125    
     
    335337      itypmpp(:) = 0 
    336338       
     339      ioserrcount = 0 
     340       
    337341      DO jk = 1, iobstot 
    338342          
     
    381385                
    382386               ! Instrument type 
    383                READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     387               READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 901 ) itype 
     388901            IF ( ios /= 0 ) THEN 
     389                  IF (ioserrcount == 0) CALL ctl_warn ( 'Problem converting an instrument type to integer. Setting type to zero' )  
     390                  ioserrcount = ioserrcount + 1 
     391                  itype = 0 
     392               ENDIF 
    384393               sstdata%ntyp(iobs) = itype 
    385394               IF ( itype < isstmaxtype + 1 ) THEN 
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_vel.F90

    r4292 r4818  
    130130      INTEGER :: iproftot 
    131131      INTEGER :: iuv3dt 
     132      INTEGER :: ios 
     133      INTEGER :: ioserrcount 
    132134      INTEGER, DIMENSION(kvars) :: iv3dt 
    133135      CHARACTER(len=8) :: cl_refdate 
     
    459461                
    460462               ! Instrument type 
    461                READ( inpfiles(jj)%cdtyp(ji), '(I4)' ) itype 
     463               READ( inpfiles(jj)%cdtyp(ji), '(I4)', IOSTAT = ios, ERR = 901 ) itype 
     464901            IF ( ios /= 0 ) THEN 
     465                  IF (ioserrcount == 0) CALL ctl_warn ( 'Problem converting an instrument type to integer. Setting type to zero' )  
     466                  ioserrcount = ioserrcount + 1 
     467                  itype = 0 
     468               ENDIF 
    462469               profdata%ntyp(iprof) = itype 
    463470                
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90

    r4781 r4818  
    945945 
    946946      !! * Arguments 
    947       TYPE(obfbdata) :: fbdata      ! DJL correct for argument? 
     947      TYPE(obfbdata) :: fbdata 
    948948 
    949949      !! * Local declarations 
  • branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/sette.sh

    r4799 r4818  
    922922    set_namelist namelist_cfg nn_it000 1 
    923923    set_namelist namelist_cfg nn_itend 75 
    924     set_namelist namelist_cfg ln_clobber .true. 
    925     set_namelist namelist_cfg nn_fwb 0 
     924    set_namelist namelist_cfg nn_fwb 0 
     925    set_namelist namelist_cfg ln_ctl .false. 
     926    set_namelist namelist_cfg ln_clobber .true. 
    926927    set_namelist namelist_cfg jpni 2 
    927928    set_namelist namelist_cfg jpnj 8 
Note: See TracChangeset for help on using the changeset viewer.