10 use fckit_configuration_module,
only: fckit_configuration
18 use oops_variables_mod
27 type(oops_variables),
public :: obsvars
28 real(kind=kind_real) :: rho_ice = 905.0
29 real(kind=kind_real) :: rho_snow = 330.0
30 real(kind=kind_real) :: rho_water= 1000.0
43 type(fckit_configuration),
intent(in) :: f_conf
44 integer :: ivar, nvars
45 character(max_string) :: err_msg
47 nvars = self%obsvars%nvars()
49 write(err_msg,*)
'ufo_seaicethickness_setup error: only variables size 1 supported!'
50 call abor1_ftn(err_msg)
68 real(c_double),
intent(inout) :: hofx(:)
69 type(c_ptr),
value,
intent(in) :: obss
71 character(len=*),
parameter :: myname_=
"ufo_seaicethick_simobs"
72 character(max_string) :: err_msg
74 integer :: iobs, icat, ncat
75 type(
ufo_geoval),
pointer :: icethick, icefrac, snowthick
76 real(kind=kind_real) :: rho_wiw, rho_wsw
79 if (geovals%nlocs /=
size(hofx,1))
then
80 write(err_msg,*) myname_,
' error: nlocs inconsistent!'
81 call abor1_ftn(err_msg)
84 if (
cmp_strings(self%obsvars%variable(1),
"sea_ice_freeboard"))
then
85 rho_wiw = (self%rho_water-self%rho_ice)/self%rho_water
86 rho_wsw = (-self%rho_snow)/self%rho_water
92 if (
cmp_strings(self%obsvars%variable(1),
"sea_ice_freeboard")) &
101 select case (trim(self%obsvars%variable(1)))
102 case (
"sea_ice_freeboard")
103 do iobs = 1,
size(hofx,1)
105 hofx(iobs) = hofx(iobs)+ rho_wiw*icefrac%vals(icat,iobs) * icethick%vals(icat,iobs)&
106 + rho_wsw*icefrac%vals(icat,iobs) * snowthick%vals(icat,iobs)
109 case (
"sea_ice_thickness")
110 do iobs = 1,
size(hofx,1)
112 hofx(iobs) = hofx(iobs) + icefrac%vals(icat,iobs) * icethick%vals(icat,iobs)
116 write(err_msg,*) myname_,
' error: no match seaice thickness_option!'
117 call abor1_ftn(err_msg)
subroutine, public ufo_geovals_get_var(self, varname, geoval)
Fortran module for seaicethickness observation operator.
subroutine ufo_seaicethickness_delete(self)
subroutine ufo_seaicethickness_setup(self, f_conf)
integer, parameter max_string
subroutine ufo_seaicethickness_simobs(self, geovals, hofx, obss)
Fortran module with various useful routines.
logical function, public cmp_strings(str1, str2)
character(len=maxvarlen), public var_seaicesnowthick
character(len=maxvarlen), public var_seaicethick
character(len=maxvarlen), public var_seaicefrac
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators
Fortran derived type for the observation type.