SCALE-RM
Functions/Subroutines | Variables
scale_atmos_phy_rd_profile Module Reference

module ATMOSPHERE / Physics Radiation / Vertical profile More...

Functions/Subroutines

subroutine, public atmos_phy_rd_profile_setup
 Setup. More...
 
subroutine, public atmos_phy_rd_profile_read (kmax, ngas, ncfc, naero, real_lat, now_date, zh, z, rhodz, pres, presh, temp, temph, gas, cfc, aerosol_conc, aerosol_radi, cldfrac)
 Read profile for radiation. More...
 
subroutine, public atmos_phy_rd_profile_setup_zgrid (kmax, kadd, zh, z)
 Setup vertical grid for radiation. More...
 

Variables

logical, public atmos_phy_rd_profile_use_climatology = .true.
 use climatology? More...
 

Detailed Description

module ATMOSPHERE / Physics Radiation / Vertical profile

Description
Climatological vertical profile (up to mesopause) for Atmospheric radiation transfer process this module use following dataset pressure, temperature : CIRA86 H2O,CO2,O3,N2O,CO,CH4,O2,CFCs : MIPAS2001
Author
Team SCALE
History
  • 2013-02-06 (H.Yashiro) [new]

Function/Subroutine Documentation

◆ atmos_phy_rd_profile_setup()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup ( )

Setup.

Definition at line 138 of file scale_atmos_phy_rd_profile.F90.

References atmos_phy_rd_profile_use_climatology, scale_calendar::calendar_date2daysec(), scale_const::const_d2r, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_get_available_fid(), scale_stdio::io_l, dc_log::log(), and scale_process::prc_mpistop().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

138  use scale_process, only: &
140  implicit none
141 
142  real(RP) :: atmos_phy_rd_profile_toa
143  character(len=H_LONG) :: atmos_phy_rd_profile_cira86_in_filename
144  character(len=H_LONG) :: atmos_phy_rd_profile_mipas2001_in_basename
145  character(len=H_LONG) :: atmos_phy_rd_profile_user_in_filename
146 
147  namelist / param_atmos_phy_rd_profile / &
148  atmos_phy_rd_profile_toa, &
150  atmos_phy_rd_profile_cira86_in_filename, &
151  atmos_phy_rd_profile_mipas2001_in_basename, &
152  atmos_phy_rd_profile_user_in_filename, &
153  atmos_phy_rd_profile_use_co2, &
154  atmos_phy_rd_profile_use_o3, &
155  atmos_phy_rd_profile_use_n2o, &
156  atmos_phy_rd_profile_use_co, &
157  atmos_phy_rd_profile_use_ch4, &
158  atmos_phy_rd_profile_use_o2, &
159  atmos_phy_rd_profile_use_cfc, &
160  debug
161 
162  integer :: ierr
163  !---------------------------------------------------------------------------
164 
165  if( io_l ) write(io_fid_log,*)
166  if( io_l ) write(io_fid_log,*) '+++ Module[Physics-RD PROFILE]/Categ[ATMOS]'
167  if( io_l ) write(io_fid_log,*) '+++ climatological profile'
168 
169  atmos_phy_rd_profile_toa = profile_toa
170  atmos_phy_rd_profile_cira86_in_filename = profile_cira86_fname
171  atmos_phy_rd_profile_mipas2001_in_basename = profile_mipas2001_dir
172  atmos_phy_rd_profile_user_in_filename = profile_user_fname
173 
174  !--- read namelist
175  rewind(io_fid_conf)
176  read(io_fid_conf,nml=param_atmos_phy_rd_profile,iostat=ierr)
177 
178  if( ierr < 0 ) then !--- missing
179  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
180  elseif( ierr > 0 ) then !--- fatal error
181  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_PROFILE. Check!'
182  call prc_mpistop
183  endif
184  if( io_l ) write(io_fid_log,nml=param_atmos_phy_rd_profile)
185 
186  profile_toa = atmos_phy_rd_profile_toa
187  profile_cira86_fname = atmos_phy_rd_profile_cira86_in_filename
188  profile_mipas2001_dir = atmos_phy_rd_profile_mipas2001_in_basename
189  profile_user_fname = atmos_phy_rd_profile_user_in_filename
190 
192 
193  call profile_setup_cira86
194 
195  call profile_setup_mipas2001
196 
197  endif
198 
199  return
subroutine, public prc_mpistop
Abort MPI.
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
module PROCESS
integer, public io_fid_conf
Config file ID.
Definition: scale_stdio.F90:55
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
logical, public atmos_phy_rd_profile_use_climatology
use climatology?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_profile_read()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_read ( integer, intent(in)  kmax,
integer, intent(in)  ngas,
integer, intent(in)  ncfc,
integer, intent(in)  naero,
real(rp), intent(in)  real_lat,
integer, dimension(6), intent(in)  now_date,
real(rp), dimension(kmax+1), intent(in)  zh,
real(rp), dimension (kmax), intent(in)  z,
real(rp), dimension (kmax), intent(out)  rhodz,
real(rp), dimension (kmax), intent(out)  pres,
real(rp), dimension (kmax+1), intent(out)  presh,
real(rp), dimension (kmax), intent(out)  temp,
real(rp), dimension (kmax+1), intent(out)  temph,
real(rp), dimension (kmax,ngas), intent(out)  gas,
real(rp), dimension (kmax,ncfc), intent(out)  cfc,
real(rp), dimension(kmax,naero), intent(out)  aerosol_conc,
real(rp), dimension(kmax,naero), intent(out)  aerosol_radi,
real(rp), dimension (kmax), intent(out)  cldfrac 
)

Read profile for radiation.

Parameters
[in]kmaxNumber of layer
[in]ngasNumber of gas species
[in]ncfcNumber of CFCs
[in]naeroNumber of aerosol(particle) categories
[in]real_latlatitude [rad]
[in]now_datedate
[in]zhaltitude at the interface [km]
[in]zaltitude at the center [km]
[out]rhodzdensity * delta z [kg/m2]
[out]prespressure at the center [hPa]
[out]preshpressure at the interface [hPa]
[out]temptemperature at the center [K]
[out]temphtemperature at the interface [K]
[out]gasgas species volume mixing ratio [ppmv]
[out]cfcCFCs volume mixing ratio [ppmv]
[out]aerosol_conccloud/aerosol volume mixing ratio [ppmv]
[out]aerosol_radicloud/aerosol effective radius [cm]
[out]cldfraccloud fraction [0-1]

Definition at line 560 of file scale_atmos_phy_rd_profile.F90.

References atmos_phy_rd_profile_use_climatology, scale_atmos_solarins::atmos_solarins_date, scale_atmos_solarins::atmos_solarins_fixeddate, scale_atmos_solarins::atmos_solarins_fixedlatlon, scale_atmos_solarins::atmos_solarins_lat, scale_calendar::calendar_date2daysec(), scale_const::const_grav, scale_stdio::io_fid_log, and scale_stdio::io_l.

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx(), and scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

560  use scale_const, only: &
561  grav => const_grav
562  use scale_atmos_solarins, only: &
563  solarins_fixedlatlon => atmos_solarins_fixedlatlon, &
564  solarins_fixeddate => atmos_solarins_fixeddate, &
565  solarins_lat => atmos_solarins_lat, &
566  solarins_date => atmos_solarins_date
567  implicit none
568 
569  integer, intent(in) :: kmax
570  integer, intent(in) :: ngas
571  integer, intent(in) :: ncfc
572  integer, intent(in) :: naero
573  real(RP), intent(in) :: real_lat
574  integer, intent(in) :: now_date(6)
575  real(RP), intent(in) :: zh(kmax+1)
576  real(RP), intent(in) :: z (kmax)
577  real(RP), intent(out) :: rhodz (kmax)
578  real(RP), intent(out) :: pres (kmax)
579  real(RP), intent(out) :: presh (kmax+1)
580  real(RP), intent(out) :: temp (kmax)
581  real(RP), intent(out) :: temph (kmax+1)
582  real(RP), intent(out) :: gas (kmax,ngas)
583  real(RP), intent(out) :: cfc (kmax,ncfc)
584  real(RP), intent(out) :: aerosol_conc(kmax,naero)
585  real(RP), intent(out) :: aerosol_radi(kmax,naero)
586  real(RP), intent(out) :: cldfrac (kmax)
587 
588  real(RP) :: lat
589  integer :: date(6)
590 
591  integer :: k
592  !---------------------------------------------------------------------------
593 
595 
596  if ( solarins_fixedlatlon ) then
597  lat = solarins_lat
598  else
599  lat = real_lat
600  endif
601 
602  date = now_date
603  if ( solarins_fixeddate ) then
604  if( solarins_date(1) >= 0 ) date(1) = solarins_date(1)
605  if( solarins_date(2) >= 1 ) date(2) = solarins_date(2)
606  if( solarins_date(3) >= 1 ) date(3) = solarins_date(3)
607  if( solarins_date(4) >= 0 ) date(4) = solarins_date(4)
608  if( solarins_date(5) >= 0 ) date(5) = solarins_date(5)
609  if( solarins_date(6) >= 0 ) date(6) = solarins_date(6)
610  endif
611 
612  call profile_read_climatology( kmax, & ! [IN]
613  ngas, & ! [IN]
614  ncfc, & ! [IN]
615  naero, & ! [IN]
616  lat, & ! [IN], tentative treatment
617  date, & ! [IN]
618  zh, & ! [IN]
619  z, & ! [IN]
620  pres, & ! [OUT]
621  presh, & ! [OUT]
622  temp, & ! [OUT]
623  temph, & ! [OUT]
624  gas, & ! [OUT]
625  cfc ) ! [OUT]
626 
627  else
628 
629  call profile_read_user( kmax, & ! [IN]
630  ngas, & ! [IN]
631  ncfc, & ! [IN]
632  naero, & ! [IN]
633  zh, & ! [IN]
634  z, & ! [IN]
635  pres, & ! [OUT]
636  presh, & ! [OUT]
637  temp, & ! [OUT]
638  temph, & ! [OUT]
639  gas, & ! [OUT]
640  cfc ) ! [OUT]
641 
642  endif
643 
644 
645  do k = 1, kmax
646  rhodz(k) = ( presh(k+1) - presh(k) ) * 100.0_rp / grav
647  enddo
648 
649  ! no cloud/aerosol
650  aerosol_conc(:,:) = 0.0_rp
651  aerosol_radi(:,:) = 0.0_rp
652  cldfrac(:) = 0.0_rp
653 
654  if ( .NOT. atmos_phy_rd_profile_use_co2 ) gas(:,2) = 0.0_rp
655  if ( .NOT. atmos_phy_rd_profile_use_o3 ) gas(:,3) = 0.0_rp
656  if ( .NOT. atmos_phy_rd_profile_use_n2o ) gas(:,4) = 0.0_rp
657  if ( .NOT. atmos_phy_rd_profile_use_co ) gas(:,5) = 0.0_rp
658  if ( .NOT. atmos_phy_rd_profile_use_ch4 ) gas(:,6) = 0.0_rp
659  if ( .NOT. atmos_phy_rd_profile_use_o2 ) gas(:,7) = 0.0_rp
660  if ( .NOT. atmos_phy_rd_profile_use_cfc ) cfc(:,:) = 0.0_rp
661 
662  !----- report data -----
663  if ( debug .AND. report_firsttime ) then
664  report_firsttime = .false.
665 
666  if( io_l ) write(io_fid_log,*)
667  if( io_l ) write(io_fid_log,'(1x,A)') &
668  '|=============== Vertical Coordinate =================|'
669  if( io_l ) write(io_fid_log,'(1x,A)') &
670  '| -GRID CENTER- -GRID INTERFACE- |'
671  if( io_l ) write(io_fid_log,'(1x,A)') &
672  '| k z pres temp zh pres temp k |'
673  if( io_l ) write(io_fid_log,'(1x,A)') &
674  '| [km] [hPa] [K] [km] [hPa] [K] |'
675  k = 1
676  if( io_l ) write(io_fid_log,'(1x,A,F8.3,F10.4,F8.2,I5,A)') &
677  '| ',zh(k),presh(k),temph(k),k, ' | TOA'
678  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,F10.4,F8.2,A)') &
679  '|',k,z(k),pres(k),temp(k), ' | '
680  do k = 2, kmax-1
681  if( io_l ) write(io_fid_log,'(1x,A,F8.3,F10.4,F8.2,I5,A)') &
682  '| ',zh(k),presh(k),temph(k),k, ' | '
683  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,F10.4,F8.2,A)') &
684  '|',k,z(k),pres(k),temp(k), ' | '
685  enddo
686  k = kmax
687  if( io_l ) write(io_fid_log,'(1x,A,F8.3,F10.4,F8.2,I5,A)') &
688  '| ',zh(k),presh(k),temph(k),k, ' | '
689  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,F10.4,F8.2,A)') &
690  '|',k,z(k),pres(k),temp(k), ' | '
691  k = kmax+1
692  if( io_l ) write(io_fid_log,'(1x,A,F8.3,F10.4,F8.2,I5,A)') &
693  '| ',zh(k),presh(k),temph(k),k, ' | Ground'
694  if( io_l ) write(io_fid_log,'(1x,A)') &
695  '|================================================================|'
696 
697  if( io_l ) write(io_fid_log,*)
698  if( io_l ) write(io_fid_log,'(1x,A)') &
699  '|=====================================================================================|'
700  if( io_l ) write(io_fid_log,'(1x,A)') &
701  '| -Gas concetrations [ppmv]- |'
702  if( io_l ) write(io_fid_log,'(1x,A)') &
703  '| k z H2O CO2 O3 N2O CO CH4 O2 |'
704  do k = 1, kmax
705  if( io_l ) write(io_fid_log,'(1x,A,I5,1F9.3,7ES10.3,A)') '|',k,z(k),gas(k,:),' | '
706  enddo
707  if( io_l ) write(io_fid_log,'(1x,A)') &
708  '|=====================================================================================|'
709 
710  endif
711 
712  return
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
logical, public atmos_solarins_fixeddate
logical, public atmos_solarins_fixedlatlon
integer, public kmax
of computational cells: z
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:48
module CONSTANT
Definition: scale_const.F90:14
integer, dimension(6), public atmos_solarins_date
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
logical, public atmos_phy_rd_profile_use_climatology
use climatology?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_phy_rd_profile_setup_zgrid()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup_zgrid ( integer, intent(in)  kmax,
integer, intent(in)  kadd,
real(rp), dimension(kmax+1), intent(inout)  zh,
real(rp), dimension (kmax), intent(inout)  z 
)

Setup vertical grid for radiation.

Parameters
[in]kmaxnumber of vertical grid
[in]kaddnumber of additional vertical grid
[in,out]zhaltitude at the interface [km]
[in,out]zaltitude at the center [km]

Definition at line 1122 of file scale_atmos_phy_rd_profile.F90.

References scale_const::const_mdry, scale_const::const_mvap, scale_const::const_ppm, scale_grid::grid_cz, scale_grid::grid_fz, scale_stdio::io_fid_log, scale_stdio::io_get_available_fid(), scale_stdio::io_l, scale_grid_index::ke, scale_grid_index::kmax, scale_grid_index::ks, dc_log::log(), and scale_process::prc_mpistop().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

1122  use scale_grid, only: &
1123  cz => grid_cz, &
1124  fz => grid_fz
1125  implicit none
1126 
1127  integer, intent(in) :: kmax
1128  integer, intent(in) :: kadd
1129  real(RP), intent(inout) :: zh(kmax+1)
1130  real(RP), intent(inout) :: z (kmax)
1131 
1132  real(RP) :: dz
1133  integer :: k, rd_k
1134  !---------------------------------------------------------------------------
1135 
1136  if ( kadd > 0 ) then
1137  !--- additional layer over the computational domain
1138  dz = ( profile_toa - fz(ke)*1.e-3_rp ) / real( kadd, kind=rp )
1139 
1140  zh(1) = profile_toa
1141  do k = 2, kadd
1142  zh(k) = zh(k-1) - dz
1143  enddo
1144  zh(kadd+1) = fz(ke)*1.e-3_rp
1145 
1146  ! linear interpolation for center of layers
1147  do k = 1, kadd
1148  z(k) = 0.5_rp * ( zh(k+1) + zh(k) )
1149  enddo
1150  endif
1151 
1152  !--- in computational domain [NOTE] layer index is reversed
1153  do k = ks-1, ke
1154  rd_k = kmax - ( k - ks )
1155  zh(rd_k) = fz(k)*1.e-3_rp
1156  enddo
1157  do k = ks, ke
1158  rd_k = kmax - ( k - ks )
1159  z(rd_k) = cz(k)*1.e-3_rp
1160  enddo
1161 
1162  !----- report data -----
1163  if ( debug ) then
1164 
1165  if( io_l ) write(io_fid_log,*)
1166  if( io_l ) write(io_fid_log,'(1x,A)') &
1167  '|=============== Vertical Coordinate ===============|'
1168  if( io_l ) write(io_fid_log,'(1x,A)') &
1169  '| -GRID CENTER- -GRID INTERFACE- |'
1170  if( io_l ) write(io_fid_log,'(1x,A)') &
1171  '| RD_k z k GRID_CZ GRID_FZ k zh RD_k |'
1172  if ( kadd > 0 ) then
1173  rd_k = 1
1174  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1175  '| ',zh(rd_k),rd_k, ' | TOA'
1176  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1177  '|',rd_k,z(rd_k), ' | '
1178  do rd_k = 2, kadd-1
1179  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1180  '| ',zh(rd_k),rd_k, ' | '
1181  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1182  '|',rd_k,z(rd_k), ' | '
1183  enddo
1184  rd_k = kadd
1185  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1186  '| ',zh(rd_k),rd_k, ' | '
1187  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1188  '|',rd_k,z(rd_k), ' | KADD'
1189  rd_k = kadd+1
1190  k = kmax - rd_k + ks
1191  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1192  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1193  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1194  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | KADD+1=KE'
1195  else
1196  rd_k = 1
1197  k = kmax - rd_k + ks
1198  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1199  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | TOA=KE'
1200  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1201  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1202  endif
1203  do rd_k = kadd+2, kmax-1
1204  k = kmax - rd_k + ks
1205  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1206  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1207  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1208  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1209  enddo
1210  rd_k = kmax
1211  k = kmax - rd_k + ks
1212  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1213  '| ',fz(k),k,zh(rd_k),rd_k, ' | '
1214  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1215  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | RD_KMAX=KS'
1216  rd_k = kmax+1
1217  k = kmax - rd_k + ks
1218  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1219  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | Ground'
1220  if( io_l ) write(io_fid_log,'(1x,A)') &
1221  '|=====================================================|'
1222 
1223  endif
1224 
1225  return
logical, public io_l
output log or not? (this process)
Definition: scale_stdio.F90:59
real(rp), dimension(:), allocatable, public grid_cz
center coordinate [m]: z, local=global
integer, public ke
end point of inner domain: z, local
integer, public kmax
of computational cells: z
real(rp), dimension(:), allocatable, public grid_fz
face coordinate [m]: z, local=global
integer, public ks
start point of inner domain: z, local
module GRID (cartesian)
integer, public io_fid_log
Log file ID.
Definition: scale_stdio.F90:56
integer, parameter, public rp
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ atmos_phy_rd_profile_use_climatology

logical, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_use_climatology = .true.

use climatology?

Definition at line 42 of file scale_atmos_phy_rd_profile.F90.

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx(), atmos_phy_rd_profile_read(), and atmos_phy_rd_profile_setup().

42  logical, public :: atmos_phy_rd_profile_use_climatology = .true.
logical, public atmos_phy_rd_profile_use_climatology
use climatology?