Changeset 12498 for branches/UKMO/dev_r5518_obs_oper_update_utils335/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90
 Timestamp:
 20200302T12:48:18+01:00 (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/UKMO/dev_r5518_obs_oper_update_utils335/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90
r11461 r12498 16 16 USE par_kind, ONLY : & ! Precision variables 17 17 & wp 18 USE dom_oce ! ocean space and time domain 18 19 USE in_out_manager ! I/O manager 19 20 USE obs_profiles_def ! Definitions for storage arrays for profiles … … 1163 1164 REAL(KIND=wp), DIMENSION(2,2,kprofno) :: & 1164 1165 & zglam, & ! Model longitude at grid points 1165 & zgphi ! Model latitude at grid points 1166 & zgphi, & ! Model latitude at grid points 1167 & zbathy ! Index of deepest wet level at grid points 1166 1168 INTEGER, DIMENSION(2,2,kprofno) :: & 1167 1169 & igrdi, & ! Grid i,j … … 1171 1173 INTEGER :: iig, ijg ! i,j of observation on model grid point. 1172 1174 INTEGER :: jobs, jobsp, jk, ji, jj 1175 REAL(KIND=wp) :: maxdept, maxdepw 1173 1176 1174 1177 ! Get grid point indices … … 1221 1224 CALL obs_int_comm_2d( 2, 2, kprofno, kpi, kpj, igrdi, igrdj, plam, zglam ) 1222 1225 CALL obs_int_comm_2d( 2, 2, kprofno, kpi, kpj, igrdi, igrdj, pphi, zgphi ) 1226 CALL obs_int_comm_2d( 2, 2, kprofno, kpi, kpj, igrdi, igrdj, REAL(mbathy), zbathy ) 1223 1227 ! Need to know the bathy depth for each observation for sco 1224 1228 CALL obs_int_comm_3d( 2, 2, kprofno, kpi, kpj, kpk, igrdi, igrdj, fsdepw(:,:,:), & … … 1261 1265 DO jobsp = kpstart(jobs), kpend(jobs) 1262 1266 1267 ! Calculate max T and W depths of 2x2 grid 1268 maxdept=zgdept(1,1,NINT(zbathy(1,1,jobs)),jobs) 1269 maxdepw=zgdepw(1,1,NINT(zbathy(1,1,jobs))+1,jobs) 1270 DO jj = 1, 2 1271 DO ji = 1, 2 1272 IF ( zgdept(ji,jj,NINT(zbathy(ji,jj,jobs)),jobs) > maxdept ) THEN 1273 maxdept = zgdept(ji,jj,NINT(zbathy(ji,jj,jobs)),jobs) 1274 END IF 1275 IF ( zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) > maxdepw ) THEN 1276 maxdepw = zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) 1277 END IF 1278 END DO 1279 END DO 1280 1263 1281 ! Flag if the observation falls outside the model spatial domain 1264 1282 IF ( ( pobslam(jobs) < 180. ) & … … 1267 1285 & .OR. ( pobsphi(jobs) > 90. ) & 1268 1286 & .OR. ( pobsdep(jobsp) < 0.0 ) & 1269 & .OR. ( pobsdep(jobsp) > gdepw_1d(kpk)) ) THEN1287 & .OR. ( pobsdep(jobsp) >= maxdepw ) ) THEN 1270 1288 kobsqc(jobsp) = IBSET(kobsqc(jobsp),11) 1271 1289 kosdobs = kosdobs + 1 … … 1334 1352 pobsdep(jobsp) = MINVAL(zgdept(1:2,1:2,1,jobs)) 1335 1353 ENDIF 1354 1355 ! Set observation depth equal to that of the last wet Tpoint 1356 IF ( ( pobsdep(jobsp) > maxdept ) .AND. & 1357 & ( pobsdep(jobsp) < maxdepw ) ) THEN 1358 pobsdep(jobsp) = maxdept 1359 END IF 1336 1360 1337 1361 #if defined key_bdy
Note: See TracChangeset
for help on using the changeset viewer.