[Dart-dev] DART/branches Revision: 12302
dart at ucar.edu
dart at ucar.edu
Tue Jan 9 14:52:19 MST 2018
hendric at ucar.edu
2018-01-09 14:52:18 -0700 (Tue, 09 Jan 2018)
160
checking if status before computing quad interpolate for
the horizontal. also assinging values to my_status to 0
for 2d fields where before they were not set.
Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90 2018-01-09 21:46:47 UTC (rev 12301)
+++ DART/branches/recam/models/cam-fv/model_mod.f90 2018-01-09 21:52:18 UTC (rev 12302)
@@ -741,6 +741,11 @@
call get_quad_vals(state_handle, ens_size, varid, obs_qty, four_lons, four_lats, &
lon_lat_vert, which_vert, quad_vals, status_array)
+if (any(status_array /= 0)) then
+ istatus(:) = 10 ! cannot get vertical values
+ return
+endif
+
! do the horizontal interpolation for each ensemble member
call quad_lon_lat_evaluate(interp_handle, lon_fract, lat_fract, ens_size, &
quad_vals, interp_vals, status_array)
@@ -829,6 +834,11 @@
call get_quad_vals(state_handle, ens_size, varid, obs_qty, four_lons, four_lats, &
lon_lat_vert, which_vert, quad_vals, status_array)
+if (any(status_array /= 0)) then
+ istatus(:) = 10 ! cannot get vertical values
+ return
+endif
+
! do the horizontal interpolation for each ensemble member
call quad_lon_lat_evaluate(interp_handle, lon_fract, lat_fract, ens_size, &
quad_vals, interp_vals, status_array)
@@ -938,7 +948,6 @@
which_vert, obs_qty, &
four_bot_levs(icorner, :), four_top_levs(icorner, :), &
four_vert_fracts(icorner, :), status_array)
-
!>@todo FIXME should we let the process continue if at least one
!>member has failed? pro: save work con: don't get forward operator
@@ -1362,6 +1371,7 @@
bot_levs(:) = bot1
top_levs(:) = top1
vert_fracts(:) = fract1
+ my_status(:) = 0
if (debug_level > 100) then
do k = 1,ens_size
print*, 'ISLEVEL bot_levs(k), top_levs(k), vert_fracts(k), vert_val', &
@@ -1370,11 +1380,11 @@
endif
! 2d fields
- case(VERTISSURFACE)
- case(VERTISUNDEF)
+ case(VERTISUNDEF, VERTISSURFACE)
bot_levs(:) = nlevels
top_levs(:) = nlevels - 1
vert_fracts(:) = 1.0_r8
+ my_status(:) = 0
case default
write(string1, *) 'unsupported vertical type: ', which_vert
@@ -1630,6 +1640,7 @@
else
fract = (p_val - pressures(top_lev)) / (pressures(bot_lev) - pressures(top_lev))
endif
+
my_status = 0
return
enddo levloop
More information about the Dart-dev
mailing list