Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two stream scatter #84

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
1,105 changes: 1,105 additions & 0 deletions src/atmos_param/two_stream_scatter_rad/two_stream_scatter_rad.F90

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion src/atmos_spectral/driver/solo/idealized_moist_phys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ module idealized_moist_phys_mod

use two_stream_gray_rad_mod, only: two_stream_gray_rad_init, two_stream_gray_rad_down, two_stream_gray_rad_up, two_stream_gray_rad_end


use two_stream_scatter_rad_mod, only: two_stream_scatter_rad_init, two_stream_scatter_rad, two_stream_scatter_rad_end

use cloud_simple_mod, only: cloud_simple_init, cloud_simple


use mixed_layer_mod, only: mixed_layer_init, mixed_layer, mixed_layer_end, albedo_calc

use lscale_cond_mod, only: lscale_cond_init, lscale_cond, lscale_cond_end
Expand Down Expand Up @@ -115,6 +119,7 @@ module idealized_moist_phys_mod

!s Radiation options
logical :: two_stream_gray = .true.
logical :: two_stream_scatter = .false.
logical :: do_rrtm_radiation = .false.
logical :: do_socrates_radiation = .false.

Expand Down Expand Up @@ -149,7 +154,8 @@ module idealized_moist_phys_mod

namelist / idealized_moist_phys_nml / turb, lwet_convection, do_bm, do_ras, roughness_heat, &
do_cloud_simple, &
two_stream_gray, do_rrtm_radiation, do_damping,&
two_stream_gray, two_stream_scatter, do_rrtm_radiation,&
do_damping,&
mixed_layer_bc, do_simple, &
roughness_moist, roughness_mom, do_virtual, &
land_option, land_file_name, land_field_name, & !s options for idealised land
Expand Down Expand Up @@ -359,6 +365,10 @@ subroutine idealized_moist_phys_init(Time, Time_step_in, nhum, rad_lon_2d, rad_l
!s need to make sure that gray radiation and rrtm radiation are not both called.
if(two_stream_gray .and. do_rrtm_radiation) &
call error_mesg('physics_driver_init','do_grey_radiation and do_rrtm_radiation cannot both be .true.',FATAL)
if(two_stream_gray .and. two_stream_scatter) &
call error_mesg('physics_driver_init','do_grey_radiation and two_stream_scatter cannot both be .true.',FATAL)
if(two_stream_scatter .and. do_rrtm_radiation) &
call error_mesg('physics_driver_init','two_stream_scatter and do_rrtm_radiation cannot both be .true.',FATAL)

if(two_stream_gray .and. do_cloud_simple) &
call error_mesg('idealized_moist_phys','Gray radiation is not configured to run with the cloud scheme at present.',FATAL)
Expand Down Expand Up @@ -739,6 +749,8 @@ subroutine idealized_moist_phys_init(Time, Time_step_in, nhum, rad_lon_2d, rad_l

if(two_stream_gray) call two_stream_gray_rad_init(is, ie, js, je, num_levels, get_axis_id(), Time, rad_lonb_2d, rad_latb_2d, dt_real)

if(two_stream_scatter) call two_stream_scatter_rad_init(is, ie, js, je, num_levels, get_axis_id(), Time, rad_lonb_2d, rad_latb_2d, dt_real)

#ifdef RRTM_NO_COMPILE
if (do_rrtm_radiation) then
call error_mesg('idealized_moist_phys','do_rrtm_radiation is .true. but compiler flag -D RRTM_NO_COMPILE used. Stopping.', FATAL)
Expand Down Expand Up @@ -1093,6 +1105,20 @@ subroutine idealized_moist_phys(Time, p_half, p_full, z_half, z_full, ug, vg, tg
dt_tg(:,:,:), albedo)
end if

if(two_stream_scatter) then
call two_stream_scatter_rad(is, js, ie, je, Time, &
rad_lat(:,:), &
rad_lon(:,:), &
p_half(:,:,:,current), &
p_full(:,:,:,current), &
t_surf(:,:), &
tg(:,:,:,previous), &
dt_tg(:,:,:), &
net_surf_sw_down(:,:), &
surf_lw_down(:,:), albedo, &
grid_tracers(:,:,:,previous,nsphum))
end if

#ifdef RRTM_NO_COMPILE
if (do_rrtm_radiation) then
call error_mesg('idealized_moist_phys','do_rrtm_radiation is .true. but compiler flag -D RRTM_NO_COMPILE used. Stopping.', FATAL)
Expand Down Expand Up @@ -1339,6 +1365,7 @@ subroutine idealized_moist_phys_end

deallocate (dt_bucket, filt)
if(two_stream_gray) call two_stream_gray_rad_end
if(two_stream_scatter) call two_stream_scatter_rad_end
if(lwet_convection) call qe_moist_convection_end
if(do_ras) call ras_end

Expand Down
1 change: 1 addition & 0 deletions src/extra/model/dry/path_names
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ atmos_param/cloud_simple/cloud_simple.F90
atmos_param/stable_bl_turb/stable_bl_turb.F90
atmos_param/strat_cloud/null/strat_cloud.F90
atmos_param/two_stream_gray_rad/two_stream_gray_rad.F90
atmos_param/two_stream_scatter_rad/two_stream_scatter_rad.F90
atmos_param/qflux/qflux.f90
atmos_param/monin_obukhov/monin_obukhov_interfaces.h
atmos_param/monin_obukhov/monin_obukhov_kernel.F90
Expand Down
1 change: 1 addition & 0 deletions src/extra/model/grey/path_names
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ atmos_param/stable_bl_turb/stable_bl_turb.F90
atmos_param/strat_cloud/null/strat_cloud.F90
atmos_param/cloud_simple/cloud_simple.F90
atmos_param/two_stream_gray_rad/two_stream_gray_rad.F90
atmos_param/two_stream_scatter_rad/two_stream_scatter_rad.F90
atmos_param/qflux/qflux.f90
atmos_param/monin_obukhov/monin_obukhov_interfaces.h
atmos_param/monin_obukhov/monin_obukhov_kernel.F90
Expand Down
1 change: 1 addition & 0 deletions src/extra/model/isca/path_names
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ atmos_param/stable_bl_turb/stable_bl_turb.F90
atmos_param/strat_cloud/null/strat_cloud.F90
atmos_param/cloud_simple/cloud_simple.F90
atmos_param/two_stream_gray_rad/two_stream_gray_rad.F90
atmos_param/two_stream_scatter_rad/two_stream_scatter_rad.F90
atmos_param/qflux/qflux.f90
atmos_param/monin_obukhov/monin_obukhov_interfaces.h
atmos_param/monin_obukhov/monin_obukhov_kernel.F90
Expand Down
1 change: 1 addition & 0 deletions src/extra/model/socrates/path_names
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ atmos_param/stable_bl_turb/stable_bl_turb.F90
atmos_param/strat_cloud/null/strat_cloud.F90
atmos_param/cloud_simple/cloud_simple.F90
atmos_param/two_stream_gray_rad/two_stream_gray_rad.F90
atmos_param/two_stream_scatter_rad/two_stream_scatter_rad.F90
atmos_param/qflux/qflux.f90
atmos_param/monin_obukhov/monin_obukhov_interfaces.h
atmos_param/monin_obukhov/monin_obukhov_kernel.F90
Expand Down
1 change: 0 additions & 1 deletion src/extra/python/isca/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Experiment(Logger, EventEmitter):
'num_fourier': 42,
'num_spherical': 43,
},

'T21': {
'lon_max': 64,
'lat_max': 32,
Expand Down