9 use fckit_mpi_module,
only: fckit_mpi_comm
12 use datetime_mod,
only: datetime
13 use unstructured_interpolation_mod,
only: unstrc_interp
16 use ufo_locs_mod,
only: ufo_locs, ufo_locs_time_mask
17 use ufo_geovals_mod,
only: ufo_geovals
48 type(datetime),
intent(in) :: t1
49 type(datetime),
intent(in) :: t2
50 type(ufo_locs),
intent(in) :: locs
51 type(ufo_geovals),
intent(in) :: geovals
53 integer :: gv, n, ji, jj, jlev
55 character(len=field_clen) :: fv3jedi_name
56 logical,
allocatable :: time_mask(:)
57 real(kind=
kind_real),
allocatable :: field_us(:)
58 real(kind=
kind_real),
allocatable :: geovals_all(:,:), geovals_tmp(:)
62 call ufo_locs_time_mask(locs, t1, t2, time_mask)
67 allocate(field_us(self%ngrid))
68 allocate(geovals_all(locs%nlocs, self%npz+1))
69 allocate(geovals_tmp(locs%nlocs))
70 field_us = 0.0_kind_real
71 geovals_all = 0.0_kind_real
72 geovals_tmp = 0.0_kind_real
77 do gv = 1, geovals%nvar
82 call get_field(fields, fv3jedi_name, field)
87 if (time_mask(n)) geovals_all(n, 1:field%npz) = geovals%geovals(gv)%vals(1:field%npz, n)
92 if ( trim(self%interp_method) ==
'bump' .and. &
93 .not.field%integerfield .and. trim(field%space)==
'magnitude' )
then
95 call self%bump%apply_ad(field%npz, field%array, locs%nlocs, geovals_all(:,1:field%npz))
99 do jlev = 1, field%npz
101 geovals_tmp(1:locs%nlocs) = geovals_all(1:locs%nlocs, jlev)
105 if (.not. field%integerfield .and. trim(field%space)==
'magnitude')
then
106 call self%unsinterp%apply_ad(field_us, geovals_tmp)
108 call abor1_ftn(
"fv3jedi_getvalues_mod.fill_geovals: interpolation for this kind of "// &
109 "field is not supported. FieldName: "// trim(field%fv3jedi_name))
113 do jj = field%jsc, field%jec
114 do ji = field%isc, field%iec
116 field%array(ji, jj, jlev) = field_us(n)
126 deallocate(time_mask)
128 deallocate(geovals_all)
129 deallocate(geovals_tmp)