8 use iso_c_binding,
only: c_ptr
9 use oops_variables_mod,
only: oops_variables
18 use kinds,
only: kind_real
24 integer,
intent(in) :: nlocs
25 type(oops_variables),
intent(in) :: obsvars
30 character(len=MAXVARLEN) :: varstr
33 character(len=*),
parameter :: suffix =
"_background_error"
35 do ivar = 1, obsdiags%nvar
36 varstr = obsdiags%variables(ivar)
37 lenvarstr = len_trim(varstr)
41 if (lenvarstr <= len(suffix)) cycle
43 if (varstr(lenvarstr - len(suffix)+1:lenvarstr) /= suffix) cycle
45 if (.not. obsvars%has(varstr(:lenvarstr - len(suffix)))) cycle
53 if (
allocated(obsdiags%geovals(ivar)%vals))
deallocate(obsdiags%geovals(ivar)%vals)
54 obsdiags%geovals(ivar)%nval = 1
55 allocate(obsdiags%geovals(ivar)%vals(obsdiags%geovals(ivar)%nval, nlocs))
58 obsdiags%geovals(ivar)%vals(1, 1:nlocs) = background_error%vals(1, 1:nlocs)
subroutine ufo_backgrounderroridentity_fillobsdiags(geovals, nlocs, obsvars, obsdiags)
For each obs diagnostic called _background_error, where belongs to the set of variable names obsvars...
subroutine, public ufo_geovals_get_var(self, varname, geoval)
integer, parameter, public maxvarlen
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators