subroutine exitinlet
use modglobal, only : iinletgen,lstoreplane,ltempeq
if (iinletgen==1) then
deallocate(Uinl,Winl,Urec,Wrec,u0inletbc,v0inletbc,w0inletbc,zirf,ziif,ziih,zirh,zorf,zoif,zorh,zoih,loclowif,locupif,loclowih,locupih,loclowof,locupof,loclowoh,locupoh,uminletbc,vminletbc,wminletbc,u0inletbcold,v0inletbcold,w0inletbcold,Utav,upupavinl,vpvpavinl,wpwpavinl,upwpavinl,thlpthlpavinl,thlpupavinl,thlpwpavinl)
if (ltempeq ) then
deallocate(t0inletbc,tminletbc,t0inletbcold,loclowot,locupot,zotr,zoti,Tinl,Trec)
end if
if (lstoreplane ) then
deallocate(storeu0inletbc,storev0inletbc,storew0inletbc)
if (ltempeq ) then
deallocate(storet0inletbc)
end if
end if
else if (iinletgen == 2) then
deallocate(storeu0inletbc,storev0inletbc,storew0inletbc,u0inletbc,v0inletbc,w0inletbc,uminletbc,vminletbc,wminletbc,u0inletbcold,v0inletbcold,w0inletbcold)
if (ltempeq ) then
deallocate(t0inletbc,tminletbc,t0inletbcold,storet0inletbc)
end if
end if
end subroutine exitinlet