hrtherm.F
路径
LMDZ.MARS\libf\aeronomars\hrtherm.F
所属目录/模块
libf\aeronomars
文件定位
hrtherm.F 定义 hrtherm_mod,提供例程 hrtherm,计算热层 EUV 光吸收加热率 jtot(erg/s)。它把各物种数密度打包到 xabsi,调用 jthermcalc_e107 计算光吸收系数(写入 param_v4_h::jfotsout),再按区间与物种加权求和得到每层总光吸收。夜间(太阳天顶角 zenit>140°)直接置 jtot=0 返回。该例程由 euvheat 在 EUV 加热路径中逐列调用,属 thermosphere_mod → euvheat → hrtherm → jthermcalc_e107 链路。
作者:fgg,2002-02 初版、2002-11 第二版(源码第 13–14 行)。
定义的符号
| 符号 |
类型 |
行号 |
作用 |
hrtherm_mod |
module |
1(END MODULE 139) |
包装 EUV 加热率计算的模块 |
hrtherm |
subroutine |
9(END SUBROUTINE 137) |
计算每层 EUV 光吸收加热率 jtot |
i_co2..i_n2 |
integer parameters |
46–62 |
EUV 加热用物种索引 1–17(须与 chemthermos.F90 一致) |
依赖的模块
| use 模块 |
only 列表 |
用途 |
待确认 |
param_v4_h |
ninter,nabs,jfotsout,fluxtop,freccen |
区间/物种维度与光吸收系数、太阳通量、地球-太阳距离修正因子 |
jfotsout 由 jthermcalc_e107 写入;fluxtop 初始化见 param_read/param_read_e107,freccen 由 param_v4_h 的 fill_data_thermos 设置 |
jthermcalc_e107_mod |
jthermcalc_e107 |
计算光吸收系数(填充 jfotsout) |
- |
调用的关键例程
| 被调用例程 |
所在模块/文件 |
调用位置 |
作用 |
jthermcalc_e107 |
jthermcalc_e107_mod.F |
121 |
按格点、EUV 模式、温度、SZA、日期计算光吸收系数,写入 param_v4_h::jfotsout |
输入
| 输入 |
来源 |
类型/维度 |
单位 |
含义 |
ig |
euvheat 循环 |
integer |
- |
网格点索引 |
nlayer |
euvheat |
integer |
- |
层数 |
euvmod |
euvheat |
integer |
- |
EUV 模式级别(≥1 含 O3;≥2 含 N/离子物种) |
rm |
euvheat |
double (nlayer,nespeuv) |
cm⁻³ |
物种数密度矩阵 |
nespeuv |
euvheat |
integer |
- |
EUV 物种数 |
tx |
euvheat |
real (nlayer) |
K |
温度 |
iz |
euvheat |
real (nlayer) |
- |
传给 jthermcalc_e107 的高度相关量 |
zenit |
euvheat |
real |
deg |
太阳天顶角 |
zday |
euvheat |
real |
- |
日期,传给 jthermcalc_e107 |
ninter,nabs,jfotsout,fluxtop,freccen |
param_v4_h |
integer/real arrays |
- |
区间数、物种数、光吸收系数、太阳通量、距离修正 |
输出
| 输出 |
去向 |
类型/维度 |
单位 |
含义 |
jtot |
euvheat |
real (nlayer) |
erg/s |
每层 EUV 光吸收总加热率;夜间为 0 |
共享状态与副作用
- 读取
param_v4_h 共享量 ninter/nabs/jfotsout/fluxtop/freccen;不直接写这些数组(jfotsout 由被调用的 jthermcalc_e107 写入)。
- 无
SAVE/THREADPRIVATE 本地变量;无文件 I/O;无 getin/abort/诊断打印。
- 无
intent 声明(第 34–41 行)。
- 夜间(
zenit>140)提前 return,jtot 置 0。
核心逻辑
- 日/夜判定(第 80–91 行):
zenit>140° → dn='n',jtot(:)=0 后 return;否则 dn='d'。
- 初始化(第 94–96 行):
jergs=0、xabsi=0、jtot=0。
- 打包数密度到
xabsi(species,layer)(第 98–118 行):(1)=co2,(2)=o2,(3)=o,(4)=h2o,(5)=h2,(6)=h2o2 恒填;euvmod>=1 填 (7)=o3;euvmod>=2 填 (8)=n2,(9)=n,(10)=no,(13)=no2;恒填 (11)=co,(12)=h。
- 计算光吸收系数(第 121–122 行):
call jthermcalc_e107(ig,nlayer,euvmod,rm,nespeuv,tx,iz,zenit,zday)(写入 jfotsout)。
- 总光吸收求和(第 125–135 行):对每层
i、物种 j=1..nabs、区间 indexint=1..ninter: jergs(indexint,j,i)=jfotsout(indexint,j,i)*xabsi(j,i)*fluxtop(indexint)/(0.5e9*freccen(indexint)),jtot(i)+=jergs。
伪代码
hrtherm(ig,nlayer,euvmod,rm,nespeuv,tx,iz,zenit,zday,jtot):
if zenit > 140: # night
jtot(:) = 0; return
jergs=0; xabsi=0; jtot=0
for i=1..nlayer:
xabsi(1,i)=rm(i,i_co2); xabsi(2,i)=rm(i,i_o2); xabsi(3,i)=rm(i,i_o)
xabsi(4,i)=rm(i,i_h2o); xabsi(5,i)=rm(i,i_h2); xabsi(6,i)=rm(i,i_h2o2)
if euvmod>=1: xabsi(7,i)=rm(i,i_o3)
if euvmod>=2: xabsi(8,i)=rm(i,i_n2); xabsi(9,i)=rm(i,i_n)
xabsi(10,i)=rm(i,i_no); xabsi(13,i)=rm(i,i_no2)
xabsi(11,i)=rm(i,i_co); xabsi(12,i)=rm(i,i_h)
call jthermcalc_e107(ig,nlayer,euvmod,rm,nespeuv,tx,iz,zenit,zday) # fills jfotsout
for i=1..nlayer:
jtot(i)=0
for j=1..nabs:
for indexint=1..ninter:
jergs(indexint,j,i)=jfotsout(indexint,j,i)*xabsi(j,i)*fluxtop(indexint)/(0.5e9*freccen(indexint))
jtot(i)=jtot(i)+jergs(indexint,j,i)
参与的主题流程
| 主题 |
参与方式 |
| 热层 EUV 加热 |
euvheat 逐列调用,输出 jtot 供 EUV 加热率;夜间置 0;euvmod 控制参与光吸收的物种范围 |
写法特点
- 固定格式
.F(续行第 1 列 ./$)。
- 物种索引
i_co2..i_n2=1..17 为 PARAMETER 硬编码;源码注释(第 44–45 行)警告必须与 chemthermos.F90 中同名索引一致,否则错物种。
- 旧版索引映射(第 63–75 行)被注释保留。
euvmod 阶梯式启用物种:0=基本 6+co+h;1=+o3;2=+n2/n/no/no2。
- 无
intent 声明;局部 k 声明后未用。
- 归一化常数
0.5e9 硬编码于 jergs 公式。
复现要点
- 物种索引须与
chemthermos.F90 严格一致(源码注释要求);改任一处须同步另一处。
jtot 依赖 param_v4_h::jfotsout(由 jthermcalc_e107 当步写入)、fluxtop/freccen(fluxtop 初始化见 param_read/param_read_e107,freccen 由 param_v4_h 的 fill_data_thermos 设置)。
- 夜间
zenit>140° 直接返回 0,不调用 jthermcalc_e107。
euvmod 决定光吸收物种集,影响 jtot 量级;复现须用相同 euvmod。
- 单位:
jtot 为 erg/s(非 SI),下游 euvheat 负责换算为 K/s 加热率。
待确认
iz 的物理含义与单位(传给 jthermcalc_e107,本例程不直接用其数值)。
0.5e9 归一化常数的来源(erg 与 photon 通量换算)。
相关页面