主程序:cpl/cpl6/main.F90
-> call flux_aoflux_o 从海洋洋流表层速度和大气低层风速计算出风应力
-> call history_write 输出变量
-> use cpl_iocdf_mod 建立netcdf文件
其中history_write是否输出取决于逻辑变量cpl_control_histNow
-> cpl_control_histNow = shr_alarm_isOn(currentDate, histAlarm)
-> histAlarm = alarmInit(hist_option, hist_n, shr_date_initCDate
(hist_date, ns))
其中hist_option控制着耦合器的输出频率,具体参见csm_share/cpl/cpl_control_mod.F90里的
alarmInit函数。cpl6耦合模式中默认是不输出,在设置脚本env_run时,应设置HIST_OPTION为想要的值。在设置好输出频率
后,然后在cpl/cpl6/history_mod.F90里加入
call cpl_iocdf_append(fid,date,bun_aoflux_o)
以输出bun_aoflux_o里的taux和tauy。
主程序:atm/gamil/src/physics/cam1/physpkg.F90
根据COUP_CSM来得到大气底层上的各种通量
->#if ( ! define COUP_CSM )
-> if(.not. aqua_planet) then
-> call atmlnd_drv
-> end if
->#if ( define COUP_SOM )
-> call somoce
->#else
-> call camoce
->#endif
-> call camice
->#endif
->#if ( define COUP_CSM )
-> if(flxave) then !! 模式现在是执行这一段代码(flxave = .true.)
-> call ccsmave
... 设置是否接受和发送数据
-> else
... 设置是否接受和发送数据
-> end if
-> if(dosend) call ccsmsnd
-> if(dorecv) call ccsmrcv
->#endif
-> call diag_surf 输出通量
-> call tphysac 注意风应力是在此子程序中不会被改变
大气中的风应力在耦合模式下通过ccsmrcv从耦合器中获取,并且反号。然后被tphysac当作只读变量使用,具体是传给了vd_intr。而
vertical_diffusion模块通过其接口程序vd_intr获得了风应力,然后传给vdiff,在vdiff中turbulence模块的
接口程序trbintr获取风应力,调用trbintd通过风应力计算ustar。vdiff其它部分中使用风应力计算了模式底层风速。