bilan_dyn.F

路径

LMDZ.COMMON-6.3\LMDZ.COMMON\libf\dyn3d\bilan_dyn.F

文件定位

bilan_dyn.F 定义串行动力守恒与历史诊断例程 bilan_dyn。它累计动量、质量、温度、tracer 通量和若干综合量,在首次调用时通过 IOIPSL 定义输出文件和变量,后续按累计周期写入 history。这个文件不是主推进器,但它会把 leapfrog 过程中的守恒信息落到可检查的诊断场。

Mars 运行参与度

条件经过:串行动力启用对应守恒/诊断输出时经过;Mars 并行版使用 `bilan_dyn_p.F`,Mars 专用入口是否默认开启取决于运行配置。

定义的符号

符号 类型 行号 作用
bilan_dyn subroutine 4 累计并写出动力守恒/通量诊断。

依赖和调用

依赖 用途
IOIPSL histbeg/histvert/histdef/histend/histwrite/histsync 输出诊断文件。
control_mod: planet_type 区分行星类型相关分支。
cpdet_mod: tpot2t 将位温转换为温度。
comvert_mod: ap,bp,presnivs 垂直坐标和输出轴。
comconst_mod: rad,omeg,pi 几何和动力常量。
temps_mod: annee_ref,day_ref 输出文件起始日期。
covcont, enercin, convmas, convflu, vitvert, massbar 速度、动能、通量辐合、垂直速度和质量平均。

输入输出和保存状态

状态 说明
dt_app, dt_cum 诊断应用步长和累计步长。
动力场参数 ucov/vcov/teta/q/masse/ps/phis 等,作为诊断输入。
累计数组 多个 _cum 工作量用于跨步累计。
SAVE first, icum, ncum 控制首次定义 history、当前累计步和累计次数。
输出文件 IOIPSL history 文件,变量包括质量、速度、垂直速度、stream function、tracer tendency 等。

核心流程

  1. 首次调用时打印步长信息,构造经纬度和垂直轴。
  2. 调用 ymds2juhistbeghistvert 初始化 IOIPSL history 文件。
  3. 用多组 histdef 定义 tracer、质量、速度、垂直速度和趋势变量。
  4. 每次调用将当前 flux/state 累加到 _cum 数组。
  5. 需要写出时,调用 covcontenercintpot2tconvmas/convfluvitvertmassbar 派生诊断量。
  6. 多次 histwrite 写出三维或二维变量,最后 histsync 同步。

伪代码

if first:
    define IOIPSL file, vertical axis and all variables
accumulate fluxes and state over dt_cum
if accumulated enough:
    convert covariant to contravariant wind
    compute kinetic energy, temperature, mass means
    compute mass/tracer flux convergence and vertical velocity
    write all diagnostic variables
    reset or advance accumulation counters

复现要点

待确认

相关页面