SCALE-RM
scale_ocean_phy_albedo.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 !-------------------------------------------------------------------------------
11 #include "scalelib.h"
13  !-----------------------------------------------------------------------------
14  !
15  !++ used modules
16  !
17  use scale_precision
18  use scale_io
19  use scale_prof
21  !-----------------------------------------------------------------------------
22  implicit none
23  private
24  !-----------------------------------------------------------------------------
25  !
26  !++ Public procedure
27  !
30  public :: ocean_phy_albedo_const
31  public :: ocean_phy_albedo_seaice
32 
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !-----------------------------------------------------------------------------
38  !
39  !++ Private procedure
40  !
41  !-----------------------------------------------------------------------------
42  !
43  !++ Private parameters & variables
44  !
45  real(RP), private :: OCEAN_PHY_ALBEDO_IR_dir = 0.05_rp
46  real(RP), private :: OCEAN_PHY_ALBEDO_IR_dif = 0.05_rp
47  real(RP), private :: OCEAN_PHY_ALBEDO_NIR_dir = 0.07_rp
48  real(RP), private :: OCEAN_PHY_ALBEDO_NIR_dif = 0.06_rp
49  real(RP), private :: OCEAN_PHY_ALBEDO_VIS_dir = 0.07_rp
50  real(RP), private :: OCEAN_PHY_ALBEDO_VIS_dif = 0.06_rp
51 
52  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_IR_dir = 0.05_rp
53  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_IR_dif = 0.05_rp
54  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_NIR_dir = 0.60_rp
55  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_NIR_dif = 0.60_rp
56  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_VIS_dir = 0.80_rp
57  real(RP), private :: OCEAN_PHY_ALBEDO_seaice_VIS_dif = 0.80_rp
58 
59  !-----------------------------------------------------------------------------
60 contains
61  !-----------------------------------------------------------------------------
63  use scale_prc, only: &
64  prc_abort
65  implicit none
66 
67  namelist / param_ocean_phy_albedo_const / &
68  ocean_phy_albedo_ir_dir, &
69  ocean_phy_albedo_ir_dif, &
70  ocean_phy_albedo_nir_dir, &
71  ocean_phy_albedo_nir_dif, &
72  ocean_phy_albedo_vis_dir, &
73  ocean_phy_albedo_vis_dif
74 
75  integer :: ierr
76  !---------------------------------------------------------------------------
77 
78  log_newline
79  log_info("OCEAN_PHY_ALBEDO_const_setup",*) 'Setup'
80 
81  !--- read namelist
82  rewind(io_fid_conf)
83  read(io_fid_conf,nml=param_ocean_phy_albedo_const,iostat=ierr)
84  if( ierr < 0 ) then !--- missing
85  log_info("OCEAN_PHY_ALBEDO_const_setup",*) 'Not found namelist. Default used.'
86  elseif( ierr > 0 ) then !--- fatal error
87  log_error("OCEAN_PHY_ALBEDO_const_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ALBEDO_const. Check!'
88  call prc_abort
89  endif
90  log_nml(param_ocean_phy_albedo_const)
91 
92  return
93  end subroutine ocean_phy_albedo_const_setup
94 
95  !-----------------------------------------------------------------------------
97  use scale_prc, only: &
98  prc_abort
99  implicit none
100 
101  namelist / param_ocean_phy_albedo_seaice / &
102  ocean_phy_albedo_seaice_ir_dir, &
103  ocean_phy_albedo_seaice_ir_dif, &
104  ocean_phy_albedo_seaice_nir_dir, &
105  ocean_phy_albedo_seaice_nir_dif, &
106  ocean_phy_albedo_seaice_vis_dir, &
107  ocean_phy_albedo_seaice_vis_dif
108 
109  integer :: ierr
110  !---------------------------------------------------------------------------
111 
112  log_newline
113  log_info("OCEAN_PHY_ALBEDO_seaice_setup",*) 'Setup'
114 
115  !--- read namelist
116  rewind(io_fid_conf)
117  read(io_fid_conf,nml=param_ocean_phy_albedo_seaice,iostat=ierr)
118  if( ierr < 0 ) then !--- missing
119  log_info("OCEAN_PHY_ALBEDO_seaice_setup",*) 'Not found namelist. Default used.'
120  elseif( ierr > 0 ) then !--- fatal error
121  log_error("OCEAN_PHY_ALBEDO_seaice_setup",*) 'Not appropriate names in namelist PARAM_OCEAN_PHY_ALBEDO_seaice. Check!'
122  call prc_abort
123  endif
124  log_nml(param_ocean_phy_albedo_seaice)
125 
126  return
127  end subroutine ocean_phy_albedo_seaice_setup
128 
129  !-----------------------------------------------------------------------------
130  subroutine ocean_phy_albedo_const( &
131  OIA, OIS, OIE, &
132  OJA, OJS, OJE, &
133  SFC_albedo )
134  implicit none
135 
136  integer, intent(in) :: oia, ois, oie
137  integer, intent(in) :: oja, ojs, oje
138  real(rp), intent(out) :: sfc_albedo(oia,oja,n_rad_dir,n_rad_rgn) ! surface albedo (0-1)
139 
140  integer :: i, j
141  !---------------------------------------------------------------------------
142  !$acc data copyout(SFC_albedo)
143 
144  !$acc kernels
145  do j = ojs, oje
146  do i = ois, oie
147  sfc_albedo(i,j,i_r_direct ,i_r_ir ) = ocean_phy_albedo_ir_dir
148  sfc_albedo(i,j,i_r_diffuse,i_r_ir ) = ocean_phy_albedo_ir_dif
149  sfc_albedo(i,j,i_r_direct ,i_r_nir) = ocean_phy_albedo_nir_dir
150  sfc_albedo(i,j,i_r_diffuse,i_r_nir) = ocean_phy_albedo_nir_dif
151  sfc_albedo(i,j,i_r_direct ,i_r_vis) = ocean_phy_albedo_vis_dir
152  sfc_albedo(i,j,i_r_diffuse,i_r_vis) = ocean_phy_albedo_vis_dif
153  enddo
154  enddo
155  !$acc end kernels
156 
157  !$acc end data
158  return
159  end subroutine ocean_phy_albedo_const
160 
161  !-----------------------------------------------------------------------------
162  subroutine ocean_phy_albedo_seaice( &
163  OIA, OIS, OIE, &
164  OJA, OJS, OJE, &
165  SFC_albedo )
166  implicit none
167 
168  integer, intent(in) :: oia, ois, oie
169  integer, intent(in) :: oja, ojs, oje
170  real(rp), intent(out) :: sfc_albedo(oia,oja,n_rad_dir,n_rad_rgn) ! surface albedo (0-1)
171 
172  integer :: i, j
173  !---------------------------------------------------------------------------
174  !$acc data copyout(SFC_albedo)
175 
176  !$acc kernels
177  do j = ojs, oje
178  do i = ois, oie
179  sfc_albedo(i,j,i_r_direct ,i_r_ir ) = ocean_phy_albedo_seaice_ir_dir
180  sfc_albedo(i,j,i_r_diffuse,i_r_ir ) = ocean_phy_albedo_seaice_ir_dif
181  sfc_albedo(i,j,i_r_direct ,i_r_nir) = ocean_phy_albedo_seaice_nir_dir
182  sfc_albedo(i,j,i_r_diffuse,i_r_nir) = ocean_phy_albedo_seaice_nir_dif
183  sfc_albedo(i,j,i_r_direct ,i_r_vis) = ocean_phy_albedo_seaice_vis_dir
184  sfc_albedo(i,j,i_r_diffuse,i_r_vis) = ocean_phy_albedo_seaice_vis_dif
185  enddo
186  enddo
187  !$acc end kernels
188 
189  !$acc end data
190 
191  return
192  end subroutine ocean_phy_albedo_seaice
193 
194 end module scale_ocean_phy_albedo
scale_cpl_sfc_index::n_rad_dir
integer, parameter, public n_rad_dir
Definition: scale_cpl_sfc_index.F90:36
scale_ocean_phy_albedo::ocean_phy_albedo_const
subroutine, public ocean_phy_albedo_const(OIA, OIS, OIE, OJA, OJS, OJE, SFC_albedo)
Definition: scale_ocean_phy_albedo.F90:134
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_cpl_sfc_index::i_r_direct
integer, parameter, public i_r_direct
Definition: scale_cpl_sfc_index.F90:37
scale_cpl_sfc_index::i_r_diffuse
integer, parameter, public i_r_diffuse
Definition: scale_cpl_sfc_index.F90:38
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_cpl_sfc_index::i_r_ir
integer, parameter, public i_r_ir
Definition: scale_cpl_sfc_index.F90:29
scale_ocean_phy_albedo::ocean_phy_albedo_const_setup
subroutine, public ocean_phy_albedo_const_setup
Definition: scale_ocean_phy_albedo.F90:63
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_io
module STDIO
Definition: scale_io.F90:10
scale_cpl_sfc_index::i_r_nir
integer, parameter, public i_r_nir
Definition: scale_cpl_sfc_index.F90:30
scale_ocean_phy_albedo::ocean_phy_albedo_seaice_setup
subroutine, public ocean_phy_albedo_seaice_setup
Definition: scale_ocean_phy_albedo.F90:97
scale_ocean_phy_albedo
module ocean / physics / surface albedo
Definition: scale_ocean_phy_albedo.F90:12
scale_prof
module profiler
Definition: scale_prof.F90:11
scale_ocean_phy_albedo::ocean_phy_albedo_seaice
subroutine, public ocean_phy_albedo_seaice(OIA, OIS, OIE, OJA, OJS, OJE, SFC_albedo)
Definition: scale_ocean_phy_albedo.F90:166
scale_cpl_sfc_index
module coupler / surface-atmospehre
Definition: scale_cpl_sfc_index.F90:11
scale_cpl_sfc_index::i_r_vis
integer, parameter, public i_r_vis
Definition: scale_cpl_sfc_index.F90:31
scale_cpl_sfc_index::n_rad_rgn
integer, parameter, public n_rad_rgn
Definition: scale_cpl_sfc_index.F90:28
scale_io::io_fid_conf
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:57