1 | MODULE update_outputs_physiq_mod |
---|
2 | |
---|
3 | CONTAINS |
---|
4 | |
---|
5 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
6 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
7 | SUBROUTINE update_outputs_physiq_surf( & |
---|
8 | ims,ime,jms,jme,& |
---|
9 | ips,ipe,jps,jpe,& |
---|
10 | MARS_MODE,& |
---|
11 | M_TSURF,M_CO2ICE,& |
---|
12 | M_H2OICE) |
---|
13 | |
---|
14 | use phys_state_var_mod, only : ftsol |
---|
15 | |
---|
16 | implicit none |
---|
17 | |
---|
18 | INTEGER, INTENT(IN) :: ims,ime,jms,jme |
---|
19 | INTEGER, INTENT(IN) :: ips,ipe,jps,jpe |
---|
20 | INTEGER, INTENT(IN) :: MARS_MODE |
---|
21 | INTEGER :: i,j,subs |
---|
22 | REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & |
---|
23 | M_TSURF,M_CO2ICE,M_H2OICE |
---|
24 | |
---|
25 | DO j = jps,jpe |
---|
26 | DO i = ips,ipe |
---|
27 | |
---|
28 | !-----------------------------------! |
---|
29 | ! 1D subscript for physics "cursor" ! |
---|
30 | !-----------------------------------! |
---|
31 | subs = (j-jps)*(ipe-ips+1)+(i-ips+1) |
---|
32 | |
---|
33 | !-------------------------------------------------------! |
---|
34 | ! Save key variables for restart and output and nesting ! |
---|
35 | !-------------------------------------------------------! |
---|
36 | M_TSURF(i,j) = ftsol(subs) |
---|
37 | |
---|
38 | ENDDO |
---|
39 | ENDDO |
---|
40 | |
---|
41 | END SUBROUTINE update_outputs_physiq_surf |
---|
42 | |
---|
43 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
44 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
45 | SUBROUTINE update_outputs_physiq_soil( & |
---|
46 | ims,ime,jms,jme,& |
---|
47 | ips,ipe,jps,jpe,& |
---|
48 | nsoil,& |
---|
49 | M_TSOIL) |
---|
50 | |
---|
51 | use phys_state_var_mod, only : ftsoil |
---|
52 | |
---|
53 | implicit none |
---|
54 | |
---|
55 | INTEGER, INTENT(IN) :: ims,ime,jms,jme |
---|
56 | INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,nsoil |
---|
57 | INTEGER :: i,j,subs |
---|
58 | REAL, DIMENSION( ims:ime, nsoil, jms:jme ), INTENT(INOUT) :: & |
---|
59 | M_TSOIL |
---|
60 | |
---|
61 | DO j = jps,jpe |
---|
62 | DO i = ips,ipe |
---|
63 | |
---|
64 | !-----------------------------------! |
---|
65 | ! 1D subscript for physics "cursor" ! |
---|
66 | !-----------------------------------! |
---|
67 | subs = (j-jps)*(ipe-ips+1)+(i-ips+1) |
---|
68 | |
---|
69 | !-------------------------------------------------------! |
---|
70 | ! Save key variables for restart and output and nesting ! |
---|
71 | !-------------------------------------------------------! |
---|
72 | M_TSOIL(i,:,j) = ftsoil(subs,:) |
---|
73 | |
---|
74 | ENDDO |
---|
75 | ENDDO |
---|
76 | |
---|
77 | END SUBROUTINE update_outputs_physiq_soil |
---|
78 | |
---|
79 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
80 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
81 | SUBROUTINE update_outputs_physiq_rad( & |
---|
82 | ims,ime,jms,jme,& |
---|
83 | ips,ipe,jps,jpe,& |
---|
84 | M_FLUXRAD) |
---|
85 | |
---|
86 | use phys_state_var_mod, only : radsol |
---|
87 | |
---|
88 | implicit none |
---|
89 | |
---|
90 | INTEGER, INTENT(IN) :: ims,ime,jms,jme |
---|
91 | INTEGER, INTENT(IN) :: ips,ipe,jps,jpe |
---|
92 | INTEGER :: i,j,subs |
---|
93 | REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: M_FLUXRAD |
---|
94 | |
---|
95 | DO j = jps,jpe |
---|
96 | DO i = ips,ipe |
---|
97 | |
---|
98 | !-----------------------------------! |
---|
99 | ! 1D subscript for physics "cursor" ! |
---|
100 | !-----------------------------------! |
---|
101 | subs = (j-jps)*(ipe-ips+1)+(i-ips+1) |
---|
102 | |
---|
103 | !-------------------------------------------------------! |
---|
104 | ! Save key variables for restart and output and nesting ! |
---|
105 | !-------------------------------------------------------! |
---|
106 | M_FLUXRAD(i,j) = radsol(subs) |
---|
107 | |
---|
108 | ENDDO |
---|
109 | ENDDO |
---|
110 | |
---|
111 | END SUBROUTINE update_outputs_physiq_rad |
---|
112 | |
---|
113 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
114 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
115 | SUBROUTINE update_outputs_physiq_turb( & |
---|
116 | ims,ime,jms,jme,kms,kme,& |
---|
117 | ips,ipe,jps,jpe,kps,kpe,& |
---|
118 | M_Q2,M_WSTAR,& |
---|
119 | HFMAX,ZMAX,USTM,HFX) |
---|
120 | |
---|
121 | use turb_mod, only: q2,wstar,yustar,sens |
---|
122 | |
---|
123 | implicit none |
---|
124 | |
---|
125 | INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme |
---|
126 | INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe |
---|
127 | INTEGER :: i,j,subs |
---|
128 | REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & |
---|
129 | M_WSTAR,HFMAX,ZMAX,USTM,HFX |
---|
130 | REAL, DIMENSION( ims:ime, kms:kme+1, jms:jme ), INTENT(INOUT) :: M_Q2 |
---|
131 | |
---|
132 | DO j = jps,jpe |
---|
133 | DO i = ips,ipe |
---|
134 | |
---|
135 | !-----------------------------------! |
---|
136 | ! 1D subscript for physics "cursor" ! |
---|
137 | !-----------------------------------! |
---|
138 | subs = (j-jps)*(ipe-ips+1)+(i-ips+1) |
---|
139 | |
---|
140 | !-------------------------------------------------------! |
---|
141 | ! Save key variables for restart and output and nesting ! |
---|
142 | !-------------------------------------------------------! |
---|
143 | M_Q2(i,kps:kpe+1,j) = q2(subs,:) |
---|
144 | M_WSTAR(i,j) = wstar(subs) |
---|
145 | |
---|
146 | !! output only (arrays already in phys modules) |
---|
147 | USTM(i,j) = yustar(subs) |
---|
148 | HFX(i,j) = sens(subs) |
---|
149 | |
---|
150 | ENDDO |
---|
151 | ENDDO |
---|
152 | |
---|
153 | END SUBROUTINE update_outputs_physiq_turb |
---|
154 | |
---|
155 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
156 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
157 | SUBROUTINE update_outputs_physiq_diag( & |
---|
158 | ims,ime,jms,jme,kms,kme,& |
---|
159 | ips,ipe,jps,jpe,kps,kpe,& |
---|
160 | SWDOWNZ,TAU_DUST,QSURFDUST,& |
---|
161 | MTOT,ICETOT,TAU_ICE,& |
---|
162 | HR_SW,HR_LW,HR_DYN,DT,DTRAD,& |
---|
163 | RDUST,VMR_ICE,RICE,& |
---|
164 | CLOUDFRAC,TOTCLOUDFRAC,& |
---|
165 | RAIN,SNOW,REEVAP,SURFRAIN,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,& |
---|
166 | FLUXSURF_LW,FLXGRD,LSCEZ,H2OICE_REFF,LATENT_HF) |
---|
167 | |
---|
168 | USE comm_wrf !! to get fields to be written from physiq |
---|
169 | |
---|
170 | INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme |
---|
171 | INTEGER, INTENT(IN) :: ips,ipe,jps,jpe,kps,kpe |
---|
172 | REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: & |
---|
173 | SWDOWNZ,TAU_DUST,QSURFDUST,& |
---|
174 | MTOT,ICETOT,TAU_ICE,& |
---|
175 | TOTCLOUDFRAC,ALBEQ,FLUXTOP_DN,FLUXABS_SW,FLUXTOP_LW,FLUXSURF_SW,& |
---|
176 | FLUXSURF_LW,FLXGRD,LATENT_HF,REEVAP,SURFRAIN |
---|
177 | REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(INOUT ) :: & |
---|
178 | HR_SW,HR_LW,RDUST,VMR_ICE,RICE,CLOUDFRAC,HR_DYN,DT,DTRAD,RAIN,SNOW,& |
---|
179 | LSCEZ,H2OICE_REFF |
---|
180 | INTEGER :: i,j,subs |
---|
181 | |
---|
182 | |
---|
183 | DO j = jps,jpe |
---|
184 | DO i = ips,ipe |
---|
185 | |
---|
186 | !-----------------------------------! |
---|
187 | ! 1D subscript for physics "cursor" ! |
---|
188 | !-----------------------------------! |
---|
189 | subs = (j-jps)*(ipe-ips+1)+(i-ips+1) |
---|
190 | |
---|
191 | !! get diagnostics from physics |
---|
192 | SWDOWNZ(i,j) = comm_SWDOWNZ(subs) |
---|
193 | MTOT(i,j) = comm_MTOT(subs) |
---|
194 | HR_SW(i,kps:kpe,j) = comm_HR_SW(subs,kps:kpe) |
---|
195 | HR_LW(i,kps:kpe,j) = comm_HR_LW(subs,kps:kpe) |
---|
196 | HR_DYN(i,kps:kpe,j) = comm_HR_DYN(subs,kps:kpe) |
---|
197 | DT(i,kps:kpe,j) = comm_DT(subs,kps:kpe) |
---|
198 | DTRAD(i,kps:kpe,j) = comm_DT_RAD(subs,kps:kpe) |
---|
199 | DTVDF(i,kps:kpe,j) = comm_DT_VDF(subs,kps:kpe) |
---|
200 | DTAJS(i,kps:kpe,j) = comm_DT_AJS(subs,kps:kpe) |
---|
201 | |
---|
202 | ENDDO |
---|
203 | ENDDO |
---|
204 | |
---|
205 | CALL deallocate_comm_wrf |
---|
206 | |
---|
207 | END SUBROUTINE update_outputs_physiq_diag |
---|
208 | |
---|
209 | END MODULE update_outputs_physiq_mod |
---|
210 | |
---|
211 | |
---|
212 | |
---|