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]

Function/Subroutine Documentation

◆ atmos_phy_rd_profile_setup()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_setup ( )

Setup.

Definition at line 137 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().

137  use scale_process, only: &
139  implicit none
140 
141  character(len=H_LONG) :: atmos_phy_rd_profile_cira86_in_filename
142  character(len=H_LONG) :: atmos_phy_rd_profile_mipas2001_in_basename
143  character(len=H_LONG) :: atmos_phy_rd_profile_user_in_filename
144 
145  namelist / param_atmos_phy_rd_profile / &
147  atmos_phy_rd_profile_cira86_in_filename, &
148  atmos_phy_rd_profile_mipas2001_in_basename, &
149  atmos_phy_rd_profile_user_in_filename, &
150  atmos_phy_rd_profile_use_co2, &
151  atmos_phy_rd_profile_use_o3, &
152  atmos_phy_rd_profile_use_n2o, &
153  atmos_phy_rd_profile_use_co, &
154  atmos_phy_rd_profile_use_ch4, &
155  atmos_phy_rd_profile_use_o2, &
156  atmos_phy_rd_profile_use_cfc, &
157  debug
158 
159  integer :: ierr
160  !---------------------------------------------------------------------------
161 
162  if( io_l ) write(io_fid_log,*)
163  if( io_l ) write(io_fid_log,*) '+++ Module[Physics-RD PROFILE]/Categ[ATMOS]'
164  if( io_l ) write(io_fid_log,*) '+++ climatological profile'
165 
166  atmos_phy_rd_profile_cira86_in_filename = profile_cira86_fname
167  atmos_phy_rd_profile_mipas2001_in_basename = profile_mipas2001_dir
168  atmos_phy_rd_profile_user_in_filename = profile_user_fname
169 
170  !--- read namelist
171  rewind(io_fid_conf)
172  read(io_fid_conf,nml=param_atmos_phy_rd_profile,iostat=ierr)
173 
174  if( ierr < 0 ) then !--- missing
175  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
176  elseif( ierr > 0 ) then !--- fatal error
177  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_PHY_RD_PROFILE. Check!'
178  call prc_mpistop
179  endif
180  if( io_l ) write(io_fid_log,nml=param_atmos_phy_rd_profile)
181 
182  profile_cira86_fname = atmos_phy_rd_profile_cira86_in_filename
183  profile_mipas2001_dir = atmos_phy_rd_profile_mipas2001_in_basename
184  profile_user_fname = atmos_phy_rd_profile_user_in_filename
185 
187 
188  call profile_setup_cira86
189 
190  call profile_setup_mipas2001
191 
192  endif
193 
194  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 555 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().

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

1118  use scale_grid, only: &
1119  cz => grid_cz, &
1120  fz => grid_fz
1121  implicit none
1122 
1123  real(RP), intent(in) :: toa
1124  integer, intent(in) :: kmax
1125  integer, intent(in) :: kadd
1126  real(RP), intent(inout) :: zh(kmax+1)
1127  real(RP), intent(inout) :: z (kmax)
1128 
1129  real(RP) :: dz
1130  integer :: k, rd_k
1131  !---------------------------------------------------------------------------
1132 
1133  if ( kadd > 0 ) then
1134  !--- additional layer over the computational domain
1135  dz = ( toa - fz(ke)*1.e-3_rp ) / real( kadd, kind=rp )
1136 
1137  zh(1) = toa
1138  do k = 2, kadd
1139  zh(k) = zh(k-1) - dz
1140  enddo
1141  zh(kadd+1) = fz(ke)*1.e-3_rp
1142 
1143  ! linear interpolation for center of layers
1144  do k = 1, kadd
1145  z(k) = 0.5_rp * ( zh(k+1) + zh(k) )
1146  enddo
1147  endif
1148 
1149  !--- in computational domain [NOTE] layer index is reversed
1150  do k = ks-1, ke
1151  rd_k = kmax - ( k - ks )
1152  zh(rd_k) = fz(k)*1.e-3_rp
1153  enddo
1154  do k = ks, ke
1155  rd_k = kmax - ( k - ks )
1156  z(rd_k) = cz(k)*1.e-3_rp
1157  enddo
1158 
1159  !----- report data -----
1160  if ( debug ) then
1161 
1162  if( io_l ) write(io_fid_log,*)
1163  if( io_l ) write(io_fid_log,'(1x,A)') &
1164  '|=============== Vertical Coordinate ===============|'
1165  if( io_l ) write(io_fid_log,'(1x,A)') &
1166  '| -GRID CENTER- -GRID INTERFACE- |'
1167  if( io_l ) write(io_fid_log,'(1x,A)') &
1168  '| RD_k z k GRID_CZ GRID_FZ k zh RD_k |'
1169  if ( kadd > 0 ) then
1170  rd_k = 1
1171  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1172  '| ',zh(rd_k),rd_k, ' | TOA'
1173  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1174  '|',rd_k,z(rd_k), ' | '
1175  do rd_k = 2, kadd-1
1176  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1177  '| ',zh(rd_k),rd_k, ' | '
1178  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1179  '|',rd_k,z(rd_k), ' | '
1180  enddo
1181  rd_k = kadd
1182  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,A)') &
1183  '| ',zh(rd_k),rd_k, ' | '
1184  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,A)') &
1185  '|',rd_k,z(rd_k), ' | KADD'
1186  rd_k = kadd+1
1187  k = kmax - rd_k + ks
1188  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1189  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1190  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1191  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | KADD+1=KE'
1192  else
1193  rd_k = 1
1194  k = kmax - rd_k + ks
1195  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1196  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | TOA=KE'
1197  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1198  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1199  endif
1200  do rd_k = kadd+2, kmax-1
1201  k = kmax - rd_k + ks
1202  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1203  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1204  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1205  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1206  enddo
1207  rd_k = kmax
1208  k = kmax - rd_k + ks
1209  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1210  '| ',fz(k),k,zh(rd_k),rd_k, ' | '
1211  if( io_l ) write(io_fid_log,'(1x,A,I5,F8.3,I5,F8.3,A)') &
1212  '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | RD_KMAX=KS'
1213  rd_k = kmax+1
1214  k = kmax - rd_k + ks
1215  if( io_l ) write(io_fid_log,'(1x,A,F8.3,I5,F8.3,I5,A)') &
1216  '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | Ground'
1217  if( io_l ) write(io_fid_log,'(1x,A)') &
1218  '|=====================================================|'
1219 
1220  endif
1221 
1222  return
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, 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?