[Dart-dev] DART/branches Revision: 12848

dart at ucar.edu dart at ucar.edu
Mon Sep 24 15:50:56 MDT 2018


thoar at ucar.edu
2018-09-24 15:50:56 -0600 (Mon, 24 Sep 2018)
136
Most targets build, dying in the custom test_interpolation.
Will be moving to the traditional 'model_mod_check' to test interpolation.




Modified: DART/branches/roms_interpolation/models/ROMS/model_mod.f90
===================================================================
--- DART/branches/roms_interpolation/models/ROMS/model_mod.f90	2018-09-24 21:35:54 UTC (rev 12847)
+++ DART/branches/roms_interpolation/models/ROMS/model_mod.f90	2018-09-24 21:50:56 UTC (rev 12848)
@@ -320,7 +320,7 @@
 !> (i.e. S, T, U, V, Eta) to the given location given a state vector.
 !> The type of the variable being interpolated is obs_type since
 !> normally this is used to find the expected value of an observation
-!> at some location. The interpolated value is returned in interp_vals
+!> at some location. The interpolated value is returned in expected_obs
 !> and istatus is 0 for success. NOTE: This is a workhorse routine and is
 !> the basis for all the forward observation operator code.
 !>
@@ -328,7 +328,7 @@
 !> @param ens_size DART ensemble size
 !> @param location the location of interest
 !> @param obs_type the DART KIND of interest
-!> @param interp_val the estimated value of the DART state at the location
+!> @param expected_obs the estimated value of the DART state at the location
 !>          of interest (the interpolated value).
 !> @param istatus interpolation status ... 0 == success, /=0 is a failure
 !>
@@ -381,8 +381,8 @@
 if(obs_type == QTY_TEMPERATURE) then
    ! we know how to interpolate this from potential temp,
    ! salinity, and pressure based on depth.
-   call compute_temperature(state_handle, ens_size, llon, llat, lheight, interp_val, istatus)
-   if (debug > 1) print *, 'interp val, istatus = ', interp_val, istatus
+   call compute_temperature(state_handle, ens_size, llon, llat, lheight, expected_obs, istatus)
+   if (debug > 1) print *, 'expected_obs, istatus = ', expected_obs, istatus
    return
 endif
 
@@ -452,13 +452,13 @@
 ! Do the horizontal interpolation
 if(obs_type == QTY_U_CURRENT_COMPONENT) then
    call quad_lon_lat_evaluate(ugrid_handle, llon, llat, lon_corner, lat_corner,&
-                              ens_size, val_corners, interp_val, lstatus)
+                              ens_size, val_corners, expected_obs, lstatus)
 elseif(obs_type == QTY_V_CURRENT_COMPONENT) then
    call quad_lon_lat_evaluate(vgrid_handle, llon, llat, lon_corner, lat_corner,&
-                              ens_size, val_corners, interp_val, lstatus)
+                              ens_size, val_corners, expected_obs, lstatus)
 else
    call quad_lon_lat_evaluate(tgrid_handle, llon, llat, lon_corner, lat_corner,&
-                              ens_size, val_corners, interp_val, lstatus)
+                              ens_size, val_corners, expected_obs, lstatus)
 endif
 
 istatus = lstatus

Modified: DART/branches/roms_interpolation/models/ROMS/quad_utils_mod.f90
===================================================================
--- DART/branches/roms_interpolation/models/ROMS/quad_utils_mod.f90	2018-09-24 21:35:54 UTC (rev 12847)
+++ DART/branches/roms_interpolation/models/ROMS/quad_utils_mod.f90	2018-09-24 21:50:56 UTC (rev 12848)
@@ -1573,6 +1573,10 @@
    if(dist_bot <= 0 .and. dist_top > 0) then
       bot = i - 1
       top = i
+      if ((abs(dist_bot) + dist_top) == 0) then
+         istatus = 2
+         return
+      endif
       fract = abs(dist_bot) / (abs(dist_bot) + dist_top)
       if (debug > 3) print *, 'lon: returning bot, top, fract', bot, top, fract
       return
@@ -1586,6 +1590,10 @@
    top = 1
    dist_bot = lon_dist(lon, lon_array(bot))
    dist_top = lon_dist(lon, lon_array(top))
+   if ((abs(dist_bot) + dist_top) == 0) then
+      istatus = 2
+      return
+   endif
    fract = abs(dist_bot) / (abs(dist_bot) + dist_top)
 else
    string1 = 'end reached. internal error, should not happen'


More information about the Dart-dev mailing list