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 
143  do j = ojs, oje
144  do i = ois, oie
145  sfc_albedo(i,j,i_r_direct ,i_r_ir ) = ocean_phy_albedo_ir_dir
146  sfc_albedo(i,j,i_r_diffuse,i_r_ir ) = ocean_phy_albedo_ir_dif
147  sfc_albedo(i,j,i_r_direct ,i_r_nir) = ocean_phy_albedo_nir_dir
148  sfc_albedo(i,j,i_r_diffuse,i_r_nir) = ocean_phy_albedo_nir_dif
149  sfc_albedo(i,j,i_r_direct ,i_r_vis) = ocean_phy_albedo_vis_dir
150  sfc_albedo(i,j,i_r_diffuse,i_r_vis) = ocean_phy_albedo_vis_dif
151  enddo
152  enddo
153 
154  return
155  end subroutine ocean_phy_albedo_const
156 
157  !-----------------------------------------------------------------------------
158  subroutine ocean_phy_albedo_seaice( &
159  OIA, OIS, OIE, &
160  OJA, OJS, OJE, &
161  SFC_albedo )
162  implicit none
163 
164  integer, intent(in) :: OIA, OIS, OIE
165  integer, intent(in) :: OJA, OJS, OJE
166  real(RP), intent(out) :: SFC_albedo(oia,oja,n_rad_dir,n_rad_rgn) ! surface albedo (0-1)
167 
168  integer :: i, j
169  !---------------------------------------------------------------------------
170 
171  do j = ojs, oje
172  do i = ois, oie
173  sfc_albedo(i,j,i_r_direct ,i_r_ir ) = ocean_phy_albedo_seaice_ir_dir
174  sfc_albedo(i,j,i_r_diffuse,i_r_ir ) = ocean_phy_albedo_seaice_ir_dif
175  sfc_albedo(i,j,i_r_direct ,i_r_nir) = ocean_phy_albedo_seaice_nir_dir
176  sfc_albedo(i,j,i_r_diffuse,i_r_nir) = ocean_phy_albedo_seaice_nir_dif
177  sfc_albedo(i,j,i_r_direct ,i_r_vis) = ocean_phy_albedo_seaice_vis_dir
178  sfc_albedo(i,j,i_r_diffuse,i_r_vis) = ocean_phy_albedo_seaice_vis_dif
179  enddo
180  enddo
181 
182  return
183  end subroutine ocean_phy_albedo_seaice
184 
185 end module scale_ocean_phy_albedo
module coupler / surface-atmospehre
integer, parameter, public i_r_vis
subroutine, public ocean_phy_albedo_seaice_setup
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
integer, parameter, public n_rad_dir
integer, parameter, public n_rad_rgn
subroutine, public ocean_phy_albedo_const(OIA, OIS, OIE, OJA, OJS, OJE, SFC_albedo)
subroutine, public ocean_phy_albedo_seaice(OIA, OIS, OIE, OJA, OJS, OJE, SFC_albedo)
module PROCESS
Definition: scale_prc.F90:11
module ocean / physics / surface albedo
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
integer, parameter, public i_r_direct
module profiler
Definition: scale_prof.F90:11
integer, parameter, public i_r_nir
module PRECISION
integer, parameter, public i_r_ir
module STDIO
Definition: scale_io.F90:10
integer, parameter, public i_r_diffuse
subroutine, public ocean_phy_albedo_const_setup