UFO
gnssro_mod_conf.F90
Go to the documentation of this file.
1 !==========================================================================
3 !==========================================================================
4 use fckit_configuration_module, only: fckit_configuration
5 use iso_c_binding
6 use kinds
7 use obsspace_mod
9 implicit none
10 private
11 public :: gnssro_conf
12 public :: gnssro_conf_setup
13 
15  integer(c_int) :: ro_top_meter
16  integer(c_int) :: use_compress
17  integer(c_int) :: n_horiz
18  integer(c_int) :: sr_steps
19  character(len=MAXVARLEN) :: super_ref_qc
20  character(len=:), allocatable :: str
21  real(kind_real) :: res
22  real(kind_real) :: top_2d
23  real(kind_real) :: dtheta
24  character(len=20) :: vertlayer
25  character(len=20) :: output_diags
26 end type gnssro_conf
27 
28 !--------- ropp2d location default parameters-----------------
29 integer(c_int), parameter, public :: n_horiz_2d = 31 !should be odd number
30 real(kind_real), parameter, public :: res_2d = 40.0 !km
31 real(kind_real), parameter, public :: top_2d = 20.0 !km; maximum height the 2d operator is applied
32 contains
33 !-------------------------------
34 
35 subroutine gnssro_conf_setup(roconf, f_conf)
36 implicit none
37 type(gnssro_conf), intent(inout) :: roconf
38 type(fckit_configuration), intent(in) :: f_conf
39 
40 character(len=:), allocatable :: str
41 
42 roconf%ro_top_meter = 30000
43 if (f_conf%has("ro_top_meter")) call f_conf%get_or_die("ro_top_meter",roconf%ro_top_meter)
44 roconf%use_compress = 1
45 if (f_conf%has("use_compress")) call f_conf%get_or_die("use_compress",roconf%use_compress)
46 roconf%n_horiz = n_horiz_2d
47 if (f_conf%has("n_horiz")) call f_conf%get_or_die("n_horiz",roconf%n_horiz)
48 roconf%res = res_2d
49 if (f_conf%has("res")) call f_conf%get_or_die("res",roconf%res)
50 roconf%top_2d = top_2d
51 if (f_conf%has("top_2d")) call f_conf%get_or_die("top_2d",roconf%top_2d)
52 roconf%top_2d = roconf%top_2d*1000.0 ! km to m
53 roconf%dtheta = roconf%res/mean_earth_rad
54 roconf%vertlayer = "full"
55 if (f_conf%has("vertlayer")) then
56  call f_conf%get_or_die("vertlayer",str)
57  roconf%vertlayer = str
58 end if
59 roconf%super_ref_qc = "NBAM"
60 if (f_conf%has("super_ref_qc")) then
61  call f_conf%get_or_die("super_ref_qc",str)
62  roconf%super_ref_qc=trim(str)
63 endif
64 roconf%sr_steps = 2
65 if (f_conf%has("sr_steps")) call f_conf%get_or_die("sr_steps",roconf%sr_steps)
66 roconf%output_diags="false"
67 if (f_conf%has("output_diags")) then
68  call f_conf%get_or_die("output_diags",str)
69  roconf%output_diags=trim(str)
70 endif
71 end subroutine gnssro_conf_setup
72 
73 
74 end module gnssro_mod_conf
real(kind_real), parameter, public res_2d
subroutine, public gnssro_conf_setup(roconf, f_conf)
real(kind_real), parameter, public top_2d
integer(c_int), parameter, public n_horiz_2d