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)
67 real(c_double),
intent(inout) :: hofx(:)
68 type(c_ptr),
value,
intent(in) :: obss
70 character(len=*),
parameter :: myname_=
"ufo_seaicethick_simobs"
71 character(max_string) :: err_msg
73 integer :: iobs, icat, ncat
74 type(
ufo_geoval),
pointer :: icethick, icefrac, snowthick
75 real(kind=kind_real) :: rho_wiw, rho_wsw
78 if (geovals%nlocs /=
size(hofx,1))
then
79 write(err_msg,*) myname_,
' error: nlocs inconsistent!'
80 call abor1_ftn(err_msg)
83 if (trim(self%obsvars%variable(1)) ==
"sea_ice_freeboard")
then
84 rho_wiw = (self%rho_water-self%rho_ice)/self%rho_water
85 rho_wsw = (self%rho_water-self%rho_snow)/self%rho_water
91 if (trim(self%obsvars%variable(1)) ==
"sea_ice_freeboard") &
100 select case (trim(self%obsvars%variable(1)))
101 case (
"sea_ice_freeboard")
102 do iobs = 1,
size(hofx,1)
104 hofx(iobs) = hofx(iobs)+ rho_wiw*icefrac%vals(icat,iobs) * icethick%vals(icat,iobs)&
105 + rho_wsw*icefrac%vals(icat,iobs) * snowthick%vals(icat,iobs)
108 case (
"sea_ice_thickness")
109 do iobs = 1,
size(hofx,1)
111 hofx(iobs) = hofx(iobs) + icefrac%vals(icat,iobs) * icethick%vals(icat,iobs)
115 write(err_msg,*) myname_,
' error: no match seaice thickness_option!'
116 call abor1_ftn(err_msg)