9 use fckit_configuration_module,
only: fckit_configuration
10 use kinds,
only: kind_real
22 real(kind=kind_real) :: t_min, t_max
23 real(kind=kind_real) :: s_min, s_max
24 real(kind=kind_real) :: ssh_min, ssh_max
25 real(kind=kind_real) :: cicen_min, cicen_max
26 real(kind=kind_real) :: hicen_min, hicen_max
27 real(kind=kind_real) :: swh_min, swh_max
28 real(kind=kind_real) :: chl_min, chl_max
29 real(kind=kind_real) :: biop_min, biop_max
33 procedure :: read => soca_bkgerr_readbounds
36 procedure :: apply => soca_bkgerr_applybounds
47 subroutine soca_bkgerr_readbounds(self, f_conf)
49 type(fckit_configuration),
intent(in) :: f_conf
52 if(.not. f_conf%get(
"t_min", self%t_min)) self%t_min = 0.0
53 if(.not. f_conf%get(
"t_max", self%t_max)) self%t_min = huge(0.0)
54 if(.not. f_conf%get(
"s_min", self%s_min)) self%s_min = 0.0
55 if(.not. f_conf%get(
"s_max", self%s_max)) self%s_max = huge(0.0)
56 if(.not. f_conf%get(
"ssh_min", self%ssh_min)) self%ssh_min = 0.0
57 if(.not. f_conf%get(
"ssh_max", self%ssh_max)) self%ssh_max = huge(0.0)
58 if(.not. f_conf%get(
"cicen_min", self%cicen_min)) self%cicen_min = 0.0
59 if(.not. f_conf%get(
"cicen_max", self%cicen_max)) self%cicen_max = huge(0.0)
60 if(.not. f_conf%get(
"hicen_min", self%hicen_min)) self%hicen_min = 0.0
61 if(.not. f_conf%get(
"hicen_max", self%hicen_max)) self%hicen_max = huge(0.0)
62 if(.not. f_conf%get(
"chl_min", self%chl_min)) self%chl_min = 0.0
63 if(.not. f_conf%get(
"chl_max", self%chl_max)) self%chl_max = huge(0.0)
64 if(.not. f_conf%get(
"biop_min", self%biop_min)) self%biop_min = 0.0
65 if(.not. f_conf%get(
"biop_max", self%biop_max)) self%biop_max = huge(0.0)
66 if(.not. f_conf%get(
"swh_min", self%swh_min)) self%swh_min = 0.0
67 if(.not. f_conf%get(
"swh_max", self%swh_max)) self%swh_max = huge(0.0)
68 end subroutine soca_bkgerr_readbounds
75 subroutine soca_bkgerr_applybounds(self, fld)
81 integer :: isc, iec, jsc, jec, i, j, n
82 real(kind=kind_real) :: vmin, vmax
85 isc = fld%geom%isc ; iec = fld%geom%iec
86 jsc = fld%geom%jsc ; jec = fld%geom%jec
88 do n=1,
size(fld%fields)
89 field => fld%fields(n)
90 select case(field%name)
101 vmin = self%cicen_min
102 vmax = self%cicen_max
104 vmin = self%hicen_min
105 vmax = self%hicen_max
121 field%val(i,j,:) =
soca_adjust(field%val(i,j,:), vmin, vmax)
126 end subroutine soca_bkgerr_applybounds
Handle fields for the model.
various utility functions
elemental real(kind=kind_real) function, public soca_adjust(std, minstd, maxstd)
Apply bounds.
bounds for background error
Holds all data and metadata related to a single field variable.
A collection of soca_field types representing a collective state or increment.