?? combo.f90
字號:
SUBROUTINE combo ( dz, wliq, wice, t, & dz2, wliq2, wice2, t2 )!=======================================================================! Source file: combo.f90! Original version: Yongjiu Dai, September 15, 1999!! combines two elements and returns the following combined! variabless: dz, t, wliq, wice.! the combined temperature is based on the equation:! the sum of the enthalpies of the two elements = that of the combined element.!!======================================================================= USE PHYCON_MODULE ! physical constants IMPLICIT NONE!-------------------------- Dummy argument -----------------------------! real, INTENT(inout) :: & dz, &! nodal thickness of 1 elements being combined [m] wliq, &! liquid water of element 1 wice, &! ice of element 1 [kg/m2] t ! nodel temperature of elment 1 [K] real, INTENT(in) :: & dz2, &! nodal thickness of 2 elements being combined [m] wliq2, &! liquid water of element 2 [kg/m2] wice2, &! ice of element 2 [kg/m2] t2 ! nodal temperature of element 2 [K]!!----------------------- Local variables ------------------------------! real dzc, &! Total thickness of nodes 1 and 2 (dzc=dz+dz2). wliqc, &! Combined liquid water [kg/m2] wicec, &! Combined ice [kg/m2] tc, &! Combined node temperature [K] h, &! enthalpy of element 1 [J/m2] h2, &! enthalpy of element 2 [J/m2] hc ! temporary!----------------------------------------------------------------------- dzc = dz+dz2 wicec = (wice+wice2) wliqc = (wliq+wliq2) h = (ci*wice+cl*wliq)*(t-tfrz)+dlm*wliq h2 = (ci*wice2+cl*wliq2)*(t2-tfrz)+dlm*wliq2 hc = h + h2 if(hc < 0.)then tc = tfrz + hc/(ci*wicec+cl*wliqc) else if(hc.le.dlm*wliqc)then tc = tfrz else tc = tfrz + (hc - dlm*wliqc)/(ci*wicec+cl*wliqc) endif dz = dzc wice = wicec wliq = wliqc t = tc END SUBROUTINE combo
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -