42 type(c_ptr),
value,
intent(in) :: obss
43 real(c_double),
intent(inout) :: hofx(:)
45 character(len=*),
parameter :: myname_=
"ufo_insitutemperature_simobs" 46 character(max_string) :: err_msg
48 integer :: iobs, ilev, nlev, nobs
50 real (kind_real),
allocatable :: depth(:,:)
51 real(kind_real) :: lono, lato, deptho
52 real(kind_real),
allocatable :: obs_lon(:)
53 real(kind_real),
allocatable :: obs_lat(:)
54 real(kind_real),
allocatable :: obs_depth(:)
55 real(kind_real),
allocatable :: obs_val(:)
59 real(kind_real) :: wf, tp, sp, prs
63 character(len=120) :: filename
67 if (geovals%nobs /=
size(hofx,1))
then 68 write(err_msg,*) myname_,
' error: nobs inconsistent!' 69 call abor1_ftn(err_msg)
83 allocate(obs_lon(obss_nobs))
84 allocate(obs_lat(obss_nobs))
85 allocate(obs_depth(obss_nobs))
86 allocate(obs_val(obss_nobs))
95 allocate(depth(nlev,nobs))
96 do iobs = 1,
size(hofx,1)
98 depth(1,iobs)=0.5*h%vals(1,iobs)
100 depth(ilev,iobs)=sum(h%vals(1:ilev-1,iobs))+0.5*h%vals(ilev,iobs)
108 do iobs = 1,
size(hofx,1)
112 deptho = obs_depth(iobs)
116 if (deptho.ge.maxval(depth))
then 126 call insitu_t_nl(hofx(iobs), tp, sp, lono, lato, deptho)
133 deallocate(obs_depth)
Fortran module to handle temperature profile observations.
subroutine, public ufo_geovals_get_var(self, varname, geoval, status)
subroutine vert_interp_apply(nlev, fvec, f, wi, wf)
subroutine, public ufo_insitutemperature_simobs(self, geovals, hofx, obss)
integer, parameter max_string
integer function, public obsspace_get_nobs(c_dom)
Return the number of observations.
character(len=maxvarlen), public var_ocn_lay_thick
Fortran module to perform linear interpolation.
character(len=maxvarlen), public var_ocn_salt
character(len=maxvarlen), public var_ocn_pot_temp
type to hold interpolated fields required by the obs operators
Fortran module to handle temperature profile observations.
subroutine, public insitu_t_nl(temp_i, temp_p, salt_p, lono, lato, deptho)
Fortran module handling observation locations.
Fortran interface to ObsSpace.
subroutine vert_interp_weights(nlev, obl, vec, wi, wf)
Fortran derived type for insitu temperature profile observation operator.
type to hold interpolated field for one variable, one observation