UPP  001
 All Data Structures Files Functions Pages
FILL_PSETFLD.f
Go to the documentation of this file.
1 
20  subroutine fill_psetfld(param_ofld,param_afld)
21 !
22 
23 !
24 !
25 ! INCLUDE ETA GRID DIMENSIONS. SET/DERIVE PARAMETERS.
26 !
27  use xml_perl_data, only: param_t
28 !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
29  implicit none
30 !
31 ! DECLARE VARIABLES.
32 !
33  type(param_t) ,intent(inout) :: param_ofld
34  type(param_t) ,intent(in) :: param_afld
35 !
36  integer :: i,j
37 !
38 !******************************************************************************
39 ! START HERE.
40 !
41 ! GET field information
42 !
43 ! pds template
44  if(trim(param_afld%pdstmpl)/='tmpl4_0'.and.trim(param_ofld%pdstmpl)=='tmpl4_0') then
45  param_ofld%pdstmpl=param_afld%pdstmpl
46  endif
47 ! pname
48  if(trim(param_ofld%pname)==''.and.trim(param_afld%pname)/='') then
49  param_ofld%pname=param_afld%pname
50  endif
51 ! stats_proc
52  if(trim(param_ofld%stats_proc)==''.and.trim(param_afld%stats_proc)/='') then
53  param_ofld%stats_proc=param_afld%stats_proc
54  endif
55 ! table_info
56  if(trim(param_ofld%table_info)==''.and.trim(param_afld%table_info)/='') then
57  param_ofld%table_info=param_afld%table_info
58  endif
59 !
60 ! fixed_sfc1_type
61  if(trim(param_ofld%fixed_sfc1_type)==''.and.trim(param_afld%fixed_sfc1_type)/='') then
62  param_ofld%fixed_sfc1_type=param_afld%fixed_sfc1_type
63  endif
64 ! scale_fact_fixed_sfc1
65  if(size(param_ofld%scale_fact_fixed_sfc1)==0.and.size(param_afld%scale_fact_fixed_sfc1)/=0) then
66 ! print *,'scale_fact,fld=',trim(param_ofld%shortname),size(param_afld%scale_fact_fixed_sfc1)
67  nullify(param_ofld%scale_fact_fixed_sfc1)
68  allocate(param_ofld%scale_fact_fixed_sfc1(1))
69  param_ofld%scale_fact_fixed_sfc1(1)=param_afld%scale_fact_fixed_sfc1(1)
70  endif
71 ! level
72  if(size(param_ofld%level)==0.and.size(param_afld%level)/=0) then
73  nullify(param_ofld%level)
74  allocate(param_ofld%level(1))
75  param_ofld%level(1)=param_afld%level(1)
76  endif
77 ! fixed_sfc2_type
78  if(trim(param_ofld%fixed_sfc2_type)==''.and.trim(param_afld%fixed_sfc2_type)/='') then
79  param_ofld%fixed_sfc2_type=param_afld%fixed_sfc2_type
80  endif
81 ! scale_fact_fixed_sfc2
82  if(size(param_ofld%scale_fact_fixed_sfc2)==0.and.size(param_afld%scale_fact_fixed_sfc2)/=0) then
83  nullify(param_ofld%scale_fact_fixed_sfc2)
84  allocate(param_ofld%scale_fact_fixed_sfc2(1))
85  param_ofld%scale_fact_fixed_sfc2(1)=param_afld%scale_fact_fixed_sfc2(1)
86  endif
87 ! level2
88  if(size(param_ofld%level2)==0.and.size(param_afld%level2)/=0) then
89  nullify(param_ofld%level2)
90  allocate(param_ofld%level2(1))
91  param_ofld%level2(1)=param_afld%level2(1)
92  endif
93 ! aerosol type
94  if(trim(param_ofld%aerosol_type)==''.and.trim(param_afld%aerosol_type)/='') then
95  param_ofld%aerosol_type=param_afld%aerosol_type
96  endif
97 ! typ_intvl_size
98  if(trim(param_ofld%typ_intvl_size)==''.and.trim(param_afld%typ_intvl_size)/='') then
99  param_ofld%typ_intvl_size=param_afld%typ_intvl_size
100  endif
101 ! scale_fact_1st_size
102  if(param_ofld%scale_fact_1st_size==0.and.param_afld%scale_fact_1st_size/=0) then
103  param_ofld%scale_fact_1st_size=param_afld%scale_fact_1st_size
104  endif
105 ! scale_val_1st_size
106  if(param_ofld%scale_val_1st_size==0.and.param_afld%scale_val_1st_size/=0) then
107  param_ofld%scale_val_1st_size=param_afld%scale_val_1st_size
108  endif
109 ! scale_fact_2nd_size
110  if(param_ofld%scale_fact_2nd_size==0.and.param_afld%scale_fact_2nd_size/=0) then
111  param_ofld%scale_fact_2nd_size=param_afld%scale_fact_2nd_size
112  endif
113 ! scale_val_2nd_size
114  if(param_ofld%scale_val_2nd_size==0.and.param_afld%scale_val_2nd_size/=0) then
115  param_ofld%scale_val_2nd_size=param_afld%scale_val_2nd_size
116  endif
117 
118 ! typ_intvl_wvlen
119  if(trim(param_ofld%typ_intvl_wvlen)==''.and.trim(param_afld%typ_intvl_wvlen)/='') then
120  param_ofld%typ_intvl_wvlen=param_afld%typ_intvl_wvlen
121  endif
122 ! scale_fact_1st_wvlen
123  if(param_ofld%scale_fact_1st_wvlen==0.and.param_afld%scale_fact_1st_wvlen/=0) then
124  param_ofld%scale_fact_1st_wvlen=param_afld%scale_fact_1st_wvlen
125  endif
126 ! scale_val_1st_wvlen
127  if(param_ofld%scale_val_1st_wvlen==0.and.param_afld%scale_val_1st_wvlen/=0) then
128  param_ofld%scale_val_1st_wvlen=param_afld%scale_val_1st_wvlen
129  endif
130 ! scale_fact_2nd_wvlen
131  if(param_ofld%scale_fact_2nd_wvlen==0.and.param_afld%scale_fact_2nd_wvlen/=0) then
132  param_ofld%scale_fact_2nd_wvlen=param_afld%scale_fact_2nd_wvlen
133  endif
134 ! scale_val_2nd_wvlen
135  if(param_ofld%scale_val_2nd_wvlen==0.and.param_afld%scale_val_2nd_wvlen/=0) then
136  param_ofld%scale_val_2nd_wvlen=param_afld%scale_val_2nd_wvlen
137  endif
138 !
139 ! scale
140  if(size(param_ofld%scale)==0.and.size(param_afld%scale)/=0) then
141  nullify(param_ofld%scale)
142  allocate(param_ofld%scale(size(param_afld%scale)))
143  param_ofld%scale=param_afld%scale
144  endif
145 
146 !
147  RETURN
148  end subroutine fill_psetfld