Changeset 15415
 Timestamp:
 20211020T14:19:38+02:00 (2 years ago)
 Location:
 branches/UKMO/dev_r5518_obs_oper_update_PS44/NEMOGCM/NEMO/OPA_SRC/OBS
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

branches/UKMO/dev_r5518_obs_oper_update_PS44/NEMOGCM/NEMO/OPA_SRC/OBS/obs_level_search.h90
r7960 r15415 13 13 !! ** Method : Straightforward search 14 14 !! 15 !! ** Action : 15 !! ** Action : Will return level associated with Tpoint below the obs 16 !! depth, except when observation is in the top box will 17 !! return level 2. Also, if obs depth greater than depth 18 !! of last wet Tpoint (kpk1) will return level kpk. 16 19 !! 17 20 !! History : … … 43 46 DO ji = 1, kobs 44 47 kobsk(ji) = 1 45 depk: DO jk = 2, kgrd 46 IF ( pgrddep(jk) > =pobsdep(ji) ) EXIT depk48 depk: DO jk = 2, kgrd1 49 IF ( pgrddep(jk) > pobsdep(ji) ) EXIT depk 47 50 END DO depk 48 51 kobsk(ji) = jk 
branches/UKMO/dev_r5518_obs_oper_update_PS44/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90
r13021 r15415 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) :: 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 maxdepw=zgdepw(1,1,NINT(zbathy(1,1,jobs))+1,jobs) 1269 DO jj = 1, 2 1270 DO ji = 1, 2 1271 IF ( zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) > maxdepw ) THEN 1272 maxdepw = zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) 1273 END IF 1274 END DO 1275 END DO 1276 1263 1277 ! Flag if the observation falls outside the model spatial domain 1264 1278 IF ( ( pobslam(jobs) < 180. ) & … … 1267 1281 & .OR. ( pobsphi(jobs) > 90. ) & 1268 1282 & .OR. ( pobsdep(jobsp) < 0.0 ) & 1269 & .OR. ( pobsdep(jobsp) > gdepw_1d(kpk)) ) THEN1283 & .OR. ( pobsdep(jobsp) >= maxdepw ) ) THEN 1270 1284 kobsqc(jobsp) = IBSET(kobsqc(jobsp),11) 1271 1285 kosdobs = kosdobs + 1 … … 1329 1343 ENDIF 1330 1344 ENDIF 1331 1332 ! Set observation depth equal to that of the first model depth 1333 IF ( pobsdep(jobsp) < MINVAL(zgdept(1:2,1:2,1,jobs) ) ) THEN 1334 pobsdep(jobsp) = MINVAL(zgdept(1:2,1:2,1,jobs)) 1335 ENDIF 1336 1345 1337 1346 #if defined key_bdy 1338 1347 ! Flag if the observation falls close to the boundary rim 
branches/UKMO/dev_r5518_obs_oper_update_PS44/NEMOGCM/NEMO/OPA_SRC/OBS/obsinter_z1d.h90
r13645 r15415 62 62 z1dm = ( pdep(kkco(jdep))  pobsdep(jdep) ) 63 63 z1dp = ( pobsdep(jdep)  pdep(kkco(jdep)1) ) 64 64 65 65 ! If kkco(jdep) is masked then set pobs(jdep) to the lowest value located above bathymetry66 IF ( pobsmask(kkco(jdep)) == 0.0_wp) THEN67 pobs(jdep) = pobsk(kkco(jdep)1)66 ! Where both levels are masked, return a fill value 67 IF ( ( pobsmask(kkco(jdep)1) == 0.0_wp ) .AND. (pobsmask(kkco(jdep)) == 0.0_wp) ) THEN 68 pobs(jdep) = 99999. 68 69 ELSE 70 71 ! Where upper level is masked (e.g., under ice cavity), only use deeper level 72 ! otherwise where ob is at or above upper level model Tpoint, 73 ! use upper model level rather than extrapolate 74 IF ( pobsmask(kkco(jdep)1) == 0.0_wp ) THEN 75 z1dm = 0.0_wp 76 ELSE IF ( pobsdep(jdep) <= pdep(kkco(jdep)1) ) THEN 77 z1dp = 0.0_wp 78 END IF 79 80 ! Where deeper level is masked (e.g., near sea bed), only use upper level 81 ! otherwise where ob is at or below deeper level model Tpoint, 82 ! use deeper model level rather than extrapolate 83 IF ( pobsmask(kkco(jdep)) == 0.0_wp ) THEN 84 z1dp = 0.0_wp 85 ELSE IF ( pobsdep(jdep) >= pdep(kkco(jdep)) ) THEN 86 z1dm = 0.0_wp 87 END IF 88 69 89 zsum = z1dm + z1dp 70 90 71 91 IF ( k1dint == 0 ) THEN 72 92
Note: See TracChangeset
for help on using the changeset viewer.