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 15356 for branches/UKMO/dev_r5518_obs_oper_update_DepthBug/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90 – NEMO

Ignore:
Timestamp:
2021-10-12T15:52:10+02:00 (2 years ago)
Author:
kingr
Message:

Chnages to fix test in obs_level_search to ensure index of level below obdepth is returned, and to obs_prep to remove code which altered obdepths, and to vertical interpolation routine to deal with obs in top half of top box or bottom half of bottom box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_obs_oper_update_DepthBug/NEMOGCM/NEMO/OPA_SRC/OBS/obs_prep.F90

    r15255 r15356  
    12241224      INTEGER :: iig, ijg           ! i,j of observation on model grid point. 
    12251225      INTEGER :: jobs, jobsp, jk, ji, jj 
    1226       REAL(KIND=wp) :: maxdept, maxdepw 
     1226      REAL(KIND=wp) :: maxdepw 
    12271227 
    12281228      ! Get grid point indices 
     
    13171317 
    13181318            ! Calculate max T and W depths of 2x2 grid 
    1319             maxdept=zgdept(1,1,NINT(zbathy(1,1,jobs)),jobs) 
    13201319            maxdepw=zgdepw(1,1,NINT(zbathy(1,1,jobs))+1,jobs) 
    13211320            DO jj = 1, 2 
    13221321               DO ji = 1, 2 
    1323                   IF ( zgdept(ji,jj,NINT(zbathy(ji,jj,jobs)),jobs) > maxdept ) THEN 
    1324                      maxdept = zgdept(ji,jj,NINT(zbathy(ji,jj,jobs)),jobs) 
    1325                   END IF 
    13261322                  IF ( zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) > maxdepw ) THEN 
    13271323                     maxdepw = zgdepw(ji,jj,NINT(zbathy(ji,jj,jobs))+1,jobs) 
     
    13981394               ENDIF 
    13991395            ENDIF 
    1400              
    1401             ! Set observation depth equal to that of the first model depth 
    1402             IF ( pobsdep(jobsp) < MINVAL(zgdept(1:2,1:2,1,jobs) ) ) THEN 
    1403                pobsdep(jobsp) = MINVAL(zgdept(1:2,1:2,1,jobs)) 
    1404             ENDIF 
    1405  
    1406             ! Set observation depth equal to that of the last wet T-point 
    1407             IF ( ( pobsdep(jobsp) > maxdept ) .AND. & 
    1408                & ( pobsdep(jobsp) < maxdepw ) ) THEN 
    1409                pobsdep(jobsp) = maxdept 
    1410             END IF 
    1411              
     1396            
    14121397#if defined key_bdy 
    14131398            ! Flag if the observation falls close to the boundary rim 
Note: See TracChangeset for help on using the changeset viewer.