SCALE-RM
Functions/Subroutines | Variables
scale_atmos_phy_rd_profile Module Reference

module atmosphere / physics/ radiation / 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 (KA, KS, KE, KMAX, KADD, toa, CZ, FZ, 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 / 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
NAMELIST
  • PARAM_ATMOS_PHY_RD_PROFILE
    nametypedefault valuecomment
    ATMOS_PHY_RD_PROFILE_USE_CLIMATOLOGY logical .true. use climatology?
    ATMOS_PHY_RD_PROFILE_CIRA86_IN_FILENAME character(len=H_LONG)
    ATMOS_PHY_RD_PROFILE_MIPAS2001_IN_BASENAME character(len=H_LONG)
    ATMOS_PHY_RD_PROFILE_USER_IN_FILENAME character(len=H_LONG)
    ATMOS_PHY_RD_PROFILE_USE_H2O logical .true.
    ATMOS_PHY_RD_PROFILE_USE_CO2 logical .true.
    ATMOS_PHY_RD_PROFILE_USE_O3 logical .true.
    ATMOS_PHY_RD_PROFILE_USE_N2O logical .true.
    ATMOS_PHY_RD_PROFILE_USE_CO logical .true.
    ATMOS_PHY_RD_PROFILE_USE_CH4 logical .true.
    ATMOS_PHY_RD_PROFILE_USE_O2 logical .true.
    ATMOS_PHY_RD_PROFILE_USE_CFC logical .true.
    DEBUG logical .false. debug mode?

History Output
No history output

Function/Subroutine Documentation

◆ atmos_phy_rd_profile_setup()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup ( )

Setup.

Definition at line 134 of file scale_atmos_phy_rd_profile.F90.

References atmos_phy_rd_profile_use_climatology, scale_calendar::calendar_date2daysec(), scale_const::const_d2r, scale_file::file_close(), scale_file::file_open(), scale_io::io_fid_conf, scale_io::io_get_available_fid(), and scale_prc::prc_abort().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

134  use scale_prc, only: &
135  prc_abort
136  implicit none
137 
138  character(len=H_LONG) :: atmos_phy_rd_profile_cira86_in_filename
139  character(len=H_LONG) :: atmos_phy_rd_profile_mipas2001_in_basename
140  character(len=H_LONG) :: atmos_phy_rd_profile_user_in_filename
141 
142  namelist / param_atmos_phy_rd_profile / &
144  atmos_phy_rd_profile_cira86_in_filename, &
145  atmos_phy_rd_profile_mipas2001_in_basename, &
146  atmos_phy_rd_profile_user_in_filename, &
147  atmos_phy_rd_profile_use_h2o, &
148  atmos_phy_rd_profile_use_co2, &
149  atmos_phy_rd_profile_use_o3, &
150  atmos_phy_rd_profile_use_n2o, &
151  atmos_phy_rd_profile_use_co, &
152  atmos_phy_rd_profile_use_ch4, &
153  atmos_phy_rd_profile_use_o2, &
154  atmos_phy_rd_profile_use_cfc, &
155  debug
156 
157  integer :: ierr
158  !---------------------------------------------------------------------------
159 
160  log_newline
161  log_info("ATMOS_PHY_RD_PROFILE_setup",*) 'Setup'
162 
163  atmos_phy_rd_profile_cira86_in_filename = profile_cira86_fname
164  atmos_phy_rd_profile_mipas2001_in_basename = profile_mipas2001_dir
165  atmos_phy_rd_profile_user_in_filename = profile_user_fname
166 
167  !--- read namelist
168  rewind(io_fid_conf)
169  read(io_fid_conf,nml=param_atmos_phy_rd_profile,iostat=ierr)
170 
171  if( ierr < 0 ) then !--- missing
172  log_info("ATMOS_PHY_RD_PROFILE_setup",*) 'Not found namelist. Default used.'
173  elseif( ierr > 0 ) then !--- fatal error
174  log_error("ATMOS_PHY_RD_PROFILE_setup",*) 'Not appropriate names in namelist PARAM_ATMOS_PHY_RD_PROFILE. Check!'
175  call prc_abort
176  endif
177  log_nml(param_atmos_phy_rd_profile)
178 
179  profile_cira86_fname = atmos_phy_rd_profile_cira86_in_filename
180  profile_mipas2001_dir = atmos_phy_rd_profile_mipas2001_in_basename
181  profile_user_fname = atmos_phy_rd_profile_user_in_filename
182 
183  log_newline
184  log_info("ATMOS_PHY_RD_PROFILE_setup",*) 'Climatological profile for radiation'
185 
187 
188  call profile_setup_cira86
189 
190  call profile_setup_mipas2001
191 
192  endif
193 
194  return
integer, public io_fid_conf
Config file ID.
Definition: scale_io.F90:55
module PROCESS
Definition: scale_prc.F90:11
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:338
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 536 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(), and scale_const::const_grav.

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

536  use scale_const, only: &
537  grav => const_grav
538  use scale_atmos_solarins, only: &
539  solarins_fixedlatlon => atmos_solarins_fixedlatlon, &
540  solarins_fixeddate => atmos_solarins_fixeddate, &
541  solarins_lat => atmos_solarins_lat, &
542  solarins_date => atmos_solarins_date
543  implicit none
544 
545  integer, intent(in) :: kmax
546  integer, intent(in) :: ngas
547  integer, intent(in) :: ncfc
548  integer, intent(in) :: naero
549  real(RP), intent(in) :: real_lat
550  integer, intent(in) :: now_date(6)
551  real(RP), intent(in) :: zh(kmax+1)
552  real(RP), intent(in) :: z (kmax)
553  real(RP), intent(out) :: rhodz (kmax)
554  real(RP), intent(out) :: pres (kmax)
555  real(RP), intent(out) :: presh (kmax+1)
556  real(RP), intent(out) :: temp (kmax)
557  real(RP), intent(out) :: temph (kmax+1)
558  real(RP), intent(out) :: gas (kmax,ngas)
559  real(RP), intent(out) :: cfc (kmax,ncfc)
560  real(RP), intent(out) :: aerosol_conc(kmax,naero)
561  real(RP), intent(out) :: aerosol_radi(kmax,naero)
562  real(RP), intent(out) :: cldfrac (kmax)
563 
564  real(RP) :: lat
565  integer :: date(6)
566 
567  integer :: k
568  !---------------------------------------------------------------------------
569 
571 
572  if ( solarins_fixedlatlon ) then
573  lat = solarins_lat
574  else
575  lat = real_lat
576  endif
577 
578  date = now_date
579  if ( solarins_fixeddate ) then
580  if( solarins_date(1) >= 0 ) date(1) = solarins_date(1)
581  if( solarins_date(2) >= 1 ) date(2) = solarins_date(2)
582  if( solarins_date(3) >= 1 ) date(3) = solarins_date(3)
583  if( solarins_date(4) >= 0 ) date(4) = solarins_date(4)
584  if( solarins_date(5) >= 0 ) date(5) = solarins_date(5)
585  if( solarins_date(6) >= 0 ) date(6) = solarins_date(6)
586  endif
587 
588  call profile_read_climatology( kmax, & ! [IN]
589  ngas, & ! [IN]
590  ncfc, & ! [IN]
591  naero, & ! [IN]
592  lat, & ! [IN], tentative treatment
593  date, & ! [IN]
594  zh, & ! [IN]
595  z, & ! [IN]
596  pres, & ! [OUT]
597  presh, & ! [OUT]
598  temp, & ! [OUT]
599  temph, & ! [OUT]
600  gas, & ! [OUT]
601  cfc ) ! [OUT]
602 
603  else
604 
605  call profile_read_user( kmax, & ! [IN]
606  ngas, & ! [IN]
607  ncfc, & ! [IN]
608  naero, & ! [IN]
609  zh, & ! [IN]
610  z, & ! [IN]
611  pres, & ! [OUT]
612  presh, & ! [OUT]
613  temp, & ! [OUT]
614  temph, & ! [OUT]
615  gas, & ! [OUT]
616  cfc ) ! [OUT]
617 
618  endif
619 
620 
621  do k = 1, kmax
622  rhodz(k) = ( presh(k+1) - presh(k) ) * 100.0_rp / grav
623  enddo
624 
625  ! no cloud/aerosol
626  aerosol_conc(:,:) = 0.0_rp
627  aerosol_radi(:,:) = 0.0_rp
628  cldfrac(:) = 0.0_rp
629 
630  if ( .NOT. atmos_phy_rd_profile_use_h2o ) gas(:,1) = 0.0_rp
631  if ( .NOT. atmos_phy_rd_profile_use_co2 ) gas(:,2) = 0.0_rp
632  if ( .NOT. atmos_phy_rd_profile_use_o3 ) gas(:,3) = 0.0_rp
633  if ( .NOT. atmos_phy_rd_profile_use_n2o ) gas(:,4) = 0.0_rp
634  if ( .NOT. atmos_phy_rd_profile_use_co ) gas(:,5) = 0.0_rp
635  if ( .NOT. atmos_phy_rd_profile_use_ch4 ) gas(:,6) = 0.0_rp
636  if ( .NOT. atmos_phy_rd_profile_use_o2 ) gas(:,7) = 0.0_rp
637  if ( .NOT. atmos_phy_rd_profile_use_cfc ) cfc(:,:) = 0.0_rp
638 
639  !----- report data -----
640  if ( debug .AND. report_firsttime ) then
641  report_firsttime = .false.
642 
643  log_newline
644  log_info("ATMOS_PHY_RD_PROFILE_read",'(1x,A)') 'Vertical Coordinate'
645  log_info_cont('(1x,A)') '| -GRID CENTER- -GRID INTERFACE- |'
646  log_info_cont('(1x,A)') '| k z pres temp zh pres temp k |'
647  log_info_cont('(1x,A)') '| [km] [hPa] [K] [km] [hPa] [K] |'
648  k = 1
649  log_info_cont('(1x,A,F8.3,F10.4,F8.2,I5,A)') '| ',zh(k),presh(k),temph(k),k, ' | TOA'
650  log_info_cont('(1x,A,I5,F8.3,F10.4,F8.2,A)') '|',k,z(k),pres(k),temp(k), ' | '
651  do k = 2, kmax-1
652  log_info_cont('(1x,A,F8.3,F10.4,F8.2,I5,A)') '| ',zh(k),presh(k),temph(k),k, ' | '
653  log_info_cont('(1x,A,I5,F8.3,F10.4,F8.2,A)') '|',k,z(k),pres(k),temp(k), ' | '
654  enddo
655  k = kmax
656  log_info_cont('(1x,A,F8.3,F10.4,F8.2,I5,A)') '| ',zh(k),presh(k),temph(k),k, ' | '
657  log_info_cont('(1x,A,I5,F8.3,F10.4,F8.2,A)') '|',k,z(k),pres(k),temp(k), ' | '
658  k = kmax+1
659  log_info_cont('(1x,A,F8.3,F10.4,F8.2,I5,A)') '| ',zh(k),presh(k),temph(k),k, ' | Ground'
660  log_info_cont('(1x,A)') '|================================================================|'
661 
662  log_newline
663  log_info_cont('(1x,A)') '|=====================================================================================|'
664  log_info_cont('(1x,A)') '| -Gas concetrations [ppmv]- |'
665  log_info_cont('(1x,A)') '| k z H2O CO2 O3 N2O CO CH4 O2 |'
666  do k = 1, kmax
667  log_info_cont('(1x,A,I5,1F9.3,7ES10.3,A)') '|',k,z(k),gas(k,:),' | '
668  enddo
669  log_info_cont('(1x,A)') '|=====================================================================================|'
670 
671  endif
672 
673  return
logical, public atmos_solarins_fixeddate
real(rp), public atmos_solarins_lat
logical, public atmos_solarins_fixedlatlon
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:46
integer, public kmax
of computational cells: z, local
module CONSTANT
Definition: scale_const.F90:11
module atmosphere / SOLARINS
integer, dimension(6), public atmos_solarins_date
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)  KA,
integer, intent(in)  KS,
integer, intent(in)  KE,
integer, intent(in)  KMAX,
integer, intent(in)  KADD,
real(rp), intent(in)  toa,
real(rp), dimension( ka), intent(in)  CZ,
real(rp), dimension(0:ka), intent(in)  FZ,
real(rp), dimension(kmax+1), intent(out)  zh,
real(rp), dimension (kmax), intent(out)  z 
)

Setup vertical grid for radiation.

Definition at line 1086 of file scale_atmos_phy_rd_profile.F90.

References scale_const::const_mdry, scale_const::const_mvap, scale_const::const_ppm, scale_io::io_get_available_fid(), and scale_prc::prc_abort().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

1086  implicit none
1087  integer, intent(in) :: ka, ks, ke
1088  integer, intent(in) :: kmax, kadd
1089  real(RP), intent(in) :: toa
1090  real(RP), intent(in) :: cz( ka)
1091  real(RP), intent(in) :: fz(0:ka)
1092  real(RP), intent(out) :: zh(kmax+1)
1093  real(RP), intent(out) :: z (kmax)
1094 
1095  real(RP) :: dz
1096  integer :: k, rd_k
1097  !---------------------------------------------------------------------------
1098 
1099  if ( kadd > 0 ) then
1100  !--- additional layer over the computational domain
1101  dz = ( toa - fz(ke)*1.e-3_rp ) / real( kadd, kind=rp )
1102 
1103  zh(1) = toa
1104  do k = 2, kadd
1105  zh(k) = zh(k-1) - dz
1106  enddo
1107  zh(kadd+1) = fz(ke)*1.e-3_rp
1108 
1109  ! linear interpolation for center of layers
1110  do k = 1, kadd
1111  z(k) = 0.5_rp * ( zh(k+1) + zh(k) )
1112  enddo
1113  endif
1114 
1115  !--- in computational domain [NOTE] layer index is reversed
1116  do k = ks-1, ke
1117  rd_k = kmax - ( k - ks )
1118  zh(rd_k) = fz(k)*1.e-3_rp
1119  enddo
1120  do k = ks, ke
1121  rd_k = kmax - ( k - ks )
1122  z(rd_k) = cz(k)*1.e-3_rp
1123  enddo
1124 
1125  !----- report data -----
1126  if ( debug ) then
1127 
1128  log_newline
1129  log_info("ATMOS_PHY_RD_PROFILE_setup_zgrid",'(1x,A)') 'Vertical Coordinate'
1130  log_info_cont('(1x,A)') '| -GRID CENTER- -GRID INTERFACE- |'
1131  log_info_cont('(1x,A)') '| RD_k z k CZ FZ k zh RD_k |'
1132  if ( kadd > 0 ) then
1133  rd_k = 1
1134  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | TOA'
1135  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | '
1136  do rd_k = 2, kadd-1
1137  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | '
1138  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | '
1139  enddo
1140  rd_k = kadd
1141  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | '
1142  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | KADD'
1143  rd_k = kadd+1
1144  k = kmax - rd_k + ks
1145  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1146  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | KADD+1=KE'
1147  else
1148  rd_k = 1
1149  k = kmax - rd_k + ks
1150  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | TOA=KE'
1151  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1152  endif
1153  do rd_k = kadd+2, kmax-1
1154  k = kmax - rd_k + ks
1155  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1156  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1157  enddo
1158  rd_k = kmax
1159  k = kmax - rd_k + ks
1160  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k),k,zh(rd_k),rd_k, ' | '
1161  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | RD_KMAX=KS'
1162  rd_k = kmax+1
1163  k = kmax - rd_k + ks
1164  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | Ground'
1165  log_info_cont('(1x,A)') '|=====================================================|'
1166 
1167  endif
1168 
1169  return
integer, public ke
end point of inner domain: z, local
integer, public ks
start point of inner domain: z, local
integer, public kmax
of computational cells: z, local
integer, public ka
of whole cells: z, local, with HALO
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 38 of file scale_atmos_phy_rd_profile.F90.

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

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