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 (toa, 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]
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 139 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_fid_nml, scale_stdio::io_get_available_fid(), scale_stdio::io_l, scale_stdio::io_nml, and scale_process::prc_mpistop().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

139  use scale_process, only: &
141  implicit none
142 
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 / &
149  atmos_phy_rd_profile_cira86_in_filename, &
150  atmos_phy_rd_profile_mipas2001_in_basename, &
151  atmos_phy_rd_profile_user_in_filename, &
152  atmos_phy_rd_profile_use_h2o, &
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[RADIATION PROFILE] / Categ[ATMOS PHYSICS] / Origin[SCALElib]'
167 
168  atmos_phy_rd_profile_cira86_in_filename = profile_cira86_fname
169  atmos_phy_rd_profile_mipas2001_in_basename = profile_mipas2001_dir
170  atmos_phy_rd_profile_user_in_filename = profile_user_fname
171 
172  !--- read namelist
173  rewind(io_fid_conf)
174  read(io_fid_conf,nml=param_atmos_phy_rd_profile,iostat=ierr)
175 
176  if( ierr < 0 ) then !--- missing
177  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
178  elseif( ierr > 0 ) then !--- fatal error
179  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_PROFILE. Check!'
180  call prc_mpistop
181  endif
182  if( io_nml ) write(io_fid_nml,nml=param_atmos_phy_rd_profile)
183 
184  profile_cira86_fname = atmos_phy_rd_profile_cira86_in_filename
185  profile_mipas2001_dir = atmos_phy_rd_profile_mipas2001_in_basename
186  profile_user_fname = atmos_phy_rd_profile_user_in_filename
187 
188  if( io_l ) write(io_fid_log,*)
189  if( io_l ) write(io_fid_log,*) '*** Climatological profile for radiation'
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.
module PROCESS
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 561 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, scale_stdio::io_l, and scale_grid_index::kmax.

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

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

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

1128  use scale_grid, only: &
1129  cz => grid_cz, &
1130  fz => grid_fz
1131  implicit none
1132 
1133  real(RP), intent(in) :: toa
1134  integer, intent(in) :: kmax
1135  integer, intent(in) :: kadd
1136  real(RP), intent(inout) :: zh(kmax+1)
1137  real(RP), intent(inout) :: z (kmax)
1138 
1139  real(RP) :: dz
1140  integer :: k, RD_k
1141  !---------------------------------------------------------------------------
1142 
1143  if ( kadd > 0 ) then
1144  !--- additional layer over the computational domain
1145  dz = ( toa - fz(ke)*1.e-3_rp ) / real( kadd, kind=rp )
1146 
1147  zh(1) = toa
1148  do k = 2, kadd
1149  zh(k) = zh(k-1) - dz
1150  enddo
1151  zh(kadd+1) = fz(ke)*1.e-3_rp
1152 
1153  ! linear interpolation for center of layers
1154  do k = 1, kadd
1155  z(k) = 0.5_rp * ( zh(k+1) + zh(k) )
1156  enddo
1157  endif
1158 
1159  !--- in computational domain [NOTE] layer index is reversed
1160  do k = ks-1, ke
1161  rd_k = kmax - ( k - ks )
1162  zh(rd_k) = fz(k)*1.e-3_rp
1163  enddo
1164  do k = ks, ke
1165  rd_k = kmax - ( k - ks )
1166  z(rd_k) = cz(k)*1.e-3_rp
1167  enddo
1168 
1169  !----- report data -----
1170  if ( debug ) then
1171 
1172  if( io_l ) write(io_fid_log,*)
1173  if( io_l ) write(io_fid_log,'(1x,A)') &
1174  '|=============== Vertical Coordinate ===============|'
1175  if( io_l ) write(io_fid_log,'(1x,A)') &
1176  '| -GRID CENTER- -GRID INTERFACE- |'
1177  if( io_l ) write(io_fid_log,'(1x,A)') &
1178  '| RD_k z k GRID_CZ GRID_FZ k zh RD_k |'
1179  if ( kadd > 0 ) then
1180  rd_k = 1
1181  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1182  '| ',zh(rd_k),rd_k, ' | TOA'
1183  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1184  '|',rd_k,z(rd_k), ' | '
1185  do rd_k = 2, kadd-1
1186  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1187  '| ',zh(rd_k),rd_k, ' | '
1188  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1189  '|',rd_k,z(rd_k), ' | '
1190  enddo
1191  rd_k = kadd
1192  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1193  '| ',zh(rd_k),rd_k, ' | '
1194  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1195  '|',rd_k,z(rd_k), ' | KADD'
1196  rd_k = kadd+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,' | '
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, ' | KADD+1=KE'
1202  else
1203  rd_k = 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,' | TOA=KE'
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  endif
1210  do rd_k = kadd+2, kmax-1
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)*1.e-3_rp,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, ' | '
1216  enddo
1217  rd_k = kmax
1218  k = kmax - rd_k + ks
1219  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1220  '| ',fz(k),k,zh(rd_k),rd_k, ' | '
1221  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1222  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | RD_KMAX=KS'
1223  rd_k = kmax+1
1224  k = kmax - rd_k + ks
1225  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1226  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | Ground'
1227  if( io_l ) write(io_fid_log,'(1x,A)') &
1228  '|=====================================================|'
1229 
1230  endif
1231 
1232  return
real(rp), dimension(:), allocatable, public grid_cz
center coordinate [m]: z, local=global
real(rp), dimension(:), allocatable, public grid_fz
face coordinate [m]: z, local=global
module GRID (cartesian)
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 43 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().

43  logical, public :: ATMOS_PHY_RD_PROFILE_use_climatology = .true.