nonoro_gwd_ran_mod.F90

路径

LMDZ.MARS\libf\phymars\nonoro_gwd_ran_mod.F90

所属目录 / 模块

libf\phymars

文件定位

nonoro_gwd_ran_mod.F90 定义 FLott/J. Liu 系列的随机非地形重力波动量拖曳模块 nonoro_gwd_ran_mod。它在 physiq_mod.Fcalllott_nonoro 分支中先于 nonoro_gwd_mix_mod 调用,按当前温度、风、压力、密度、Brunt-Vaisala 频率和网格面积构造一组离散重力波,沿垂直方向推进 EP flux,并把通量散度转换成纬向和经向风 tendency。

这个文件只计算动量拖曳:d_t 在出口前被置零,d_ud_v 才会回加到 physiqpdu/pdv。跨时间步记忆由 du_nonoro_gwddv_nonoro_gwd 保存,并通过 phyetat0_mod.F90 / phyredem.F90 从物理重启文件读取和写回。

定义的符号

符号 类型 行号 作用
nonoro_gwd_ran_mod module 1 保存非地形 GW 随机拖曳入口、记忆数组和分配/释放例程
du_nonoro_gwd allocatable save array 5 纬向风非地形 GW tendency 的 AR(1) 记忆项
dv_nonoro_gwd allocatable save array 6 经向风非地形 GW tendency 的 AR(1) 记忆项
east_gwstress allocatable save array 7 东向波应力剖面诊断数组
west_gwstress allocatable save array 8 西向波应力剖面诊断数组
NONORO_GWD_RAN subroutine 14 主计算入口,返回 d_u/d_v 动量拖曳 tendency 和 zustr/zvstr 累积应力
ini_nonoro_gwd_ran subroutine 486 ngrid/nlayer 分配模块保存数组
end_nonoro_gwd_ran subroutine 502 释放模块保存数组

依赖的模块

use 模块 only 列表 用途 待确认
comcstfi_h g, pi, r 重力加速度、圆周率和气体常数;用于高度、波数和密度相关计算 -
ioipsl_getin_p_mod getin_p 首次调用时读取 nonoro_gwd_* 调参键 -
vertical_layers_mod presnivs 用参考半层压力确定可复现的发射层 LAUNCH -
geometry_mod cell_area 用水平网格面积约束最小可解析波数 kstar -
write_output_mod write_output 输出 Brunt-Vaisala 频率、EP flux 和 du/dv_nonoro_gwd 诊断 -

调用的关键例程

被调用例程 所在模块 / 文件 调用位置 作用
getin_p ioipsl_getin_p_mod 167, 170, 176, 179, 182, 185 读取 nonoro_gwd_epflux_max/sat/rdiss/kmax/kmin/xlaunch
abort_physic 外部物理错误处理例程 191, 194 当物理时间步超过 24 h 或 nlayer < NW 时中止
write_output write_output_mod 274, 443-444, 468-469 写出 nonoro_bv、U/V EP flux 和 U/V GW tendency
ini_nonoro_gwd_ran 本文件 phys_state_var_init_mod.F90:176-177 物理状态初始化阶段分配记忆数组
end_nonoro_gwd_ran 本文件 phys_state_var_init_mod.F90:176 重新分配前释放旧数组
NONORO_GWD_RAN 本文件 physiq_mod.F:1776-1783 calllott_nonoro 为真时计算非地形 GW 动量拖曳 tendency

输入

输入 来源 类型/维度 单位 含义
ngrid, nlayer physiq integer scalar - 水平格点数和垂直层数
DTIME physiqptimestep real scalar s 物理时间步
cpnew, rnew physiq 当前热力属性 real (ngrid,nlayer) J kg-1 K-1 层内比热和气体常数
pp physiqzplay real (ngrid,nlayer) Pa 全层压力
zmax_therm physiqzmax_th real (ngrid) m 热羽最大高度;当前源码接口保留但未参与计算
pt, pu, pv physiq 状态 real (ngrid,nlayer) K, m s-1, m s-1 当前温度、纬向风、经向风
pdt, pdu, pdv physiq 已累计 tendency real (ngrid,nlayer) K s-1, m s-2, m s-2 state + DTIME*tendency 构造本方案看到的背景场

输出

输出 去向 类型/维度 单位 含义
zustr, zvstr physiq 局部数组 zustrhi/zvstrhi real (ngrid) 动量通量量纲 垂直积分的 U/V 拖曳应力诊断
d_t physiqd_t_hin,随后加到 pdt real (ngrid,nlayer) K s-1 接口保留;本文件出口前置零
d_u physiqd_u_hin,随后加到 pdu real (ngrid,nlayer) m s-2 非地形 GW 对纬向风的拖曳 tendency
d_v physiqd_v_hin,随后加到 pdv real (ngrid,nlayer) m s-2 非地形 GW 对经向风的拖曳 tendency
du_nonoro_gwd, dv_nonoro_gwd 模块保存状态 / 重启文件 allocatable save arrays m s-2 AR(1) 平滑后的 U/V tendency 记忆项

共享状态与副作用

核心逻辑

  1. 首次调用时设置默认调参:epflux_max=5.E-4sat=1.5rdiss=0.07kmax=1.E-4kmin=7.E-6xlaunch=0.6,再用 getin_p 允许运行配置覆盖。
  2. 检查 DTIME <= DELTATnlayer >= NW,其中 DELTAT=24*3600NW=NK*NP*NO=8
  3. pt/pu/pv + DTIME*pdt/pdu/pdv 得到本方案使用的当前背景温度和风,再由 rho = pp/(rnew*tt) 计算密度。
  4. 构造半层压力 PH、参考半层压力 HREF、对数压力高度 ZH、半层风 UH/VH 和 Brunt-Vaisala 频率 BV
  5. HREF(LL)/HREF(1) > xlaunch 选择发射层 LAUNCH;用 cell_area 形成 kstar=pi/sqrt(cell_area),并用 max(kmin,kstar) 限制波数下限。
  6. NW=8 个离散波,使用背景温度和风场的 MOD(...) 派生方位角、水平波数、相速度、内禀频率和发射层 EP flux。这里不是调用随机数发生器,而是用场变量构造可复现的“随机”特征。
  7. LAUNCH 向上推进 EP flux:每一层同时考虑守恒、rdiss 耗散、内禀频率变号的临界层截断,以及由 sat 控制的饱和上限。
  8. 在发射层以下几层做通量补偿,使总发射通量在低层闭合。
  9. 对 U/V EP flux 做垂直差分,换算为 d_ud_v
  10. DTIME/DELTAT/REAL(NW) 与上一时间步的 du_nonoro_gwd/dv_nonoro_gwd 做 AR(1) 平滑,更新模块记忆数组,并把 d_t 置零。
  11. d_u/d_v、密度和层厚积分,得到 zustr/zvstr 诊断应力。

伪代码

if firstcall:
    read nonoro_gwd_* parameters
    abort if DTIME > 24 h or nlayer < 8

background = state + DTIME * accumulated_tendencies
rho = pressure / (gas_constant * temperature)
build half-level pressure, log-pressure height, half-level winds, BV
LAUNCH = highest reference level with HREF(level) / HREF(surface) > xlaunch

for each wave jw and grid column:
    derive azimuth and horizontal wavenumber from MOD(background fields)
    derive phase speed and intrinsic frequency
    set launch EP flux from epflux_max and local wind magnitude

for level from LAUNCH to model top:
    update intrinsic frequency
    limit EP flux by dissipation, critical level sign change, and saturation
    accumulate zonal and meridional EP flux

close flux below LAUNCH
d_u, d_v = vertical divergence of U/V EP flux
apply AR(1) memory using du_nonoro_gwd and dv_nonoro_gwd
d_t = 0
save updated memory arrays and compute diagnostic stresses

参与的主题流程

主题 参与方式
非地形重力波 calllott_nonoro 打开后,本文件计算随机非地形 GW 动量拖曳
主物理时间步 physiq physiq_mod.F:1774-1816 调用本方案并把 d_t_hin/d_u_hin/d_v_hin 累加到 pdt/pdu/pdv
GW-induced mixing nonoro_gwd_mix_mod 在同一 calllott_nonoro 分支内、且 calljliu_gwimix 为真时接着执行
重启状态 du_nonoro_gwd/dv_nonoro_gwdphyetat0_mod.F90 读取或清零,并由 phyredem.F90 写回

写法特点

复现要点

待确认

相关页面