nlte_paramdef_h.F90
路径
LMDZ.MARS\libf\phymars\nlte_paramdef_h.F90
所属目录 / 模块
libf/phymars
文件定位
nlte_paramdef_h.F90 定义真实 Fortran module nlte_paramdef_h,集中保存 CO2 15 微米 NLTE 快速参数化使用的编译期参数。它不包含 contains、subroutine 或 function,也不读写运行时状态;它为 nlte_commons_h 的数组维度、nlte_aux 的 Planck/插值/历史谱线表工具、nlte_calc 的 Curtis matrix 和 escape probability 计算,以及 nlte_tcool_mod.F 的 cooling-time 主求解提供常数。
这些参数来自旧 mz1d.par、tcr_15um.h 和 bloque_dlvr11.f 注释块。文件把旧模型的网格层数、谱带/同位素数量、历史谱线表尺寸、压力上下界、辐射常数、CO2 谱带中心波数和火星同位素混合比固定在 module parameter 中。
定义的符号
| 符号 |
类型 |
行号 |
作用 |
nlte_paramdef_h |
module |
1 |
NLTE 15 微米 CO2 参数化的编译期参数模块。 |
nztabul |
integer parameter |
12 |
Tesc 和 VC 等 ISO tabulation 的垂直表点数,当前为 79。 |
nltot |
integer parameter |
16 |
NLTE module 与 Tstar110 合并使用的总高度数,当前为 20。 |
nl |
integer parameter |
19 |
NLTE 主网格和 Curtis matrix 实际层数,当前为 12。 |
nl2 |
integer parameter |
20 |
nl-2,用于 mmh2 相关矩阵反演维度。 |
nzy |
integer parameter |
22 |
主网格 Curtis matrix 细网格点数,按 (nl-1)*4+1 计算。 |
nl_cts |
integer parameter |
24 |
cool-to-space / Tstar110 路径实际层数,按 2+nltot-nl 计算。 |
nzy_cts |
integer parameter |
25 |
CTS 透过率细网格点数,按 (nl_cts-1)*4+1 计算。 |
nisot |
integer parameter |
29 |
参与 15 微米 NLTE 计算的 CO2 同位素个数,当前为 4。 |
nb |
integer parameter |
30 |
包含的谱带数,当前为 41。 |
nhist |
integer parameter |
32 |
历史谱线表温度点数,当前为 36。 |
nbox_max |
integer parameter |
35 |
历史谱线 histogram box 最大数,当前为 4。 |
itt_cza |
integer parameter |
40 |
NLTE scheme 选择参数,当前为 13。 |
Ptop_atm, Pbottom_atm |
real parameter |
42-43 |
NLTE model 适用压力上、下边界,分别为 3.e-10 和 2.e-5。 |
rf19, rf20, rf21a, rf21b, rf21c, rf33bc |
real*8 parameter |
45-46 |
碰撞率缩放因子,当前均为 1。 |
nu(nisot,8) |
real parameter |
50-57 |
各同位素最多 8 个谱带/跃迁的中心波数表。 |
nu12_0200, nu12_1000 |
real parameter |
62-63 |
121 热带合成使用的两个参考波数。 |
indexisot(nisot) |
integer parameter |
65 |
4 个 CO2 同位素的编码:26、28、36、27。 |
vlight, ee, hplanck, gamma |
real*8 parameter |
68-71 |
cgs 单位制下的光速、第二辐射常数、Planck 常数和 Planck 预因子。 |
imr(nisot) |
real parameter |
75 |
火星 CO2 同位素混合比,当前为 626/628/636/627 对应的 4 个权重。 |
依赖的模块
| use 模块 |
only 列表 |
用途 |
待确认 |
| 无 |
- |
本文件只定义 parameter,不依赖其他 module。 |
否 |
调用的关键例程
| 被调用例程 |
所在模块 / 文件 |
调用位置 |
作用 |
| 无 |
- |
- |
本文件没有可执行例程。 |
输入
| 输入 |
来源 |
类型/维度 |
单位 |
含义 |
| 无运行时输入 |
编译期源码常量 |
parameter |
混合 |
所有数值在源码中以 parameter 固定。 |
| 旧模型参数块 |
源文件注释标注的 mz1d.par、tcr_15um.h、bloque_dlvr11.f |
文档/历史来源 |
- |
说明这些参数从旧 NLTE 1-D 模型合并而来。 |
输出
| 输出 |
去向 |
类型/维度 |
单位 |
含义 |
nl, nl_cts, nzy, nzy_cts, nb, nisot, nhist, nbox_max |
nlte_commons_h.F90、nlte_aux.F、nlte_calc.F、nlte_tcool_mod.F |
integer parameters |
- |
决定共享数组、历史表、主网格/CTS 网格和矩阵维度。 |
Ptop_atm, Pbottom_atm |
nlte_tcool_mod.F |
real parameters |
pressure |
限定 NLTE model 的压力范围和边界定位。 |
nu, nu12_0200, nu12_1000, ee, gamma, hplanck, vlight |
nlte_aux.F、nlte_calc.F、nlte_tcool_mod.F |
real / real*8 parameters |
cm-1、cgs 等 |
Planck 项、谱带缩放和辐射能量计算常数。 |
imr, indexisot |
nlte_setup.F、nlte_calc.F、nlte_tcool_mod.F |
arrays |
mixing ratio / isotope code |
同位素查表、谱带合成和速率计算使用的 CO2 同位素信息。 |
rf19 ... rf33bc |
nlte_setup.F::GETK_dlvr11 |
real*8 parameters |
scaling factor |
碰撞率族的缩放因子。 |
共享状态与副作用
- 本文件没有
save 变量、common block、I/O、诊断输出或运行时副作用。
- 它的副作用是编译期耦合:修改任一维度参数会改变 nlte_commons_h 中数组形状,并影响
nlte_aux.F、nlte_calc.F、nlte_tcool_mod.F 的循环边界和矩阵尺寸。
Ptop_atm/Pbottom_atm、itt_cza、nu* 和 imr 是物理/配置常数;改变它们不会触发局部校验,必须同时核对下游公式和表文件是否匹配。
核心逻辑
- 编译器加载
nlte_paramdef_h 时,先固定 NLTE 主网格、CTS 网格、细网格和矩阵维度。
- nlte_commons_h 用这些参数声明谱带、同位素、查表、主网格、CTS 网格和历史谱线缓存数组。
nlte_setup.F 读取 nztabul/nb/nisot/indexisot 以填充谱线表,并读取 rf*、nu、ee 计算碰撞率。
- nlte_aux 用
gamma/ee 计算 Planck 辅助函数,用 nl/nzy/nzy_cts/nhist/nbox_max 控制插值和历史表读写。
- nlte_calc 用
nl/nzy/nl_cts/nzy_cts 控制矩阵和 escape probability 的网格尺寸,用 nu/nu12_0200/nu12_1000/imr/ee 做谱带与同位素合成。
nlte_tcool_mod.F 用 nl/nl2/nltot/nl_cts 构造 cooling-time 方程,用 Ptop_atm/Pbottom_atm 定位适用压力范围,并用 hplanck/vlight/ee/gamma/nu/imr 计算辐射项。
伪代码
at compile time:
set NLTE dimensions:
nl = 12
nltot = 20
nl_cts = 2 + nltot - nl
nzy = (nl - 1) * 4 + 1
nzy_cts = (nl_cts - 1) * 4 + 1
set table sizes:
nztabul = 79
nb = 41
nisot = 4
nhist = 36
nbox_max = 4
set physical constants and CO2 spectral data:
pressure limits = Ptop_atm, Pbottom_atm
radiation constants = hplanck, vlight, ee, gamma
isotope band table = nu
isotope weights = imr
downstream modules:
allocate arrays and loops from these parameters
read tables and solve NLTE matrices using matching dimensions
参与的主题流程
| 主题 |
参与方式 |
| NLTE 15 微米 CO2 冷却 |
提供所有固定维度、压力范围、谱带中心波数、辐射常数和 CO2 同位素权重。 |
| 辐射计算 |
hplanck/vlight/ee/gamma/nu 进入 Planck 项、谱带能量和冷却率计算。 |
| 历史谱线表复现 |
nhist/nbox_max/nb/nisot 决定 rhist_03 读入和缓存历史谱线表的合法尺寸。 |
写法特点
- 文件是自由格式 Fortran 90 module,但保存了旧参数文件名注释,便于追溯参数来源。
nu(nisot,8) 通过 reshape(..., shape(nu), order=[2,1]) 填表;复现时要保留这个 order,否则同位素和谱带轴会转置。
nl_cts 和 nzy_cts 不是硬编码常数,而由 nltot 与 nl 推导;改动 nl 会连锁改变 CTS 网格。
- cgs 辐射常数使用
real*8,但 nu 和 imr 是默认 real,下游混合精度由源文件字面类型决定。
复现要点
nbox_max=4 必须覆盖历史谱线表中的 box 数;nlte_aux.F::rhist_03 会检查 nbox_stored(ihist) > nbox_max。
nb=41 和 nisot=4 必须与 nlte_setup.F 读取的谱线/同位素表一致,尤其是 indexisot=[26,28,36,27]。
Ptop_atm=3.e-10 与 Pbottom_atm=2.e-5 是 NLTE 插值和边界定位的固定压力范围,运行剖面超出范围会影响 nlte_tcool_mod.F 的边界索引。
- 修改
nu12_0200 或 nu12_1000 会影响 121 热带合成缩放,必须同步核对 nlte_calc 中 121 子带逻辑。
rf19 ... rf33bc 当前全为 1;如用于调参,应记录与碰撞率来源文件的对应关系。
待确认
itt_cza=13 的完整方案枚举需要结合 nlte_tcool_mod.F 后续页面确认。
Ptop_atm/Pbottom_atm 的单位按源注释和下游压力变量推断为压力边界,但文件本身没有显式单位说明。
rf19 ... rf33bc 的物理校准来源需要结合旧 IAA/CSIC 文档或 nlte_setup.F::GETK_dlvr11 的上游说明确认。
相关页面