*IF DEF,SCMA S_DPPRNT.2 C *****************************COPYRIGHT****************************** S_DPPRNT.3 C (c) CROWN COPYRIGHT 1998, METEOROLOGICAL OFFICE, All Rights Reserved. S_DPPRNT.4 C S_DPPRNT.5 C Use, duplication or disclosure of this code is subject to the S_DPPRNT.6 C restrictions as set forth in the contract. S_DPPRNT.7 C S_DPPRNT.8 C Meteorological Office S_DPPRNT.9 C London Road S_DPPRNT.10 C BRACKNELL S_DPPRNT.11 C Berkshire UK S_DPPRNT.12 C RG12 2SZ S_DPPRNT.13 C S_DPPRNT.14 C If no contract has been raised with this copy of the code, the use, S_DPPRNT.15 C duplication or disclosure of it is strictly prohibited. Permission S_DPPRNT.16 C to do so must first be obtained in writing from the Head of Numerical S_DPPRNT.17 C Modelling at the above address. S_DPPRNT.18 C ******************************COPYRIGHT****************************** S_DPPRNT.19 C S_DPPRNT.20 C SUBROUTINE DUMP_PRINT S_DPPRNT.21 C PURPOSE:- To print out diagnostics for DUMP. S_DPPRNT.22 C This code can cope with printing out S_DPPRNT.23 C variables on any number of model levels. S_DPPRNT.24 C S_DPPRNT.25 C PROGRAMMER:- J. LEAN S_DPPRNT.26 C Modification History: S_DPPRNT.27 C Version Date S_DPPRNT.28 C 4.5 07/98 SCM integrated as a standard UM configuration S_DPPRNT.29 C JC Thil. S_DPPRNT.30 C = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = S_DPPRNT.31 C S_DPPRNT.32Subroutine DUMP_PRINT( 3S_DPPRNT.33 ! IN S_DPPRNT.34 & points, nlevs, nwet S_DPPRNT.35 & ,nfor, nbl_levs, nsoilt_levs, nsoilm_levs, ntrop S_DPPRNT.36 ! IN dimension of dump array. S_DPPRNT.37 & ,nvars, sec_dump S_DPPRNT.38 & ,dump, j, stepcount, daynumber, year, time_string S_DPPRNT.39 & ,daycount, dump_days, land_mask, head_label, unit) S_DPPRNT.40 S_DPPRNT.41 Implicit none S_DPPRNT.42 S_DPPRNT.43 C Arguments S_DPPRNT.44 Integer S_DPPRNT.45 & points ! IN Number of model columns. S_DPPRNT.46 & ,nlevs ! IN Number of levels of the model. S_DPPRNT.47 & ,nwet ! IN Number of model levels S_DPPRNT.48 & ,nfor ! IN Number terms for observational S_DPPRNT.49 ! forcing S_DPPRNT.50 & ,nbl_levs ! IN Number of Boundary layer levels S_DPPRNT.51 & ,nsoilt_levs ! IN Number of soil temperature S_DPPRNT.52 ! levels S_DPPRNT.53 & ,nsoilm_levs ! IN Number of soil moisture levels S_DPPRNT.54 & ,ntrop ! IN Max number of levels in the S_DPPRNT.55 ! troposphere S_DPPRNT.56 & ,nvars ! IN no. of variables in dump ; S_DPPRNT.57 ! is equal to nprimvars + X S_DPPRNT.58 ! where X is any no. of variables S_DPPRNT.59 ! (default 71) S_DPPRNT.60 Real S_DPPRNT.61 & sec_dump ! sec_dump is no. of seconds between S_DPPRNT.62 ! each dump and is equal to S_DPPRNT.63 ! n*timestep where n is a whole S_DPPRNT.64 ! number S_DPPRNT.65 C S_DPPRNT.66 C--------------------------------------------------------------------- S_DPPRNT.67 C Arguments S_DPPRNT.68 C--------------------------------------------------------------------- S_DPPRNT.69 C S_DPPRNT.70 Logical S_DPPRNT.71 & land_mask(points) ! IN true if land point. S_DPPRNT.72 Integer S_DPPRNT.73 & daycount ! Counter for day number S_DPPRNT.74 & ,daynumber ! day number S_DPPRNT.75 & ,dump_days ! No. of days over which mean dump S_DPPRNT.76 ! required S_DPPRNT.77 & ,head_label ! No. refers to which heading for S_DPPRNT.78 ! output table required S_DPPRNT.79 & ,j ! Counter for dump no. S_DPPRNT.80 & ,stepcount ! Counter for timestep S_DPPRNT.81 & ,unit ! UNIT no. for o/p of dump to go. S_DPPRNT.82 & ,year ! 'actual' year. S_DPPRNT.83 C S_DPPRNT.84 Character*8 S_DPPRNT.85 & time_string ! IN string containing actual time; S_DPPRNT.86 ! hr..mn..sc S_DPPRNT.87 c S_DPPRNT.88 Real S_DPPRNT.89 & dump(points,nvars,*) ! DUMP containing diagnostics S_DPPRNT.90 C S_DPPRNT.91 C--------------------------------------------------------------------- S_DPPRNT.92 C Local variables S_DPPRNT.93 C--------------------------------------------------------------------- S_DPPRNT.94 C S_DPPRNT.95 Integer S_DPPRNT.96 & element ! Array element number S_DPPRNT.97 & ,lastrow ! Number of elements in the last row S_DPPRNT.98 & ,nblrows,nblcount ! Limit and counter for DO Loop that S_DPPRNT.99 ! writes out arrays with S_DPPRNT.100 & ,ndeeprows,ndeepcount ! NBL_LEVS,NCLDS,NDEEP,NLEVS, S_DPPRNT.101 & ,deepmrows,deepmcount ! NSOILM rows,count S_DPPRNT.102 & ,nlevsrows,nlevscount ! NWET,NSOIL elements S_DPPRNT.103 & ,nwetrows,nwetcount ! S_DPPRNT.104 & ,ndeep ! No of deep soil temp. layers S_DPPRNT.105 & ,ndeepm ! No of deep soil moisture layers S_DPPRNT.106 & ,i, l ! Loop counters S_DPPRNT.107 & ,icount S_DPPRNT.108 S_DPPRNT.109 Character*30 S_DPPRNT.110 & c1fmt S_DPPRNT.111 Character*32 S_DPPRNT.112 & c2fmt S_DPPRNT.113 Character*36 S_DPPRNT.114 & ctfmt S_DPPRNT.115 C S_DPPRNT.116 C Set format statements S_DPPRNT.117 C S_DPPRNT.118 c1fmt = '('' * '', (f8.3,3x))' S_DPPRNT.119 c2fmt = '('' * '', (1pe10.3,1x))' S_DPPRNT.120 ctfmt = '(''0* Variable'', (3x,''level'',i2,1x))' S_DPPRNT.121 C S_DPPRNT.122 C Heading S_DPPRNT.123 C S_DPPRNT.124 If (head_label .eq. 1) then S_DPPRNT.125 C S_DPPRNT.126 C Timestep values. O/P titles - day in run etc. + actual day S_DPPRNT.127 C etc. S_DPPRNT.128 C S_DPPRNT.129 Write (unit,60) S_DPPRNT.130 Write (unit,81) daycount, stepcount, sec_dump S_DPPRNT.131 Write (unit,80) year, daynumber, time_string S_DPPRNT.132 elseif (head_label .eq. 2) then S_DPPRNT.133 C S_DPPRNT.134 C Daily means S_DPPRNT.135 C S_DPPRNT.136 Write (unit,60) S_DPPRNT.137 Write (unit,82) daycount S_DPPRNT.138 Write (unit,79) year, daynumber, time_string S_DPPRNT.139 elseif (head_label .eq. 3) then S_DPPRNT.140 C S_DPPRNT.141 C Periodic means ( no. od days specified). S_DPPRNT.142 C S_DPPRNT.143 Write (unit,60) S_DPPRNT.144 Write (unit,83) daycount-dump_days + 1, daycount S_DPPRNT.145 Write (unit,84) year, daynumber, time_string S_DPPRNT.146 endif S_DPPRNT.147 C S_DPPRNT.148 C Write out variables T THETA U and V maximum of 10 S_DPPRNT.149 C variables per row S_DPPRNT.150 C S_DPPRNT.151 Do l = 1, points S_DPPRNT.152 Write (unit,59) S_DPPRNT.153 If (Points .gt. 1) Write(unit,'(''Dump for site '',I5)') l S_DPPRNT.154 Write (unit,50) S_DPPRNT.155 Write (unit,59) S_DPPRNT.156 C S_DPPRNT.157 C Calculate no. of rows and no. of elements in last row S_DPPRNT.158 C S_DPPRNT.159 If (mod(nlevs,10) .eq. 0) then S_DPPRNT.160 nlevsrows = int(nlevs/10) S_DPPRNT.161 lastrow = 10 S_DPPRNT.162 else S_DPPRNT.163 nlevsrows = int(nlevs/10) + 1 S_DPPRNT.164 lastrow = mod(nlevs,10) S_DPPRNT.165 endif S_DPPRNT.166 Do nlevscount = 1, nlevsrows S_DPPRNT.167 element = 10 * (nlevscount-1) S_DPPRNT.168 if (nlevscount .lt. nlevsrows) then S_DPPRNT.169 C S_DPPRNT.170 C Write out all complete rows ie of 10 variables per row S_DPPRNT.171 C S_DPPRNT.172 Write (unit,150) (element + i,i = 1, 10) S_DPPRNT.173 Write (unit,100) (dump(l,element + i,j), i = 1, 10), S_DPPRNT.174 & (dump(l,nlevs + element + i,j), i = 1, 10), S_DPPRNT.175 & (dump(l,2*nlevs + element + i,j), i = 1, 10), S_DPPRNT.176 & (dump(l,3*nlevs + element + i,j), i = 1, 10) S_DPPRNT.177 else S_DPPRNT.178 C S_DPPRNT.179 C Write out last row. Use an internal format statement by S_DPPRNT.180 C creating a character string. This will enable a variable S_DPPRNT.181 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.182 C elements in the last row which can be written into the S_DPPRNT.183 C format statement via an internal write statement. S_DPPRNT.184 C S_DPPRNT.185 Write (ctfmt(16:17), '(i2)') lastrow S_DPPRNT.186 Write (unit,ctfmt) (element + i, i = 1, lastrow) S_DPPRNT.187 Write (c1fmt(18:19), '(i2)')lastrow S_DPPRNT.188 Write (c1fmt(6:15), '(''U m s^-1 '')') S_DPPRNT.189 Write (unit,c1fmt) S_DPPRNT.190 & (dump(l,i + element,j), i = 1, lastrow) S_DPPRNT.191 Write (c1fmt(6:15), '(''V m s^-1 '')') S_DPPRNT.192 Write (unit,c1fmt) (dump(l,nlevs + i + element,j), S_DPPRNT.193 & i = 1, lastrow) S_DPPRNT.194 Write (c1fmt(6:15), '(''T K '')') S_DPPRNT.195 Write (unit,c1fmt) (dump(l,2*nlevs + i + element,j), S_DPPRNT.196 & i = 1, lastrow) S_DPPRNT.197 Write (c1fmt(6:15), '(''theta K '')') S_DPPRNT.198 Write (unit,c1fmt) (dump(l,3*nlevs + i + element,j), S_DPPRNT.199 & i = 1, lastrow) S_DPPRNT.200 endif S_DPPRNT.201 enddo S_DPPRNT.202 icount = 4 * nlevs S_DPPRNT.203 Write (unit,130) S_DPPRNT.204 Write (unit,131) S_DPPRNT.205 Write (unit,132) dump(l,icount + 3,j) S_DPPRNT.206 icount = icount + 3 S_DPPRNT.207 Write (unit,59) S_DPPRNT.208 Write (unit,51) S_DPPRNT.209 Write (unit,59) S_DPPRNT.210 C S_DPPRNT.211 C Repeat above section of code for variables with nwet levels S_DPPRNT.212 C Write out variables Q RH RHW QCL QCF and LCA for nwet levels S_DPPRNT.213 C maximum of 10 variables per row S_DPPRNT.214 C S_DPPRNT.215 If (mod(nwet,10) .eq. 0) then S_DPPRNT.216 C S_DPPRNT.217 C Calculate no. of rows and no. of elements in last row S_DPPRNT.218 C S_DPPRNT.219 nwetrows = int(nwet/10) S_DPPRNT.220 lastrow = 10 S_DPPRNT.221 else S_DPPRNT.222 nwetrows = int(nwet/10) + 1 S_DPPRNT.223 lastrow = mod(nwet,10) S_DPPRNT.224 endif S_DPPRNT.225 Do nwetcount = 1, nwetrows S_DPPRNT.226 element = 10 * (nwetcount-1) S_DPPRNT.227 if (nwetcount .lt. nwetrows) then S_DPPRNT.228 C S_DPPRNT.229 C Write out all complete rows ie of 10 variables per row S_DPPRNT.230 C S_DPPRNT.231 Write (unit,150) (element + i, i = 1, 10) S_DPPRNT.232 Write (unit,101) S_DPPRNT.233 & (dump(l,icount + element + i, j), i = 1, 10), S_DPPRNT.234 & (dump(l,icount + nwet + element + i, j), i = 1, 10), S_DPPRNT.235 & (dump(l,icount + 2*nwet + element + i, j), i = 1, 10), S_DPPRNT.236 & (dump(l,icount + 3*nwet + element + i, j), i = 1, 10), S_DPPRNT.237 & (dump(l,icount + 4*nwet + element + i, j), i = 1, 10), S_DPPRNT.238 & (dump(l,icount + 5*nwet + element + i, j), i = 1, 10), S_DPPRNT.239 & (dump(l,icount + 6*nwet + element + i, j), i = 1, 10), S_DPPRNT.240 & (dump(l,icount + 7*nwet + element + i, j), i = 1, 10) S_DPPRNT.241 else S_DPPRNT.242 C S_DPPRNT.243 C Write out last row. Use an internal format statement by S_DPPRNT.244 C creating a character string. This will enable a variable S_DPPRNT.245 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.246 C elements in the last row which can be written into the S_DPPRNT.247 C format statement via an internal write statement. S_DPPRNT.248 C S_DPPRNT.249 Write (ctfmt(16:17), '(i2)') lastrow S_DPPRNT.250 Write (unit,ctfmt)(element + i,i = 1, lastrow) S_DPPRNT.251 Write (c2fmt(18:19), '(i2)')lastrow S_DPPRNT.252 Write (c2fmt(6:15), '(''Q kg/kg '')') S_DPPRNT.253 Write (unit,c2fmt) (dump(l,icount + i + element,j), S_DPPRNT.254 & i = 1, lastrow) S_DPPRNT.255 Write (c2fmt(6:15), '(''RH '')') S_DPPRNT.256 Write (unit,c2fmt) (dump(l,icount+ nwet+ i+ element,j), S_DPPRNT.257 & i = 1, lastrow) S_DPPRNT.258 Write (c2fmt(6:15), '(''RHW '')') S_DPPRNT.259 Write (unit,c2fmt) S_DPPRNT.260 & (dump(l,icount + 2*nwet + i + element,j), S_DPPRNT.261 & i = 1, lastrow) S_DPPRNT.262 Write (c2fmt(6:15), '(''QCL kg/kg '')') S_DPPRNT.263 Write (unit,c2fmt) S_DPPRNT.264 & (dump(l,icount + 3*nwet + i + element,j), S_DPPRNT.265 & i = 1, lastrow) S_DPPRNT.266 Write (c2fmt(6:15), '(''QCF kg/kg '')') S_DPPRNT.267 Write (unit,c2fmt) S_DPPRNT.268 & (dump(l,icount + 4*nwet + i + element,j), S_DPPRNT.269 & i = 1, lastrow) S_DPPRNT.270 Write (c2fmt(6:15), '(''LCA '')') S_DPPRNT.271 Write (unit,c2fmt) S_DPPRNT.272 & (dump(l,icount + 5*nwet + i + element,j), S_DPPRNT.273 & i = 1, lastrow) S_DPPRNT.274 Write (c2fmt(6:15), '(''DT K/d '')') S_DPPRNT.275 Write (unit,c2fmt) S_DPPRNT.276 & (dump(l,icount + 6*nwet + i + element,j), S_DPPRNT.277 & i = 1, lastrow) S_DPPRNT.278 Write (c2fmt(6:15), '(''DQ kg/kg/d'')') S_DPPRNT.279 Write (unit,c2fmt) S_DPPRNT.280 & (dump(l,icount + 7*nwet + i + element,j), S_DPPRNT.281 & i = 1, lastrow) S_DPPRNT.282 endif S_DPPRNT.283 enddo S_DPPRNT.284 icount = icount + 8*nwet S_DPPRNT.285 Write (unit,102) S_DPPRNT.286 Write (unit,103) S_DPPRNT.287 Write (unit,104) S_DPPRNT.288 c S_DPPRNT.289 c Write out all other rain and cloud variables S_DPPRNT.290 C S_DPPRNT.291 Write (unit,105)(dump(l,icount + 1 + i,j), i = 1, 2), S_DPPRNT.292 & (dump(l,icount + 5 + i,j), i = 1, 6) S_DPPRNT.293 icount = icount + i + 4 S_DPPRNT.294 Write (unit,60) S_DPPRNT.295 Write (unit,52) S_DPPRNT.296 Write (unit,59) S_DPPRNT.297 C S_DPPRNT.298 C Repeat above section of code for variables with NBL levels S_DPPRNT.299 C Write out variables TAUX TAUY FQ and FTL for NBL levels S_DPPRNT.300 C maximum of 10 variables per row S_DPPRNT.301 C S_DPPRNT.302 If (mod(nbl_levs,10) .eq. 0) then S_DPPRNT.303 C S_DPPRNT.304 C Calculate no. of rows and no. of elements in last row S_DPPRNT.305 C S_DPPRNT.306 nblrows = int(nbl_levs/10) S_DPPRNT.307 lastrow = 10 S_DPPRNT.308 else S_DPPRNT.309 nblrows = int(nbl_levs/10) + 1 S_DPPRNT.310 lastrow = mod(NBL_LEVS,10) S_DPPRNT.311 endif S_DPPRNT.312 Do nblcount = 1, nblrows S_DPPRNT.313 element = 10*(nblcount-1) S_DPPRNT.314 If (nblcount .lt. nblrows) then S_DPPRNT.315 C S_DPPRNT.316 C Write out all complete rows ie of 10 variables per row S_DPPRNT.317 C S_DPPRNT.318 Write (unit,150)(element + i + 1/2,i = 1, 10) S_DPPRNT.319 Write (unit,106) S_DPPRNT.320 & (dump(l,icount + element + i, j), S_DPPRNT.321 & i = 1, 10), S_DPPRNT.322 & (dump(l,icount + nbl_levs + element + i, j), S_DPPRNT.323 & i = 1, 10), S_DPPRNT.324 & (dump(l,icount + 2*nbl_levs + element + i, j), S_DPPRNT.325 & i = 1, 10), S_DPPRNT.326 & (dump(l,icount + 3*nbl_levs + element + i, j), S_DPPRNT.327 & i = 1, 10) S_DPPRNT.328 else S_DPPRNT.329 C S_DPPRNT.330 C Write out last row. Use an internal format statement by S_DPPRNT.331 C creating a character string. This will enable a variable S_DPPRNT.332 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.333 C elements in the last row which can be written into the S_DPPRNT.334 C format statement via an internal write statement. S_DPPRNT.335 C S_DPPRNT.336 Write (ctfmt(16:17), '(i2)')lastrow S_DPPRNT.337 Write (unit,ctfmt)(element + i + 1/2,i = 1, lastrow) S_DPPRNT.338 Write (c2fmt(18:19), '(i2)')lastrow S_DPPRNT.339 Write (c2fmt(6:15), '(''taux nm^-2'')') S_DPPRNT.340 Write (unit,c2fmt)(dump(l,icount + i + element,j), S_DPPRNT.341 & i = 1, lastrow) S_DPPRNT.342 Write (c2fmt(6:15), '(''tauy nm^-2'')') S_DPPRNT.343 Write (unit,c2fmt) S_DPPRNT.344 & (dump(l,icount + nbl_levs + i + element,j), S_DPPRNT.345 & i = 1, lastrow) S_DPPRNT.346 Write(c2fmt(6:15),'(''fq kg/m2/s'')') S_DPPRNT.347 Write (unit,c2fmt) S_DPPRNT.348 & (dump(l,icount + 2*nbl_levs + i + element,j) S_DPPRNT.349 & ,i = 1, lastrow) S_DPPRNT.350 Write (c2fmt(6:15), '(''ftl W m^-2'')') S_DPPRNT.351 Write (unit,c2fmt) S_DPPRNT.352 & (dump(l,icount + 3*nbl_levs + i + element,j) S_DPPRNT.353 & ,i = 1, lastrow) S_DPPRNT.354 endif S_DPPRNT.355 enddo S_DPPRNT.356 icount = icount + nbl_levs*4 S_DPPRNT.357 ndeep = nsoilt_levs S_DPPRNT.358 ndeepm = nsoilm_levs S_DPPRNT.359 c S_DPPRNT.360 C Repeat above section of code for variables with NSOILT levels S_DPPRNT.361 C Write out variables Tdeep maximum of 10 S_DPPRNT.362 C variables per row S_DPPRNT.363 C S_DPPRNT.364 If (mod(ndeep,10) .eq. 0) then S_DPPRNT.365 C S_DPPRNT.366 C Calculate no. of rows and no. of elements in last row S_DPPRNT.367 C S_DPPRNT.368 ndeeprows = int(ndeep/10) S_DPPRNT.369 lastrow = 10 S_DPPRNT.370 else S_DPPRNT.371 ndeeprows = int(ndeep/10) + 1 S_DPPRNT.372 lastrow = mod(ndeep,10) S_DPPRNT.373 endif S_DPPRNT.374 do ndeepcount = 1, ndeeprows S_DPPRNT.375 C S_DPPRNT.376 C Write out all complete rows ie of 10 variables per row S_DPPRNT.377 C S_DPPRNT.378 element = 10*(ndeepcount-1) S_DPPRNT.379 if (ndeepcount .lt. ndeeprows) then S_DPPRNT.380 Write (unit,150)(element + i + 1/2,i = 1, 10) S_DPPRNT.381 Write (unit,107) S_DPPRNT.382 & (dump(l,icount + element + i,j), i = 1, 10) S_DPPRNT.383 else S_DPPRNT.384 C S_DPPRNT.385 C Write out last row. Use an internal format statement by S_DPPRNT.386 C creating a character string. This will enable a variable S_DPPRNT.387 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.388 C elements in the last row which can be written into the S_DPPRNT.389 C format statement via an internal write statement. S_DPPRNT.390 C S_DPPRNT.391 Write (ctfmt(16:17), '(i2)')lastrow S_DPPRNT.392 Write (unit,ctfmt)(element + i + 1/2,i = 1, lastrow) S_DPPRNT.393 Write (c1fmt(18:19), '(i2)')lastrow S_DPPRNT.394 Write (c1fmt(6:15), '(''Tdeep k '')') S_DPPRNT.395 Write (unit,c1fmt)(dump(l,icount + i + element,j) S_DPPRNT.396 & ,i = 1, lastrow) S_DPPRNT.397 endif S_DPPRNT.398 enddo S_DPPRNT.399 icount = icount + ndeep S_DPPRNT.400 Write (unit,108) S_DPPRNT.401 Write (unit,109) S_DPPRNT.402 C S_DPPRNT.403 C Write out all other boundary layer variables S_DPPRNT.404 C S_DPPRNT.405 Write (unit,110)(dump(l,icount + i,j), i = 1, 8) S_DPPRNT.406 icount = icount + i-1 S_DPPRNT.407 Write (unit,111) S_DPPRNT.408 Write (unit,112) S_DPPRNT.409 Write (unit,113) S_DPPRNT.410 Write (unit,114)(dump(l,icount + i,j), i = 1, 7) S_DPPRNT.411 icount = icount + i-1 S_DPPRNT.412 Write (unit,115) S_DPPRNT.413 Write (unit,116) S_DPPRNT.414 Write (unit,117)(dump(l,icount + i,j), i = 1, 7) S_DPPRNT.415 icount = icount + i-1 S_DPPRNT.416 *IF DEF,A03_5A S_DPPRNT.417 Write (unit,134) S_DPPRNT.418 Write (unit,135) S_DPPRNT.419 Write (unit,136) S_DPPRNT.420 Write (unit,137) S_DPPRNT.421 & (dump(l,icount + i,j), i = 1, 2), S_DPPRNT.422 & (dump(l,icount + i,j), i = 4, 7) S_DPPRNT.423 *ELSE S_DPPRNT.424 Write (unit,118) S_DPPRNT.425 Write (unit,119) S_DPPRNT.426 Write (unit,120) S_DPPRNT.427 Write (unit,121) S_DPPRNT.428 & (dump(l,icount + i,j), i = 1, 3), S_DPPRNT.429 & (dump(l,icount + i,j), i = 6,7) S_DPPRNT.430 *ENDIF S_DPPRNT.431 S_DPPRNT.432 icount = icount + i-1 S_DPPRNT.433 C S_DPPRNT.434 *IF DEF,A08_5A S_DPPRNT.435 C Repeat above section of code for variables with NSOILM levels S_DPPRNT.436 C Write out variables SMCL maximum of 10 S_DPPRNT.437 C variables per row S_DPPRNT.438 C S_DPPRNT.439 ndeepm = nsoilm_levs S_DPPRNT.440 If (mod(ndeepm,10) .eq. 0) then S_DPPRNT.441 C S_DPPRNT.442 C Calculate no. of rows and no. of elements in last row S_DPPRNT.443 C S_DPPRNT.444 deepmrows = int(ndeepm/10) S_DPPRNT.445 lastrow = 10 S_DPPRNT.446 else S_DPPRNT.447 deepmrows = int(ndeepm/10) + 1 S_DPPRNT.448 lastrow = mod(ndeepm,10) S_DPPRNT.449 endif S_DPPRNT.450 Do deepmcount = 1, deepmrows S_DPPRNT.451 C S_DPPRNT.452 C Write out all complete rows ie of 10 variables per row S_DPPRNT.453 C S_DPPRNT.454 element = 10*(deepmcount-1) S_DPPRNT.455 If (deepmcount .lt. deepmrows) then S_DPPRNT.456 Write (unit,150)(element + i + 1/2,i = 1, 10) S_DPPRNT.457 Write (unit,133) S_DPPRNT.458 & (dump(l,icount + element + i,j), i = 1, 10) S_DPPRNT.459 else S_DPPRNT.460 C S_DPPRNT.461 C Write out last row. Use an internal format statement by S_DPPRNT.462 C creating a character string. This will enable a variable S_DPPRNT.463 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.464 C elements in the last row which can be written into the S_DPPRNT.465 C format statement via an internal write statement. S_DPPRNT.466 C S_DPPRNT.467 Write (ctfmt(16:17), '(i2)')lastrow S_DPPRNT.468 Write (unit,ctfmt)(element + i + 1/2,i = 1, lastrow) S_DPPRNT.469 Write (c1fmt(18:19), '(i2)')lastrow S_DPPRNT.470 Write (c1fmt(6:15), '(''SMCL kg/m2'')') S_DPPRNT.471 Write (unit,c1fmt)(dump(l,icount + i + element,j) S_DPPRNT.472 & ,i = 1, lastrow) S_DPPRNT.473 endif S_DPPRNT.474 enddo S_DPPRNT.475 *ENDIF S_DPPRNT.476 icount = icount + ndeepm S_DPPRNT.477 *IF DEF,A08_5A S_DPPRNT.478 C Write out the MOSES diagnostics S_DPPRNT.479 Do deepmcount = 1, deepmrows S_DPPRNT.480 C S_DPPRNT.481 C Write out all complete rows ie of 10 variables per row S_DPPRNT.482 C S_DPPRNT.483 element = 10*(deepmcount-1) S_DPPRNT.484 If (deepmcount .lt. deepmrows) then S_DPPRNT.485 Write (unit,150)(element + i + 1/2,i = 1, 10) S_DPPRNT.486 Write (unit,138) S_DPPRNT.487 & (dump(l,icount + element + i,j), i = 1, 10) S_DPPRNT.488 else S_DPPRNT.489 C S_DPPRNT.490 C Write out last row. Use an internal format statement by S_DPPRNT.491 C creating a character string. This will enable a variable S_DPPRNT.492 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.493 C elements in the last row which can be written into the S_DPPRNT.494 C format statement via an internal write statement. S_DPPRNT.495 C S_DPPRNT.496 Write (ctfmt(16:17), '(i2)')lastrow S_DPPRNT.497 Write (unit,ctfmt)(element + i + 1/2,i = 1, lastrow) S_DPPRNT.498 Write (c1fmt(18:19), '(i2)')lastrow S_DPPRNT.499 Write (c1fmt(6:15), '(''sthu Kg/m2'')') S_DPPRNT.500 Write (unit,c1fmt)(dump(l,icount + i + element,j) S_DPPRNT.501 & ,i = 1, lastrow) S_DPPRNT.502 endif S_DPPRNT.503 enddo ! deepmcount S_DPPRNT.504 icount = icount + ndeepm S_DPPRNT.505 S_DPPRNT.506 Do deepmcount = 1, deepmrows S_DPPRNT.507 C S_DPPRNT.508 C Write out all complete rows ie of 10 variables per row S_DPPRNT.509 C S_DPPRNT.510 element = 10*(deepmcount-1) S_DPPRNT.511 if (deepmcount .lt. deepmrows) then S_DPPRNT.512 Write (unit,150)(element + i + 1/2,i = 1, 10) S_DPPRNT.513 Write (unit,139) S_DPPRNT.514 & (dump(l,icount + element + i,j), i = 1, 10) S_DPPRNT.515 else S_DPPRNT.516 C S_DPPRNT.517 C Write out last row. Use an internal format statement by S_DPPRNT.518 C creating a character string. This will enable a variable S_DPPRNT.519 C format to be created eg NF10.6 where N is the no. of S_DPPRNT.520 C elements in the last row which can be written into the S_DPPRNT.521 C format statement via an internal write statement. S_DPPRNT.522 C S_DPPRNT.523 Write (ctfmt(16:17), '(i2)') lastrow S_DPPRNT.524 Write (unit,ctfmt)(element + i + 1/2,i = 1, lastrow) S_DPPRNT.525 Write (c1fmt(18:19), '(i2)') lastrow S_DPPRNT.526 Write (c1fmt(6:15), '(''sthf Kg/m2'')') S_DPPRNT.527 Write (unit,c1fmt)(dump(l,icount + i + element,j) S_DPPRNT.528 & ,i = 1, lastrow) S_DPPRNT.529 endif S_DPPRNT.530 enddo ! deepmcount S_DPPRNT.531 icount = icount + ndeepm S_DPPRNT.532 S_DPPRNT.533 Write (unit,140) S_DPPRNT.534 Write (unit,141) S_DPPRNT.535 Write (unit,143)(dump(l,icount + i,j), i = 1, 3) S_DPPRNT.536 icount = icount + i-1 S_DPPRNT.537 S_DPPRNT.538 Write (unit,144) S_DPPRNT.539 Write (unit,145) S_DPPRNT.540 Write (unit,146) S_DPPRNT.541 Write (unit,147)(dump(l,icount + i,j), i = 1, 4) S_DPPRNT.542 icount = icount + i-1 S_DPPRNT.543 S_DPPRNT.544 *ELSE S_DPPRNT.545 C Space for MOSES diagnostics in DUMP - move on counters S_DPPRNT.546 icount = icount + ndeepm ! sthu S_DPPRNT.547 icount = icount + ndeepm ! sthf S_DPPRNT.548 icount = icount + 3 ! lai,canht,stom_cond S_DPPRNT.549 icount = icount + 4 ! etran,gpp,npp,resp_p S_DPPRNT.550 *ENDIF S_DPPRNT.551 S_DPPRNT.552 Write (unit,59) S_DPPRNT.553 Write (unit,53) S_DPPRNT.554 Write (unit,59) S_DPPRNT.555 C S_DPPRNT.556 C Repeat above section of code for variables with NLEVS levels S_DPPRNT.557 C Write out variables SW and LW maximum of 10 S_DPPRNT.558 C variables per row S_DPPRNT.559 C S_DPPRNT.560 If (mod(nlevs,10) .eq. 0) then S_DPPRNT.561 nlevsrows = int(nlevs/10) S_DPPRNT.562 lastrow = 10 S_DPPRNT.563 else S_DPPRNT.564 nlevsrows = int(nlevs/10) + 1 S_DPPRNT.565 lastrow = mod(nlevs,10) S_DPPRNT.566 endif S_DPPRNT.567 Do nlevscount = 1, nlevsrows S_DPPRNT.568 element = 10*(nlevscount-1) S_DPPRNT.569 If (nlevscount .lt. nlevsrows) then S_DPPRNT.570 Write (unit,150)(element + i,i = 1, 10) S_DPPRNT.571 Write (unit,122) S_DPPRNT.572 & (dump(l,icount + element + i,j), i = 1, 10), S_DPPRNT.573 & (dump(l,icount + nlevs + element + i,j), i = 1, 10) S_DPPRNT.574 else S_DPPRNT.575 Write (ctfmt(16:17), '(i2)')lastrow S_DPPRNT.576 Write (unit,ctfmt)(element + i,i = 1, lastrow) S_DPPRNT.577 Write (c2fmt(18:19), '(i2)')lastrow S_DPPRNT.578 Write (c2fmt(6:15), '(''SW K/d '')') S_DPPRNT.579 Write (unit,c2fmt)(dump(l,icount + i + element,j) S_DPPRNT.580 & ,i = 1, lastrow) S_DPPRNT.581 Write (c2fmt(6:15), '(''LW K/d '')') S_DPPRNT.582 Write (unit,c2fmt)(dump(l,icount + nlevs + i + element,j) S_DPPRNT.583 & ,i = 1, lastrow) S_DPPRNT.584 endif S_DPPRNT.585 enddo S_DPPRNT.586 icount = icount + nlevs*2 S_DPPRNT.587 If (land_mask(l)) then S_DPPRNT.588 Write (unit,123) S_DPPRNT.589 else S_DPPRNT.590 Write (unit,124) S_DPPRNT.591 endif S_DPPRNT.592 Write (unit,125) S_DPPRNT.593 C S_DPPRNT.594 C Write out all other radiation variables S_DPPRNT.595 C S_DPPRNT.596 Write (unit,126)(dump(l,icount + i,j), i = 1, 4) S_DPPRNT.597 Write (unit,127) S_DPPRNT.598 Write (unit,128) S_DPPRNT.599 C S_DPPRNT.600 C Write out all other radiation variables S_DPPRNT.601 C S_DPPRNT.602 icount = icount + i-1 S_DPPRNT.603 Write (unit,129)(dump(l,icount + i,j), i = 1, 6) S_DPPRNT.604 Write (unit,59) S_DPPRNT.605 S_DPPRNT.606 enddo ! l S_DPPRNT.607 S_DPPRNT.608 79 Format(' Up to actual year ',i5, ' day ',i5,' start time ',a8) S_DPPRNT.609 80 Format(' Up to actual year ',i5, ' day ',i5,' start time ',a8) S_DPPRNT.610 81 format(' day in run is ',i5, S_DPPRNT.611 & ' timestep in run is ',i5/ ' mean dump over ',f8.0, S_DPPRNT.612 & ' seconds') S_DPPRNT.613 82 Format(' mean dump over runday ',i5) S_DPPRNT.614 84 Format(' mean dump for actual days up to year ',i5,' day', i5 S_DPPRNT.615 & ,' start time ',a8) S_DPPRNT.616 83 Format(' mean dump over rundays ',i5,' to ',i5) S_DPPRNT.617 59 Format( S_DPPRNT.618 & ' ***********************************************************' S_DPPRNT.619 & '************************************************************' S_DPPRNT.620 & '**') S_DPPRNT.621 60 Format( S_DPPRNT.622 & '1***********************************************************' S_DPPRNT.623 & '************************************************************' S_DPPRNT.624 & '**') S_DPPRNT.625 50 Format(' * Standard model variables',/, S_DPPRNT.626 & ' + __________________________') S_DPPRNT.627 51 Format(' * Humidity and cloud variables',/, S_DPPRNT.628 & ' + __________________________') S_DPPRNT.629 52 Format(' * Boundary layer and surface variables',/, S_DPPRNT.630 & ' + ______________________________________') S_DPPRNT.631 53 Format(' * Radiation variables',/, S_DPPRNT.632 & ' + ____________________') S_DPPRNT.633 150 Format('0* Variable level',i2,9(4x,'level',i2)) S_DPPRNT.634 100 Format( S_DPPRNT.635 & ' * U m s^-1 ', 10(f8.3,3x), /, S_DPPRNT.636 & ' * V m s^-2 ', 10(f8.3,3x), /, S_DPPRNT.637 & ' * T K ', 10(f8.3,3x), /, S_DPPRNT.638 & ' * theta K ', 10(f8.3,3x), /) S_DPPRNT.639 101 Format( S_DPPRNT.640 & ' * Q kg/kg ',10(1pe10.3,1x), /, S_DPPRNT.641 & ' * RH ',10(1pe10.3,1x), /, S_DPPRNT.642 & ' * RHW ',10(1pe10.3,1x), /, S_DPPRNT.643 & ' * QCL kg/kg ',10(1pe10.3,1x), /, S_DPPRNT.644 & ' * QCF kg/kg ',10(1pe10.3,1x), /, S_DPPRNT.645 & ' * LCA ',10(1pe10.3,1x), /, S_DPPRNT.646 & ' * DT K/d ',10(1pe10.3,1x), /, S_DPPRNT.647 & ' * DQ kg/kg/d',10(1pe10.3,1x)) S_DPPRNT.648 102 Format('0* Qatmos',6x,'cca',7x,'ccb',6x,'cct',5x,'conv_rain', S_DPPRNT.649 & 4x, 'conv_snow',4x,'ls_rain',4x,'ls_snow') S_DPPRNT.650 103 Format(' *(kg kg^-1) ', 12X,'(Pa)',5X,'(Pa)',4X,'(kg m^-2 ', S_DPPRNT.651 & 4X, '(kg m^-2 ',3X,'(kg m^-2 ',2X,'(kg m^-2 ') S_DPPRNT.652 104 Format(' *',43X,' d^-1)',7X,' d^-1)',6X,' d^-1)',5X,' d^-1)') S_DPPRNT.653 105 Format(' ',5(1pe10.3), 3x,1pe10.3,2x,1pe10.3,1x,1pe10.3) S_DPPRNT.654 106 Format( S_DPPRNT.655 & ' * taux Nm^-2', 10(1pe10.3,1x), /, S_DPPRNT.656 & ' * tauy Nm^-2', 10(1pe10.3,1x), /, S_DPPRNT.657 & ' * fq kg/m2/s', 10(1pe10.3,1x), /, S_DPPRNT.658 & ' * ftl W m^-2', 10(1pe10.3,1x)) S_DPPRNT.659 107 Format( S_DPPRNT.660 & ' *Tdeep K ', 10(f10.4)) S_DPPRNT.661 108 Format('0* Pstar',5X,'Tstar',6X,'smc',6x,'canopy',4x,'snodep', S_DPPRNT.662 & 6x,'zh',6x,'z0m',6x,'surf_ht_flux') S_DPPRNT.663 109 Format(' *',2X,'(Pa)',6X,'(K)',4X,'(kg m^-2 )','(kg m^-2 )', S_DPPRNT.664 & '(kg m^-2 )',3X,'(m)',6X,'(m)',7X,'(W m^-2 ') S_DPPRNT.665 110 Format(' ',f10.3,5f10.4,1pe10.3,1x,1pe10.3) S_DPPRNT.666 111 format('0* can_evap ',3x,'soil_evap ',2x,'sice_tmlt_htf', S_DPPRNT.667 & 2x,'seai_htf',4x,'sublim',4x,'lat_ht',4x,'sens_ht') S_DPPRNT.668 112 Format(' *(kg m^-2',3x,'(kg m^-2',6x,'(W m^-2) ',2x, S_DPPRNT.669 & '(W m^-2)',2X,'(kg m^-2',1X,'(W m^-2)',2X,'(W m^-2)') S_DPPRNT.670 113 Format(' *',4x,'d^-1)',6x,'d^-1)',29x,'d^-1)') S_DPPRNT.671 114 Format(' ',1pe10.3,3x,1pe10.3,4x,1pe10.3,1x,1pe10.3,2x, S_DPPRNT.672 & 3(1x,1pe10.3)) S_DPPRNT.673 115 Format('0* U10m',6x,'V10m',4X,'T1p5m',4X,'T1p5m_max',1x, S_DPPRNT.674 & 'T1p5m_min',3x,'rib',6x,'Q1p5m') S_DPPRNT.675 116 Format(' *(m s^-1) ','(m s^-1)',5x,'K',9x,'K',9x,'K', S_DPPRNT.676 & 14X,'(kg kg^-1)') S_DPPRNT.677 117 Format(' ',6f10.4,1pe10.3) S_DPPRNT.678 118 Format('0* fast_roff ',3x,'sub_roff ',4x,'snomlt_htf',4x, S_DPPRNT.679 & 'snomlt',4x,'thro_fall') S_DPPRNT.680 119 Format(' *(kg m^-2',4X,'(kg m^-2',5X,'(W m^-2)',3X, S_DPPRNT.681 & '(kg m^-2',2X,'(kg m^-2') S_DPPRNT.682 120 Format(' *',4X,'d^-1)',7X,'d^-1)',20X,'d^-1)',5X,'d^-1)') S_DPPRNT.683 121 Format(' ',1pe10.3,4x,1pe10.3,3x,1pe10.3,2x,1pe10.3,1x, S_DPPRNT.684 & 1pe10.3) S_DPPRNT.685 122 Format(' * SW K/d ',10(1pe10.3,1x), /, S_DPPRNT.686 & ' * LW K/d ',10(1pe10.3,1x)) S_DPPRNT.687 123 Format('0* net_rad',5x,'sw_surf',3x,'down_surf_sw_b1',5x, S_DPPRNT.688 & 'lw_surf') S_DPPRNT.689 124 Format('0* net_rad',5x,'swsea',3x,'down_surf_sw_b1',5x, S_DPPRNT.690 & 'lwsea') S_DPPRNT.691 125 Format(' (W m^-2)',3x,'(W m^-2)',6x,'(W m^-2)',6x, S_DPPRNT.692 & '(W m^-2)') S_DPPRNT.693 126 Format(' ',2(1pe12.4), 1x,1pe12.4,5x,1pe12.4) S_DPPRNT.694 127 Format('0* os_toa',6x,'is_toa',6x,'olr_toa',6x,'csolrd',6x, S_DPPRNT.695 & 'csosdi',6x,'tca') S_DPPRNT.696 128 Format(' *(W m^-2)',3x,'(W m^-2)',3x,'(W m^-2)',4x, S_DPPRNT.697 & '(W m^-2)',3x,'(W m^-2) ') S_DPPRNT.698 129 Format(' ',6(1pe12.4)) S_DPPRNT.699 130 Format('0* Tatmos') S_DPPRNT.700 131 Format(' *',2x,'(K)') S_DPPRNT.701 132 Format(' ',f10.3) S_DPPRNT.702 133 Format(' *SMCL ',10(f10.4)) S_DPPRNT.703 134 Format('0* fast_roff ',3x,'sub_roff ',4x,'snomlt_surf_htf',4x, S_DPPRNT.704 & 'snomlt_sub_htf',4x,'snomlt',4x,'thro_fall') S_DPPRNT.705 135 Format(' *(kg m^-2',4x,'(kg m^-2',5x,'(W m^-2)',10x, S_DPPRNT.706 & '(W m^-2)',8x,'(kg m^-2',2x,'(kg m^-2') S_DPPRNT.707 136 Format(' *',4x,'d^-1)',7x,'d^-1)',43x,'d^-1)',5x,'d^-1)') S_DPPRNT.708 137 Format(' ',1pe10.3,4x,1pe10.3,7x,1pe10.3,8x,1pe10.3,3x,1pe10.3 S_DPPRNT.709 & ,2x,1pe10.3) S_DPPRNT.710 138 Format(' *sthu ',10(f10.4)) S_DPPRNT.711 139 Format(' *sthf ',10(f10.4)) S_DPPRNT.712 140 Format('0* lai ',5x,' canht ',4x,'stom_cond') S_DPPRNT.713 141 Format(' * ',4X,' (m) ',5X,'(m s*-1) ') S_DPPRNT.714 ! 143 Format(' ',pe10.3,2(1x,pe10.3)) S_DPPRNT.715 143 Format(' ', e10.3,2(1x, e10.3)) S_DPPRNT.716 144 Format('0* etran ',6x,' gpp ',7x,' npp ',7x, ' resp_p ') S_DPPRNT.717 145 Format(' *(g m^-2',3x,'(g C m^-2',3x,'(g C m^-2)',3x, S_DPPRNT.718 & '(g C m^-2)') S_DPPRNT.719 146 Format(' *',3x,'d^-1)',6x,'d^-1)',8x,'d^-1)',8x,'d^-1)') S_DPPRNT.720 147 Format(' ',1pe10.3,4x,1pe10.3,4x,1pe10.3,4x,1pe10.3) S_DPPRNT.721 Return S_DPPRNT.722 End ! Subroutine DUMP_PRINT S_DPPRNT.723 *ENDIF S_DPPRNT.724