109 REAL,
DIMENSION(nt,nx,ny),
INTENT(in) :: &
111 TYPE(t_mxl),
DIMENSION(nx,ny),
INTENT(in) :: &
113 TYPE(t_tfl),
DIMENSION(nx,ny),
INTENT(inout) :: &
115 REAL,
DIMENSION(nt,nx,ny),
OPTIONAL,
INTENT(in) :: &
120 REAL,
DIMENSION(nt,nx,ny) :: &
121 zaux,zsml,zssh,zdmass,zsalt
122 REAL,
parameter :: ssmr=34.
129 IF ( present(pdmass) )
THEN
130 zdmass(:,:,:) = pdmass(:,:,:)
135 IF ( present(psalt) )
THEN
136 zsalt(:,:,:) = psalt(:,:,:)
150 zsml(:,:,:) = spread( tpmxl(:,:)%sml,1,nt )
151 IF ( ncdlssh==1 )
THEN
152 zssh(:,:,:) = spread( tpmxl(:,:)%ssh,1,nt )
157 IF ( nsalflx==1 )
THEN
158 tptfl(:,:)%cio = tptfl(:,:)%cio - &
159 sum( zdmass(:,:,:) - pqsalt(:,:,:)/amax1( zsml(:,:,:),epsil1 ), &
167 ELSE IF ( nsalflx==2 )
THEN
168 zaux(:,:,:) = 1. / ( rhofw + zsalt(:,:,:) )
169 tptfl(:,:)%cio = tptfl(:,:)%cio - &
170 sum( ( rhoice*zdmass(:,:,:)*zaux(:,:,:) - &
171 rhoice/rhosw * pqsalt(:,:,:)/amax1( zsml(:,:,:),epsil1 ) ) / &
172 ( 1. - zaux(:,:,:)*zdmass(:,:,:)/( rn_htopoc+zssh(:,:,:) ) ), &
179 ELSE IF ( nsalflx==3 )
THEN
180 zaux(:,:,:) = 1. / ( rhofw + zsalt(:,:,:) )
181 tptfl(:,:)%cio = tptfl(:,:)%cio - &
182 sum( ( rhoice*zdmass(:,:,:)*zaux(:,:,:) - &
183 rhoice/rhosw * pqsalt(:,:,:)/ssw0 ) / &
184 ( 1. - zaux(:,:,:)*zdmass(:,:,:)/( rn_htopoc+zssh(:,:,:) ) ), &
189 ELSE IF ( nsalflx==4 )
THEN
190 tptfl(:,:)%cio = tptfl(:,:)%cio - &
191 sum( zdmass(:,:,:) * (ssmr - sice)/amax1( zsml(:,:,:),epsil1 ), &
subroutine glt_salflx(pqsalt, tpmxl, tptfl, pdmass, psalt)