Changeset 4765 for palm/trunk/TUTORIALS/cases/lsm_short
- Timestamp:
- Nov 2, 2020 10:31:45 AM (4 years ago)
- Location:
- palm/trunk/TUTORIALS/cases/lsm_short
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/TUTORIALS/cases/lsm_short/INPUT/lsm_short_p3d
r4409 r4765 27 27 pt_vertical_gradient_level = 0.0, 800.0, ! height level of temp gradients 28 28 29 origin_date_time = '2019-08-20 11:00:00 +00'30 29 ! 31 30 !-- boundary conditions … … 67 66 dt_do3d = 60.0, ! output interval for 3d data 68 67 dt_do2d_xy = 60.0, ! output interval for 2d-xy data 69 70 data_output = 'theta', 'w', 'u', 'v', 'us*_xy', 'ghf*_xy', 'shf*_xy', 'tsurf*_xy', 't_soil', ! 2d and/or 3d output 71 72 data_output_pr = '#u', '#v', '#theta', '#km', '#kh', '#l', 'w', 'e', 'e*', 'p', 'w"theta"', 'w*theta*', 'wtheta', 'w*e*', 'theta*2','u*2', 'v*2', 'w*2', '#t_soil', ! Profile output 68 ! 69 !-- 2d and/or 3d data output 70 !------------------------------------------------------------------------------- 71 data_output = 'theta', 72 'w', 73 'u', 74 'v', 75 'us*_xy', 76 'ghf*_xy', 77 'shf*_xy', 78 'tsurf*_xy', 79 'theta_xy', 80 't_soil', 81 ! 82 !-- profile output 83 !------------------------------------------------------------------------------- 84 data_output_pr = '#u', 85 '#v', 86 '#theta', 87 '#km', 88 '#kh', 89 '#l', 90 'w', 91 'e', 92 'e*', 93 'p', 94 'w"theta"', 95 'w*theta*', 96 'wtheta', 97 'w*e*', 98 'theta*2', 99 'u*2', 100 'v*2', 101 'w*2', 102 '#t_soil', 73 103 74 104 section_xy = 0, ! grid index for 2D XY cross sections … … 87 117 !------------------------------------------------------------------------------- 88 118 &land_surface_parameters 119 ! 120 !-- define soil type and tempature 121 !------------------------------------------------------------------------------- 89 122 soil_type = 3, ! type to be used in soil model 90 soil_moisture = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,91 soil_temperature = 293 , 293, 293, 293, 293, 293, 293, 293, ! every soil level92 deep_soil_temperature = 293 , ! temperature of deep soil123 soil_moisture = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 124 soil_temperature = 293.0, 293.0, 293.0, 293.0, 293.0, 293.0, 293.0, 293.0, 125 deep_soil_temperature = 293.0, ! temperature of deep soil 93 126 94 127 surface_type = 'vegetation', ! surface classification -
palm/trunk/TUTORIALS/cases/lsm_short/MONITORING/lsm_short_rc.000
r4446 r4765 1 1 2 2 ****************************** -------------------------------------------- 3 * PALM 6.0 Rev: 4 402* atmosphere - run without 1D - prerun3 * PALM 6.0 Rev: 4761 * atmosphere - run without 1D - prerun 4 4 ****************************** -------------------------------------------- 5 5 6 Date: 2020- 02-14Run: lsm_short__gfortran_default__47 Time: 11: 14:41 Run-No.: 006 Date: 2020-10-30 Run: lsm_short__gfortran_default__4 7 Time: 11:08:51 Run-No.: 00 8 8 Run on host: gfortran_d 9 9 Number of PEs: 4 Processor grid (x,y): ( 2, 2) calculated … … 13 13 ----------------- 14 14 15 --> Use the Moeng_Wyngaardturbulence closure (LES mode).15 --> Use the 1.5-order turbulence closure (LES mode). 16 16 --> Use the boussinesq approximation for the model equations. 17 17 --> Solve perturbation pressure via FFT using temperton-algorithm routines … … 86 86 87 87 z_mo = 12.50 m z0 = 0.1000 m z0h = 0.10000 m kappa = 0.40 88 Rif value range: -20.00 <= rif<= 20.0088 zeta value range: -20.00 <= zeta <= 20.00 89 89 Predefined surface temperature 90 90 … … 136 136 137 137 138 XY-cross-section Arrays: us*, ghf*, shf*, tsurf*, 138 XY-cross-section Arrays: us*, ghf*, shf*, tsurf*, theta, 139 139 Output every 60.00 s 140 140 Cross sections at k = /0/ … … 175 175 f* = 0.000084 1/s 176 176 177 Date and time at model start : 2019-0 8-20 11:00:00 +00177 Date and time at model start : 2019-06-21 12:00:00 +00 178 178 179 179 Gravity : g = 9.8 m/s**2 … … 190 190 --------------------------- 191 191 192 Mixing length is limited to 1.80 * z192 Mixing length is limited close to surfaces 193 193 194 194 … … 309 309 0 577 00:54:03.39 3.8800A 3.4627 3.8573 5.7958 0.119 2.15 -0.304E+01 875. 0.645E+00 0.641E+00 0.333E-03 0.323E-13 1 14 18 1 4 5 20 33 28 0.000 0.000 0 310 310 0 593 00:55:01.02 3.5200A -3.3128 3.9400 6.3881 0.121 2.22 -0.303E+01 950. 0.649E+00 0.645E+00 0.303E-03 0.290E-13 7 33 1 1 5 3 25 32 28 0.000 0.000 0 311 0 611 00:56:03.39 3.5300A 3.493 2-3.8873 6.3763 0.121 2.20 -0.310E+01 925. 0.655E+00 0.650E+00 0.308E-03 0.292E-13 1 3 9 37 30 29 30 32 29 0.000 0.000 0311 0 611 00:56:03.39 3.5300A 3.4933 -3.8873 6.3763 0.121 2.20 -0.310E+01 925. 0.655E+00 0.650E+00 0.308E-03 0.292E-13 1 3 9 37 30 29 30 32 29 0.000 0.000 0 312 312 0 627 00:57:00.97 3.5400A -3.0215 -3.8977 6.3630 0.120 2.18 -0.306E+01 900. 0.662E+00 0.657E+00 0.308E-03 0.294E-13 31 13 8 38 27 30 27 15 21 0.000 0.000 0 313 0 643 00:58:00.99 3.8200A -3.1488 3.63 505.8895 0.119 2.20 -0.309E+01 925. 0.662E+00 0.659E+00 0.342E-03 0.331E-13 38 33 22 21 35 1 18 27 9 0.000 0.000 0314 0 659 00:59:02.72 3.9000A -3.0297 -3.5710 5.769 80.120 2.19 -0.308E+01 900. 0.663E+00 0.660E+00 0.351E-03 0.338E-13 33 11 7 16 2 38 32 26 6 0.000 0.000 0313 0 643 00:58:00.99 3.8200A -3.1488 3.6349 5.8895 0.119 2.20 -0.309E+01 925. 0.662E+00 0.659E+00 0.342E-03 0.331E-13 38 33 22 21 35 1 18 27 9 0.000 0.000 0 314 0 659 00:59:02.72 3.9000A -3.0297 -3.5710 5.7697 0.120 2.19 -0.308E+01 900. 0.663E+00 0.660E+00 0.351E-03 0.338E-13 33 11 7 16 2 38 32 26 6 0.000 0.000 0 315 315 0 674 01:00:01.39 3.8800A 3.4608 3.5710 5.7932 0.121 2.15 -0.309E+01 850. 0.666E+00 0.664E+00 0.354E-03 0.336E-13 17 19 29 26 33 4 18 11 20 0.000 0.000 0 316 316 0 690 01:01:02.32 3.8400A -3.4325 3.6644 5.8597 0.120 2.26 -0.311E+01 975. 0.670E+00 0.669E+00 0.356E-03 0.334E-13 35 12 6 9 33 33 26 11 20 0.000 0.000 0 317 317 0 705 01:02:01.15 3.9100A -3.2987 3.6724 5.7587 0.120 2.22 -0.314E+01 925. 0.675E+00 0.673E+00 0.367E-03 0.342E-13 38 10 4 33 16 20 30 11 21 0.000 0.000 0 318 0 720 01:03:00.72 4.0900A -3.7833 3.4857 5.506 10.121 2.23 -0.313E+01 925. 0.673E+00 0.670E+00 0.380E-03 0.356E-13 27 10 9 11 36 34 29 5 9 0.000 0.000 0318 0 720 01:03:00.72 4.0900A -3.7833 3.4857 5.5060 0.121 2.23 -0.313E+01 925. 0.673E+00 0.670E+00 0.380E-03 0.356E-13 27 10 9 11 36 34 29 5 9 0.000 0.000 0 319 319 0 735 01:04:02.70 4.0600A 3.3044 -3.0846 5.5471 0.124 2.22 -0.312E+01 900. 0.665E+00 0.661E+00 0.383E-03 0.350E-13 8 32 13 1 19 22 18 1 20 0.000 0.000 0 320 320 0 750 01:05:03.17 3.8900A 3.1157 3.3684 5.7783 0.127 2.21 -0.311E+01 875. 0.664E+00 0.660E+00 0.372E-03 0.333E-13 29 2 24 26 38 32 15 33 32 0.000 0.000 0 321 321 0 765 01:06:00.29 3.7300A -4.0851 3.4941 6.0342 0.128 2.22 -0.311E+01 875. 0.680E+00 0.676E+00 0.357E-03 0.323E-13 27 32 28 31 0 31 22 33 32 0.000 0.000 0 322 322 0 783 01:07:02.40 3.1600A -3.5715 4.0555 7.1273 0.128 2.30 -0.312E+01 975. 0.709E+00 0.706E+00 0.304E-03 0.275E-13 30 34 27 37 0 33 25 33 32 0.000 0.000 0 323 0 802 01:08:00.66 3.1700A 3.0024 4.198 07.0976 0.128 2.26 -0.314E+01 925. 0.732E+00 0.730E+00 0.302E-03 0.273E-13 40 34 35 39 3 33 33 33 32 0.000 0.000 0324 0 819 01:09:01.36 3.9000A 3.4808 -3.602 2 5.76510.127 2.22 -0.316E+01 875. 0.749E+00 0.747E+00 0.378E-03 0.340E-13 42 33 34 44 30 32 34 38 30 0.000 0.000 0325 0 834 01:10:02.25 4.0400A 3.532 2 3.3613 5.56430.126 2.28 -0.316E+01 950. 0.766E+00 0.764E+00 0.400E-03 0.364E-13 8 12 14 41 2 29 19 10 21 0.000 0.000 0326 0 849 01:11:01.06 3.9100A -4.158 0 4.56645.7530 0.126 2.27 -0.326E+01 925. 0.783E+00 0.780E+00 0.402E-03 0.365E-13 39 38 29 31 14 22 22 9 23 0.000 0.000 0327 0 866 01:12:02.48 3.5600A -3.9940 4.901 56.3170 0.128 2.27 -0.319E+01 925. 0.800E+00 0.795E+00 0.358E-03 0.326E-13 40 36 25 32 17 21 29 9 23 0.000 0.000 0328 0 882 01:13:02.68 3.9600A -3.5532 4.05 41 5.67830.130 2.31 -0.316E+01 950. 0.808E+00 0.804E+00 0.399E-03 0.366E-13 35 32 22 33 19 20 33 9 21 0.000 0.000 0329 0 898 01:14:02.30 3.6800A 3.653 4 -3.7072 6.12200.132 2.29 -0.314E+01 925. 0.819E+00 0.815E+00 0.372E-03 0.347E-13 27 6 28 37 29 36 21 2 20 0.000 0.000 0330 0 915 01:15:02.84 3.4300A 3.749 7 -3.81796.5666 0.132 2.27 -0.316E+01 900. 0.844E+00 0.839E+00 0.363E-03 0.332E-13 28 6 30 1 13 24 21 13 10 0.000 0.000 0331 0 933 01:16:01.69 3.3500A 3.535 2 -4.1565 6.72110.130 2.29 -0.318E+01 925. 0.866E+00 0.861E+00 0.359E-03 0.324E-13 24 10 11 2 12 24 31 38 38 0.000 0.000 0332 0 950 01:17:01.39 3.4800A -3.80 42 -4.0536 6.47330.129 2.35 -0.320E+01 1000. 0.888E+00 0.883E+00 0.378E-03 0.344E-13 9 11 24 2 11 24 22 37 14 0.000 0.000 0333 0 968 01:18:02.70 3.4500A 4.29 35 -3.9053 6.51900.129 2.33 -0.321E+01 975. 0.897E+00 0.894E+00 0.371E-03 0.342E-13 29 11 12 1 6 23 31 38 15 0.000 0.000 0334 0 985 01:19:01.2 6 3.6800A 3.9624 -4.1758 6.1135 0.130 2.29 -0.320E+01 925. 0.909E+00 0.905E+00 0.397E-03 0.364E-13 34 11 13 1 5 22 33 0 16 0.000 0.000 0335 0 100 1 01:20:00.04 3.6900A -4.1990 -4.5214 6.0971 0.130 2.26 -0.321E+01 875. 0.901E+00 0.895E+00 0.417E-03 0.383E-13 1 4 24 2 4 22 1923 29 0.000 0.000 0336 0 1018 01:21:03. 35 3.7400A -3.8121 -4.5139 6.02040.131 2.28 -0.323E+01 900. 0.893E+00 0.886E+00 0.432E-03 0.391E-13 1 4 23 2 3 21 26 22 30 0.000 0.000 0337 0 1034 01:22:03. 87 3.9100A -4.3708 -4.1757 5.7585 0.130 2.30 -0.323E+01 925. 0.888E+00 0.880E+00 0.445E-03 0.402E-13 1 3 23 2 2 21 33 21 30 0.000 0.000 0338 0 1050 01:23:03. 32 3.7000A 4.1322 -4.3210 6.0868 0.129 2.34 -0.324E+01 975. 0.895E+00 0.887E+00 0.422E-03 0.385E-13 27 1 27 2 2 20 24 24 26 0.000 0.000 0339 0 1065 01:24:00. 31 3.7500A -4.4515 -3.9577 5.99740.131 2.35 -0.324E+01 975. 0.893E+00 0.885E+00 0.433E-03 0.395E-13 1 2 21 1 2 19 28 5 10 0.000 0.000 0340 0 1081 01:25:00. 62 3.6900A -3.8178 -3.4814 6.1009 0.134 2.32 -0.321E+01 925. 0.888E+00 0.879E+00 0.438E-03 0.396E-13 8 1 20 4 3 9 29 5 10 0.000 0.000 0341 0 1097 01:26:00. 72 4.2300A -4.0595 -3.4137 5.3217 0.136 2.37 -0.321E+01 975. 0.881E+00 0.872E+00 0.479E-03 0.430E-13 1 1 26 25 35 1536 5 10 0.000 0.000 0342 0 1112 01:27:02. 31 3.7300A -4.1024 -3.7793 6.02740.139 2.36 -0.317E+01 950. 0.877E+00 0.869E+00 0.429E-03 0.380E-13 1 2 25 27 33 15 18 21 25 0.000 0.000 0343 0 1127 01:28:00. 44 3.8400A -4.1132 -4.3536 5.8628 0.144 2.34 -0.316E+01 900. 0.895E+00 0.889E+00 0.455E-03 0.399E-13 1 2 23 17 38 9 19 38 17 0.000 0.000 0344 0 1143 01:29:00. 87 3.7900A 4.2107 -3.9932 5.9380 0.146 2.39 -0.316E+01 950. 0.926E+00 0.921E+00 0.446E-03 0.386E-13 34 1 23 24 37 8 29 36 18 0.000 0.000 0345 0 1158 01:30:01. 55 4.1900A -4.2576 -3.6350 5.3679 0.146 2.45 -0.313E+01 1025. 0.951E+00 0.947E+00 0.497E-03 0.425E-13 35 36 9 35 35 11 32 35 9 0.000 0.000 0346 0 1173 01:31:01. 99 3.8000A -4.0657 -4.1395 5.9181 0.145 2.42 -0.316E+01 1000. 0.983E+00 0.980E+00 0.465E-03 0.397E-13 38 35 7 16 12 10 11 2 8 0.000 0.000 0347 0 1191 01:32:0 1.06 2.9900A 3.9585 -4.3963 7.5211 0.143 2.40 -0.314E+01 975. 0.103E+01 0.103E+01 0.359E-03 0.310E-13 39 32 24 30 34 8 20 3 9 0.000 0.000 0348 0 121 1 01:33:00.15 3.1200A -4.9115 -5.0019 7.2108 0.142 2.45 -0.313E+01 1050. 0.107E+01 0.106E+01 0.371E-03 0.323E-13 38 0 4 34 31 5 313 9 0.000 0.000 0349 0 1230 01:34:02. 73 3.1600A -5.0792 -5.0448 7.1132 0.141 2.45 -0.314E+01 1050. 0.109E+01 0.108E+01 0.392E-03 0.342E-13 39 39 1 37 2911 24 2 17 0.000 0.000 0350 0 124 8 01:35:00.62 3.1600A 4.7965 -4.5551 7.1103 0.142 2.40 -0.314E+01 975. 0.112E+01 0.110E+01 0.398E-03 0.346E-13 36 2 21 36 26 10 24 1 170.000 0.000 0351 0 1268 01:36:01. 04 2.8400A 5.0566 -4.3069 7.9208 0.142 2.38 -0.316E+01 950. 0.114E+01 0.112E+01 0.365E-03 0.320E-13 40 2 24 41 31 3 28 26 180.000 0.000 0352 0 12 90 01:37:01.63 2.7800A 4.1688 -4.3049 8.0935 0.142 2.42 -0.319E+01 1000. 0.115E+01 0.112E+01 0.352E-03 0.309E-13 43 3 25 39 38 16 34 27 180.000 0.000 0353 0 13 11 01:38:02.08 3.1200A -4.5463 -4.3848 7.2076 0.142 2.44 -0.318E+01 1025. 0.114E+01 0.112E+01 0.387E-03 0.348E-13 42 24 14 41 20 17 29 3 170.000 0.000 0354 0 13 31 01:39:00.07 2.8600A -4.6898 -3.8181 7.8612 0.143 2.43 -0.317E+01 1000. 0.113E+01 0.112E+01 0.372E-03 0.335E-13 44 25 13 42 18 16 363 17 0.000 0.000 0355 0 13 52 01:40:00.07 3.0100A -4.8562 4.2191 7.4706 0.146 2.48 -0.314E+01 1050. 0.111E+01 0.110E+01 0.408E-03 0.361E-13 44 29 13 45 32 16 36 3015 0.000 0.000 0356 0 13 71 01:41:02.28 3.6700A -5.2011 3.5977 6.1234 0.147 2.44 -0.314E+01 1000. 0.108E+01 0.107E+01 0.481E-03 0.430E-13 41 29 10 42 12 22 20 25 250.000 0.000 0357 0 138 7 01:42:00.91 3.6100A -4.7229 4.0121 6.2254 0.147 2.42 -0.314E+01 975. 0.106E+01 0.105E+01 0.463E-03 0.411E-13 41 31 7 41 10 16 15 25 130.000 0.000 0358 0 1 404 01:43:02.04 3.5000A -5.0764 3.4659 6.4262 0.144 2.41 -0.317E+01 975. 0.107E+01 0.106E+01 0.440E-03 0.381E-13 34 29 9 1 27 21 29 24 150.000 0.000 0359 0 14 21 01:44:01.81 3.3400A -4.3755 -3.6993 6.7441 0.137 2.46 -0.324E+01 1075. 0.109E+01 0.108E+01 0.430E-03 0.367E-13 34 30 5 35 22 12 23 32 200.000 0.000 0360 0 14 40 01:45:00.65 2.9200A -4.2136 -3.6976 7.6976 0.132 2.41 -0.329E+01 1025. 0.109E+01 0.108E+01 0.381E-03 0.326E-13 32 28 11 40 19 1225 30 18 0.000 0.000 0361 0 14 61 01:46:02.89 3.1100A -4.4747 -3.8814 7.2275 0.130 2.38 -0.334E+01 1000. 0.110E+01 0.109E+01 0.401E-03 0.348E-13 40 32 10 44 30 17 34 30 180.000 0.000 0362 0 14 80 01:47:02.71 3.3000A -5.7419 3.9887 6.8194 0.129 2.44 -0.342E+01 1075. 0.108E+01 0.107E+01 0.428E-03 0.376E-13 39 32 7 34 30 9 33 30 180.000 0.000 0363 0 149 8 01:48:02.32 3.0600A -5.1730 3.8710 7.3581 0.130 2.37 -0.342E+01 975. 0.105E+01 0.104E+01 0.402E-03 0.351E-13 38 33 4 1 30 30 20 3015 0.000 0.000 0364 0 151 7 01:49:00.43 3.0700A -4.6641 4.1815 7.3345 0.134 2.37 -0.339E+01 950. 0.103E+01 0.102E+01 0.404E-03 0.342E-13 37 34 1 39 38 21 33 31 150.000 0.000 0365 0 15 36 01:50:01.30 3.6100A 4.1902 4.2292 6.2258 0.141 2.35 -0.329E+01 900. 0.101E+01 0.101E+01 0.471E-03 0.399E-13 12 3 7 1 33 31 32 4 150.000 0.000 0366 0 15 53 01:51:01.13 3.2300A 3.9049 -3.6179 6.9573 0.147 2.40 -0.325E+01 925. 0.101E+01 0.100E+01 0.421E-03 0.354E-13 17 4 7 1 0 26 21 33 280.000 0.000 0367 0 15 73 01:52:02.53 2.9900A -3.8620 -3.6876 7.5304 0.150 2.49 -0.322E+01 1025. 0.101E+01 0.100E+01 0.383E-03 0.315E-13 43 29 10 34 0 11 32 33 280.000 0.000 0368 0 15 92 01:53:00.20 3.1600A 3.7698 3.6672 7.1142 0.148 2.29 -0.321E+01 800. 0.101E+01 0.100E+01 0.408E-03 0.335E-13 1 35 11 44 38 27 38 33 280.000 0.000 0369 0 1 611 01:54:03.23 3.2500A 4.3997 3.4270 6.9161 0.144 2.38 -0.326E+01 925. 0.101E+01 0.100E+01 0.438E-03 0.361E-13 1 35 13 37 0 24 28 35 210.000 0.000 0370 0 16 30 01:55:01.76 2.9600A 4.2012 -3.8586 7.5911 0.141 2.39 -0.329E+01 950. 0.104E+01 0.103E+01 0.400E-03 0.328E-13 18 2 21 15 6 19 31 28 130.000 0.000 0371 0 16 48 01:56:01.11 3.4800A 4.9521 3.9985 6.4697 0.138 2.34 -0.335E+01 900. 0.106E+01 0.106E+01 0.462E-03 0.383E-13 21 2 23 38 2 24 32 35 220.000 0.000 0372 0 16 65 01:57:00.84 3.4600A 3.9706 4.2439 6.4952 0.134 2.37 -0.339E+01 950. 0.107E+01 0.106E+01 0.469E-03 0.389E-13 28 4 23 29 7 20 33 27 110.000 0.000 0373 0 16 84 01:58:02.96 3.1500A 4.0927 4.1890 7.1317 0.131 2.40 -0.342E+01 1000. 0.109E+01 0.108E+01 0.424E-03 0.350E-13 31 5 25 46 2 20 26 7 190.000 0.000 0374 0 1 702 01:59:00.62 3.2700A 3.8317 -3.5119 6.8745 0.129 2.47 -0.346E+01 1100. 0.107E+01 0.107E+01 0.447E-03 0.372E-13 17 22 12 1 6 22 33 8 180.000 0.000 0375 0 17 20 02:00:01.87 3.2800A -3.7534 3.9650 6.8552 0.128 2.40 -0.347E+01 1000. 0.107E+01 0.106E+01 0.454E-03 0.376E-13 8 4 22 37 14 17 28 36 190.000 0.000 0323 0 802 01:08:00.66 3.1700A 3.0024 4.1981 7.0976 0.128 2.26 -0.314E+01 925. 0.732E+00 0.730E+00 0.302E-03 0.273E-13 40 34 35 39 3 33 33 33 32 0.000 0.000 0 324 0 819 01:09:01.36 3.9000A 3.4808 -3.6023 5.7653 0.127 2.22 -0.316E+01 875. 0.749E+00 0.747E+00 0.378E-03 0.340E-13 42 33 34 44 30 32 34 38 30 0.000 0.000 0 325 0 834 01:10:02.25 4.0400A 3.5324 3.3613 5.5641 0.126 2.28 -0.316E+01 950. 0.766E+00 0.764E+00 0.400E-03 0.364E-13 8 12 14 41 2 29 19 10 21 0.000 0.000 0 326 0 849 01:11:01.06 3.9100A -4.1581 4.5665 5.7530 0.126 2.27 -0.326E+01 925. 0.783E+00 0.780E+00 0.402E-03 0.365E-13 39 38 29 31 14 22 22 9 23 0.000 0.000 0 327 0 866 01:12:02.48 3.5600A -3.9940 4.9012 6.3170 0.128 2.27 -0.319E+01 925. 0.800E+00 0.795E+00 0.358E-03 0.326E-13 40 36 25 32 17 21 29 9 23 0.000 0.000 0 328 0 882 01:13:02.68 3.9600A -3.5532 4.0539 5.6782 0.130 2.31 -0.316E+01 950. 0.808E+00 0.804E+00 0.399E-03 0.366E-13 35 32 22 33 19 20 33 9 21 0.000 0.000 0 329 0 898 01:14:02.30 3.6800A 3.6537 -3.7073 6.1221 0.132 2.29 -0.314E+01 925. 0.819E+00 0.815E+00 0.372E-03 0.347E-13 27 6 28 37 29 36 21 2 20 0.000 0.000 0 330 0 915 01:15:02.84 3.4300A 3.7496 -3.8177 6.5666 0.132 2.27 -0.316E+01 900. 0.844E+00 0.839E+00 0.363E-03 0.332E-13 28 6 30 1 13 24 21 13 10 0.000 0.000 0 331 0 933 01:16:01.69 3.3500A 3.5353 -4.1563 6.7222 0.130 2.29 -0.318E+01 925. 0.866E+00 0.861E+00 0.359E-03 0.324E-13 24 10 11 2 12 24 31 38 38 0.000 0.000 0 332 0 950 01:17:01.39 3.4800A -3.8050 -4.0535 6.4726 0.129 2.35 -0.320E+01 1000. 0.888E+00 0.883E+00 0.378E-03 0.344E-13 9 11 24 2 11 24 22 37 14 0.000 0.000 0 333 0 968 01:18:02.70 3.4500A 4.2929 -3.9052 6.5161 0.129 2.33 -0.321E+01 975. 0.897E+00 0.894E+00 0.371E-03 0.342E-13 29 11 12 1 6 23 31 38 15 0.000 0.000 0 334 0 985 01:19:01.21 3.6700A 3.9660 -4.1744 6.1283 0.130 2.29 -0.320E+01 925. 0.909E+00 0.905E+00 0.395E-03 0.363E-13 34 11 13 1 5 22 33 0 16 0.000 0.000 0 335 0 1002 01:20:03.67 3.6700A -4.3289 -4.5634 6.1373 0.131 2.26 -0.321E+01 875. 0.901E+00 0.895E+00 0.415E-03 0.382E-13 1 4 24 2 4 22 20 23 29 0.000 0.000 0 336 0 1018 01:21:03.27 3.7400A -3.8139 -4.5109 6.0196 0.131 2.28 -0.323E+01 900. 0.893E+00 0.886E+00 0.432E-03 0.391E-13 1 4 23 2 3 21 26 22 30 0.000 0.000 0 337 0 1034 01:22:03.77 3.9100A -4.3747 -4.1774 5.7617 0.130 2.30 -0.323E+01 925. 0.888E+00 0.880E+00 0.444E-03 0.401E-13 1 3 23 2 2 21 33 21 30 0.000 0.000 0 338 0 1050 01:23:03.17 3.6900A 4.1338 -4.3159 6.0979 0.129 2.34 -0.324E+01 975. 0.895E+00 0.887E+00 0.421E-03 0.384E-13 27 1 27 2 2 20 24 24 26 0.000 0.000 0 339 0 1065 01:24:00.10 3.7500A -4.4530 -3.9701 6.0040 0.131 2.35 -0.324E+01 975. 0.893E+00 0.885E+00 0.433E-03 0.395E-13 1 2 21 1 2 19 28 5 10 0.000 0.000 0 340 0 1081 01:25:00.46 3.6900A -3.8227 -3.4844 6.0932 0.134 2.32 -0.321E+01 925. 0.888E+00 0.879E+00 0.438E-03 0.395E-13 8 1 20 4 3 9 29 5 10 0.000 0.000 0 341 0 1097 01:26:00.59 4.2300A -4.0440 3.4144 5.3210 0.136 2.37 -0.321E+01 975. 0.881E+00 0.872E+00 0.479E-03 0.430E-13 1 1 26 32 34 14 36 5 10 0.000 0.000 0 342 0 1112 01:27:02.29 3.7300A -4.1101 -3.7705 6.0290 0.139 2.36 -0.317E+01 950. 0.877E+00 0.869E+00 0.429E-03 0.380E-13 1 2 25 27 33 15 18 21 25 0.000 0.000 0 343 0 1127 01:28:00.39 3.8300A -4.1216 -4.3556 5.8719 0.144 2.34 -0.316E+01 900. 0.895E+00 0.889E+00 0.454E-03 0.398E-13 1 2 23 17 38 9 19 38 17 0.000 0.000 0 344 0 1143 01:29:00.57 3.7600A 4.2122 -3.9660 5.9830 0.146 2.39 -0.317E+01 950. 0.925E+00 0.920E+00 0.442E-03 0.382E-13 34 1 23 24 37 8 29 36 18 0.000 0.000 0 345 0 1158 01:30:01.10 4.2000A -4.3122 -3.5934 5.3602 0.146 2.45 -0.313E+01 1025. 0.951E+00 0.947E+00 0.501E-03 0.428E-13 35 36 9 35 35 11 32 35 9 0.000 0.000 0 346 0 1173 01:31:01.32 3.8400A -4.0059 -4.1383 5.8524 0.145 2.42 -0.314E+01 1000. 0.983E+00 0.980E+00 0.463E-03 0.395E-13 38 35 7 16 12 10 11 2 8 0.000 0.000 0 347 0 1191 01:32:00.68 2.9900A 3.7369 -4.4189 7.5260 0.143 2.40 -0.313E+01 975. 0.103E+01 0.103E+01 0.358E-03 0.310E-13 39 32 24 30 34 8 20 3 9 0.000 0.000 0 348 0 1212 01:33:02.80 3.1400A -4.7984 -5.1513 7.1550 0.142 2.45 -0.313E+01 1050. 0.107E+01 0.106E+01 0.375E-03 0.327E-13 38 0 4 34 31 5 32 3 9 0.000 0.000 0 349 0 1230 01:34:02.11 3.1600A -5.0090 -4.9103 7.1215 0.141 2.45 -0.314E+01 1050. 0.109E+01 0.107E+01 0.391E-03 0.342E-13 40 39 2 37 30 11 24 2 17 0.000 0.000 0 350 0 1249 01:35:03.11 3.1800A 5.0450 -4.5437 7.0838 0.143 2.40 -0.315E+01 975. 0.112E+01 0.110E+01 0.399E-03 0.348E-13 36 2 21 36 26 10 26 0 18 0.000 0.000 0 351 0 1268 01:36:01.73 3.0200A 4.7551 -4.1479 7.4503 0.143 2.38 -0.316E+01 950. 0.114E+01 0.112E+01 0.379E-03 0.330E-13 40 2 24 42 30 0 30 26 19 0.000 0.000 0 352 0 1287 01:37:00.46 3.0700A -4.3104 -4.2302 7.3349 0.142 2.44 -0.319E+01 1025. 0.114E+01 0.112E+01 0.389E-03 0.342E-13 36 1 39 38 31 12 26 27 17 0.000 0.000 0 353 0 1307 01:38:02.96 3.1900A 4.3117 -4.1504 7.0488 0.143 2.44 -0.317E+01 1025. 0.114E+01 0.112E+01 0.400E-03 0.359E-13 42 0 24 42 37 17 29 3 16 0.000 0.000 0 354 0 1327 01:39:01.23 2.8300A 4.5941 -3.9671 7.9441 0.143 2.42 -0.316E+01 1000. 0.114E+01 0.113E+01 0.367E-03 0.329E-13 43 1 26 22 12 13 37 3 17 0.000 0.000 0 355 0 1348 01:40:01.20 2.8500A 4.3287 3.9442 7.8927 0.144 2.47 -0.316E+01 1050. 0.112E+01 0.111E+01 0.380E-03 0.339E-13 38 3 28 46 32 15 39 29 15 0.000 0.000 0 356 0 1367 01:41:03.44 3.5500A 4.5522 4.0462 6.3317 0.146 2.42 -0.315E+01 975. 0.108E+01 0.107E+01 0.472E-03 0.420E-13 42 6 26 2 24 23 21 6 26 0.000 0.000 0 357 0 1383 01:42:00.86 3.6600A -4.1438 3.9905 6.1427 0.148 2.40 -0.315E+01 950. 0.106E+01 0.105E+01 0.469E-03 0.413E-13 41 7 15 2 25 23 26 25 25 0.000 0.000 0 358 0 1399 01:43:00.39 4.0100A -4.3311 3.6270 5.6106 0.145 2.43 -0.316E+01 1000. 0.107E+01 0.106E+01 0.495E-03 0.426E-13 37 32 8 1 26 22 25 25 16 0.000 0.000 0 359 0 1415 01:44:00.47 3.2700A -4.1867 -3.3786 6.8865 0.137 2.36 -0.325E+01 950. 0.109E+01 0.108E+01 0.424E-03 0.358E-13 35 24 6 16 22 25 15 30 18 0.000 0.000 0 360 0 1436 01:45:01.41 2.8400A -4.4120 4.0902 7.9099 0.129 2.39 -0.333E+01 1025. 0.112E+01 0.111E+01 0.365E-03 0.310E-13 35 33 10 31 34 18 25 30 18 0.000 0.000 0 361 0 1457 01:46:00.53 2.9200A -5.3352 4.3138 7.7076 0.125 2.38 -0.341E+01 1025. 0.114E+01 0.113E+01 0.374E-03 0.322E-13 40 28 11 37 35 14 31 31 15 0.000 0.000 0 362 0 1476 01:47:00.82 3.3100A -5.7525 -3.8622 6.7879 0.126 2.29 -0.341E+01 900. 0.112E+01 0.111E+01 0.430E-03 0.381E-13 38 31 8 44 28 19 37 30 19 0.000 0.000 0 363 0 1493 01:48:00.07 3.5500A -4.5315 3.7301 6.3411 0.130 2.37 -0.341E+01 975. 0.107E+01 0.106E+01 0.463E-03 0.411E-13 40 35 6 43 38 21 24 28 15 0.000 0.000 0 364 0 1511 01:49:03.29 3.6200A -4.0956 3.6587 6.2192 0.134 2.35 -0.338E+01 925. 0.102E+01 0.101E+01 0.480E-03 0.411E-13 7 30 30 1 30 31 32 29 16 0.000 0.000 0 365 0 1526 01:50:00.23 3.7100A -4.0100 -4.2427 6.0692 0.139 2.28 -0.334E+01 825. 0.993E+00 0.987E+00 0.499E-03 0.426E-13 7 30 30 44 26 17 20 32 16 0.000 0.000 0 366 0 1543 01:51:02.61 3.6700A -4.0450 -3.9755 6.1301 0.144 2.47 -0.329E+01 1025. 0.999E+00 0.992E+00 0.478E-03 0.405E-13 25 8 11 39 21 16 32 33 15 0.000 0.000 0 367 0 1560 01:52:03.17 3.4300A -3.6568 -3.8067 6.5608 0.144 2.45 -0.327E+01 1000. 0.102E+01 0.101E+01 0.454E-03 0.378E-13 6 13 27 16 36 32 20 24 14 0.000 0.000 0 368 0 1577 01:53:02.06 3.5500A -3.7761 -3.6516 6.3344 0.142 2.42 -0.329E+01 975. 0.104E+01 0.103E+01 0.476E-03 0.393E-13 7 13 25 21 34 31 27 35 20 0.000 0.000 0 369 0 1594 01:54:00.98 3.2800A 3.6477 3.4656 6.8510 0.142 2.42 -0.328E+01 975. 0.106E+01 0.105E+01 0.454E-03 0.373E-13 1 33 16 32 38 22 25 35 22 0.000 0.000 0 370 0 1613 01:55:02.36 3.0900A -3.7118 -3.8361 7.2711 0.145 2.37 -0.324E+01 900. 0.106E+01 0.105E+01 0.416E-03 0.344E-13 39 35 15 29 0 19 25 0 19 0.000 0.000 0 371 0 1631 01:56:02.32 3.2900A 3.8617 4.1773 6.8302 0.146 2.42 -0.326E+01 950. 0.107E+01 0.106E+01 0.449E-03 0.367E-13 30 1 25 1 2 5 16 35 20 0.000 0.000 0 372 0 1650 01:57:00.64 2.9500A 3.9181 3.9853 7.6317 0.145 2.45 -0.327E+01 1000. 0.108E+01 0.108E+01 0.404E-03 0.329E-13 33 1 26 1 4 5 33 36 18 0.000 0.000 0 373 0 1670 01:58:00.42 2.9100A -4.5577 4.4882 7.7277 0.143 2.53 -0.332E+01 1100. 0.112E+01 0.112E+01 0.400E-03 0.330E-13 44 35 13 45 2 19 32 34 21 0.000 0.000 0 374 0 1691 01:59:02.58 3.3300A 4.7480 4.6393 6.7572 0.141 2.46 -0.330E+01 1025. 0.113E+01 0.113E+01 0.459E-03 0.384E-13 21 4 21 45 3 19 39 35 20 0.000 0.000 0 375 0 1708 02:00:01.82 3.2100A 4.3269 4.6137 6.9986 0.141 2.42 -0.328E+01 975. 0.114E+01 0.114E+01 0.453E-03 0.377E-13 26 3 24 44 4 17 19 35 27 0.000 0.000 0 -
palm/trunk/TUTORIALS/cases/lsm_short/USER_CODE/user_module.f90
r4397 r4765 1 1 !> @file user_module.f90 2 !------------------------------------------------------------------------------ !2 !--------------------------------------------------------------------------------------------------! 3 3 ! This file is part of the PALM model system. 4 4 ! 5 ! PALM is free software: you can redistribute it and/or modify it under the 6 ! terms of the GNU General Public License as published by the Free Software 7 ! Foundation, either version 3 of the License, or (at your option) any later 8 ! version. 9 ! 10 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY 11 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 12 ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 ! 14 ! You should have received a copy of the GNU General Public License along with 15 ! PALM. If not, see <http://www.gnu.org/licenses/>. 5 ! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General 6 ! Public License as published by the Free Software Foundation, either version 3 of the License, or 7 ! (at your option) any later version. 8 ! 9 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 10 ! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11 ! Public License for more details. 12 ! 13 ! You should have received a copy of the GNU General Public License along with PALM. If not, see 14 ! <http://www.gnu.org/licenses/>. 16 15 ! 17 16 ! Copyright 1997-2020 Leibniz Universitaet Hannover 18 !------------------------------------------------------------------------------! 17 !--------------------------------------------------------------------------------------------------! 18 ! 19 19 ! 20 20 ! Current revisions: … … 24 24 ! Former revisions: 25 25 ! ----------------- 26 ! $Id: user_module.f90 3986 2019-05-20 14:08:14Z Giersch $ 26 ! $Id: user_module.f90 4535 2020-05-15 12:07:23Z raasch $ 27 ! bugfix for restart data format query 28 ! 29 ! 4517 2020-05-03 14:29:30Z raasch 30 ! added restart with MPI-IO for reading local arrays 31 ! 32 ! 4504 2020-04-20 12:11:24Z raasch 33 ! hint for setting rmask arrays added 34 ! 35 ! 4497 2020-04-15 10:20:51Z raasch 36 ! file re-formatted to follow the PALM coding standard 37 ! 38 ! 4495 2020-04-13 20:11:20Z raasch 39 ! restart data handling with MPI-IO added 40 ! 41 ! 4360 2020-01-07 11:25:50Z suehring 42 ! Introduction of wall_flags_total_0, which currently sets bits based on static topography 43 ! information used in wall_flags_static_0 44 ! 45 ! 4329 2019-12-10 15:46:36Z motisi 46 ! Renamed wall_flags_0 to wall_flags_static_0 47 ! 48 ! 4287 2019-11-01 14:50:20Z raasch 49 ! reading of namelist file and actions in case of namelist errors revised so that statement labels 50 ! and goto statements are not required any more; this revision also removes a previous bug which 51 ! appeared when the namelist has been commented out in the namelist file 52 ! 53 ! 4182 2019-08-22 15:20:23Z scharf 54 ! Corrected "Former revisions" section 55 ! 56 ! 3986 2019-05-20 14:08:14Z Giersch 27 57 ! Redundant integration of control parameters in user_rrd_global removed 28 ! 58 ! 29 59 ! 3911 2019-04-17 12:26:19Z knoop 30 60 ! Bugfix: added before_prognostic_equations case in user_actions 31 ! 61 ! 32 62 ! 3768 2019-02-27 14:35:58Z raasch 33 63 ! variables commented + statements added to avoid compiler warnings about unused variables … … 35 65 ! 3767 2019-02-27 08:18:02Z raasch 36 66 ! unused variable for file index removed from rrd-subroutines parameter list 37 ! 67 ! 38 68 ! 3747 2019-02-16 15:15:23Z gronemeier 39 69 ! Add routine user_init_arrays 40 ! 70 ! 41 71 ! 3703 2019-01-29 16:43:53Z knoop 42 72 ! An example for a user defined global variable has been added (Giersch) 43 !44 ! 2718 2018-01-02 08:49:38Z suehring45 ! Corrected "Former revisions" section46 !47 ! 2696 2017-12-14 17:12:51Z kanani48 ! Change in file header (GPL part)49 !50 ! 2101 2017-01-05 16:42:31Z suehring51 !52 ! 2000 2016-08-20 18:09:15Z knoop53 ! Forced header and separation lines into 80 columns54 !55 ! 1873 2016-04-18 14:50:06Z maronga56 ! Module renamed (removed _mod)57 !58 !59 ! 1850 2016-04-08 13:29:27Z maronga60 ! Module renamed61 !62 !63 ! 1682 2015-10-07 23:56:08Z knoop64 ! Code annotations made doxygen readable65 !66 ! 1320 2014-03-20 08:40:49Z raasch67 ! kind-parameters added to all INTEGER and REAL declaration statements,68 ! kinds are defined in new module kinds,69 ! old module precision_kind is removed,70 ! revision history before 2012 removed,71 ! comment fields (!:) to be used for variable explanations added to72 ! all variable declaration statements73 !74 ! 1036 2012-10-22 13:43:42Z raasch75 ! code put under GPL (PALM 3.9)76 73 ! 77 74 ! Revision 1.1 1998/03/24 15:29:04 raasch … … 81 78 ! Description: 82 79 ! ------------ 83 !> Declaration of user-defined variables. This module may only be used 84 !> in the user-defined routines(contained in user_interface.f90).85 !------------------------------------------------------------------------------ !80 !> Declaration of user-defined variables. This module may only be used in the user-defined routines 81 !> (contained in user_interface.f90). 82 !--------------------------------------------------------------------------------------------------! 86 83 MODULE user 87 84 88 89 85 USE arrays_3d 90 86 … … 105 101 IMPLICIT NONE 106 102 107 INTEGER(iwp) :: dots_num_palm !<108 INTEGER(iwp) :: dots_num_user = 0 !< 109 INTEGER(iwp) :: user_idummy !<110 111 LOGICAL :: user_module_enabled = .FALSE. !<112 113 REAL(wp) :: user_rdummy !<103 INTEGER(iwp) :: dots_num_palm !< 104 INTEGER(iwp) :: dots_num_user = 0 !< 105 INTEGER(iwp) :: user_idummy !< 106 107 LOGICAL :: user_module_enabled = .FALSE. !< 108 109 REAL(wp) :: user_rdummy !< 114 110 115 111 ! 116 112 !-- Sample for user-defined output 117 ! REAL(wp) :: global_parameter !< user defined global parameter118 ! 119 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: u2 120 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: u2_av 121 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ustvst 113 ! REAL(wp) :: global_parameter !< user defined global parameter 114 ! 115 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: u2 !< user defined array 116 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: u2_av !< user defined array 117 ! REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ustvst !< user defined array 122 118 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: v_h, v_h_av !< user defined array 123 119 … … 128 124 ! 129 125 !- Public functions 130 PUBLIC & 131 user_parin, & 132 user_check_parameters, & 133 user_check_data_output_ts, & 134 user_check_data_output_pr, & 135 user_check_data_output, & 136 user_define_netcdf_grid, & 137 user_init, & 138 user_init_arrays, & 139 user_header, & 140 user_actions, & 141 user_3d_data_averaging, & 142 user_data_output_2d, & 143 user_data_output_3d, & 144 user_statistics, & 145 user_rrd_global, & 146 user_rrd_local, & 147 user_wrd_global, & 148 user_wrd_local, & 149 user_last_actions 126 PUBLIC & 127 user_actions, & 128 user_check_data_output, & 129 user_check_data_output_pr, & 130 user_check_data_output_ts, & 131 user_check_parameters, & 132 user_data_output_2d, & 133 user_data_output_3d, & 134 user_define_netcdf_grid, & 135 user_header, & 136 user_init, & 137 user_init_arrays, & 138 user_last_actions, & 139 user_parin, & 140 user_rrd_global, & 141 user_rrd_local, & 142 user_statistics, & 143 user_3d_data_averaging, & 144 user_wrd_global, & 145 user_wrd_local 146 150 147 151 148 ! 152 149 !- Public parameters, constants and initial values 153 PUBLIC &150 PUBLIC & 154 151 user_module_enabled 155 152 … … 212 209 213 210 INTERFACE user_rrd_global 214 MODULE PROCEDURE user_rrd_global 211 MODULE PROCEDURE user_rrd_global_ftn 212 MODULE PROCEDURE user_rrd_global_mpi 215 213 END INTERFACE user_rrd_global 216 214 217 215 INTERFACE user_rrd_local 218 MODULE PROCEDURE user_rrd_local 216 MODULE PROCEDURE user_rrd_local_ftn 217 MODULE PROCEDURE user_rrd_local_mpi 219 218 END INTERFACE user_rrd_local 220 219 … … 235 234 236 235 237 !------------------------------------------------------------------------------ !236 !--------------------------------------------------------------------------------------------------! 238 237 ! Description: 239 238 ! ------------ 240 239 !> Parin for &user_parameters for user module 241 !------------------------------------------------------------------------------ !240 !--------------------------------------------------------------------------------------------------! 242 241 SUBROUTINE user_parin 243 242 244 245 CHARACTER (LEN=80) :: line !< 246 247 INTEGER(iwp) :: i !< 248 INTEGER(iwp) :: j !< 249 250 251 NAMELIST /user_parameters/ & 252 user_module_enabled, & 253 data_output_pr_user, & 254 data_output_user, & 255 region, & 256 data_output_masks_user 243 CHARACTER (LEN=80) :: line !< string containing the last line read from namelist file 244 245 INTEGER(iwp) :: i !< 246 INTEGER(iwp) :: io_status !< status after reading the namelist file 247 INTEGER(iwp) :: j !< 248 249 250 NAMELIST /user_parameters/ & 251 data_output_masks_user, & 252 data_output_pr_user, & 253 data_output_user, & 254 region 257 255 258 256 ! … … 263 261 264 262 ! 265 !-- Set revision number of this default interface version. It will be checked within 266 !-- the main program (palm). Please change the revision number in case that the 267 !-- current revision does not match with previous revisions (e.g. if routines 268 !-- have been added/deleted or if parameter lists in subroutines have been changed). 269 user_interface_current_revision = 'r3703' 270 271 ! 272 !-- Position the namelist-file at the beginning (it was already opened in 273 !-- parin), search for user-defined namelist-group ("userpar", but any other 274 !-- name can be choosed) and position the file at this line. 263 !-- Set revision number of this default interface version. It will be checked within the main 264 !-- program (palm). Please change the revision number in case that the current revision does not 265 !-- match with previous revisions (e.g. if routines have been added/deleted or if parameter lists 266 !-- in subroutines have been changed). 267 user_interface_current_revision = 'r4495' 268 269 ! 270 !-- Position the namelist-file at the beginning (it has already been opened in parin), and try to 271 !-- read (find) a namelist named "user_parameters". 275 272 REWIND ( 11 ) 276 277 line = ' ' 278 DO WHILE ( INDEX( line, '&user_parameters' ) == 0 ) 279 READ ( 11, '(A)', END=12 ) line 280 ENDDO 281 BACKSPACE ( 11 ) 282 283 !-- Set default module switch to true 284 user_module_enabled = .TRUE. 285 286 !-- Read user-defined namelist 287 READ ( 11, user_parameters, ERR = 10 ) 288 289 GOTO 12 290 291 10 BACKSPACE( 11 ) 292 READ( 11 , '(A)') line 293 CALL parin_fail_message( 'user_parameters', line ) 294 295 12 CONTINUE 296 297 ! 298 !-- Determine the number of user-defined profiles and append them to the 299 !-- standard data output (data_output_pr) 273 READ( 11, user_parameters, IOSTAT=io_status ) 274 275 ! 276 !-- Actions depending on the READ status 277 IF ( io_status == 0 ) THEN 278 ! 279 !-- User namelist found and correctly read. Set default module switch to true. This activates 280 !-- calls of the user-interface subroutines. 281 user_module_enabled = .TRUE. 282 283 ELSEIF ( io_status > 0 ) THEN 284 ! 285 !-- User namelist was found, but contained errors. Print an error message containing the line 286 !-- that caused the problem 287 BACKSPACE( 11 ) 288 READ( 11 , '(A)') line 289 CALL parin_fail_message( 'user_parameters', line ) 290 291 ENDIF 292 293 ! 294 !-- Determine the number of user-defined profiles and append them to the standard data output 295 !-- (data_output_pr) 300 296 IF ( user_module_enabled ) THEN 301 297 IF ( data_output_pr_user(1) /= ' ' ) THEN … … 318 314 319 315 320 !------------------------------------------------------------------------------ !316 !--------------------------------------------------------------------------------------------------! 321 317 ! Description: 322 318 ! ------------ 323 319 !> Check &userpar control parameters and deduce further quantities. 324 !------------------------------------------------------------------------------ !320 !--------------------------------------------------------------------------------------------------! 325 321 SUBROUTINE user_check_parameters 326 322 327 328 !-- Here the user may add code to check the validity of further &userpar 329 !-- control parameters ordeduce further quantities.323 ! 324 !-- Here the user may add code to check the validity of further &userpar control parameters or 325 !-- deduce further quantities. 330 326 331 327 … … 333 329 334 330 335 !------------------------------------------------------------------------------ !331 !--------------------------------------------------------------------------------------------------! 336 332 ! Description: 337 333 ! ------------ 338 334 !> Set module-specific timeseries units and labels 339 !------------------------------------------------------------------------------ !335 !--------------------------------------------------------------------------------------------------! 340 336 SUBROUTINE user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 341 337 342 343 INTEGER(iwp), INTENT(IN ) :: dots_max344 INTEGER(iwp), INTENT(INOUT) :: dots_num 345 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label346 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit338 INTEGER(iwp), INTENT(IN) :: dots_max !< 339 INTEGER(iwp), INTENT(INOUT) :: dots_num !< 340 341 CHARACTER(LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label !< 342 CHARACTER(LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit !< 347 343 348 344 ! … … 351 347 352 348 ! 353 !-- Sample for user-defined time series 354 !-- For each time series quantity you have to give a label and a unit, 355 !-- which will be used for the NetCDF file. They must not contain more than 356 !-- seven characters. The value of dots_num has to be increased by the 357 !-- number of new time series quantities. Its old value has to be store in 358 !-- dots_num_palm. See routine user_statistics on how to output calculate 359 !-- and output these quantities. 349 !-- Sample for user-defined time series: 350 !-- For each time series quantity you have to give a label and a unit, which will be used for the 351 !-- NetCDF file. They must not contain more than seven characters. The value of dots_num has to be 352 !-- increased by the number of new time series quantities. Its old value has to be stored in 353 !-- dots_num_palm. See routine user_statistics on how to calculate and output these quantities. 360 354 361 355 ! dots_num_palm = dots_num … … 375 369 376 370 377 !------------------------------------------------------------------------------! 378 ! Description: 379 ! ------------ 380 !> Set the unit of user defined profile output quantities. For those variables 381 !> not recognized by the user, the parameter unit is set to "illegal", which 382 !> tells the calling routine that the output variable is not defined and leads 383 !> to a program abort. 384 !------------------------------------------------------------------------------! 371 !--------------------------------------------------------------------------------------------------! 372 ! Description: 373 ! ------------ 374 !> Set the unit of user defined profile output quantities. For those variables not recognized by the 375 !> user, the parameter unit is set to "illegal", which tells the calling routine that the 376 !> output variable is not defined and leads to a program abort. 377 !--------------------------------------------------------------------------------------------------! 385 378 SUBROUTINE user_check_data_output_pr( variable, var_count, unit, dopr_unit ) 386 379 … … 389 382 390 383 391 CHARACTER (LEN=*) :: unit !<392 CHARACTER (LEN=*) :: variable !<384 CHARACTER (LEN=*) :: unit !< 385 CHARACTER (LEN=*) :: variable !< 393 386 CHARACTER (LEN=*) :: dopr_unit !< local value of dopr_unit 394 387 395 ! INTEGER(iwp) :: user_pr_index !<396 INTEGER(iwp) :: var_count !<388 ! INTEGER(iwp) :: user_pr_index !< 389 INTEGER(iwp) :: var_count !< 397 390 398 391 ! … … 404 397 ! 405 398 !-- Uncomment and extend the following lines, if necessary. 406 !-- Add additional CASE statements depending on the number of quantities 407 !-- for which profiles are to be calculated. The respective calculations 408 !-- to be performed have to be added in routine user_statistics. 409 !-- The quantities are (internally) identified by a user-profile-number 410 !-- (see variable "user_pr_index" below). The first user-profile must be assigned 411 !-- the number "pr_palm+1", the second one "pr_palm+2", etc. The respective 412 !-- user-profile-numbers have also to be used in routine user_statistics! 413 ! CASE ( 'u*v*' ) ! quantity string as given in 414 ! ! data_output_pr_user 399 !-- Add additional CASE statements depending on the number of quantities for which profiles are 400 !-- to be calculated. The respective calculations to be performed have to be added in routine 401 !-- user_statistics. The quantities are (internally) identified by a user-profile-number 402 !-- (see variable "user_pr_index" below). The first user-profile must be assigned the number 403 !-- "pr_palm+1", the second one "pr_palm+2", etc. The respective user-profile-numbers have also 404 !-- to be used in routine user_statistics! 405 ! CASE ( 'u*v*' ) ! quantity string as given in data_output_pr_user 415 406 ! user_pr_index = pr_palm + 1 416 407 ! dopr_index(var_count) = user_pr_index ! quantities' user-profile-number 417 408 ! dopr_unit = 'm2/s2' ! quantity unit 418 409 ! unit = dopr_unit 419 ! hom(:,2,user_pr_index,:) 420 ! ! grid on which the quantity is 421 ! ! defined (use zu or zw)410 ! hom(:,2,user_pr_index,:) = SPREAD( zu, 2, statistic_regions+1 ) 411 ! ! grid on which the quantity is defined (use zu or zw) 412 ! 422 413 423 414 CASE DEFAULT … … 430 421 431 422 432 !------------------------------------------------------------------------------! 433 ! Description: 434 ! ------------ 435 !> Set the unit of user defined output quantities. For those variables 436 !> not recognized by the user, the parameter unit is set to "illegal", which 437 !> tells the calling routine that the output variable is not defined and leads 438 !> to a program abort. 439 !------------------------------------------------------------------------------! 423 !--------------------------------------------------------------------------------------------------! 424 ! Description: 425 ! ------------ 426 !> Set the unit of user defined output quantities. For those variables not recognized by the user, 427 !> the parameter unit is set to "illegal", which tells the calling routine that the output variable 428 !> is not defined and leads to a program abort. 429 !--------------------------------------------------------------------------------------------------! 440 430 SUBROUTINE user_check_data_output( variable, unit ) 441 431 442 432 443 CHARACTER (LEN=*) :: unit !<444 CHARACTER (LEN=*) :: variable !<433 CHARACTER (LEN=*) :: unit !< 434 CHARACTER (LEN=*) :: variable !< 445 435 446 436 … … 451 441 ! CASE ( 'u2' ) 452 442 ! unit = 'm2/s2' 453 443 ! 444 ! CASE ( 'u*v*' ) 445 ! unit = 'm2/s2' 446 ! 454 447 CASE ( 'v_h' ) 455 448 unit = 'm/s' 456 ! 457 ! CASE ( 'u*v*' ) 458 ! unit = 'm2/s2' 459 ! 449 460 450 CASE DEFAULT 461 451 unit = 'illegal' … … 467 457 468 458 469 !------------------------------------------------------------------------------ !459 !--------------------------------------------------------------------------------------------------! 470 460 ! Description: 471 461 ! ------------ 472 462 !> Initialize user-defined arrays 473 !------------------------------------------------------------------------------ !463 !--------------------------------------------------------------------------------------------------! 474 464 SUBROUTINE user_init_arrays 475 465 … … 486 476 ALLOCATE( v_h(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 487 477 478 488 479 ! 489 480 !-- Example for defining a statistic region: 481 !-- ATTENTION: rmask = 0 is required at the ghost boundaries to guarantee correct statistic 482 !-- evaluations (otherwise ghost points would be counted twice). This setting has 483 !-- already been cared for in routine init_3d_model. Please don't set the ghost points 484 !-- /= 0. i.e. run the following loop only over nxl,nxr and nys,nyn. 490 485 ! IF ( statistic_regions >= 1 ) THEN 491 486 ! region = 1 492 ! 487 ! 493 488 ! rmask(:,:,region) = 0.0_wp 494 489 ! DO i = nxl, nxr … … 501 496 ! ENDIF 502 497 ! ENDDO 503 ! 498 ! 504 499 ! ENDIF 505 500 … … 507 502 508 503 509 !------------------------------------------------------------------------------ !504 !--------------------------------------------------------------------------------------------------! 510 505 ! Description: 511 506 ! ------------ 512 507 !> Execution of user-defined initializing actions 513 !------------------------------------------------------------------------------ !508 !--------------------------------------------------------------------------------------------------! 514 509 SUBROUTINE user_init 515 510 516 511 517 ! CHARACTER (LEN=20) :: field_char!<512 ! CHARACTER(LEN=20) :: field_char !< 518 513 ! 519 514 !-- Here the user-defined initializing actions follow: … … 526 521 527 522 528 !------------------------------------------------------------------------------! 529 ! Description: 530 ! ------------ 531 !> Set the grids on which user-defined output quantities are defined. 532 !> Allowed values for grid_x are "x" and "xu", for grid_y "y" and "yv", and 533 !> for grid_z "zu" and "zw". 534 !------------------------------------------------------------------------------! 523 !--------------------------------------------------------------------------------------------------! 524 ! Description: 525 ! ------------ 526 !> Set the grids on which user-defined output quantities are defined. Allowed values for grid_x are 527 !> "x" and "xu", for grid_y "y" and "yv", and for grid_z "zu" and "zw". 528 !--------------------------------------------------------------------------------------------------! 535 529 SUBROUTINE user_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) 536 530 … … 560 554 ! grid_z = 'zu' 561 555 562 563 556 CASE ( 'v_h', 'v_h_av' ) 564 557 found = .TRUE. … … 581 574 582 575 583 !------------------------------------------------------------------------------ !576 !--------------------------------------------------------------------------------------------------! 584 577 ! Description: 585 578 ! ------------ 586 579 !> Print a header with user-defined information. 587 !------------------------------------------------------------------------------ !580 !--------------------------------------------------------------------------------------------------! 588 581 SUBROUTINE user_header( io ) 589 582 590 583 591 INTEGER(iwp) :: i !< 592 INTEGER(iwp) :: io !< 593 594 ! 595 !-- If no user-defined variables are read from the namelist-file, no 596 !-- information will be printed. 584 INTEGER(iwp) :: i !< 585 INTEGER(iwp) :: io !< 586 587 ! 588 !-- If no user-defined variables are read from the namelist-file, no information will be printed. 597 589 IF ( .NOT. user_module_enabled ) THEN 598 590 WRITE ( io, 100 ) … … 614 606 !-- Format-descriptors 615 607 100 FORMAT (//' *** no user-defined variables found'/) 616 110 FORMAT (//1X,78('#') & 617 //' User-defined variables and actions:'/ & 618 ' -----------------------------------'//) 608 110 FORMAT (//1X,78('#') // ' User-defined variables and actions:' / & 609 ' -----------------------------------'//) 619 610 200 FORMAT (' Output of profiles and time series for following regions:' /) 620 611 201 FORMAT (4X,'Region ',I1,': ',A) … … 624 615 625 616 626 !------------------------------------------------------------------------------ !617 !--------------------------------------------------------------------------------------------------! 627 618 ! Description: 628 619 ! ------------ 629 620 !> Call for all grid points 630 !------------------------------------------------------------------------------ !621 !--------------------------------------------------------------------------------------------------! 631 622 SUBROUTINE user_actions( location ) 632 623 633 624 634 CHARACTER (LEN=*) :: location !<635 636 INTEGER(iwp) :: i !<637 INTEGER(iwp) :: j !<638 INTEGER(iwp) :: k !<625 CHARACTER(LEN=*) :: location !< 626 627 INTEGER(iwp) :: i !< 628 INTEGER(iwp) :: j !< 629 INTEGER(iwp) :: k !< 639 630 640 631 CALL cpu_log( log_point(24), 'user_actions', 'start' ) 641 632 642 633 ! 643 !-- Here the user-defined actions follow 644 !-- No calls for single grid points are allowed at locations before and 645 !-- after the timestep, since these calls are not within an i,j-loop 634 !-- Here the user-defined actions follow. No calls for single grid points are allowed at locations 635 !-- before and after the timestep, since these calls are not within an i,j-loop 646 636 SELECT CASE ( location ) 647 637 … … 656 646 CASE ( 'after_integration' ) 657 647 ! 658 !-- Enter actions to be done after every time integration (before 659 !-- data output) 648 !-- Enter actions to be done after every time integration (before data output) 660 649 !-- Sample for user-defined output: 661 650 ! DO i = nxlg, nxrg … … 670 659 ! DO k = nzb, nzt+1 671 660 ! ustvst(k,j,i) = & 672 ! ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,0) ) * &661 ! ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,0) ) * & 673 662 ! ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,0) ) 674 663 ! ENDDO … … 679 668 DO j = nysg, nyng 680 669 DO k = nzb, nzt 681 v_h(k,j,i) = SQRT( u(k,j,i)**2.+v(k,j,i)**2.)670 v_h(k,j,i) = SQRT( u(k,j,i)**2.0_wp + v(k,j,i)**2.0_wp ) 682 671 ENDDO 683 672 ENDDO 684 673 ENDDO 685 674 686 687 675 CASE ( 'after_timestep' ) 688 676 ! … … 726 714 727 715 728 !------------------------------------------------------------------------------ !716 !--------------------------------------------------------------------------------------------------! 729 717 ! Description: 730 718 ! ------------ 731 719 !> Call for grid point i,j 732 !------------------------------------------------------------------------------ !720 !--------------------------------------------------------------------------------------------------! 733 721 SUBROUTINE user_actions_ij( i, j, location ) 734 722 735 723 736 CHARACTER (LEN=*) :: location737 738 INTEGER(iwp) :: i 739 INTEGER(iwp) :: j 724 CHARACTER(LEN=*) :: location !< 725 726 INTEGER(iwp) :: i !< 727 INTEGER(iwp) :: j !< 740 728 741 729 ! … … 782 770 783 771 784 !------------------------------------------------------------------------------ !785 ! Description: 786 ! ------------ 787 !> Sum up and time-average user-defined output quantities as well as allocate 788 !> the array necessaryfor storing the average.789 !------------------------------------------------------------------------------ !772 !--------------------------------------------------------------------------------------------------! 773 ! Description: 774 ! ------------ 775 !> Sum up and time-average user-defined output quantities as well as allocate the array necessary 776 !> for storing the average. 777 !--------------------------------------------------------------------------------------------------! 790 778 SUBROUTINE user_3d_data_averaging( mode, variable ) 791 779 792 780 793 CHARACTER (LEN=*) :: mode !<794 CHARACTER (LEN=*) :: variable !<795 796 INTEGER(iwp) :: i !<797 INTEGER(iwp) :: j !<798 INTEGER(iwp) :: k !<781 CHARACTER(LEN=*) :: mode !< 782 CHARACTER(LEN=*) :: variable !< 783 784 INTEGER(iwp) :: i !< 785 INTEGER(iwp) :: j !< 786 INTEGER(iwp) :: k !< 799 787 800 788 IF ( mode == 'allocate' ) THEN … … 804 792 ! 805 793 !-- Uncomment and extend the following lines, if necessary. 806 !-- The arrays for storing the user defined quantities (here u2_av) have 807 !-- to be declared anddefined by the user!794 !-- The arrays for storing the user defined quantities (here u2_av) have to be declared and 795 !-- defined by the user! 808 796 !-- Sample for user-defined output: 809 797 ! CASE ( 'u2' ) … … 830 818 ! 831 819 !-- Uncomment and extend the following lines, if necessary. 832 !-- The arrays for storing the user defined quantities (here u2 and 833 !-- u2_av) have to be declaredand defined by the user!820 !-- The arrays for storing the user defined quantities (here u2 and u2_av) have to be declared 821 !-- and defined by the user! 834 822 !-- Sample for user-defined output: 835 823 ! CASE ( 'u2' ) 836 ! IF ( ALLOCATED( u2_av ) ) THEN824 ! IF ( ALLOCATED( u2_av ) ) THEN 837 825 ! DO i = nxlg, nxrg 838 826 ! DO j = nysg, nyng … … 845 833 846 834 CASE ( 'v_h' ) 835 847 836 IF ( ALLOCATED( v_h_av ) ) THEN 848 837 DO i = nxlg, nxrg … … 855 844 ENDIF 856 845 846 857 847 CASE DEFAULT 858 848 CONTINUE … … 866 856 ! 867 857 !-- Uncomment and extend the following lines, if necessary. 868 !-- The arrays for storing the user defined quantities (here u2_av) have 869 !-- to be declared anddefined by the user!858 !-- The arrays for storing the user defined quantities (here u2_av) have to be declared and 859 !-- defined by the user! 870 860 !-- Sample for user-defined output: 871 861 ! CASE ( 'u2' ) 872 ! IF ( ALLOCATED( u2_av ) ) THEN862 ! IF ( ALLOCATED( u2_av ) ) THEN 873 863 ! DO i = nxlg, nxrg 874 864 ! DO j = nysg, nyng … … 881 871 882 872 CASE ( 'v_h' ) 873 883 874 IF ( ALLOCATED( v_h_av ) ) THEN 884 875 DO i = nxlg, nxrg … … 891 882 ENDIF 892 883 884 893 885 END SELECT 894 886 … … 899 891 900 892 901 !------------------------------------------------------------------------------! 902 ! Description: 903 ! ------------ 904 !> Resorts the user-defined output quantity with indices (k,j,i) to a 905 !> temporary array with indices (i,j,k) and sets the grid on which it is defined. 906 !> Allowed values for grid are "zu" and "zw". 907 !------------------------------------------------------------------------------! 893 !--------------------------------------------------------------------------------------------------! 894 ! Description: 895 ! ------------ 896 !> Resorts the user-defined output quantity with indices (k,j,i) to a temporary array with indices 897 !> (i,j,k) and sets the grid on which it is defined. Allowed values for grid are "zu" and "zw". 898 !--------------------------------------------------------------------------------------------------! 908 899 SUBROUTINE user_data_output_2d( av, variable, found, grid, local_pf, two_d, nzb_do, nzt_do ) 909 900 910 901 911 CHARACTER (LEN=*) :: grid !<912 CHARACTER (LEN=*) :: variable !<913 914 INTEGER(iwp) :: av !< flag to control data output of instantaneous or time-averaged data915 INTEGER(iwp) :: i !< grid index along x-direction916 INTEGER(iwp) :: j !< grid index along y-direction917 INTEGER(iwp) :: k !< grid index along z-direction918 ! INTEGER(iwp) :: m !< running index surface elements919 INTEGER(iwp) :: nzb_do !< lower limit of the domain (usually nzb)920 INTEGER(iwp) :: nzt_do !< upper limit of the domain (usually nzt+1)921 922 LOGICAL :: found !<923 LOGICAL :: two_d !< flag parameter that indicates 2D variables (horizontal cross sections)924 925 926 927 REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !<902 CHARACTER(LEN=*) :: grid !< 903 CHARACTER(LEN=*) :: variable !< 904 905 INTEGER(iwp) :: av !< flag to control data output of instantaneous or time-averaged data 906 INTEGER(iwp) :: i !< grid index along x-direction 907 INTEGER(iwp) :: j !< grid index along y-direction 908 INTEGER(iwp) :: k !< grid index along z-direction 909 ! INTEGER(iwp) :: m !< running index surface elements 910 INTEGER(iwp) :: nzb_do !< lower limit of the domain (usually nzb) 911 INTEGER(iwp) :: nzt_do !< upper limit of the domain (usually nzt+1) 912 913 LOGICAL :: found !< 914 LOGICAL :: two_d !< flag parameter that indicates 2D variables (horizontal cross sections) 915 916 REAL(wp) :: fill_value = -999.0_wp !< value for the _FillValue attribute 917 918 REAL(wp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< 928 919 929 920 ! … … 931 922 IF ( av == 0 .OR. local_pf(nxl,nys,nzb_do) == 0.0_wp .OR. two_d ) CONTINUE 932 923 924 933 925 found = .TRUE. 934 926 … … 937 929 ! 938 930 !-- Uncomment and extend the following lines, if necessary. 939 !-- The arrays for storing the user defined quantities (here u2 and u2_av) 940 !-- have to be declaredand defined by the user!931 !-- The arrays for storing the user defined quantities (here u2 and u2_av) have to be declared 932 !-- and defined by the user! 941 933 !-- Sample for user-defined output: 942 934 ! CASE ( 'u2_xy', 'u2_xz', 'u2_yz' ) … … 950 942 ! ENDDO 951 943 ! ELSE 952 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN944 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN 953 945 ! ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 954 946 ! u2_av = REAL( fill_value, KIND = wp ) … … 989 981 990 982 grid = 'zu' 991 ! 992 ! -- In case two-dimensional surface variables are output, the user993 !-- has to access related surface-type. Uncomment and extend following lines994 !-- appropriately (example output of vertical surface momentum flux of u-995 !-- component). Please note, surface elements can be distributed over996 !-- several data type , depending on their respective surface properties.983 984 ! 985 !-- In case two-dimensional surface variables are output, the user has to access related 986 !-- surface-type. Uncomment and extend following lines appropriately (example output of vertical 987 !-- surface momentum flux of u-component). Please note, surface elements can be distributed over 988 !-- several data types, depending on their respective surface properties. 997 989 ! CASE ( 'usws_xy' ) 998 990 ! IF ( av == 0 ) THEN … … 1021 1013 ! 1022 1014 ! grid = 'zu' 1023 !-- 1015 !-- 1024 1016 1025 1017 … … 1034 1026 1035 1027 1036 !------------------------------------------------------------------------------ !1037 ! Description: 1038 ! ------------ 1039 !> Resorts the user-defined output quantity with indices (k,j,i) to a 1040 !> temporary array with indices(i,j,k).1041 !------------------------------------------------------------------------------ !1028 !--------------------------------------------------------------------------------------------------! 1029 ! Description: 1030 ! ------------ 1031 !> Resorts the user-defined output quantity with indices (k,j,i) to a temporary array with indices 1032 !> (i,j,k). 1033 !--------------------------------------------------------------------------------------------------! 1042 1034 SUBROUTINE user_data_output_3d( av, variable, found, local_pf, nzb_do, nzt_do ) 1043 1035 1044 1036 1045 CHARACTER (LEN=*) :: variable !<1046 1047 INTEGER(iwp) :: av !<1048 INTEGER(iwp) :: i !<1049 INTEGER(iwp) :: j !<1050 INTEGER(iwp) :: k !<1037 CHARACTER(LEN=*) :: variable !< 1038 1039 INTEGER(iwp) :: av !< 1040 INTEGER(iwp) :: i !< 1041 INTEGER(iwp) :: j !< 1042 INTEGER(iwp) :: k !< 1051 1043 INTEGER(iwp) :: nzb_do !< lower limit of the data output (usually 0) 1052 1044 INTEGER(iwp) :: nzt_do !< vertical upper limit of the data output (usually nz_do3d) 1053 1045 1054 LOGICAL :: found !< 1055 1056 REAL(wp) :: fill_value = -999.0_wp !< value for the _FillValue attribute 1057 1058 REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< 1046 LOGICAL :: found !< 1047 1048 REAL(wp) :: fill_value = -999.0_wp !< value for the _FillValue attribute 1049 1050 REAL(sp), DIMENSION(nxl:nxr,nys:nyn,nzb_do:nzt_do) :: local_pf !< 1051 1052 ! 1053 !-- Next line is to avoid compiler warning about unused variables. Please remove. 1054 IF ( av == 0 .OR. local_pf(nxl,nys,nzb_do) == 0.0_wp ) CONTINUE 1059 1055 1060 1056 … … 1065 1061 ! 1066 1062 !-- Uncomment and extend the following lines, if necessary. 1067 !-- The arrays for storing the user defined quantities (here u2 and u2_av) 1068 !-- have to be declaredand defined by the user!1063 !-- The arrays for storing the user defined quantities (here u2 and u2_av) have to be declared 1064 !-- and defined by the user! 1069 1065 !-- Sample for user-defined output: 1070 1066 ! CASE ( 'u2' ) … … 1078 1074 ! ENDDO 1079 1075 ! ELSE 1080 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN1076 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN 1081 1077 ! ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1082 1078 ! u2_av = REAL( fill_value, KIND = wp ) … … 1090 1086 ! ENDDO 1091 1087 ! ENDIF 1092 1093 1088 1094 1089 CASE ( 'v_h' ) … … 1114 1109 ENDDO 1115 1110 ENDIF 1116 ! 1111 1117 1112 1118 1113 CASE DEFAULT … … 1125 1120 1126 1121 1127 !------------------------------------------------------------------------------! 1128 ! Description: 1129 ! ------------ 1130 !> Calculation of user-defined statistics, i.e. horizontally averaged profiles 1131 !> and time series. 1132 !> This routine is called for every statistic region sr defined by the user, 1133 !> but at least for the region "total domain" (sr=0). 1134 !> See section 3.5.4 on how to define, calculate, and output user defined 1135 !> quantities. 1136 !------------------------------------------------------------------------------! 1122 !--------------------------------------------------------------------------------------------------! 1123 ! Description: 1124 ! ------------ 1125 !> Calculation of user-defined statistics, i.e. horizontally averaged profiles and time series. 1126 !> This routine is called for every statistic region sr defined by the user, but at least for the 1127 !> region "total domain" (sr=0). See section 3.5.4 on how to define, calculate, and output user 1128 !> defined quantities. 1129 !--------------------------------------------------------------------------------------------------! 1137 1130 SUBROUTINE user_statistics( mode, sr, tn ) 1138 1131 1139 1132 1140 CHARACTER (LEN=*) :: mode !<1141 ! INTEGER(iwp) :: i 1142 ! INTEGER(iwp) :: j 1143 ! INTEGER(iwp) :: k 1144 INTEGER(iwp) :: sr !<1145 INTEGER(iwp) :: tn !<1146 1147 ! REAL(wp), DIMENSION(:), ALLOCATABLE :: ts_value_l 1133 CHARACTER(LEN=*) :: mode !< 1134 ! INTEGER(iwp) :: i !< 1135 ! INTEGER(iwp) :: j !< 1136 ! INTEGER(iwp) :: k !< 1137 INTEGER(iwp) :: sr !< 1138 INTEGER(iwp) :: tn !< 1139 1140 ! REAL(wp), DIMENSION(:), ALLOCATABLE :: ts_value_l !< 1148 1141 1149 1142 ! … … 1154 1147 1155 1148 ! 1156 !-- Sample on how to calculate horizontally averaged profiles of user- 1157 !-- defined quantities. Each quantity is identified by the index 1158 !-- "pr_palm+#" where "#" is an integer starting from 1. These 1159 !-- user-profile-numbers must also be assigned to the respective strings 1160 !-- given by data_output_pr_user in routine user_check_data_output_pr. 1149 !-- Sample on how to calculate horizontally averaged profiles of user-defined quantities. Each 1150 !-- quantity is identified by the index "pr_palm+#" where "#" is an integer starting from 1. 1151 !-- These user-profile-numbers must also be assigned to the respective strings given by 1152 !-- data_output_pr_user in routine user_check_data_output_pr. 1161 1153 ! !$OMP DO 1162 1154 ! DO i = nxl, nxr … … 1164 1156 ! DO k = nzb+1, nzt 1165 1157 !! 1166 !!-- Sample on how to calculate the profile of the resolved-scale 1167 !!-- horizontal momentum flux u*v* 1168 ! sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) + & 1169 ! ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,sr) ) *& 1170 ! ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,sr) ) & 1171 ! * rmask(j,i,sr) & 1172 ! * MERGE( 1.0_wp, 0.0_wp, & 1173 ! BTEST( wall_flags_0(k,j,i), 0 ) ) 1158 !!-- Sample on how to calculate the profile of the resolved-scale horizontal momentum 1159 !!-- flux u*v* 1160 ! sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) + & 1161 ! ( 0.5_wp * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,sr) ) * & 1162 ! ( 0.5_wp * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,sr) ) * & 1163 ! rmask(j,i,sr) * MERGE( 1.0_wp, 0.0_wp, & 1164 ! BTEST( wall_flags_total_0(k,j,i), 0 ) ) 1174 1165 !! 1175 !!-- Further profiles can be defined and calculated by increasing 1176 !!-- the second index of array sums_l (replace ... appropriately) 1177 ! sums_l(k,pr_palm+2,tn) = sums_l(k,pr_palm+2,tn) + ... & 1178 ! * rmask(j,i,sr) 1166 !!-- Further profiles can be defined and calculated by increasing the second index of 1167 !!-- array sums_l (replace ... appropriately) 1168 ! sums_l(k,pr_palm+2,tn) = sums_l(k,pr_palm+2,tn) + ... * rmask(j,i,sr) 1179 1169 ! ENDDO 1180 1170 ! ENDDO … … 1187 1177 ! 1188 1178 !-- Sample on how to add values for the user-defined time series quantities. 1189 !-- These have to be defined before in routine user_init. This sample 1190 !-- creates two time series for the absolut values of the horizontal 1191 !-- velocities u and v. 1179 !-- These have to be defined before in routine user_init. This sample creates two time series for 1180 !-- the absolut values of the horizontal velocities u and v. 1192 1181 ! ts_value_l = 0.0_wp 1193 1182 ! ts_value_l(1) = ABS( u_max ) … … 1195 1184 ! 1196 1185 !-- Collect / send values to PE0, because only PE0 outputs the time series. 1197 !-- CAUTION: Collection is done by taking the sum over all processors. 1198 !-- You may have to normalize this sum, depending on the quantity 1199 !-- that you like to calculate. For serial runs, nothing has to be 1200 !-- done. 1201 !-- HINT: If the time series value that you are calculating has the same 1202 !-- value on all PEs, you can omit the MPI_ALLREDUCE call and 1203 !-- assign ts_value(dots_num_palm+1:,sr) = ts_value_l directly. 1186 !-- CAUTION: Collection is done by taking the sum over all processors. You may have to normalize 1187 !-- this sum, depending on the quantity that you like to calculate. For serial runs, 1188 !-- nothing has to be done. 1189 !-- HINT: If the time series value that you are calculating has the same value on all PEs, you 1190 !-- can omit the MPI_ALLREDUCE call and assign ts_value(dots_num_palm+1:,sr) = ts_value_l directly. 1204 1191 !#if defined( __parallel ) 1205 1192 ! IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 1206 ! CALL MPI_ALLREDUCE( ts_value_l(1), & 1207 ! ts_value(dots_num_palm+1,sr), & 1208 ! dots_num_user, MPI_REAL, MPI_MAX, comm2d, & 1209 ! ierr ) 1193 ! CALL MPI_ALLREDUCE( ts_value_l(1), ts_value(dots_num_palm+1,sr), dots_num_user, MPI_REAL, & 1194 ! MPI_MAX, comm2d, ierr ) 1210 1195 !#else 1211 1196 ! ts_value(dots_num_palm+1:dots_num_palm+dots_num_user,sr) = ts_value_l … … 1217 1202 1218 1203 1219 !------------------------------------------------------------------------------ !1220 ! Description: 1221 ! ------------ 1222 !> Read ing global restart data that has been defined by the user.1223 !------------------------------------------------------------------------------ !1224 SUBROUTINE user_rrd_global ( found )1225 1226 1227 LOGICAL, INTENT(OUT) :: found 1204 !--------------------------------------------------------------------------------------------------! 1205 ! Description: 1206 ! ------------ 1207 !> Read module-specific global restart data (Fortran binary format). 1208 !--------------------------------------------------------------------------------------------------! 1209 SUBROUTINE user_rrd_global_ftn( found ) 1210 1211 1212 LOGICAL, INTENT(OUT) :: found !< 1228 1213 1229 1214 … … 1237 1222 1238 1223 CASE DEFAULT 1239 1224 1240 1225 found = .FALSE. 1241 1226 … … 1243 1228 1244 1229 1245 END SUBROUTINE user_rrd_global 1246 1247 1248 !------------------------------------------------------------------------------! 1249 ! Description: 1250 ! ------------ 1251 !> Reading processor specific restart data from file(s) that has been defined 1252 !> by the user. 1253 !> Subdomain index limits on file are given by nxl_on_file, etc. 1254 !> Indices nxlc, etc. indicate the range of gridpoints to be mapped from the 1255 !> subdomain on file (f) to the subdomain of the current PE (c). They have been 1256 !> calculated in routine rrd_local. 1257 !------------------------------------------------------------------------------! 1258 SUBROUTINE user_rrd_local( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, & 1259 nxr_on_file, nynf, nync, nyn_on_file, nysf, & 1260 nysc, nys_on_file, tmp_3d, found ) 1230 END SUBROUTINE user_rrd_global_ftn 1231 1232 1233 !--------------------------------------------------------------------------------------------------! 1234 ! Description: 1235 ! ------------ 1236 !> Read module-specific global restart data (MPI-IO). 1237 !--------------------------------------------------------------------------------------------------! 1238 SUBROUTINE user_rrd_global_mpi 1239 1240 ! USE restart_data_mpi_io_mod, & 1241 ! ONLY: rrd_mpi_io 1242 1243 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 1244 CONTINUE 1245 1246 END SUBROUTINE user_rrd_global_mpi 1247 1248 1249 !--------------------------------------------------------------------------------------------------! 1250 ! Description: 1251 ! ------------ 1252 !> Read module-specific local restart data arrays (Fortran binary format). 1253 !> Subdomain 1254 !> index limits on file are given by nxl_on_file, etc. Indices nxlc, etc. indicate the range of 1255 !> gridpoints to be mapped from the subdomain on file (f) to the subdomain of the current PE (c). 1256 !> They have been calculated in routine rrd_local. 1257 !--------------------------------------------------------------------------------------------------! 1258 SUBROUTINE user_rrd_local_ftn( k, nxlf, nxlc, nxl_on_file, nxrf, nxrc, nxr_on_file, nynf, nync, & 1259 nyn_on_file, nysf, nysc, nys_on_file, tmp_3d, found ) 1261 1260 1262 1261 … … 1276 1275 INTEGER(iwp) :: nys_on_file !< 1277 1276 1278 LOGICAL, INTENT(OUT) :: found 1279 1280 REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d 1277 LOGICAL, INTENT(OUT) :: found !< 1278 1279 REAL(wp), DIMENSION(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) :: tmp_3d !< 1281 1280 1282 1281 ! … … 1294 1293 1295 1294 CASE ( 'u2_av' ) 1296 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN1295 ! IF ( .NOT. ALLOCATED( u2_av ) ) THEN 1297 1296 ! ALLOCATE( u2_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 1298 1297 ! ENDIF 1299 1298 ! IF ( k == 1 ) READ ( 13 ) tmp_3d 1300 ! u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = &1301 ! 1299 ! u2_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 1300 ! tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 1302 1301 ! 1303 1302 CASE DEFAULT … … 1307 1306 END SELECT 1308 1307 1309 END SUBROUTINE user_rrd_local 1310 1311 1312 !------------------------------------------------------------------------------! 1313 ! Description: 1314 ! ------------ 1315 !> Writes global and user-defined restart data into binary file(s) for restart 1316 !> runs. 1317 !------------------------------------------------------------------------------! 1308 END SUBROUTINE user_rrd_local_ftn 1309 1310 1311 !--------------------------------------------------------------------------------------------------! 1312 ! Description: 1313 ! ------------ 1314 !> Read module-specific local restart data arrays (MPI-IO). 1315 !--------------------------------------------------------------------------------------------------! 1316 SUBROUTINE user_rrd_local_mpi 1317 1318 ! USE restart_data_mpi_io_mod, & 1319 ! ONLY: rd_mpi_io_check_array, rrd_mpi_io 1320 1321 ! CALL rd_mpi_io_check_array( 'u2_av' , found = array_found ) 1322 ! IF ( array_found ) THEN 1323 ! IF ( .NOT. ALLOCATED( u2_av ) ) ALLOCATE( u2_av(nysg:nyng,nxlg:nxrg) ) 1324 ! CALL rrd_mpi_io( 'rad_u2_av', rad_u2_av ) 1325 ! ENDIF 1326 1327 CONTINUE 1328 1329 END SUBROUTINE user_rrd_local_mpi 1330 1331 1332 !--------------------------------------------------------------------------------------------------! 1333 ! Description: 1334 ! ------------ 1335 !> Writes global and user-defined restart data into binary file(s) for restart runs. 1336 !--------------------------------------------------------------------------------------------------! 1318 1337 SUBROUTINE user_wrd_global 1319 1338 1320 ! CALL wrd_write_string( 'global_parameter' ) 1321 ! WRITE ( 14 ) global_parameter 1339 ! USE restart_data_mpi_io_mod, & 1340 ! ONLY: wrd_mpi_io 1341 1342 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1343 1344 ! CALL wrd_write_string( 'global_parameter' ) 1345 ! WRITE ( 14 ) global_parameter 1346 1347 ELSEIF ( restart_data_format_output(1:3) == 'mpi' ) THEN 1348 1349 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 1350 1351 ENDIF 1322 1352 1323 1353 END SUBROUTINE user_wrd_global 1324 1354 1325 1355 1326 !------------------------------------------------------------------------------! 1327 ! Description: 1328 ! ------------ 1329 !> Writes processor specific and user-defined restart data into binary file(s) 1330 !> for restart runs. 1331 !------------------------------------------------------------------------------! 1356 !--------------------------------------------------------------------------------------------------! 1357 ! Description: 1358 ! ------------ 1359 !> Writes processor specific and user-defined restart data into binary file(s) for restart runs. 1360 !--------------------------------------------------------------------------------------------------! 1332 1361 SUBROUTINE user_wrd_local 1362 1363 ! USE restart_data_mpi_io_mod, & 1364 ! ONLY: wrd_mpi_io 1333 1365 1334 1366 ! 1335 1367 !-- Here the user-defined actions at the end of a job follow. 1336 1368 !-- Sample for user-defined output: 1337 ! IF ( ALLOCATED( u2_av ) ) THEN 1338 ! CALL wrd_write_string( 'u2_av' ) 1339 ! WRITE ( 14 ) u2_av 1340 ! ENDIF 1369 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1370 1371 ! IF ( ALLOCATED( u2_av ) ) THEN 1372 ! CALL wrd_write_string( 'u2_av' ) 1373 ! WRITE ( 14 ) u2_av 1374 ! ENDIF 1375 1376 ELSEIF ( restart_data_format_output(1:3) == 'mpi' ) THEN 1377 1378 ! IF ( ALLOCATED( u2_av ) ) CALL wrd_mpi_io( 'u2_av', u2_av ) 1379 1380 ENDIF 1341 1381 1342 1382 END SUBROUTINE user_wrd_local 1343 1383 1344 1384 1345 !------------------------------------------------------------------------------ !1385 !--------------------------------------------------------------------------------------------------! 1346 1386 ! Description: 1347 1387 ! ------------ 1348 1388 !> Execution of user-defined actions at the end of a job. 1349 !------------------------------------------------------------------------------ !1389 !--------------------------------------------------------------------------------------------------! 1350 1390 SUBROUTINE user_last_actions 1351 1391
Note: See TracChangeset
for help on using the changeset viewer.