if(UTBL) then if(FIRST) then FIRST = .false. call ESINIT end if if (TX<=TMINTBL) then EX=ESTBLE(1) if(present(DQ)) DDQ = 0.0 elseif(TX>=ZEROC ) then EX=ESTFRZ if(present(DQ)) DDQ = 0.0 else TT = (TX - TMINTBL)*DEGSUBS+1 IT = int(TT) DDQ = ESTBLE(IT+1) - ESTBLE(IT) EX = ((TT-IT)*DDQ + ESTBLE(IT)) end if if(present(PL)) then if(PX > EX) then DD = (ESFAC/(PX - (1.0-ESFAC)*EX)) EX = EX*DD if(present(DQ)) DX = DDQ*ERFAC*PX*DD*DD else EX = MAX_MIXING_RATIO if(present(DQ)) DX = 0.0 end if else if(present(DQ)) DX = DDQ end if else ! Exact Formulation if (TXZEROC ) then TI = ZEROC else TI = TX end if #include "esatice.code" if(present(DQ)) then if (TXZEROC ) then DDQ = 0.0 else if(PX>EX) then DD = EX TI = TX + DELTA_T #include "esatice.code" DDQ = EX-DD EX = DD endif end if end if if(present(PL)) then if(PX > EX) then DD = ESFAC/(PX - (1.0-ESFAC)*EX) EX = EX*DD if(present(DQ)) DX = DDQ*ERFAC*PX*DD*DD else EX = MAX_MIXING_RATIO if(present(DQ)) DX = 0.0 end if else if(present(DQ)) DX = DDQ*(1.0/DELTA_T) end if end if