8 use atlas_module,
only: atlas_field
10 use fckit_log_module,
only: fckit_log
39 type(
qg_locs),
intent(in) :: locs
41 type(datetime),
intent(in) :: t1, t2
42 type(
qg_gom),
intent(inout) :: gom
46 real(kind_real),
allocatable :: x(:,:,:),q(:,:,:),u(:,:,:),v(:,:,:)
47 real(kind_real),
pointer :: lonlat(:,:), z(:)
48 type(atlas_field) :: lonlat_field, z_field
51 lonlat_field = locs%lonlat()
52 call lonlat_field%data(lonlat)
54 z_field = locs%altitude()
61 allocate(x(fld%geom%nx,fld%geom%ny,fld%geom%nz))
62 allocate(q(fld%geom%nx,fld%geom%ny,fld%geom%nz))
63 allocate(u(fld%geom%nx,fld%geom%ny,fld%geom%nz))
64 allocate(v(fld%geom%nx,fld%geom%ny,fld%geom%nz))
72 if (gom%ix /= 0.or.gom%iu /= 0.or.gom%iv /= 0)
then
73 if (fld%lq)
call convert_q_to_x(fld%geom,q,fld%x_north,fld%x_south,x)
76 if (.not.fld%lq)
call convert_x_to_q(fld%geom,x,fld%x_north,fld%x_south,q)
78 if (gom%iu /= 0.or.gom%iv /= 0)
call convert_x_to_uv(fld%geom,x,fld%x_north,fld%x_south,u,v)
81 do jloc=1,locs%nlocs()
83 if (t1 < locs%times(jloc) .and. locs%times(jloc) <= t2)
then
86 & z(jloc),x,gom%values(gom%ix,jloc))
88 & z(jloc),q,gom%values(gom%iq,jloc))
90 & z(jloc),u,gom%values(gom%iu,jloc))
92 & z(jloc),v,gom%values(gom%iv,jloc))
97 call lonlat_field%final()
108 type(
qg_locs),
intent(in) :: locs
110 type(datetime),
intent(in) :: t1, t2
111 type(
qg_gom),
intent(inout) :: gom
115 real(kind_real),
allocatable :: x(:,:,:),q(:,:,:),u(:,:,:),v(:,:,:)
116 real(kind_real),
pointer :: lonlat(:,:), z(:)
117 type(atlas_field) :: lonlat_field, z_field
120 lonlat_field = locs%lonlat()
121 call lonlat_field%data(lonlat)
123 z_field = locs%altitude()
130 allocate(x(fld%geom%nx,fld%geom%ny,fld%geom%nz))
131 allocate(q(fld%geom%nx,fld%geom%ny,fld%geom%nz))
132 allocate(u(fld%geom%nx,fld%geom%ny,fld%geom%nz))
133 allocate(v(fld%geom%nx,fld%geom%ny,fld%geom%nz))
141 if (gom%ix /= 0.or.gom%iu /= 0.or.gom%iv /= 0)
then
144 if (gom%iq /= 0)
then
150 do jloc=1,locs%nlocs()
152 if (t1 < locs%times(jloc) .and. locs%times(jloc) <= t2)
then
155 & z(jloc),x,gom%values(gom%ix,jloc))
157 & z(jloc),q,gom%values(gom%iq,jloc))
159 & z(jloc),u,gom%values(gom%iu,jloc))
161 & z(jloc),v,gom%values(gom%iv,jloc))
166 call lonlat_field%final()
177 type(
qg_locs),
intent(in) :: locs
179 type(datetime),
intent(in) :: t1, t2
180 type(
qg_gom),
intent(in) :: gom
184 real(kind_real),
allocatable :: x(:,:,:),q(:,:,:),u(:,:,:),v(:,:,:)
185 real(kind_real),
pointer :: lonlat(:,:), z(:)
186 type(atlas_field) :: lonlat_field, z_field
189 lonlat_field = locs%lonlat()
190 call lonlat_field%data(lonlat)
192 z_field = locs%altitude()
199 allocate(x(fld%geom%nx,fld%geom%ny,fld%geom%nz))
200 allocate(q(fld%geom%nx,fld%geom%ny,fld%geom%nz))
201 allocate(u(fld%geom%nx,fld%geom%ny,fld%geom%nz))
202 allocate(v(fld%geom%nx,fld%geom%ny,fld%geom%nz))
210 do jloc=locs%nlocs(),1,-1
212 if (t1 < locs%times(jloc) .and. locs%times(jloc) <= t2)
then
215 & z(jloc),gom%values(gom%ix,jloc),x)
217 & z(jloc),gom%values(gom%iq,jloc),q)
219 & z(jloc),gom%values(gom%iu,jloc),u)
221 & z(jloc),gom%values(gom%iv,jloc),v)
227 if (gom%iq /= 0)
then
230 if (gom%ix /= 0.or.gom%iu /= 0.or.gom%iv /= 0)
then
234 fld%gfld3d = fld%gfld3d+q
236 fld%gfld3d = fld%gfld3d+x
239 call lonlat_field%final()