19 type(c_ptr),
intent(in) :: c_conf
20 integer,
intent(in) :: nlocs
21 integer,
intent(in) :: ntimes
22 type(datetime),
intent(in) :: bgn
23 type(duration),
intent(in) :: step
24 type(datetime),
intent(inout) :: times(nlocs*ntimes)
25 type(obs_vect),
intent(inout) :: obsloc
27 integer :: ijk, jobs, intinv, iobs, jstep, ii, jj, kk, ij, nx, ny
28 real(kind=kind_real) :: goldinv, dx, dy
29 real(kind=kind_real),
allocatable :: xxyyzz(:,:)
32 nx = config_get_int(c_conf,
"nx");
33 ny = config_get_int(c_conf,
"ny");
34 dx=1.0_kind_real/
real(nx,kind_real)
35 dy=1.0_kind_real/
real(ny,kind_real)
37 goldinv = 0.5_kind_real*(sqrt(5.0_kind_real)-1.0_kind_real)
38 intinv = nint(goldinv*
real(nx*ny*2,kind_real))
40 allocate(xxyyzz(3,nlocs))
44 ijk=modulo(ijk,2*nx*(ny-2))
50 if (ii<0 .or. ii>nx-1)
call abor1_ftn (
"generate_locations: error ii")
51 if (jj<1 .or. jj>ny-2)
call abor1_ftn (
"generate_locations: error jj")
52 if (kk<0 .or. kk>1)
call abor1_ftn (
"generate_locations: error kk")
53 xxyyzz(1,jobs)=
real(ii,kind_real)*dx
54 xxyyzz(2,jobs)=
real(jj,kind_real)*dy
55 xxyyzz(3,jobs)=
real(kk+1,kind_real)
66 obsloc%values(:,iobs)=xxyyzz(:,jobs)
68 call datetime_update(now,step)
71 call datetime_delete(now)
subroutine generate_locations(c_conf, nlocs, ntimes, bgn, step, times, obsloc)
subroutine, public obsvec_setup(self, nc, no)
Fortran module handling observation vectors.