- Timestamp:
- 2022-04-25T17:15:21+02:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_FOAM_package/src/OCE/OBS/obs_readmdt.F90
r14075 r15799 31 31 32 32 PUBLIC obs_rea_mdt ! called by dia_obs_init 33 PUBLIC obs_offset_mdt ! called by obs_rea_mdt34 35 INTEGER , PUBLIC :: nn_msshc = 1 ! MDT correction scheme36 REAL(wp), PUBLIC :: rn_mdtcorr = 1.61_wp ! User specified MDT correction37 REAL(wp), PUBLIC :: rn_mdtcutoff = 65.0_wp ! MDT cutoff for computed correction38 33 39 34 !!---------------------------------------------------------------------- … … 44 39 CONTAINS 45 40 46 SUBROUTINE obs_rea_mdt( sladata, k2dint ) 41 SUBROUTINE obs_rea_mdt( sladata, k2dint, kmdt, nn_msshc, rn_mdtcorr, & 42 rn_mdtcutoff ) 47 43 !!--------------------------------------------------------------------- 48 44 !! … … 57 53 USE iom 58 54 ! 59 TYPE(obs_surf), INTENT(inout) :: sladata ! SLA data 60 INTEGER , INTENT(in) :: k2dint ! ? 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 61 61 ! 62 62 CHARACTER(LEN=12), PARAMETER :: cpname = 'obs_rea_mdt' … … 105 105 106 106 ! Remove the offset between the MDT used with the sla and the model MDT 107 IF( nn_msshc == 1 .OR. nn_msshc == 2 ) & 108 & CALL obs_offset_mdt( jpi, jpj, z_mdt, zfill ) 109 110 ! Intepolate the MDT already on the model grid at the observation point 111 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 111 112 ! Interpolate the MDT already on the model grid at the observation point 113 112 114 ALLOCATE( & 113 115 & igrdi(2,2,sladata%nsurf), & … … 118 120 & zmdtl(2,2,sladata%nsurf) & 119 121 & ) 120 122 121 123 DO jobs = 1, sladata%nsurf 122 124 … … 147 149 148 150 CALL obs_int_h2d( 1, 1, zweig, zmdtl(:,:,jobs), zext ) 149 150 sladata%rext(jobs, 2) = zext(1)151 152 sladata%rext(jobs,kmdt) = zext(1) 151 153 152 154 ! mark any masked data with a QC flag 153 155 IF( zobsmask(1) == 0 ) sladata%nqc(jobs) = IBSET(sladata%nqc(jobs),15) 154 156 155 156 157 END DO 158 157 159 DEALLOCATE( & 158 160 & igrdi, & … … 169 171 170 172 171 SUBROUTINE obs_offset_mdt( kpi, kpj, mdt, zfill ) 173 SUBROUTINE obs_offset_mdt( kpi, kpj, mdt, zfill, nn_msshc, rn_mdtcorr, & 174 rn_mdtcutoff ) 172 175 !!--------------------------------------------------------------------- 173 176 !! … … 183 186 !!---------------------------------------------------------------------- 184 187 INTEGER, INTENT(IN) :: kpi, kpj 185 REAL(wp), DIMENSION(kpi,kpj), INTENT(INOUT) :: mdt ! MDT used on the model grid 186 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 187 193 ! 188 194 INTEGER :: ji, jj … … 246 252 WRITE(numout,*) ' zcorr = ', zcorr 247 253 WRITE(numout,*) ' nn_msshc = ', nn_msshc 254 255 IF ( nn_msshc == 0 ) WRITE(numout,*) ' MSSH correction is not applied' 256 IF ( nn_msshc == 1 ) WRITE(numout,*) ' MSSH correction is applied' 257 IF ( nn_msshc == 2 ) WRITE(numout,*) ' User defined MSSH correction' 248 258 ENDIF 249 250 IF ( nn_msshc == 0 ) WRITE(numout,*) ' MSSH correction is not applied'251 IF ( nn_msshc == 1 ) WRITE(numout,*) ' MSSH correction is applied'252 IF ( nn_msshc == 2 ) WRITE(numout,*) ' User defined MSSH correction'253 259 254 260 !
Note: See TracChangeset
for help on using the changeset viewer.