UFO
ufo_gnssro_2d_locs_mod_stub.F90
Go to the documentation of this file.
2 
3 use iso_c_binding
4 use fckit_log_module, only : fckit_log
5 use kinds, only : kind_real
7 
8 contains
9 
10 !-------------------------------------------------------------------------
11 !-------------------------------------------------------------------------
12 subroutine ufo_gnssro_2d_locs_init(self, obss, nlocs_ext, lons, lats)
13  use kinds
14  use datetime_mod
15  use obsspace_mod
17 
18  implicit none
19 
20  class(ufo_gnssro_BndROPP2D), intent(inout) :: self
21  type(c_ptr), value, intent(in) :: obss
22  integer, intent(in) :: nlocs_ext
23  real(c_float), dimension(nlocs_ext), intent(inout) :: lons, lats
24 
25  character(len=*),parameter :: myname = "ufo_gnssro_2d_locs_init"
26  integer, parameter :: max_string = 800
27  character(max_string) :: err_msg
28 
29  integer :: i, j, nlocs
30  real(kind_real), dimension(:), allocatable :: lon, lat
31 
32 ! gnss ro data 2d location
33  real(kind_real), dimension(:), allocatable :: obsAzim
34  real(kind_real), dimension(self%roconf%n_horiz) :: plat_2d, plon_2d
35  integer :: kerror, n_horiz
36  real(kind_real) :: dtheta
37 
38  dtheta = self%roconf%dtheta
39  n_horiz = self%roconf%n_horiz
40  nlocs = nlocs_ext / n_horiz
41 
42  allocate(lon(nlocs), lat(nlocs))
43  call obsspace_get_db(obss, "MetaData", "longitude", lon)
44  call obsspace_get_db(obss, "MetaData", "latitude", lat)
45 
46  allocate(obsazim(nlocs))
47  call obsspace_get_db(obss, "MetaData", "sensor_azimuth_angle", obsazim)
48 
49  !Setup ufo 2d locations
50  do i = 1, nlocs
51  lons( (i-1)*n_horiz+1 : i*n_horiz) = lon(i)
52  lats( (i-1)*n_horiz+1 : i*n_horiz) = lat(i)
53  end do
54 
55  ! save ufo_locs to self
56  self%obsLat2d = lats
57  self%obsLon2d = lons
58 
59  deallocate(lon, lat, obsazim)
60 
61 end subroutine ufo_gnssro_2d_locs_init
62 
63 !----------------------------
64 end module ufo_gnssro_2d_locs_mod
subroutine, public ufo_gnssro_2d_locs_init(self, obss, nlocs_ext, lons, lats)
Fortran module for gnssro bending angle ropp2d forward operator following the ROPP (2018 Aug) impleme...