Opened 15 years ago

Closed 15 years ago

#240 closed upgrade (Done)

Updated 4DVar observation operator

Reported by: arango Owned by: arango
Priority: major Milestone: Adjoint Based Algorithms
Component: Adjoint Version: 3.2
Keywords: Cc:

Description

Changed the 4DVar observation operator extract_obs.F and ad_extract_obs.F to check viable observations in terms of the fractional coordinates lower and upper bounds real values (rXmin, rXmax, rYmin, rYmax, and similar values for u- and v-observations) instead of the integer values. In distributed-memory, these bounds are a function of the tile partition. The strategy here is to add a small value (epsilon=1E-8) to the eastern and northern boundary values of Xmax and Ymax so observations at such boundaries locations are processed. This is needed because the .lt. operator in the following conditional in the above routines:

      IF (...
     &    ((Xmin.le.Xobs(iobs)).and.(Xobs(iobs).lt.Xmax)).and.          &
     &    ((Ymin.le.Yobs(iobs)).and.(Yobs(iobs).lt.Ymax))) THEN

In distributed-memory, a unity value is added to rXmax and rYmax (and others) to all tiles except those next to the eastern and northern boundaries, so observations are processed and not excluded between tile boundaries.

All the observations are assumed to be in fractional coordinates with respect to the RHO-points. The outside world locations is at RHO-points since the C-grid locations is a numerical abstraction. This implies that the fractional X-coordinate for u-type observations and the fractional Y-coordinates for v-type observations need to be shifted by +0.5, as follows:

   M      r..u..r..u..r..u..r..u..r..u..r..u..r..u..r..u..r..u..r
          :                                                     :
   Mm+.5  v  p++v++p++v++p++v++p++v++p++v++p++v++p++v++p++v++p  v
          :  +     |     |     |     |     |     |     |     +  :
   Mm     r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r
          :  +     |     |     |     |     |     |     |     +  :
   Mm-.5  v  p--v--p--v--p--v--p--v--p--v--p--v--p--v--p--v--p  v
          :  +     |     |     |     |     |     |     |     +  :
          r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r
          :  +     |     |     |     |     |     |     |     +  :
          v  p--v--p--v--p--v--p--v--p--v--p--v--p--v--p--v--p  v
          :  +     |     |     |     |     |     |     |     +  :
          r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r
          :  +     |     |     |     |     |     |     |     +  :
   2.5    v  p--v--p--v--p--v--p--v--p--v--p--v--p--v--p--v--p  v
          :  +     |     |     |     |     |     |     |     +  :
   2.0    r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r
          :  +     |     |     |     |     |     |     |     +  :
   1.5    v  p--v--p--v--p--v--p--v--p--v--p--v--p--v--p--v--p  v
          :  +     |     |     |     |     |     |     |     +  :
   1.0    r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r  u  r
          :  +     |     |     |     |     |     |     |     +  :
   0.5    v  p++v++p++v++p++v++p++v++p++v++p++v++p++v++p++v++p  v
          :                                                     :
   0.0    r..u..r..u..r..u..r..u..r..u..r..u..r..u..r..u..r..u..r

            0.5   1.5   2.5                          Lm-.5 Lm+.5
   Y/X
         0.0   1.0   2.0                                  Lm    L

Notice that in the above diagram the domain physical boundary is marked with ++ whereas the artifial boundary is marked with ...

For those of you that processed the velocity observations without the 0.5 offset, the error is small and may not be significant. I will recommend you to consider such offset in the future.

I also modified extract_sta.F for consistency and to avoid out-of-bounds whe the station is located exactly at the eastern or northern boundaries.

Many thanks to Andy Moore for bringing the out-bounds and scanning conditional to my attention.

Change History (1)

comment:1 by arango, 15 years ago

Resolution: Done
Status: newclosed
Note: See TracTickets for help on using tickets.