22 real(kind_real),
allocatable :: wf(:)
23 integer,
allocatable :: wi(:)
36 class(ufo_conventional_profile_tlad),
intent(inout) :: self
37 type(ufo_geovals),
intent(in) :: geovals
38 type(c_ptr),
value,
intent(in) :: obss
40 character(len=*),
parameter :: myname_=
"ufo_conventional_profile_tlad_settraj" 41 character(max_string) :: err_msg
43 real(kind_real),
allocatable :: pressure(:)
44 type(ufo_geoval),
pointer :: prsl
50 write(err_msg,*) myname_, trim(
var_prsl),
' doesnt exist' 51 call abor1_ftn(err_msg)
61 allocate(self%wi(self%nobs))
62 allocate(self%wf(self%nobs))
65 allocate(pressure(self%nobs))
69 do iobs = 1, self%nobs
70 call vert_interp_weights(self%nval,log(pressure(iobs)/10.),prsl%vals(:,iobs),self%wi(iobs),self%wf(iobs))
82 class(ufo_conventional_profile_tlad),
intent(in) :: self
83 type(ufo_geovals),
intent(in) :: geovals
84 real(c_double),
intent(inout) :: hofx(:)
85 type(c_ptr),
value,
intent(in) :: obss
87 character(len=*),
parameter :: myname_=
"ufo_conventional_profile_simobs_tl" 88 character(max_string) :: err_msg
91 type(ufo_geoval),
pointer :: tv_d
94 if (.not. self%ltraj)
then 95 write(err_msg,*) myname_,
' trajectory wasnt set!' 96 call abor1_ftn(err_msg)
108 write(err_msg,*) myname_, trim(
var_tv),
' doesnt exist' 109 call abor1_ftn(err_msg)
113 do iobs = 1, geovals%nobs
114 call vert_interp_apply_tl(tv_d%nval, tv_d%vals(:,iobs), hofx(iobs), self%wi(iobs), self%wf(iobs))
123 class(ufo_conventional_profile_tlad),
intent(in) :: self
124 type(ufo_geovals),
intent(inout) :: geovals
125 real(c_double),
intent(in) :: hofx(:)
126 type(c_ptr),
value,
intent(in) :: obss
128 character(len=*),
parameter :: myname_=
"ufo_conventional_profile_simobs_ad" 129 character(max_string) :: err_msg
132 type(ufo_geoval),
pointer :: tv_d
135 if (.not. self%ltraj)
then 136 write(err_msg,*) myname_,
' trajectory wasnt set!' 137 call abor1_ftn(err_msg)
149 write(err_msg,*) myname_, trim(
var_tv),
' doesnt exist' 150 call abor1_ftn(err_msg)
154 if (.not.
allocated(tv_d%vals))
then 155 tv_d%nobs = self%nobs
156 tv_d%nval = self%nval
157 allocate(tv_d%vals(tv_d%nval,tv_d%nobs))
158 tv_d%vals = 0.0_kind_real
160 if (.not. geovals%linit ) geovals%linit=.true.
162 do iobs = 1, geovals%nobs
163 call vert_interp_apply_ad(tv_d%nval, tv_d%vals(:,iobs), hofx(iobs), self%wi(iobs), self%wf(iobs))
172 class(ufo_conventional_profile_tlad),
intent(inout) :: self
174 character(len=*),
parameter :: myname_=
"ufo_conventional_profile_tlad_delete" 177 if (
allocated(self%wi))
deallocate(self%wi)
178 if (
allocated(self%wf))
deallocate(self%wf)
subroutine, public ufo_geovals_get_var(self, varname, geoval, status)
integer, parameter max_string
subroutine vert_interp_apply_ad(nlev, fvec_ad, f_ad, wi, wf)
integer function, public obsspace_get_nobs(c_dom)
Return the number of observations.
subroutine vert_interp_apply_tl(nlev, fvec_tl, f_tl, wi, wf)
subroutine conventional_profile_simobs_ad_(self, geovals, hofx, obss)
Fortran module to perform linear interpolation.
character(len=maxvarlen), public var_prsl
type(registry_t), public ufo_geovals_registry
Linked list interface - defines registry_t type.
subroutine conventional_profile_tlad_settraj_(self, geovals, obss)
Fortran interface to ObsSpace.
character(len=maxvarlen), public var_tv
subroutine vert_interp_weights(nlev, obl, vec, wi, wf)
subroutine conventional_profile_simobs_tl_(self, geovals, hofx, obss)
subroutine conventional_profile_tlad_delete_(self)
subroutine, public delete(self)