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

Ignore:
Timestamp:
2021-09-24T12:33:16+02:00 (3 years ago)
Author:
dford
Message:

Some bug fixes.

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

Legend:

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

    r15246 r15285  
    319319                  CALL obs_rea_mdt( sobsgroups(jgroup)%ssurfdataqc, & 
    320320                     &              sobsgroups(jgroup)%n2dint,      & 
    321                      &              sobsgroups(jgroup)%next_mdt ) 
     321                     &              sobsgroups(jgroup)%next_mdt,    & 
     322                     &              sobsgroups(jgroup)%nmsshc,      & 
     323                     &              sobsgroups(jgroup)%rmdtcorr,    & 
     324                     &              sobsgroups(jgroup)%rmdtcutoff ) 
    322325                  IF( sobsgroups(jgroup)%laltbias ) THEN 
    323326                     !CALL obs_rea_altbias( sobsgroups(jgroup)%ssurfdataqc, & 
     
    797800 
    798801               IF (sobsgroups(jgroup)%lfbd) THEN 
    799                   ! Input observations were freeboard, but we're putputting ice thickness 
     802                  ! Input observations were freeboard, but we're outputting ice thickness 
    800803                  DO jvar = 1, sobsgroups(jgroup)%nobstypes 
    801804                     IF ( sobsgroups(jgroup)%cobstypes(jvar) == cobsname_fbd ) THEN 
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_group_def.F90

    r15246 r15285  
    461461            WRITE(numout,*) '          Settings only for temperature/salinity data' 
    462462            WRITE(numout,*) '             Logical switch for outputting climatology        ln_output_clim = ', sdobsgroup%loutput_clim 
     463 
     464            IF ( (       sdobsgroup%lsurf .AND.       sdobsgroup%lprof ) .OR. & 
     465               & ( .NOT. sdobsgroup%lsurf .AND. .NOT. sdobsgroup%lprof ) ) THEN 
     466               CALL ctl_stop( ' One and only one of ln_surf or ln_prof must be set per observation group' ) 
     467            ENDIF 
     468 
     469            IF ( sdobsgroup%nobstypes == 0 ) THEN 
     470               CALL ctl_stop( ' No observation types specified for this observation group' ) 
     471            ENDIF 
     472 
     473            IF ( sdobsgroup%nobsfiles == 0 ) THEN 
     474               CALL ctl_stop( ' No observation files specified for this observation group' ) 
     475            ENDIF 
     476 
     477            IF ( (sdobsgroup%lobsbias) .AND. (sdobsgroup%nobsbiasfiles == 0) ) THEN 
     478               CALL ctl_stop( ' No bias files specified for this observation group' ) 
     479            ENDIF 
     480 
     481            IF ( (sdobsgroup%n2dint < 0) .OR. (sdobsgroup%n2dint > 6) ) THEN 
     482               CALL ctl_stop( ' Invalid horizontal interpolation type' ) 
     483            ENDIF 
     484 
     485            IF( (sdobsgroup%n1dint < 0) .OR. (sdobsgroup%n1dint > 1) ) THEN 
     486               CALL ctl_stop(' Invalid vertical interpolation type') 
     487            ENDIF 
     488 
     489            IF ( (sdobsgroup%n2dint > 4) .AND. (sdobsgroup%n2dint <= 6) ) THEN 
     490               IF ( sdobsgroup%ravglamscl <= 0._wp ) THEN 
     491                  CALL ctl_stop( ' Incorrect value set for averaging footprint scale rn_avglamscl' ) 
     492               ENDIF 
     493               IF ( sdobsgroup%ravgphiscl <= 0._wp ) THEN 
     494                  CALL ctl_stop( ' Incorrect value set for averaging footprint scale rn_avgphiscl' ) 
     495               ENDIF 
     496            ENDIF 
     497 
     498            ! Various other checks of combined options 
     499 
    463500         ENDIF 
    464501 
    465          IF ( (       sdobsgroup%lsurf .AND.       sdobsgroup%lprof ) .OR. & 
    466             & ( .NOT. sdobsgroup%lsurf .AND. .NOT. sdobsgroup%lprof ) ) THEN 
    467             CALL ctl_stop( ' One and only one of ln_surf or ln_prof must be set per observation group' ) 
    468          ENDIF 
    469  
    470          IF ( sdobsgroup%nobstypes == 0 ) THEN 
    471             CALL ctl_stop( ' No observation types specified for this observation group' ) 
    472          ENDIF 
    473  
    474          IF ( sdobsgroup%nobsfiles == 0 ) THEN 
    475             CALL ctl_stop( ' No observation files specified for this observation group' ) 
    476          ENDIF 
    477  
    478          IF ( (sdobsgroup%lobsbias) .AND. (sdobsgroup%nobsbiasfiles == 0) ) THEN 
    479             CALL ctl_stop( ' No bias files specified for this observation group' ) 
    480          ENDIF 
    481  
    482          IF ( (sdobsgroup%n2dint < 0) .OR. (sdobsgroup%n2dint > 6) ) THEN 
    483             CALL ctl_stop( ' Invalid horizontal interpolation type' ) 
    484          ENDIF 
    485  
    486          IF( (sdobsgroup%n1dint < 0) .OR. (sdobsgroup%n1dint > 1) ) THEN 
    487             CALL ctl_stop(' Invalid vertical interpolation type') 
    488          ENDIF 
    489  
    490          IF ( (sdobsgroup%n2dint > 4) .AND. (sdobsgroup%n2dint <= 6) ) THEN 
    491             IF ( sdobsgroup%ravglamscl <= 0._wp ) THEN 
    492                CALL ctl_stop( ' Incorrect value set for averaging footprint scale rn_avglamscl' ) 
    493             ENDIF 
    494             IF ( sdobsgroup%ravgphiscl <= 0._wp ) THEN 
    495                CALL ctl_stop( ' Incorrect value set for averaging footprint scale rn_avgphiscl' ) 
    496             ENDIF 
    497          ENDIF 
    498           
    499          ! Various other checks of combined options 
    500  
    501502      ENDIF 
    502503 
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_oper.F90

    r15248 r15285  
    925925#if defined key_si3 || defined key_cice 
    926926            ELSE IF ( TRIM(surfdataqc%cvars(kvar)) == cobsname_fbd .AND. PRESENT(kfbd) .AND. PRESENT(ksnow) ) THEN 
     927               surfdataqc%rmod(jobs,kvar) = zext(1) 
    927928               ! Convert radar freeboard to true freeboard 
    928929               ! (add 1/4 snow depth; 1/4 based on ratio of speed of light in vacuum 
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_readmdt.F90

    r15187 r15285  
    3131    
    3232   PUBLIC   obs_rea_mdt     ! called by dia_obs_init 
    33    PUBLIC   obs_offset_mdt  ! called by obs_rea_mdt 
    34  
    35    INTEGER , PUBLIC :: nn_msshc    = 1         ! MDT correction scheme 
    36    REAL(wp), PUBLIC :: rn_mdtcorr   = 1.61_wp  ! User specified MDT correction 
    37    REAL(wp), PUBLIC :: rn_mdtcutoff = 65.0_wp  ! MDT cutoff for computed correction 
    3833 
    3934   !!---------------------------------------------------------------------- 
     
    4439CONTAINS 
    4540 
    46    SUBROUTINE obs_rea_mdt( sladata, k2dint, kmdt ) 
     41   SUBROUTINE obs_rea_mdt( sladata, k2dint, kmdt, nn_msshc, rn_mdtcorr, & 
     42                           rn_mdtcutoff ) 
    4743      !!--------------------------------------------------------------------- 
    4844      !! 
     
    5753      USE iom 
    5854      ! 
    59       TYPE(obs_surf), INTENT(inout) ::   sladata   ! SLA data 
    60       INTEGER       , INTENT(in)    ::   k2dint    ! ? 
    61       INTEGER       , INTENT(in)    ::   kmdt      ! Index of MDT extra var 
     55      TYPE(obs_surf), INTENT(inout) :: sladata      ! SLA data 
     56      INTEGER       , INTENT(in)    :: k2dint       ! Interpolation type 
     57      INTEGER       , INTENT(in)    :: kmdt         ! Index of MDT extra var 
     58      INTEGER       , INTENT(in)    :: nn_msshc     ! MDT correction scheme 
     59      REAL(wp)      , INTENT(in)    :: rn_mdtcorr   ! User specified MDT correction 
     60      REAL(wp)      , INTENT(in)    :: rn_mdtcutoff ! MDT cutoff for computed correction 
    6261      ! 
    6362      CHARACTER(LEN=12), PARAMETER ::   cpname  = 'obs_rea_mdt' 
     
    106105 
    107106      ! Remove the offset between the MDT used with the sla and the model MDT 
    108       IF( nn_msshc == 1 .OR. nn_msshc == 2 ) & 
    109          & CALL obs_offset_mdt( jpi, jpj, z_mdt, zfill ) 
     107      IF( nn_msshc == 1 .OR. nn_msshc == 2 ) THEN 
     108         CALL obs_offset_mdt( jpi, jpj, z_mdt, zfill, nn_msshc, & 
     109            &                 rn_mdtcorr, rn_mdtcutoff ) 
     110      ENDIF 
    110111 
    111112      ! Interpolate the MDT already on the model grid at the observation point 
     
    170171 
    171172 
    172    SUBROUTINE obs_offset_mdt( kpi, kpj, mdt, zfill ) 
     173   SUBROUTINE obs_offset_mdt( kpi, kpj, mdt, zfill, nn_msshc, rn_mdtcorr, & 
     174                              rn_mdtcutoff ) 
    173175      !!--------------------------------------------------------------------- 
    174176      !! 
     
    184186      !!---------------------------------------------------------------------- 
    185187      INTEGER, INTENT(IN) ::  kpi, kpj 
    186       REAL(wp), DIMENSION(kpi,kpj), INTENT(INOUT) ::   mdt     ! MDT used on the model grid 
    187       REAL(wp)                    , INTENT(IN   ) ::   zfill  
     188      REAL(wp), DIMENSION(kpi,kpj), INTENT(INOUT) :: mdt          ! MDT used on the model grid 
     189      REAL(wp)                    , INTENT(IN   ) :: zfill        ! Fill value 
     190      INTEGER                     , INTENT(IN   ) :: nn_msshc     ! MDT correction scheme 
     191      REAL(wp)                    , INTENT(IN   ) :: rn_mdtcorr   ! User specified MDT correction 
     192      REAL(wp)                    , INTENT(IN   ) :: rn_mdtcutoff ! MDT cutoff for computed correction 
    188193      !  
    189194      INTEGER  :: ji, jj 
  • NEMO/branches/UKMO/NEMO_4.0.4_generic_obs/src/OCE/OBS/obs_write.F90

    r15225 r15285  
    532532 
    533533         IF (lwp) THEN 
    534             WRITE(numout,*) 'Type: ',fbdata%cname(jvar),'  Total number of good observations: ',inumgoodobsmpp  
    535             WRITE(numout,*) 'Overall mean obs minus model of the good observations: ',zsumx/inumgoodobsmpp 
    536             WRITE(numout,*) 'Overall RMS obs minus model of the good observations: ',sqrt( zsumx2/inumgoodobsmpp ) 
     534            WRITE(numout,*) 'Type: ',fbdata%cname(jvar),'  Total number of good observations: ',inumgoodobsmpp 
     535            IF ( inumgoodobsmpp > 0 ) THEN 
     536               WRITE(numout,*) 'Overall mean obs minus model of the good observations: ',zsumx/inumgoodobsmpp 
     537               WRITE(numout,*) 'Overall RMS obs minus model of the good observations: ',sqrt( zsumx2/inumgoodobsmpp ) 
     538            ENDIF 
    537539            WRITE(numout,*) '' 
    538540         ENDIF 
Note: See TracChangeset for help on using the changeset viewer.