Changeset 2157
- Timestamp:
- Feb 22, 2017 3:10:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/radiation_model_mod.f90
r2101 r2157 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix in read_restart data 23 23 ! 24 24 ! Former revisions: … … 3399 3399 tmp_3d !< 3400 3400 3401 REAL(wp), & 3402 DIMENSION(0:0,nys_on_file-nbgp:nyn_on_file+nbgp,nxl_on_file-nbgp:nxr_on_file+nbgp) ::& 3403 tmp_3d2 !< 3404 3401 3405 3402 3406 … … 3437 3441 CASE ( 'rad_lw_in' ) 3438 3442 IF ( .NOT. ALLOCATED( rad_lw_in ) ) THEN 3439 ALLOCATE( rad_lw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3443 IF ( radiation_scheme == 'clear-sky' .OR. & 3444 radiation_scheme == 'constant') THEN 3445 ALLOCATE( rad_lw_in(0:0,nysg:nyng,nxlg:nxrg) ) 3446 ELSE 3447 ALLOCATE( rad_lw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3448 ENDIF 3440 3449 ENDIF 3441 IF ( k == 1 ) READ ( 13 ) tmp_3d 3442 rad_lw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3450 IF ( k == 1 ) THEN 3451 IF ( radiation_scheme == 'clear-sky' .OR. & 3452 radiation_scheme == 'constant') THEN 3453 READ ( 13 ) tmp_2d 3454 rad_lw_in(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3455 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3456 ELSE 3457 READ ( 13 ) tmp_3d 3458 rad_lw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3443 3459 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3460 ENDIF 3461 ENDIF 3444 3462 3445 3463 CASE ( 'rad_lw_in_av' ) 3446 3464 IF ( .NOT. ALLOCATED( rad_lw_in_av ) ) THEN 3447 ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3465 IF ( radiation_scheme == 'clear-sky' .OR. & 3466 radiation_scheme == 'constant') THEN 3467 ALLOCATE( rad_lw_in_av(0:0,nysg:nyng,nxlg:nxrg) ) 3468 ELSE 3469 ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3470 ENDIF 3448 3471 ENDIF 3449 IF ( k == 1 ) READ ( 13 ) tmp_3d 3450 rad_lw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3472 IF ( k == 1 ) THEN 3473 IF ( radiation_scheme == 'clear-sky' .OR. & 3474 radiation_scheme == 'constant') THEN 3475 READ ( 13 ) tmp_2d 3476 rad_lw_in_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3477 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3478 ELSE 3479 READ ( 13 ) tmp_3d 3480 rad_lw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3451 3481 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3482 ENDIF 3483 ENDIF 3452 3484 3453 3485 CASE ( 'rad_lw_out' ) 3454 3486 IF ( .NOT. ALLOCATED( rad_lw_out ) ) THEN 3455 ALLOCATE( rad_lw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3487 IF ( radiation_scheme == 'clear-sky' .OR. & 3488 radiation_scheme == 'constant') THEN 3489 ALLOCATE( rad_lw_out(0:0,nysg:nyng,nxlg:nxrg) ) 3490 ELSE 3491 ALLOCATE( rad_lw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3492 ENDIF 3456 3493 ENDIF 3457 IF ( k == 1 ) READ ( 13 ) tmp_3d 3458 rad_lw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3494 IF ( k == 1 ) THEN 3495 IF ( radiation_scheme == 'clear-sky' .OR. & 3496 radiation_scheme == 'constant') THEN 3497 READ ( 13 ) tmp_2d 3498 rad_lw_out(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3499 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3500 ELSE 3501 READ ( 13 ) tmp_3d 3502 rad_lw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3459 3503 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3504 ENDIF 3505 ENDIF 3460 3506 3461 3507 CASE ( 'rad_lw_out_av' ) 3462 3508 IF ( .NOT. ALLOCATED( rad_lw_out_av ) ) THEN 3463 ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3509 IF ( radiation_scheme == 'clear-sky' .OR. & 3510 radiation_scheme == 'constant') THEN 3511 ALLOCATE( rad_lw_out_av(0:0,nysg:nyng,nxlg:nxrg) ) 3512 ELSE 3513 ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3514 ENDIF 3464 3515 ENDIF 3465 IF ( k == 1 ) READ ( 13 ) tmp_3d 3466 rad_lw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3516 IF ( k == 1 ) THEN 3517 IF ( radiation_scheme == 'clear-sky' .OR. & 3518 radiation_scheme == 'constant') THEN 3519 READ ( 13 ) tmp_2d 3520 rad_lw_out_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3521 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3522 ELSE 3523 READ ( 13 ) tmp_3d 3524 rad_lw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3467 3525 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3526 ENDIF 3527 ENDIF 3468 3528 3469 3529 CASE ( 'rad_lw_out_change_0' ) … … 3509 3569 CASE ( 'rad_sw_in' ) 3510 3570 IF ( .NOT. ALLOCATED( rad_sw_in ) ) THEN 3511 ALLOCATE( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3571 IF ( radiation_scheme == 'clear-sky' .OR. & 3572 radiation_scheme == 'constant') THEN 3573 ALLOCATE( rad_sw_in(0:0,nysg:nyng,nxlg:nxrg) ) 3574 ELSE 3575 ALLOCATE( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3576 ENDIF 3512 3577 ENDIF 3513 IF ( k == 1 ) READ ( 13 ) tmp_3d 3514 rad_sw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3578 IF ( k == 1 ) THEN 3579 IF ( radiation_scheme == 'clear-sky' .OR. & 3580 radiation_scheme == 'constant') THEN 3581 READ ( 13 ) tmp_2d 3582 rad_sw_in(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3583 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3584 ELSE 3585 READ ( 13 ) tmp_3d 3586 rad_sw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3515 3587 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3588 ENDIF 3589 ENDIF 3516 3590 3517 3591 CASE ( 'rad_sw_in_av' ) 3518 3592 IF ( .NOT. ALLOCATED( rad_sw_in_av ) ) THEN 3519 ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3593 IF ( radiation_scheme == 'clear-sky' .OR. & 3594 radiation_scheme == 'constant') THEN 3595 ALLOCATE( rad_sw_in_av(0:0,nysg:nyng,nxlg:nxrg) ) 3596 ELSE 3597 ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3598 ENDIF 3520 3599 ENDIF 3521 IF ( k == 1 ) READ ( 13 ) tmp_3d 3522 rad_sw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3600 IF ( k == 1 ) THEN 3601 IF ( radiation_scheme == 'clear-sky' .OR. & 3602 radiation_scheme == 'constant') THEN 3603 READ ( 13 ) tmp_2d 3604 rad_sw_in_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3605 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3606 ELSE 3607 READ ( 13 ) tmp_3d 3608 rad_sw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3523 3609 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3610 ENDIF 3611 ENDIF 3524 3612 3525 3613 CASE ( 'rad_sw_out' ) 3526 3614 IF ( .NOT. ALLOCATED( rad_sw_out ) ) THEN 3527 ALLOCATE( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3615 IF ( radiation_scheme == 'clear-sky' .OR. & 3616 radiation_scheme == 'constant') THEN 3617 ALLOCATE( rad_sw_out(0:0,nysg:nyng,nxlg:nxrg) ) 3618 ELSE 3619 ALLOCATE( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3620 ENDIF 3528 3621 ENDIF 3529 IF ( k == 1 ) READ ( 13 ) tmp_3d 3530 rad_sw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3622 IF ( k == 1 ) THEN 3623 IF ( radiation_scheme == 'clear-sky' .OR. & 3624 radiation_scheme == 'constant') THEN 3625 READ ( 13 ) tmp_2d 3626 rad_sw_out(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3627 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3628 ELSE 3629 READ ( 13 ) tmp_3d 3630 rad_sw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3531 3631 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3632 ENDIF 3633 ENDIF 3532 3634 3533 3635 CASE ( 'rad_sw_out_av' ) 3534 3636 IF ( .NOT. ALLOCATED( rad_sw_out_av ) ) THEN 3535 ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3637 IF ( radiation_scheme == 'clear-sky' .OR. & 3638 radiation_scheme == 'constant') THEN 3639 ALLOCATE( rad_sw_out_av(0:0,nysg:nyng,nxlg:nxrg) ) 3640 ELSE 3641 ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 3642 ENDIF 3536 3643 ENDIF 3537 IF ( k == 1 ) READ ( 13 ) tmp_3d 3538 rad_sw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & 3644 IF ( k == 1 ) THEN 3645 IF ( radiation_scheme == 'clear-sky' .OR. & 3646 radiation_scheme == 'constant') THEN 3647 READ ( 13 ) tmp_2d 3648 rad_sw_out_av(0:0,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3649 tmp_3d2(0:0,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3650 ELSE 3651 READ ( 13 ) tmp_3d 3652 rad_sw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) =& 3539 3653 tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) 3654 ENDIF 3655 ENDIF 3540 3656 3541 3657 CASE ( 'rad_sw_cs_hr' )
Note: See TracChangeset
for help on using the changeset viewer.