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 15226 for NEMO/branches/UKMO/NEMO_4.0.4_generic_obs – NEMO

Ignore:
Timestamp:
2021-09-02T19:25:23+02:00 (3 years ago)
Author:
dford
Message:

Deal with variables not initialised on step zero.

Location:
NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/diaobs.F90

    r15225 r15226  
    339339      INTEGER :: jvar              ! Variable number 
    340340      INTEGER :: jgroup 
    341       INTEGER :: ji, jj            ! Loop counters 
     341      INTEGER :: ji, jj, jobs      ! Loop counters 
     342      LOGICAL :: lstp0             ! Flag special treatment on zeroth time step 
    342343      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: & 
    343344         & zprofvar                ! Model values for variables in a prof ob 
     
    406407               DO jvar = 1, sobsgroups(jgroup)%nobstypes 
    407408 
     409                  lstp0 = .FALSE. 
    408410                  SELECT CASE ( TRIM(sobsgroups(jgroup)%cobstypes(jvar)) ) 
    409411                  CASE('SST') 
     
    419421                  CASE('ICECONC') 
    420422                     IF ( kstp == 0 ) THEN 
    421                         IF ( lwp .AND. sobsgroups(jgroup)%ssurfdataqc%nsstpmpp(1) > 0 ) THEN 
    422                            CALL ctl_warn( 'Sea-ice not initialised on zeroth '// & 
    423                               &           'time-step but some obs are valid then.' ) 
    424                            WRITE(numout,*)sobsgroups(jgroup)%ssurfdataqc%nsstpmpp(1), & 
    425                               &           ' sea-ice obs will be missed' 
    426                         ENDIF 
    427 !!! IS THIS ROBUST TO MULTIPLE TYPES IN A GROUP??? 
    428                         sobsgroups(jgroup)%ssurfdataqc%nsurfup = sobsgroups(jgroup)%ssurfdataqc%nsurfup + & 
    429                            &                                     sobsgroups(jgroup)%ssurfdataqc%nsstp(1) 
    430                         CYCLE 
     423                        lstp0 = .TRUE. 
    431424                     ELSE 
    432425#if defined key_cice || defined key_si3 
     
    439432                  END SELECT 
    440433 
    441                   CALL obs_surf_opt( sobsgroups(jgroup)%ssurfdataqc,       & 
    442                      &               kstp, jpi, jpj,                       & 
    443                      &               nit000, idaystp,                      & 
    444                      &               jvar, zsurfvar,                       & 
    445                      &               sobsgroups(jgroup)%rmask(:,:,1,jvar), & 
    446                      &               sobsgroups(jgroup)%n2dint,            & 
    447                      &               sobsgroups(jgroup)%lnight,            & 
    448                      &               sobsgroups(jgroup)%ravglamscl,        & 
    449                      &               sobsgroups(jgroup)%ravgphiscl,        & 
    450                      &               sobsgroups(jgroup)%lfp_indegs,        & 
    451                      &               kssh=sobsgroups(jgroup)%nadd_ssh,     & 
    452                      &               kmdt=sobsgroups(jgroup)%next_mdt ) 
     434                  IF ( lstp0 ) THEN 
     435                     IF ( sobsgroups(jgroup)%ssurfdataqc%nsstpmpp(1) > 0 ) THEN 
     436                        DO jobs = sobsgroups(jgroup)%ssurfdataqc%nsurfup + 1, & 
     437                           &      sobsgroups(jgroup)%ssurfdataqc%nsurfup + sobsgroups(jgroup)%ssurfdataqc%nsstp(1) 
     438                           sobsgroups(jgroup)%ssurfdata%nqc(jobs) = IBSET(sobsgroups(jgroup)%ssurfdata%nqc(jobs),13) 
     439                        END DO 
     440                        IF ( lwp ) THEN 
     441                           CALL ctl_warn( TRIM(sobsgroups(jgroup)%cobstypes(jvar))// & 
     442                              &           ' not initialised on zeroth '           // & 
     443                              &           'time-step but some obs are valid then.' ) 
     444                           WRITE(numout,*)sobsgroups(jgroup)%ssurfdataqc%nsstpmpp(1), & 
     445                              &           TRIM(sobsgroups(jgroup)%cobstypes(jvar)),   & 
     446                              &           'observations will be flagged as bad' 
     447                        ENDIF 
     448                     ENDIF 
     449                     IF ( jvar == sobsgroups(jgroup)%ssurfdataqc%nvar ) THEN 
     450                        sobsgroups(jgroup)%ssurfdataqc%nsurfup = sobsgroups(jgroup)%ssurfdataqc%nsurfup + & 
     451                           &                                     sobsgroups(jgroup)%ssurfdataqc%nsstp(1) 
     452                     ENDIF 
     453                  ELSE 
     454                     CALL obs_surf_opt( sobsgroups(jgroup)%ssurfdataqc,       & 
     455                        &               kstp, jpi, jpj,                       & 
     456                        &               nit000, idaystp,                      & 
     457                        &               jvar, zsurfvar,                       & 
     458                        &               sobsgroups(jgroup)%rmask(:,:,1,jvar), & 
     459                        &               sobsgroups(jgroup)%n2dint,            & 
     460                        &               sobsgroups(jgroup)%lnight,            & 
     461                        &               sobsgroups(jgroup)%ravglamscl,        & 
     462                        &               sobsgroups(jgroup)%ravgphiscl,        & 
     463                        &               sobsgroups(jgroup)%lfp_indegs,        & 
     464                        &               kssh=sobsgroups(jgroup)%nadd_ssh,     & 
     465                        &               kmdt=sobsgroups(jgroup)%next_mdt ) 
     466                  ENDIF 
    453467 
    454468               END DO 
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_oper.F90

    r15225 r15226  
    795795      ENDIF 
    796796      ! 
    797       surfdataqc%nsurfup = surfdataqc%nsurfup + isurf 
     797      IF ( kvar == surfdataqc%nvar ) THEN 
     798         surfdataqc%nsurfup = surfdataqc%nsurfup + isurf 
     799      ENDIF 
    798800      ! 
    799801   END SUBROUTINE obs_surf_opt 
Note: See TracChangeset for help on using the changeset viewer.