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 11863 for branches/UKMO/dev_r5518_obs_oper_update_SlaAssim/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90 – NEMO

Ignore:
Timestamp:
2019-11-05T18:22:07+01:00 (4 years ago)
Author:
kingr
Message:

Merged recent changes to dev_r5518_obs_oper_update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_obs_oper_update_SlaAssim/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90

    r11468 r11863  
    4646      &                     kvars, kextr, kstp, ddobsini, ddobsend, & 
    4747      &                     ldvar, ldignmis, ldsatt, & 
    48       &                     ldmod, ldclim, kdailyavtypes ) 
     48      &                     ldmod, ldclim, cdvars, kdailyavtypes ) 
    4949      !!--------------------------------------------------------------------- 
    5050      !! 
     
    8181      REAL(dp), INTENT(IN) :: ddobsini  ! Obs. ini time in YYYYMMDD.HHMMSS 
    8282      REAL(dp), INTENT(IN) :: ddobsend  ! Obs. end time in YYYYMMDD.HHMMSS 
     83      CHARACTER(len=8), DIMENSION(kvars), INTENT(IN) :: cdvars 
    8384      INTEGER, DIMENSION(imaxavtypes), OPTIONAL :: & 
    8485         & kdailyavtypes                ! Types of daily average observations 
     
    8788      CHARACTER(LEN=15), PARAMETER :: cpname='obs_rea_prof' 
    8889      CHARACTER(len=8) :: clrefdate 
    89       CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: clvars 
     90      CHARACTER(len=8), DIMENSION(:), ALLOCATABLE :: clvarsin 
    9091      INTEGER :: jvar 
    9192      INTEGER :: ji 
     
    222223 
    223224            IF ( jj == 1 ) THEN 
    224                ALLOCATE( clvars( inpfiles(jj)%nvar ) ) 
     225               ALLOCATE( clvarsin( inpfiles(jj)%nvar ) ) 
    225226               DO ji = 1, inpfiles(jj)%nvar 
    226                  clvars(ji) = inpfiles(jj)%cname(ji) 
     227                 clvarsin(ji) = inpfiles(jj)%cname(ji) 
     228                 IF ( clvarsin(ji) /= cdvars(ji) ) THEN 
     229                    CALL ctl_stop( 'Feedback file variables do not match', & 
     230                        &           ' expected variable names for this type' ) 
     231                 ENDIF 
    227232               END DO 
    228233            ELSE 
    229234               DO ji = 1, inpfiles(jj)%nvar 
    230                   IF ( inpfiles(jj)%cname(ji) /= clvars(ji) ) THEN 
     235                  IF ( inpfiles(jj)%cname(ji) /= clvarsin(ji) ) THEN 
    231236                     CALL ctl_stop( 'Feedback file variables not consistent', & 
    232237                        &           ' with previous files for this type' ) 
     
    507512      profdata%nprof     = 0 
    508513      profdata%nvprot(:) = 0 
    509       profdata%cvars(:)  = clvars(:) 
     514      profdata%cvars(:)  = clvarsin(:) 
    510515      iprof = 0 
    511516 
     
    809814      ! Deallocate temporary data 
    810815      !----------------------------------------------------------------------- 
    811       DEALLOCATE( ifileidx, iprofidx, zdat, clvars ) 
     816      DEALLOCATE( ifileidx, iprofidx, zdat, clvarsin ) 
    812817 
    813818      !----------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.