dimradmars_mod.F90

路径

LMDZ.MARS\libf\phymars\dimradmars_mod.F90

所属目录 / 模块

libf/phymars

文件定位

dimradmars_mod.F90 定义模块 dimradmars_mod,是 Mars 物理包中辐射维度、辐射共享场、气溶胶 scatterer 名称表和离散光学查找表的集中状态模块。它本身不执行辐射传输,也不读取外部光学文件;它负责保存 callradite、短波/长波辐射、suaeraeroptpropertiesaeropacityupdatereffrad 等路径共同使用的数组维度和表。

初始化分两层:phys_state_var_init_mod 调用 ini_dimradmars_modngrid/nlayer/nslope 分配辐射场数组;conf_phys 在读到 naerkind 后调用 ini_scatterers 分配气溶胶第三维和查找表,再填充 name_iaer。因此复现辐射链路时,不能只看辐射主程序,还要保证本模块的初始化顺序、naerkindname_iaer 与配置一致。

定义的符号

符号 类型 行号 作用
dimradmars_mod module 1 辐射维度、气溶胶 scatterer 和光学查找表共享模块。
NFLEV / ndomainsz / NDLON / NDLO2 saved module variables 10-13 长短波辐射和重力波等子域工作数组使用的垂直层数、水平子域长度和辐射列维度。
naerkind saved module variable 23 当前运行的气溶胶辐射属性种类数;由 conf_phys 读取 callphys.def 后写入。
name_iaer(:) saved allocatable module variable 26 每类 scatterer 的名称表;由 ini_scatterers 分配清空,再由 conf_phys 按开关组合填充。
iaer_dust_conrathiaer_* integer module variables 30-45 尘埃、水冰、CO2 冰等 scatterer 的索引槽位。
iaerdust(:) saved allocatable module variable 48 尘埃类 scatterer 索引表,由 aeropacity 识别名称后写入,供尘埃缩放路径使用。
file_id(:,:) saved allocatable module variable 53 每类 scatterer 的 VIS/IR 外部光学表文件名,由 suaer 写入。
longrefir(:) / longrefvis(:) saved allocatable module variables 59 每类 scatterer 的红外/可见参考波长。
nir / nuco2 / NSUN integer parameters 64-77 长波红外带数、CO2 带数和短波太阳带数;当前 nir=4nuco2=2NSUN=2
long*ir / long*co2 / long*vis real parameters 66-79 长波和短波谱段边界。
sunfr(2) saved module variable 82 两个太阳短波带的能量份额:0.2744900.725509
nsizemax integer parameter 97 光学数据库支持的最大离散粒径数;当前为 60
npademx / nabsmx / nt_pademx integer parameters 106-108 长波 Pade 近似相关维度常数。
flux_1AU real parameter 113 坡面辐射使用的 1 AU 太阳常数,1370 W m-2
dtrad, fluxrad_sky, fluxrad, albedo, totcloudfrac, aerosol, nueffdust saved allocatable module arrays 118-127 辐射加热率、地表辐射通量、反照率、云量、气溶胶层光学厚度和尘埃有效方差。
tauvis saved module variable 153 参考可见光尘埃光学厚度,可由配置或控制表路径写入。
QVISsQREF, omegavis, gvis, QIRsQREF, omegaIR, gIR saved allocatable module arrays 154-159 VIS/IR 离散粒径光学查找表;由 suaer 填充,供 aeroptproperties 插值/卷积。
nsize, radiustab, QREFvis, QREFir, omegaREFvis, omegaREFir saved allocatable module arrays 165-175 每类 aerosol 的离散粒径数、半径轴和参考波长光学属性。
ini_dimradmars_mod subroutine 183 ngrid/nlayer/nslope 设置辐射维度并分配主辐射状态数组。
end_dimradmars_mod subroutine 206 释放主辐射状态数组。
ini_dimradmars_mod_slope_var subroutine 219 只重分配坡面相关辐射数组。
end_dimradmars_mod_slope_var subroutine 232 释放坡面相关辐射数组。
ini_scatterers subroutine 243 ngrid/nlayer/naerkind 分配气溶胶场和光学查找表,并清空 name_iaer

依赖的模块

use 模块 only 列表 用途 待确认
- 本文件没有 use 语句;只声明自身共享状态和初始化/释放例程。

调用的关键例程

被调用例程 所在模块/文件 调用位置 作用
- - 本文件内没有 call 语句;所有例程只分配、释放或清空本模块数组。

输入

输入 来源 类型/维度 单位 含义
ngrid ini_dimradmars_mod, ini_dimradmars_mod_slope_var, ini_scatterers 实参 integer scalar grid columns 物理列数,决定数组第一维。
nlayer ini_dimradmars_mod, ini_scatterers 实参 integer scalar layers 大气层数,决定 dtrad/aerosol/nueffdust 等垂直维。
nslope ini_dimradmars_mod, ini_dimradmars_mod_slope_var 实参 integer scalar slope classes 坡面维度,决定 albedo/fluxrad/fluxrad_sky 第三或第二维。
naerkind conf_phys 写入后由 ini_scatterers 读取 integer scalar - 当前运行启用的 scatterer 种类数。

输出

输出 去向 类型/维度 单位 含义
NFLEV, ndomainsz, NDLON, NDLO2 长波/短波辐射、部分子域例程 integer scalars grid/layers 子域和辐射工作数组维度。
albedo(ngrid,2,nslope) 辐射/坡面路径 real array - 两个短波带、每个坡面类别的地表反照率。
dtrad(ngrid,nlayer) 物理主循环 real array K s-1 净大气辐射加热率。
fluxrad_sky(ngrid,nslope) 地表能量收支 real array W m-2 天空辐射被地表吸收的通量。
fluxrad(ngrid,nslope) 地表能量收支 real array W m-2 净地表辐射通量。
totcloudfrac(ngrid) 云/辐射诊断路径 real array - 柱总云量。
aerosol(ngrid,nlayer,naerkind) 辐射传输输入 real array - 每层每类气溶胶在参考波长处的光学厚度。
nueffdust(ngrid,nlayer) updatereffrad / 辐射半径路径 real array - 尘埃有效方差缓存。
name_iaer(naerkind) suaer, aeropacity, updatereffrad character array - scatterer 名称顺序。
QVISsQREF, QIRsQREF, omega*, g*, QREF*, radiustab, nsize suaer 写入,aeroptproperties 读取 mixed arrays mixed 离散光学属性查找表。

共享状态与副作用

核心逻辑

  1. ini_dimradmars_mod(ngrid,nlayer,nslope)nflev 设为 nlayer,把 ndomainsz 设为 (ngrid-1)/20 + 1,并令 ndlon=ndomainszndlo2=ndlon
  2. 同一入口按运行维度分配辐射主状态:albedo(ngrid,2,nslope)dtrad(ngrid,nlayer)fluxrad_sky(ngrid,nslope)fluxrad(ngrid,nslope)nueffdust(ngrid,nlayer)totcloudfrac(ngrid)
  3. ini_dimradmars_mod_slope_var 只分配坡面相关的 albedo/fluxrad_sky/fluxrad,用于坡面维度后续调整路径。
  4. ini_scatterers(ngrid,nlayer) 先重建 aerosol(ngrid,nlayer,naerkind);随后按 naerkindnsun=2nir=4nsizemax=60 分配名称、参考波长、气溶胶索引和 VIS/IR 光学查找表。
  5. ini_scatterers 末尾清空 name_iaer(:),后续必须由 conf_physdoubleq/active/rdstorm/topflows/water/co2clouds/submicron 等开关填入可被 suaeraeropacityupdatereffrad 匹配的名称。

伪代码

ini_dimradmars_mod(ngrid, nlayer, nslope):
    nflev = nlayer
    ndomainsz = (ngrid - 1) / 20 + 1
    ndlon = ndomainsz
    ndlo2 = ndlon
    allocate albedo, dtrad, fluxrad_sky, fluxrad, nueffdust, totcloudfrac

ini_scatterers(ngrid, nlayer):
    if aerosol allocated:
        deallocate aerosol
    allocate aerosol(ngrid, nlayer, naerkind)

    allocate name_iaer, longref*, iaerdust, file_id if needed
    allocate VIS tables as (nsun, naerkind, nsizemax)
    allocate IR tables as (nir, naerkind, nsizemax)
    allocate nsize/radiustab/QREF*/omegaREF* if needed
    name_iaer(:) = ""

参与的主题流程

主题 参与方式
辐射 提供短波/长波谱带维度、辐射通量/加热率数组、气溶胶光学厚度和光学查找表。
尘埃循环 保存尘埃 scatterer 名称、iaerdust 索引、tauvisaerosol 和尘埃有效方差。
水循环 h2o_ice scatterer 的名称和光学表通过本模块进入辐射。
CO2 循环 co2_ice scatterer 的名称和光学表通过本模块进入辐射。

写法特点

复现要点

待确认

相关页面