euvheat.F90
路径
LMDZ.MARS\libf\aeronomars\euvheat.F90
所属目录/模块
libf\aeronomars
文件定位
euvheat.F90 定义 euvheat_mod,提供热层 EUV 吸收加热例程 euvheat。它在 thermosphere_mod 的 calleuv 分支下逐格点调用:先用输入温度/示踪物及其当前倾向外推到时间步末,再把质量混合比转换成数密度矩阵 rm,调用 hrtherm 得到每层总光吸收 jtot,最后用 callkeys_mod::euveff、cpnew/rnew/pplay/zt 把 jtot 换算为温度倾向 pdteuv。
该文件处在 thermosphere_mod -> euvheat -> hrtherm -> jthermcalc_e107 链路中;thermosphere_mod 随后把 pdteuv 累加回 pdt,且热传导 conduction 会看到已包含 EUV 的预测温度。
定义的符号
| 符号 |
类型 |
行号 |
作用 |
euvheat_mod |
module |
1(END MODULE 454) |
包装 EUV 加热例程 |
euvheat |
subroutine |
7(END SUBROUTINE 452) |
计算 EUV 加热温度倾向 pdteuv(ngrid,nlayer) |
i_co2..i_n2 |
integer parameters |
86-102 |
热层化学/EUV 物种槽位,源码要求与 chemthermos.F90、hrtherm.F 等保持一致 |
nespeuv,euvmod,rm,g_*,firstcall |
saved local state |
63, 66, 67, 123-143, 145 |
首次调用缓存物种数、EUV 模式、数密度矩阵和 GCM tracer 索引 |
依赖的模块
| use 模块 |
only 列表 |
用途 |
待确认 |
tracer_mod |
igcm_co2, igcm_co, igcm_o, igcm_o1d, igcm_o2, igcm_h, igcm_h2, igcm_oh, igcm_ho2, igcm_h2o2, igcm_h2o_vap, igcm_o3, igcm_n2, igcm_n, igcm_no, igcm_no2, igcm_n2d, mmol |
读取 GCM tracer 索引和摩尔质量,用于检查必须物种并把质量混合比转为数密度 |
traceur.def 中具体 tracer 顺序由 tracer_mod/initracer 路径决定 |
conc_mod |
rnew, cpnew |
用比气体常数和定压比热计算密度与 K/s 温度倾向 |
- |
hrtherm_mod |
hrtherm |
计算每层总光吸收 jtot |
- |
callkeys_mod |
euveff |
EUV 加热效率,参与 pdteuv 换算 |
其配置读取在 conf_phys,本页只记录消费点 |
调用的关键例程
| 被调用例程 |
所在模块/文件 |
调用位置 |
作用 |
hrtherm |
hrtherm_mod / hrtherm.F |
430 |
按太阳天顶角、日期、温度和数密度计算 jtot(nlayer);夜间返回 0 |
输入
| 输入 |
来源 |
类型/维度 |
单位 |
含义 |
ngrid,nlayer,nq |
thermosphere_mod |
integer |
- |
水平格点数、层数、tracer 数 |
pt |
thermosphere_mod |
real (ngrid,nlayer) |
K |
当前温度 |
pdt |
thermosphere_mod |
real (ngrid,nlayer) |
K/s |
已有温度倾向,用于外推 zt=pt+pdt*ptimestep |
pplev,pplay |
thermosphere_mod |
real (ngrid,nlayer+1) / (ngrid,nlayer) |
Pa |
界面/层中压力;pplev 传入但本例程不直接使用 |
zzlay |
thermosphere_mod |
real (ngrid,nlayer) |
m |
层中高度,转为 km 传给 hrtherm |
mu0 |
thermosphere_mod |
real (ngrid) |
- |
太阳天顶角余弦,转换为角度 zenit |
ptimestep |
thermosphere_mod |
real |
s |
物理时间步 |
zday |
thermosphere_mod |
real |
sol |
自 Ls=0 起的日期,传给 hrtherm |
pq,pdq |
thermosphere_mod |
real (ngrid,nlayer,nq) |
kg/kg_air, kg/kg_air/s |
当前 tracer 质量混合比及倾向,用于外推 zq=pq+pdq*ptimestep |
rnew,cpnew |
conc_mod |
real (ngrid,nlayer) |
J/kg/K, J/kg/K |
比气体常数和定压比热 |
euveff |
callkeys_mod |
real |
- |
EUV 加热效率 |
mmol |
tracer_mod |
real (nq) |
g/mol 或源码约定 |
各 tracer 摩尔质量,用于数密度换算 |
输出
| 输出 |
去向 |
类型/维度 |
单位 |
含义 |
pdteuv |
thermosphere_mod |
real (ngrid,nlayer) |
K/s |
EUV 加热温度倾向;thermosphere_mod 第 86 行把它累加进 pdt |
共享状态与副作用
- 首次调用时保存并线程私有化
nespeuv/euvmod/rm/g_* / firstcall;rm 在第 357 行按 (nlayer,nespeuv) 分配,结尾的 deallocate(rm) 被注释,数组跨调用保留。
- 首次调用会检查必需 tracer;缺失 CO2/O/O2/H2/OH/HO2/H2O2/H2O/O1D/CO/H/O3 会
write(*,*) 后 stop。NO 缺失时不停止,只打印“不做 N species in UV heating”;若 NO 存在,则要求 N2/N/NO2/N2D 同时存在,否则停止。
- 首次调用会打印
euvheat: Computing absorption by ... species;错误路径也打印并 stop。
- 不写文件,不调用
getin/abort_physic。
pplev、n 局部变量未在活跃计算中使用;zlocal(1) 连续赋值为 zzlay(ig,1) 与 zzlay(ig,1)/1000.,最终传给 hrtherm 的是 km。
核心逻辑
- 首次调用初始化(第 150-359 行):读取 GCM tracer 索引,按源码硬编码物种槽位检查必需物种;默认
euvmod=0,O3 存在后设为 1,NO 存在后设为 2 并启用 N 族检查;按 euvmod 校验 nespeuv 为 11/12/17。
- 构造时间步末局地状态(第 364-392 行):对参与物种做
zq=pq+pdq*ptimestep;温度做 zt=pt+pdt*ptimestep。若 euvmod 越界则打印并 stop。
- 逐格点准备辐射输入(第 395-428 行):
zenit=acos(mu0)*180/pi;密度 dens=pplay/(rnew*zt)/1.66e-21;把各物种质量混合比除以 mmol 后填入 rm(l,i_*);高度 zzlay 转为 km,温度拷贝到 tx。
- 调用光吸收核(第 430 行):
call hrtherm(ig,nlayer,euvmod,rm,nespeuv,tx,zlocal,zenit,zday,jtot),得到每层 jtot。夜间置零由 hrtherm 内部处理。
- 换算温度倾向(第 440-442 行):
pdteuv=euveff*jtot/10/(cpnew*pplay/(rnew*zt))。源码注释说明太阳距离修正不在这里乘,因为 flujo.F 中的太阳通量已修正。
伪代码
euvheat(...):
if firstcall:
read required tracer indexes from tracer_mod
stop if mandatory C/O/H/O3 species are missing
if NO exists:
euvmod=2 and require N2/N/NO2/N2D
else:
euvmod=1 after mandatory O3 check
check nespeuv count; allocate rm(nlayer,nespeuv); firstcall=false
for each layer and grid:
zq(selected tracers) = pq + pdq*ptimestep
zt = pt + pdt*ptimestep
for each grid column:
zenit = acos(mu0)*180/pi
for each layer:
dens = pplay/(rnew*zt)/1.66e-21
rm(:, selected species) = zq*density/mmol
tx = zt
zlocal = zzlay/1000
call hrtherm(..., rm, tx, zlocal, zenit, zday, jtot)
for each layer:
pdteuv = euveff*jtot/10/(cpnew*pplay/(rnew*zt))
参与的主题流程
| 主题 |
参与方式 |
| 热层 EUV 加热 |
thermosphere_mod 在 calleuv 下调用本例程,本例程输出 zdteuv/pdteuv 并由调用方累加到温度倾向 |
| 热层化学/光吸收 |
使用与 chemthermos.F90、hrtherm.F 一致的物种槽位,向 hrtherm 和 jthermcalc_e107 链路提供数密度输入 |
| 热层过程耦合顺序 |
thermosphere_mod 先累加 EUV 倾向,再进入 callconduct 热传导、callmolvis 分子黏性和 callmoldiff 分子扩散路径 |
写法特点
- 自由格式
.F90 模块,但保留大量固定格式风格续行和旧注释。
rm 是 double precision, allocatable, save,且 THREADPRIVATE;分配后不释放。
euvmod 实际由 tracer 配置决定:O3 缺失会停止,因此正常通过初始化后至少为 1;NO 存在时切到 2 并启用 N 族物种。
euveff 从 callkeys_mod 读取;旧的局部 real euveff 与 euveff=0.16 注释块已停用。
- 源码会校验 OH/HO2/O1D/N2D 等 tracer,但
hrtherm 的可见吸收打包只消费 CO2/O2/O/H2O/H2/H2O2/O3/N2/N/NO/NO2/CO/H;下游 jthermcalc_e107 对完整 rm 的使用需看对应文件页。
复现要点
callthermos 和 calleuv 共同决定是否运行该路径;conf_phys 中还要求 calleuv 依赖 callthermos。
- tracer 列表必须满足源码检查;O3 对
calleuv 是强制项,NO 是 N 族路径开关。
- 物种槽位必须与
chemthermos.F90、hrtherm.F、jthermcalc*、paramfoto_compact.F 同步;源码注释明确要求同步修改。
pdteuv 依赖当前步外推状态 pq+pdq*dt、pt+pdt*dt,因此上游倾向会影响 EUV 加热输入温度和成分。
- 单位换算链路是
jtot(erg/s) -> euveff*jtot/10 -> 除以体积热容 cpnew*pplay/(rnew*zt) 得到 K/s;太阳距离修正不在本例程重复乘。
待确认
1.66e-21 和 /10. 两个换算常数的完整单位推导需结合 hrtherm/jthermcalc_e107 和历史文献确认。
jthermcalc_e107 对 rm 各物种槽位的实际使用范围见 jthermcalc_e107_mod.F,仍需结合具体 chemthermod 配置确认运行分支。
case(0) 的 euvmod 分支在当前 O3 强制检查后是否仍可能到达,待开发者或历史配置确认。
相关页面