28 logical :: ltraj = .false.
53 character(len=*),
parameter :: myname_=
"ufo_seaicethick_tlad_settraj" 54 character(max_string) :: err_msg
64 self%icethick = icethick
65 self%icefrac = icefrac
77 real(c_double),
intent(inout) :: hofx(:)
79 character(len=*),
parameter :: myname_=
"ufo_seaicethick_simobs_tl" 80 character(max_string) :: err_msg
82 integer :: iobs, icat, ncat
83 type(
ufo_geoval),
pointer :: icethick_d, icefrac_d
85 print *, myname_,
' nobs: ', geovals%nobs,
size(hofx,1)
88 if (.not. self%ltraj)
then 89 write(err_msg,*) myname_,
' trajectory wasnt set!' 90 call abor1_ftn(err_msg)
94 if (geovals%nobs /=
size(hofx,1))
then 95 write(err_msg,*) myname_,
' error: nobs inconsistent!' 96 call abor1_ftn(err_msg)
106 ncat = icefrac_d%nval
108 do iobs = 1,
size(hofx,1)
110 hofx(iobs) = hofx(iobs) + &
111 self%icefrac%vals(icat,iobs) * icethick_d%vals(icat,iobs) / 905.0 + &
112 icefrac_d%vals(icat,iobs) * self%icethick%vals(icat,iobs) /905.0
124 real(c_double),
intent(inout) :: hofx(:)
126 character(len=*),
parameter :: myname_=
"ufo_seaicethick_simobs_ad" 127 character(max_string) :: err_msg
129 integer :: iobs, icat, ncat
130 type(
ufo_geoval),
pointer :: icefrac_d, icethick_d
133 if (.not. self%ltraj)
then 134 write(err_msg,*) myname_,
' trajectory wasnt set!' 135 call abor1_ftn(err_msg)
139 if (geovals%nobs /=
size(hofx,1))
then 140 write(err_msg,*) myname_,
' error: nobs inconsistent!' 141 call abor1_ftn(err_msg)
144 if (.not. geovals%linit ) geovals%linit=.true.
152 ncat = self%icethick%nval
153 if (.not.(
allocated(icefrac_d%vals) .or. .not.
allocated(icethick_d%vals)))
then 155 write(err_msg,*) myname_,
' unknown number of categories' 156 call abor1_ftn(err_msg)
158 if (.not.
allocated(icefrac_d%vals))
allocate(icefrac_d%vals(ncat,
size(hofx,1)))
159 if (.not.
allocated(icethick_d%vals))
allocate(icethick_d%vals(ncat,
size(hofx,1)))
167 if (.not.
allocated(icefrac_d%vals))
allocate(icefrac_d%vals(ncat,
size(hofx,1)))
168 if (.not.
allocated(icethick_d%vals))
allocate(icethick_d%vals(ncat,
size(hofx,1)))
170 icethick_d%vals = 0.0
172 do iobs = 1,
size(hofx,1)
174 icefrac_d%vals(icat,iobs) = icefrac_d%vals(icat,iobs) + self%icethick%vals(icat,iobs) * hofx(iobs) / 905.0
175 icethick_d%vals(icat,iobs) = icethick_d%vals(icat,iobs) + self%icefrac%vals(icat,iobs) * hofx(iobs) / 905.0
character(len=maxvarlen), public var_seaicethick
subroutine, public ufo_geovals_get_var(self, varname, geoval, status)
integer, parameter max_string
subroutine, public ufo_seaicethick_simobs_ad(self, geovals, hofx)
subroutine, public ufo_seaicethick_simobs_tl(self, geovals, hofx)
Fortran module to handle ice concentration observations.
Fortran derived type for sea ice fraction observation operator.
type to hold interpolated fields required by the obs operators
subroutine, public ufo_seaicethick_tlad_delete(self)
subroutine, public ufo_seaicethick_tlad_settraj(self, geovals)
character(len=maxvarlen), public var_seaicefrac
type to hold interpolated field for one variable, one observation