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_finalize
 finalize 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 135 of file scale_atmos_phy_rd_profile.F90.

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

References atmos_phy_rd_profile_use_climatology, scale_io::io_fid_conf, and scale_prc::prc_abort().

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

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

◆ atmos_phy_rd_profile_finalize()

subroutine, public scale_atmos_phy_rd_profile::atmos_phy_rd_profile_finalize

finalize

Definition at line 201 of file scale_atmos_phy_rd_profile.F90.

201 
202  if ( allocated( cira_nd ) ) deallocate( cira_nd )
203  if ( allocated( cira_plog ) ) deallocate( cira_plog )
204  if ( allocated( cira_lat ) ) deallocate( cira_lat )
205  if ( allocated( cira_temp ) ) deallocate( cira_temp )
206  if ( allocated( cira_z ) ) deallocate( cira_z )
207 
208  if ( allocated( interp_temp ) ) deallocate( interp_temp )
209  if ( allocated( interp_z ) ) deallocate( interp_z )
210 
211  return

References scale_calendar::calendar_date2daysec(), scale_const::const_d2r, scale_file::file_close(), scale_file::file_open(), scale_io::io_get_available_fid(), scale_io::io_get_fname(), scale_prc::prc_abort(), and scale_precision::rp.

Referenced by mod_atmos_phy_rd_driver::atmos_phy_rd_driver_finalize().

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 546 of file scale_atmos_phy_rd_profile.F90.

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

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, and scale_precision::rp.

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

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 1099 of file scale_atmos_phy_rd_profile.F90.

1099  implicit none
1100  integer, intent(in) :: KA, KS, KE
1101  integer, intent(in) :: KMAX, KADD
1102  real(RP), intent(in) :: toa
1103  real(RP), intent(in) :: CZ( KA)
1104  real(RP), intent(in) :: FZ(0:KA)
1105  real(RP), intent(out) :: zh(KMAX+1)
1106  real(RP), intent(out) :: z (KMAX)
1107 
1108  real(RP) :: dz
1109  integer :: k, RD_k
1110  !---------------------------------------------------------------------------
1111 
1112  if ( kadd > 0 ) then
1113  !--- additional layer over the computational domain
1114  dz = ( toa - fz(ke)*1.e-3_rp ) / real( kadd, kind=rp )
1115 
1116  zh(1) = toa
1117  do k = 2, kadd
1118  zh(k) = zh(k-1) - dz
1119  enddo
1120  zh(kadd+1) = fz(ke)*1.e-3_rp
1121 
1122  ! linear interpolation for center of layers
1123  do k = 1, kadd
1124  z(k) = 0.5_rp * ( zh(k+1) + zh(k) )
1125  enddo
1126  endif
1127 
1128  !--- in computational domain [NOTE] layer index is reversed
1129  do k = ks-1, ke
1130  rd_k = kmax - ( k - ks )
1131  zh(rd_k) = fz(k)*1.e-3_rp
1132  enddo
1133  do k = ks, ke
1134  rd_k = kmax - ( k - ks )
1135  z(rd_k) = cz(k)*1.e-3_rp
1136  enddo
1137 
1138  !----- report data -----
1139  if ( debug ) then
1140 
1141  log_newline
1142  log_info("ATMOS_PHY_RD_PROFILE_setup_zgrid",'(1x,A)') 'Vertical Coordinate'
1143  log_info_cont('(1x,A)') '| -GRID CENTER- -GRID INTERFACE- |'
1144  log_info_cont('(1x,A)') '| RD_k z k CZ FZ k zh RD_k |'
1145  if ( kadd > 0 ) then
1146  rd_k = 1
1147  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | TOA'
1148  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | '
1149  do rd_k = 2, kadd-1
1150  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | '
1151  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | '
1152  enddo
1153  rd_k = kadd
1154  log_info_cont('(1x,A,F8.3,I5,A)') '| ',zh(rd_k),rd_k, ' | '
1155  log_info_cont('(1x,A,I5,F8.3,A)') '|',rd_k,z(rd_k), ' | KADD'
1156  rd_k = kadd+1
1157  k = kmax - rd_k + ks
1158  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1159  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'
1160  else
1161  rd_k = 1
1162  k = kmax - rd_k + ks
1163  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'
1164  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1165  endif
1166  do rd_k = kadd+2, kmax-1
1167  k = kmax - rd_k + ks
1168  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k)*1.e-3_rp,k,zh(rd_k),rd_k,' | '
1169  log_info_cont('(1x,A,I5,F8.3,I5,F8.3,A)') '|',rd_k,z(rd_k),k,cz(k)*1.e-3_rp, ' | '
1170  enddo
1171  rd_k = kmax
1172  k = kmax - rd_k + ks
1173  log_info_cont('(1x,A,F8.3,I5,F8.3,I5,A)') '| ',fz(k),k,zh(rd_k),rd_k, ' | '
1174  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'
1175  rd_k = kmax+1
1176  k = kmax - rd_k + ks
1177  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'
1178  log_info_cont('(1x,A)') '|=====================================================|'
1179 
1180  endif
1181 
1182  return

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

Referenced by scale_atmos_phy_rd_mstrnx::atmos_phy_rd_mstrnx_setup().

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 39 of file scale_atmos_phy_rd_profile.F90.

39  logical, public :: ATMOS_PHY_RD_PROFILE_use_climatology = .true.

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

scale_const::const_grav
real(rp), public const_grav
standard acceleration of gravity [m/s2]
Definition: scale_const.F90:49
scale_prc::prc_abort
subroutine, public prc_abort
Abort Process.
Definition: scale_prc.F90:350
scale_atmos_phy_rd_profile::atmos_phy_rd_profile_use_climatology
logical, public atmos_phy_rd_profile_use_climatology
use climatology?
Definition: scale_atmos_phy_rd_profile.F90:39
scale_atmos_solarins::atmos_solarins_fixedlatlon
logical, public atmos_solarins_fixedlatlon
Definition: scale_atmos_solarins.F90:56
scale_atmos_solarins
module atmosphere / SOLARINS
Definition: scale_atmos_solarins.F90:14
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_atmos_solarins::atmos_solarins_lat
real(rp), public atmos_solarins_lat
Definition: scale_atmos_solarins.F90:58
scale_atmos_solarins::atmos_solarins_date
integer, dimension(6), public atmos_solarins_date
Definition: scale_atmos_solarins.F90:61
scale_atmos_solarins::atmos_solarins_fixeddate
logical, public atmos_solarins_fixeddate
Definition: scale_atmos_solarins.F90:60