| 142 |
DO iy = 1, ny |
DO iy = 1, ny |
| 143 |
DO ix = 1, nx |
DO ix = 1, nx |
| 144 |
heat_in(ix,iy) = heating(rho(ix,iy), temperature0(ix,iy)) |
heat_in(ix,iy) = heating(rho(ix,iy), temperature0(ix,iy)) |
| 145 |
CALL rad_losses(rho(ix,iy), temperature0(ix,iy), xi_n(ix,iy), rad, alf) |
CALL rad_losses(rho(ix,iy), temperature0(ix,iy), xi_n(ix,iy), yc(iy), rad, alf) |
| 146 |
alpha(ix,iy) = alf |
alpha(ix,iy) = alf |
|
IF (yc(iy) > 1.0_num) THEN |
|
| 147 |
radiation(ix,iy) = rad |
radiation(ix,iy) = rad |
|
END IF |
|
| 148 |
END DO |
END DO |
| 149 |
END DO |
END DO |
| 150 |
|
|
| 239 |
|
|
| 240 |
|
|
| 241 |
|
|
| 242 |
SUBROUTINE rad_losses(density, temperature, xi, rad, alf) |
SUBROUTINE rad_losses(density, temperature, xi, height, rad, alf) |
| 243 |
! returns the normalised RTV losses |
! returns the normalised RTV losses |
| 244 |
REAL(num), INTENT(IN) :: density, temperature, xi |
REAL(num), INTENT(IN) :: density, temperature, xi, height |
| 245 |
REAL(num), INTENT(OUT) :: rad, alf |
REAL(num), INTENT(OUT) :: rad, alf |
| 246 |
|
|
| 247 |
REAL(num), DIMENSION(7) :: trange = (/0.02_num,0.0398_num,0.0794_num,0.251_num, 0.562_num,1.995_num,10.0_num /) |
REAL(num), DIMENSION(7) :: trange = (/0.02_num,0.0398_num,0.0794_num,0.251_num, 0.562_num,1.995_num,10.0_num /) |
| 253 |
rad = 0.0_num |
rad = 0.0_num |
| 254 |
alf = 0.0_num |
alf = 0.0_num |
| 255 |
IF(.NOT. radiation) RETURN |
IF(.NOT. radiation) RETURN |
| 256 |
|
IF(height < 1.0_num) RETURN |
| 257 |
|
|
| 258 |
tmk = temperature * t2tmk |
tmk = temperature * t2tmk |
| 259 |
IF (tmk < trange(1) .OR. tmk > trange(7)) RETURN |
IF (tmk < trange(1) .OR. tmk > trange(7)) RETURN |
| 290 |
IF (proc_y_max == MPI_PROC_NULL) THEN |
IF (proc_y_max == MPI_PROC_NULL) THEN |
| 291 |
store_state = radiation |
store_state = radiation |
| 292 |
radiation = .TRUE. |
radiation = .TRUE. |
| 293 |
CALL rad_losses(rho(1,ny), temperature(1,ny), xi_n(1,ny), rad, alf) |
CALL rad_losses(rho(1,ny), temperature(1,ny), xi_n(1,ny), yc(ny), rad, alf) |
| 294 |
radiation = store_state |
radiation = store_state |
| 295 |
a1 = rad / rho(1,ny)**2 |
a1 = rad / rho(1,ny)**2 |
| 296 |
END IF |
END IF |