SCALE-RM
Functions/Subroutines
scale_atmos_sfc_ch_rn222 Module Reference

module atmosphere / surface / chemistry / RN222 More...

Functions/Subroutines

subroutine, public atmos_sfc_ch_rn222_setup (IA, JA, real_lon, real_lat)
 Setup. More...
 
subroutine, public atmos_sfc_ch_rn222_finalize
 finalize More...
 
subroutine, public atmos_sfc_ch_rn222_ocean_flux (IA, IS, IE, JA, JS, JE, QA_CH, SFLX_QTRC)
 Emission from the ocean surface. More...
 
subroutine, public atmos_sfc_ch_rn222_land_flux (IA, IS, IE, JA, JS, JE, QA_CH, NOWDATE, SFLX_QTRC)
 Emission from the land surface. More...
 

Detailed Description

module atmosphere / surface / chemistry / RN222

Description
Surface emission component for rn222 tracer
Author
Team SCALE
NAMELIST
  • PARAM_ATMOS_SFC_CH_RN222
    nametypedefault valuecomment
    ATMOS_SFC_CH_RN222_EMISSION_TYPE character(len=H_SHORT) 'CONST' Emission type
    ATMOS_SFC_CH_RN222_CONST_EMISSION_LAND real(RP) 20.8E-3_RP Surface flux from land [Bq/m2/s]
    ATMOS_SFC_CH_RN222_CONST_EMISSION_OCEAN real(RP) 0.14E-3_RP Surface flux from ocean [Bq/m2/s]
    ATMOS_SFC_CH_RN222_SCHERY1998_DIRPATH character(len=H_LONG) '.'
    ATMOS_SFC_CH_RN222_HIRAO2010_DIRPATH character(len=H_LONG) '.'
    ATMOS_SFC_CH_RN222_HIRAO2010_YSTART integer 1979
    ATMOS_SFC_CH_RN222_HIRAO2010_YEND integer 2012
    ATMOS_SFC_CH_RN222_NINTRP integer 5

History Output
No history output

Function/Subroutine Documentation

◆ atmos_sfc_ch_rn222_setup()

subroutine, public scale_atmos_sfc_ch_rn222::atmos_sfc_ch_rn222_setup ( integer, intent(in)  IA,
integer, intent(in)  JA,
real(rp), dimension(ia,ja), intent(in)  real_lon,
real(rp), dimension(ia,ja), intent(in)  real_lat 
)

Setup.

Definition at line 82 of file scale_atmos_sfc_ch_rn222.F90.

82  use scale_prc, only: &
83  prc_ismaster, &
84  prc_abort
85  use scale_const, only: &
86  const_d2r
87  use scale_comm_cartesc, only: &
88  comm_bcast
89  use scale_interp, only: &
90  interp_factor2d
91  implicit none
92 
93  integer, intent(in) :: IA
94  integer, intent(in) :: JA
95  real(RP), intent(in) :: real_lon(IA,JA) ! longitude [rad]
96  real(RP), intent(in) :: real_lat(IA,JA) ! latitude [rad]
97 
98  namelist / param_atmos_sfc_ch_rn222 / &
99  atmos_sfc_ch_rn222_emission_type, &
100  atmos_sfc_ch_rn222_const_emission_land, &
101  atmos_sfc_ch_rn222_const_emission_ocean, &
102  atmos_sfc_ch_rn222_schery1998_dirpath, &
103  atmos_sfc_ch_rn222_hirao2010_dirpath, &
104  atmos_sfc_ch_rn222_hirao2010_ystart, &
105  atmos_sfc_ch_rn222_hirao2010_yend, &
106  atmos_sfc_ch_rn222_nintrp
107 
108  character(len=H_LONG) :: fname
109  real(RP) :: lon, lat, value
110 
111  integer :: ierr, fid
112  integer :: i, j, m, y, yy
113  !---------------------------------------------------------------------------
114 
115  log_newline
116  log_info("ATMOS_SFC_CH_rn222_setup",*) 'Setup'
117  log_info("ATMOS_SFC_CH_rn222_setup",*) 'rn222 surface flux'
118 
119  !--- read namelist
120  rewind(io_fid_conf)
121  read(io_fid_conf,nml=param_atmos_sfc_ch_rn222,iostat=ierr)
122  if( ierr < 0 ) then !--- missing
123  log_info("ATMOS_SFC_CH_rn222_setup",*) 'Not found namelist. Default used.'
124  elseif( ierr > 0 ) then !--- fatal error
125  log_error("ATMOS_SFC_CH_rn222_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_SFC_CH_RN222. Check!'
126  call prc_abort
127  endif
128  log_nml(param_atmos_sfc_ch_rn222)
129 
130 
131 
132  log_newline
133  log_info("ATMOS_SFC_CH_rn222_setup",*) 'Type of emission of Rn222: ', trim(atmos_sfc_ch_rn222_emission_type)
134 
135  select case( atmos_sfc_ch_rn222_emission_type )
136  case( 'CONST' )
137 
138  log_info_cont('(A,ES16.6)') 'From land [Bq/m2/s] : ', atmos_sfc_ch_rn222_const_emission_land
139  log_info_cont('(A,ES16.6)') 'From ocean [Bq/m2/s] : ', atmos_sfc_ch_rn222_const_emission_ocean
140 
141  case( 'SCHERY1998' )
142 
143  log_info_cont(*) 'Flux map by Schery and Wasiolek (1998) is used'
144 
145  nlon = 360
146  nlat = 180
147  nmonth = 12
148  nyear = 1
149 
150  allocate( emission_lon(nlon,nlat) )
151  allocate( emission_lat(nlon,nlat) )
152  allocate( emission_value(nlon,nlat,nmonth,nyear) )
153 
154  if ( prc_ismaster ) then
155  y = 1
156  do m = 1, nmonth
157  write(fname,'(A,A,I2.2,A)') trim(atmos_sfc_ch_rn222_schery1998_dirpath), "/fdh3a.", m
158  call io_get_fname(fname, fname)
159  log_info_cont(*) 'Read from the ASCII file: ', trim(fname)
160 
161  fid = io_get_available_fid()
162  open( unit = fid, &
163  file = trim(fname), &
164  status = "old", &
165  form = "formatted" )
166 
167  do j = 1, nlat
168  do i = 1, nlon
169  lon = real(i-1,kind=rp) - 180.0_rp ! [180W-179E]
170  lat = 90.0_rp - real(j-1,kind=rp) ! [90N-89S]
171 
172  read(fid,*) value
173 
174  emission_lon(i,j) = ( lon + 0.5_rp ) * const_d2r ! shift +0.5deg, [deg->rad]
175  emission_lat(i,j) = ( lat - 0.5_rp ) * const_d2r ! shift -0.5deg, [deg->rad]
176  emission_value(i,j,m,y) = value * 1.e-3_rp ! [mBq/m2->Bq/m2]
177  enddo
178  enddo
179 
180  close(fid)
181  enddo ! month loop
182  endif
183 
184  case( 'HIRAO2010' )
185 
186  log_info_cont(*) 'Flux map by Hirao et al. (2010) is used'
187  log_info_cont(*) 'Start year: ', atmos_sfc_ch_rn222_hirao2010_ystart
188  log_info_cont(*) 'End year: ', atmos_sfc_ch_rn222_hirao2010_yend
189 
190  if ( atmos_sfc_ch_rn222_hirao2010_ystart < 1979 &
191  .OR. atmos_sfc_ch_rn222_hirao2010_yend > 2012 ) then
192  log_warn('ATMOS_SFC_CH_rn222_setup',*) 'Available period of the data is between 1979 and 2012.'
193  log_warn_cont(*) 'Please check the range of ystart and yend.'
194  atmos_sfc_ch_rn222_hirao2010_ystart = max( atmos_sfc_ch_rn222_hirao2010_ystart, 1979 )
195  atmos_sfc_ch_rn222_hirao2010_yend = min( atmos_sfc_ch_rn222_hirao2010_yend, 2012 )
196  endif
197 
198  nlon = 360
199  nlat = 180
200  nmonth = 12
201  nyear = atmos_sfc_ch_rn222_hirao2010_yend - atmos_sfc_ch_rn222_hirao2010_ystart + 1
202 
203  allocate( emission_lon(nlon,nlat) )
204  allocate( emission_lat(nlon,nlat) )
205  allocate( emission_value(nlon,nlat,nmonth,nyear) )
206 
207  if ( prc_ismaster ) then
208  do y = 1, nyear
209  do m = 1, nmonth
210  yy = y+atmos_sfc_ch_rn222_hirao2010_ystart-1
211  write(fname,'(A,A,I4.4,I2.2)') trim(atmos_sfc_ch_rn222_hirao2010_dirpath), "/flux-hra-revi", yy, m
212  call io_get_fname(fname, fname)
213  log_info_cont(*) 'Read from the ASCII file: ', trim(fname)
214 
215  fid = io_get_available_fid()
216  open( unit = fid, &
217  file = trim(fname), &
218  status = "old", &
219  form = "formatted" )
220 
221  do j = 1, nlat
222  do i = 1, nlon
223  read(fid,*) lon, lat, value
224 
225  emission_lon(i,j) = ( lon + 0.5_rp ) * const_d2r ! shift +0.5deg, [deg->rad]
226  emission_lat(i,j) = ( lat - 0.5_rp ) * const_d2r ! shift -0.5deg, [deg->rad]
227  emission_value(i,j,m,y) = value * 1.e-3_rp ! [mBq/m2->Bq/m2]
228  enddo
229  enddo
230 
231  close(fid)
232  enddo ! month loop
233  enddo ! year loop
234  endif
235 
236  case default
237  log_error("ATMOS_SFC_CH_rn222_setup",*) 'Not supported type of Rn222 emission! Stop.'
238  call prc_abort
239  end select
240 
241  select case( atmos_sfc_ch_rn222_emission_type )
242  case( 'SCHERY1998', 'HIRAO2010' )
243 
244  call comm_bcast( nlon, nlat, emission_lon(:,:) )
245  call comm_bcast( nlon, nlat, emission_lat(:,:) )
246  call comm_bcast( nlon, nlat, nmonth, nyear, emission_value(:,:,:,:) )
247 
248  allocate( idx_i(ia,ja,atmos_sfc_ch_rn222_nintrp) )
249  allocate( idx_j(ia,ja,atmos_sfc_ch_rn222_nintrp) )
250  allocate( hfact(ia,ja,atmos_sfc_ch_rn222_nintrp) )
251 
252  call interp_factor2d( atmos_sfc_ch_rn222_nintrp, & ! [IN]
253  nlon, nlat, & ! [IN]
254  ia, ja, & ! [IN]
255  emission_lon(:,:), & ! [IN]
256  emission_lat(:,:), & ! [IN]
257  real_lon(:,:), & ! [IN]
258  real_lat(:,:), & ! [IN]
259  idx_i(:,:,:), & ! [OUT]
260  idx_j(:,:,:), & ! [OUT]
261  hfact(:,:,:) ) ! [OUT]
262  end select
263 
264  return

References scale_const::const_d2r, scale_io::io_fid_conf, scale_io::io_get_available_fid(), scale_io::io_get_fname(), scale_prc::prc_abort(), and scale_prc::prc_ismaster.

Referenced by mod_atmos_phy_ch_driver::atmos_phy_ch_driver_setup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_sfc_ch_rn222_finalize()

subroutine, public scale_atmos_sfc_ch_rn222::atmos_sfc_ch_rn222_finalize

finalize

Definition at line 270 of file scale_atmos_sfc_ch_rn222.F90.

270 
271  if ( allocated( emission_lon ) ) deallocate( emission_lon )
272  if ( allocated( emission_lat ) ) deallocate( emission_lat )
273  if ( allocated( emission_value ) ) deallocate( emission_value )
274 
275  if ( allocated( idx_i ) ) deallocate( idx_i )
276  if ( allocated( idx_j ) ) deallocate( idx_j )
277  if ( allocated( hfact ) ) deallocate( hfact )
278 
279  return

Referenced by mod_atmos_phy_ch_driver::atmos_phy_ch_driver_finalize().

Here is the caller graph for this function:

◆ atmos_sfc_ch_rn222_ocean_flux()

subroutine, public scale_atmos_sfc_ch_rn222::atmos_sfc_ch_rn222_ocean_flux ( integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
integer, intent(in)  QA_CH,
real(rp), dimension(ia,ja,qa_ch), intent(inout)  SFLX_QTRC 
)

Emission from the ocean surface.

Definition at line 289 of file scale_atmos_sfc_ch_rn222.F90.

289  implicit none
290 
291  integer, intent(in) :: IA, IS, IE
292  integer, intent(in) :: JA, JS, JE
293  integer, intent(in) :: QA_CH
294  real(RP), intent(inout) :: SFLX_QTRC(IA,JA,QA_CH)
295 
296  integer :: i, j
297  !---------------------------------------------------------------------------
298 
299  select case( atmos_sfc_ch_rn222_emission_type )
300  case( 'CONST', 'SCHERY1998', 'HIRAO2010' )
301 
302  do j = js, je
303  do i = is, ie
304  sflx_qtrc(i,j,i_ch_rn222) = atmos_sfc_ch_rn222_const_emission_ocean
305  enddo
306  enddo
307 
308  end select
309 
310  return

Referenced by mod_atmos_phy_ch_driver::atmos_phy_ch_driver_ocean_flux().

Here is the caller graph for this function:

◆ atmos_sfc_ch_rn222_land_flux()

subroutine, public scale_atmos_sfc_ch_rn222::atmos_sfc_ch_rn222_land_flux ( integer, intent(in)  IA,
integer, intent(in)  IS,
integer, intent(in)  IE,
integer, intent(in)  JA,
integer, intent(in)  JS,
integer, intent(in)  JE,
integer, intent(in)  QA_CH,
integer, dimension(6), intent(in)  NOWDATE,
real(rp), dimension(ia,ja,qa_ch), intent(inout)  SFLX_QTRC 
)

Emission from the land surface.

Definition at line 321 of file scale_atmos_sfc_ch_rn222.F90.

321  use scale_prc, only: &
322  prc_abort
323  use scale_interp, only: &
325  implicit none
326 
327  integer, intent(in) :: IA, IS, IE
328  integer, intent(in) :: JA, JS, JE
329  integer, intent(in) :: QA_CH
330  integer, intent(in) :: NOWDATE(6)
331  real(RP), intent(inout) :: SFLX_QTRC(IA,JA,QA_CH)
332 
333  integer :: i, j, m, y, yy
334  !---------------------------------------------------------------------------
335 
336  select case( atmos_sfc_ch_rn222_emission_type )
337  case( 'CONST' )
338 
339  do j = js, je
340  do i = is, ie
341  sflx_qtrc(i,j,i_ch_rn222) = atmos_sfc_ch_rn222_const_emission_land
342  enddo
343  enddo
344 
345  case( 'SCHERY1998' )
346 
347  y = 1
348  m = nowdate(2)
349 
350  call interp_interp2d( atmos_sfc_ch_rn222_nintrp, & ! [IN]
351  nlon, nlat, & ! [IN]
352  ia, ja, & ! [IN]
353  idx_i(:,:,:), & ! [IN]
354  idx_j(:,:,:), & ! [IN]
355  hfact(:,:,:), & ! [IN]
356  emission_value(:,:,m,y), & ! [IN]
357  sflx_qtrc(:,:,i_ch_rn222) ) ! [OUT]
358 
359  case( 'HIRAO2010' )
360 
361  yy = nowdate(1)
362  yy = max( yy, 1979 ) ! Use flux of 1979 before 1977
363  yy = min( yy, 2012 ) ! Use flux of 2012 after 2013
364 
365  y = yy-atmos_sfc_ch_rn222_hirao2010_ystart+1
366 
367  if ( y < 1 .OR. y > nyear ) then
368  log_error("ATMOS_SFC_CH_rn222_setup",*) 'emission file does not exist for year=', yy
369  call prc_abort
370  endif
371 
372  m = nowdate(2)
373 
374  call interp_interp2d( atmos_sfc_ch_rn222_nintrp, & ! [IN]
375  nlon, nlat, & ! [IN]
376  ia, ja, & ! [IN]
377  idx_i(:,:,:), & ! [IN]
378  idx_j(:,:,:), & ! [IN]
379  hfact(:,:,:), & ! [IN]
380  emission_value(:,:,m,y), & ! [IN]
381  sflx_qtrc(:,:,i_ch_rn222) ) ! [OUT]
382 
383  end select
384 
385  return

References scale_interp::interp_interp2d(), and scale_prc::prc_abort().

Referenced by mod_atmos_phy_ch_driver::atmos_phy_ch_driver_land_flux(), and mod_atmos_phy_ch_driver::atmos_phy_ch_driver_urban_flux().

Here is the call graph for this function:
Here is the caller graph for this function:
scale_interp::interp_interp2d
subroutine, public interp_interp2d(npoints, IA_ref, JA_ref, IA, JA, idx_i, idx_j, hfact, val_ref, val, threshold_undef, wsum, val2)
Definition: scale_interp.F90:1376
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:349
scale_interp
module INTERPOLATION
Definition: scale_interp.F90:12
scale_tracer::unit
character(len=h_short), public unit
Definition: scale_tracer.F90:41
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_comm_cartesc
module COMMUNICATION
Definition: scale_comm_cartesC.F90:11
scale_const::const_d2r
real(rp), public const_d2r
degree to radian
Definition: scale_const.F90:33
scale_prc::prc_ismaster
logical, public prc_ismaster
master process in local communicator?
Definition: scale_prc.F90:91