- Timestamp:
- Jan 5, 2018 9:27:03 AM (7 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/land_surface_model_mod.f90
r2718 r2723 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 1976 1979 1977 1980 1978 ! IF ( surf_t_surface_p%var_1d(m) < 270.0_wp .OR. surf_t_surface_p%var_1d(m) > 350.0_wp ) THEN1979 ! PRINT*, "myid: ", myid1980 ! PRINT*, "m: ", m1981 ! PRINT*, "i,j,k: ", i, j, k1982 ! PRINT*, "pt_p: ", surf_t_surface_p%var_1d(m)1983 ! PRINT*, "f_shf: ", f_shf1984 ! PRINT*, "f_qsws: ", f_qsws1985 ! ENDIF1986 1987 1988 1981 ! pt(k+k_off,j+j_off,i+i_off) = surf_t_surface_p%var_1d(m) / exn !is actually no air temperature 1989 1982 surf%pt_surface(m) = surf_t_surface_p%var_1d(m) / exn … … 4527 4520 IF ( spinup_time > 0.0_wp ) THEN 4528 4521 coupling_start_time = spinup_time 4529 end_time = end_time + spinup_time4530 4522 IF ( spinup_pt_mean == 9999999.9_wp ) THEN 4531 4523 spinup_pt_mean = pt_surface 4532 4524 ENDIF 4533 spinup = .TRUE. 4525 IF ( .NOT. spinup ) THEN 4526 end_time = end_time + spinup_time 4527 spinup = .TRUE. 4528 ENDIF 4534 4529 ENDIF 4535 4530 -
palm/trunk/SOURCE/radiation_model_mod.f90
r2718 r2723 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix in calculation of rad_lw_out (clear-sky). First grid level was used 28 ! instead of the surface value 29 ! 30 ! 2718 2018-01-02 08:49:38Z maronga 27 31 ! Corrected "Former revisions" section 28 32 ! … … 2370 2374 2371 2375 INTEGER(iwp) :: i !< index x-direction 2372 INTEGER(iwp) :: ioff !< offset between surface element and adjacent grid point along x2373 2376 INTEGER(iwp) :: j !< index y-direction 2374 INTEGER(iwp) :: joff !< offset between surface element and adjacent grid point along y2375 2377 INTEGER(iwp) :: k !< index z-direction 2376 INTEGER(iwp) :: koff !< offset between surface element and adjacent grid point along z2377 2378 INTEGER(iwp) :: m !< running index for surface elements 2378 2379 … … 2385 2386 2386 2387 k = nzut 2387 ! 2388 !-- MS: Why k+1 ? 2389 !-- MS: @Mohamed: emissivity belongs now to surface type with 3 different values for each 2390 !-- surface element (due to tile approach). 2388 2391 2389 exn1 = ( hyp(k+1) / 100000.0_wp )**0.286_wp 2392 2390 … … 2409 2407 !-- element. 2410 2408 ELSE 2411 !2412 !-- Determine index offset between surface element and adjacent2413 !-- atmospheric grid point (depends on surface orientation).2414 ioff = surf%ioff2415 joff = surf%joff2416 koff = surf%koff2417 2409 2418 2410 DO m = 1, surf%ns … … 2429 2421 !-- no weighted averaging is performed ( only one surface type per 2430 2422 !-- surface element ). 2423 !-- ATTENTION: when radiation interactions are switched on the 2424 !-- calculated fluxes below are not actually used as they are 2425 !-- overwritten in radiation_interaction. 2431 2426 IF ( ALLOCATED( surf%frac ) ) THEN 2432 2427 … … 2441 2436 ) & 2442 2437 * sigma_sb & 2443 * ( pt(k+koff,j+joff,i+ioff) * exn )**4 2444 2438 * ( surf%pt_surface(m) * exn )**4 2445 2439 2446 2440 surf%rad_lw_out_change_0(m) = & … … 2449 2443 + surf%frac(2,m) * surf%emissivity(2,m) & 2450 2444 ) * 3.0_wp * sigma_sb & 2451 * ( pt(k+koff,j+joff,i+ioff) * exn )** 32445 * ( surf%pt_surface(m) * exn )** 3 2452 2446 2453 2447 ELSE … … 2457 2451 surf%rad_lw_out(m) = surf%emissivity(0,m) & 2458 2452 * sigma_sb & 2459 * ( pt(k+koff,j+joff,i+ioff) * exn )**4 2460 2453 * ( surf%pt_surface(m) * exn )**4 2461 2454 2462 2455 surf%rad_lw_out_change_0(m) = surf%emissivity(0,m) & 2463 2456 * 3.0_wp * sigma_sb & 2464 * ( pt(k+koff,j+joff,i+ioff) * exn )** 32457 * ( surf%pt_surface(m) * exn )** 3 2465 2458 2466 2459 ENDIF … … 2635 2628 ) & 2636 2629 * sigma_sb & 2637 * ( pt(k+koff,j+joff,i+ioff) * exn )**42630 * ( surf%pt_surface(m) * exn )**4 2638 2631 2639 2632 surf%rad_sw_in(m) = ( surf%rad_net(m) - surf%rad_lw_in(m) & … … 2653 2646 surf%rad_lw_out(m) = surf%emissivity(0,m) & 2654 2647 * sigma_sb & 2655 * ( pt(k+koff,j+joff,i+ioff) * exn )**42648 * ( surf%pt_surface(m) * exn )**4 2656 2649 2657 2650 surf%rad_sw_in(m) = ( surf%rad_net(m) - surf%rad_lw_in(m) & … … 5363 5356 surfinlw(i) - surfoutlw(i) 5364 5357 ! 5365 !-- westward-fac ding5358 !-- westward-facing 5366 5359 ELSEIF ( surfl(1,i) == iwest_l ) THEN 5367 5360 surf_lsm_v(3)%rad_sw_in(m) = surfinsw(i) -
palm/trunk/SOURCE/time_integration_spinup.f90
r2718 r2723 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Bugfix: array rad_sw_in no longer exists and is thus removed from RUN_CONTROL 28 ! output. 29 ! Added output of XY and 3D data during spinup. 30 ! Bugfix: time step in LSM and USM was set to dt_3d instead of dt_spinup 31 ! 32 ! 2718 2018-01-02 08:49:38Z maronga 27 33 ! Corrected "Former revisions" section 28 34 ! … … 62 68 coupling_start_time, current_timestep_number, & 63 69 data_output_during_spinup, disturbance_created, dopr_n, do_sum, & 64 dt_averaging_input_pr, dt_dopr, dt_dots, dt_ run_control, &65 dt_spinup, humidity, intermediate_timestep_count, &70 dt_averaging_input_pr, dt_dopr, dt_dots, dt_do2d_xy, dt_do3d, dt_run_control, & 71 dt_spinup, dt_3d, humidity, intermediate_timestep_count, & 66 72 intermediate_timestep_count_max, land_surface, & 67 simulated_time, simulated_time_chr, &68 skip_time_dopr, s pinup, spinup_pt_amplitude, spinup_pt_mean,&69 spinup_ time, timestep_count, timestep_scheme, time_dopr,&70 time_dopr _av, time_dots, time_run_control,&73 simulated_time, simulated_time_chr, & 74 skip_time_dopr, skip_time_do2d_xy, skip_time_do3d, spinup, spinup_pt_amplitude, & 75 spinup_pt_mean, spinup_time, timestep_count, timestep_scheme, & 76 time_dopr, time_dopr_av, time_dots, time_do2d_xy, time_do3d, time_run_control, & 71 77 time_since_reference_point, urban_surface 72 78 … … 130 136 131 137 REAL(wp) :: pt_spinup !< temporary storage of temperature 138 REAL(wp) :: dt_save !< temporary storage for time step 132 139 133 140 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: pt_save !< temporary storage of temperature … … 137 144 CALL exchange_horiz( pt, nbgp ) 138 145 pt_save = pt 146 147 dt_save = dt_3d 148 dt_3d = dt_spinup 139 149 140 150 CALL location_message( 'starting spinup-sequence', .TRUE. ) … … 299 309 == intermediate_timestep_count_max ) THEN 300 310 301 time_radiation = time_radiation + dt_ spinup311 time_radiation = time_radiation + dt_3d 302 312 303 313 IF ( time_radiation >= dt_radiation .OR. force_radiation_call ) & … … 327 337 !-- Increase simulation time and output times 328 338 current_timestep_number_spinup = current_timestep_number_spinup + 1 329 simulated_time = simulated_time + dt_ spinup339 simulated_time = simulated_time + dt_3d 330 340 simulated_time_chr = time_to_string( simulated_time ) 331 341 time_since_reference_point = simulated_time - coupling_start_time 332 342 333 343 IF ( data_output_during_spinup ) THEN 334 time_dots = time_dots + dt_spinup 344 IF ( simulated_time >= skip_time_do2d_xy ) THEN 345 time_do2d_xy = time_do2d_xy + dt_3d 346 ENDIF 347 IF ( simulated_time >= skip_time_do3d ) THEN 348 time_do3d = time_do3d + dt_3d 349 ENDIF 350 time_dots = time_dots + dt_3d 335 351 IF ( simulated_time >= skip_time_dopr ) THEN 336 time_dopr = time_dopr + dt_ spinup337 ENDIF 338 time_run_control = time_run_control + dt_ spinup352 time_dopr = time_dopr + dt_3d 353 ENDIF 354 time_run_control = time_run_control + dt_3d 339 355 340 356 ! … … 354 370 ( dt_dopr - time_dopr ) <= averaging_interval_pr .AND. & 355 371 simulated_time >= skip_time_dopr ) THEN 356 time_dopr_av = time_dopr_av + dt_ spinup372 time_dopr_av = time_dopr_av + dt_3d 357 373 IF ( time_dopr_av >= dt_averaging_input_pr ) THEN 358 374 do_sum = .TRUE. 359 375 time_dopr_av = MOD( time_dopr_av, & 360 MAX( dt_averaging_input_pr, dt_ spinup) )376 MAX( dt_averaging_input_pr, dt_3d ) ) 361 377 ENDIF 362 378 ENDIF … … 367 383 IF ( time_dopr >= dt_dopr ) THEN 368 384 IF ( dopr_n /= 0 ) CALL data_output_profiles 369 time_dopr = MOD( time_dopr, MAX( dt_dopr, dt_ spinup) )385 time_dopr = MOD( time_dopr, MAX( dt_dopr, dt_3d ) ) 370 386 time_dopr_av = 0.0_wp ! due to averaging (see above) 371 387 ENDIF … … 375 391 IF ( time_dots >= dt_dots ) THEN 376 392 CALL data_output_tseries 377 time_dots = MOD( time_dots, MAX( dt_dots, dt_spinup ) ) 378 ENDIF 393 time_dots = MOD( time_dots, MAX( dt_dots, dt_3d ) ) 394 ENDIF 395 396 ! 397 !-- 2d-data output (cross-sections) 398 IF ( time_do2d_xy >= dt_do2d_xy ) THEN 399 CALL data_output_2d( 'xy', 0 ) 400 time_do2d_xy = MOD( time_do2d_xy, MAX( dt_do2d_xy, dt_3d ) ) 401 ENDIF 402 403 ! 404 !-- 3d-data output (volume data) 405 IF ( time_do3d >= dt_do3d ) THEN 406 CALL data_output_3d( 0 ) 407 time_do3d = MOD( time_do3d, MAX( dt_do3d, dt_3d ) ) 408 ENDIF 409 379 410 380 411 ENDIF … … 389 420 ! IF ( time_run_control >= dt_run_control ) THEN 390 421 ! time_run_control = MOD( time_run_control, & 391 ! MAX( dt_run_control, dt_ spinup) )422 ! MAX( dt_run_control, dt_3d ) ) 392 423 ! ENDIF 393 424 ! ENDIF … … 408 439 ! 409 440 !-- Write some general information about the spinup in run control file 410 WRITE ( 15, 101 ) current_timestep_number_spinup, simulated_time_chr, dt_ spinup, pt_spinup, rad_sw_in(0,nysg,nxlg)441 WRITE ( 15, 101 ) current_timestep_number_spinup, simulated_time_chr, dt_3d, pt_spinup 411 442 ! 412 443 !-- Write buffer contents to disc immediately … … 423 454 pt_p(:,:,:) = pt_save 424 455 456 ! 457 !-- Reset time step 458 dt_3d = dt_save 459 425 460 DEALLOCATE(pt_save) 426 461 … … 431 466 !-- Formats 432 467 100 FORMAT (///'Spinup control output:'/ & 433 '-------------------------------- --------'// &434 'ITER. HH:MM:SS DT PT(z_MO) SWD'/ &435 '-------------------------------- --------')468 '--------------------------------'// & 469 'ITER. HH:MM:SS DT PT(z_MO)'/ & 470 '--------------------------------') 436 471 101 FORMAT (I5,2X,A9,1X,F6.2,3X,F6.2,2X,F6.2) 437 472 -
palm/trunk/SOURCE/urban_surface_mod.f90
r2720 r2723 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Bugfix for spinups (end_time was increased twice in case of LSM + USM runs) 29 ! 30 ! 2720 2018-01-02 16:27:15Z kanani 28 31 ! Correction of comment 29 32 ! … … 5107 5110 IF ( spinup_time > 0.0_wp ) THEN 5108 5111 coupling_start_time = spinup_time 5109 end_time = end_time + spinup_time5110 5112 IF ( spinup_pt_mean == 9999999.9_wp ) THEN 5111 5113 spinup_pt_mean = pt_surface 5112 5114 ENDIF 5113 spinup = .TRUE. 5115 IF ( .NOT. spinup ) THEN 5116 end_time = end_time + spinup_time 5117 spinup = .TRUE. 5118 ENDIF 5114 5119 ENDIF 5115 5120
Note: See TracChangeset
for help on using the changeset viewer.