private pure subroutine drain_avail_scale_x(nx, ny, nz, scratch, uhtr)
Scale each interior x-face transport by its INFLOW-receiving cell’s
factor (drain_avail_limit step 2). Face i between cell (i-1) and
cell (i): uhtr(i)>0 ⇒ receiver i, uhtr(i)<0 ⇒ receiver i-1.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
integer,
private
::
i
integer,
private
::
j
integer,
private
::
k
real(kind=wp),
private
::
sfac
Source Code
pure subroutine drain_avail_scale_x(nx,ny,nz,scratch,uhtr)!! Scale each interior x-face transport by its INFLOW-receiving cell's!! factor (drain_avail_limit step 2). Face i between cell (i-1) and!! cell (i): uhtr(i)>0 ⇒ receiver i, uhtr(i)<0 ⇒ receiver i-1.integer,intent(in)::nx,ny,nzreal(wp),intent(in)::scratch(nx,ny,nz)real(wp),intent(inout)::uhtr(nx+1,ny,nz)integer::i,j,kreal(wp)::sfacdoconcurrent(k=1:nz,j=1:ny,i=2:nx)local(sfac)if(uhtr(i,j,k)>0.0_wp)thensfac=scratch(i,j,k)else if(uhtr(i,j,k)<0.0_wp)thensfac=scratch(i-1,j,k)elsesfac=1.0_wpend ifuhtr(i,j,k)=uhtr(i,j,k)*sfacend do end subroutine drain_avail_scale_x