dust_param_mod.F90
路径
LMDZ.MARS\libf\phymars\dust_param_mod.F90
所属目录/模块
libf\phymars
文件定位
该文件定义尘埃循环的共享配置模块 dust_param_mod(51 行)。它集中保存控制尘埃方案的逻辑开关(是否辐射活性、是否两矩方案、是否升华注入、是否自由尘埃等)、尘埃 bin 数 dustbin、参考气压常数 odpref、尘埃缩放模式 dustscaling_mode,以及两个按格点分配的缩放数组 tauscaling、dust_rad_adjust。模块还提供分配/释放这两个数组的 ini_dust_param_mod、end_dust_param_mod 例程。
这些开关由 conf_phys(读取 callphys.def)写入,被 15+ 个 phymars 文件(aeropacity、dust_scaling、dust_rad_adjust、read_dust_scenario、initracer、phyetat0/phyredem 等)读取,是尘埃循环的中心配置枢纽。
定义的符号
| 符号 |
类型 |
行号 |
作用 |
dust_param_mod |
module |
1 |
尘埃循环配置开关与缩放状态模块 |
active |
logical SAVE |
4 |
尘埃是否辐射活性 |
doubleq |
logical SAVE |
5 |
是否用两矩方案(需 dustbin>=2) |
submicron |
logical SAVE |
6 |
是否包含次微米尘埃二次分布 |
lifting |
logical SAVE |
7 |
是否激活地表尘埃注入 |
freedust |
logical SAVE |
8 |
真则不对尘埃质量/数量做 tauscaling 重缩放 |
callddevil |
logical SAVE |
9 |
是否激活尘卷风参数化 |
reff_driven_IRtoVIS_scenario |
logical SAVE |
10 |
用 GCM 尘埃粒径把 IR 场景转 VIS |
dustbin |
integer SAVE |
15 |
尘埃 tracer bin 数 |
odpref |
real PARAMETER |
19 |
DOD 参考气压 610 Pa |
tauscaling |
real SAVE ALLOCATABLE(:) |
22 |
qdust/Ndust 转换(缩放)因子,按格点 |
dustscaling_mode |
integer SAVE |
23 |
尘埃缩放模式:0=不缩放(freedust),1=GCM5.3 prescribed,2=仅辐射缩放 |
dust_rad_adjust |
real SAVE ALLOCATABLE(:) |
27 |
尘埃辐射缩放因子,按格点 |
t_scenario_sol |
real PARAMETER |
28 |
tau_pref_scenario 视为精确的当日时刻 14/24 sol |
ini_dust_param_mod |
subroutine |
35 |
按 ngrid 分配 tauscaling、dust_rad_adjust |
end_dust_param_mod |
subroutine |
44 |
释放 tauscaling、dust_rad_adjust |
依赖的模块
| use 模块 |
only 列表 |
用途 |
待确认 |
| 无 |
- |
本模块不 use 任何其它模块 |
否 |
调用的关键例程
| 被调用例程 |
所在模块/文件 |
调用位置 |
作用 |
| 无 |
- |
- |
ini/end 例程只用 Fortran intrinsic allocate/deallocate/allocated |
输入
| 输入 |
来源 |
类型/维度 |
单位 |
含义 |
ngrid |
phys_state_var_init(调用 ini_dust_param_mod) |
integer scalar |
- |
水平格点数,用于分配缩放数组 |
| 各开关值 |
conf_phys(getin_p 读 callphys.def) |
logical/integer |
- |
dustbin/active/doubleq/submicron/freedust/callddevil/dustscaling_mode/reff_driven_IRtoVIS_scenario |
输出
| 输出 |
去向 |
类型/维度 |
单位 |
含义 |
tauscaling(ngrid) |
dust_scaling/dust_rad_adjust/aeropacity/read_dust_scenario/restart 等 |
real array |
- |
尘埃质量/数量缩放因子 |
dust_rad_adjust(ngrid) |
dust_rad_adjust/aeropacity 等 |
real array |
- |
尘埃辐射缩放因子 |
| 开关/常数 |
15+ phymars 文件 |
混合 |
- |
作为共享只读配置被广泛读取 |
共享状态与副作用
- 全部为 module 级
SAVE 变量;active/doubleq/submicron/lifting/freedust/callddevil、dustbin、tauscaling/dustscaling_mode/dust_rad_adjust 标为 THREADPRIVATE(行 12-13、17、31)。注意 reff_driven_IRtoVIS_scenario 未出现在任何 THREADPRIVATE 列表中(见待确认)。
ini_dust_param_mod 分配 tauscaling、dust_rad_adjust;end_dust_param_mod 释放它们。由 phys_state_var_init(行 184-185,先 end 再 ini)管理生命周期。
- 开关本身不在此模块赋值,由
conf_phys 写入;本模块只声明与持有。
- 无文件 I/O、无日志输出。
核心逻辑
- 模块声明尘埃循环的全部配置开关、
dustbin、参考常数 odpref=610、t_scenario_sol=14/24、缩放模式 dustscaling_mode 与两个缩放数组。
ini_dust_param_mod(ngrid):allocate(tauscaling(ngrid))、allocate(dust_rad_adjust(ngrid))。
end_dust_param_mod:若已分配则 deallocate 两数组(幂等保护)。
伪代码
module dust_param_mod:
declare SAVE switches: active, doubleq, submicron, lifting,
freedust, callddevil, reff_driven_IRtoVIS_scenario
declare SAVE dustbin, dustscaling_mode
parameter odpref = 610. ! DOD 参考气压 (Pa)
parameter t_scenario_sol = 14/24.
allocatable tauscaling(:), dust_rad_adjust(:)
subroutine ini_dust_param_mod(ngrid):
allocate tauscaling(ngrid), dust_rad_adjust(ngrid)
subroutine end_dust_param_mod:
if allocated: deallocate tauscaling, dust_rad_adjust
参与的主题流程
| 主题 |
参与方式 |
| 尘埃循环 |
提供全套尘埃方案开关、bin 数、缩放模式与缩放因子数组,是尘埃循环的中心配置枢纽 |
| 辐射 |
odpref、freedust、reff_driven_IRtoVIS_scenario、tauscaling、dust_rad_adjust 供 aeropacity 计算光学厚度与缩放 |
写法特点
- 自由格式 Fortran 90(
.F90)。
- 大量 module 级
SAVE + THREADPRIVATE,OpenMP 下每线程各持一份。
odpref、t_scenario_sol 为编译期 PARAMETER 常数。
end_dust_param_mod 用 if (allocated(...)) 做幂等释放保护。
- 开关与状态分离:声明在此,赋值在
conf_phys,分配在 phys_state_var_init。
复现要点
odpref=610 Pa:所有 tau_pref_* 尘埃柱光学厚度的参考气压。
t_scenario_sol=14/24:场景 DOD 视为精确的当日时刻(约 14:00 LT),供 compute_dtau/dust_rad_adjust 时间插值。
dustscaling_mode:0=freedust 不缩放,1=GCM5.3 prescribed(用 tauscaling),2=仅辐射缩放(用 dust_rad_adjust)。conf_phys 中:dustscaling_mode=1 与 freedust 不兼容、dustscaling_mode=2 与 iaervar=1 不兼容(行 570-576)。
active 要求 dustbin>=1;doubleq 要求 dustbin=2(conf_phys 校验)。
- 缩放数组按
ngrid 分配,restart 路径(phyetat0/phyredem)会读写 tauscaling。
待确认
- 行 10 的
reff_driven_IRtoVIS_scenario 是 LOGICAL,SAVE,但未出现在任何 !$OMP THREADPRIVATE 列表中(行 12-13 的 THREADPRIVATE 只含 active,doubleq,submicron,lifting,freedust,callddevil)。推断:它在 OpenMP 下为线程间共享而非私有;由于它只在 conf_phys 一次性设定且运行中只读,共享通常无害,但与同组其它开关的 THREADPRIVATE 处理不一致,复现并行行为时需留意。
相关页面