108 REAL,
DIMENSION(nt,np),
INTENT(in) :: &
110 TYPE(t_mxl),
DIMENSION(np),
INTENT(in) :: &
112 TYPE(t_tfl),
DIMENSION(np),
INTENT(inout) :: &
114 REAL,
DIMENSION(nt,np),
OPTIONAL,
INTENT(in) :: &
119 REAL,
DIMENSION(nt,np) :: &
120 zaux,zsml,zssh,zdmass,zsalt
121 REAL,
parameter :: ssmr=34.
128 IF ( present(pdmass) )
THEN
129 zdmass(:,:) = pdmass(:,:)
134 IF ( present(psalt) )
THEN
135 zsalt(:,:) = psalt(:,:)
149 zsml(:,:) = spread( tpmxl(:)%sml,1,nt )
150 IF ( ncdlssh==1 )
THEN
151 zssh(:,:) = spread( tpmxl(:)%ssh,1,nt )
156 IF ( nsalflx==1 )
THEN
157 tptfl(:)%cio = tptfl(:)%cio - &
158 sum( zdmass(:,:) - pqsalt(:,:)/amax1( zsml(:,:),epsil1 ), &
166 ELSE IF ( nsalflx==2 )
THEN
167 zaux(:,:) = 1. / ( rhofw + zsalt(:,:) )
168 tptfl(:)%cio = tptfl(:)%cio - &
169 sum( ( rhoice*zdmass(:,:)*zaux(:,:) - &
170 rhoice/rhosw * pqsalt(:,:)/amax1( zsml(:,:),epsil1 ) ) / &
171 ( 1. - zaux(:,:)*zdmass(:,:)/( rn_htopoc+zssh(:,:) ) ), &
178 ELSE IF ( nsalflx==3 )
THEN
179 zaux(:,:) = 1. / ( rhofw + zsalt(:,:) )
180 tptfl(:)%cio = tptfl(:)%cio - &
181 sum( ( rhoice*zdmass(:,:)*zaux(:,:) - &
182 rhoice/rhosw * pqsalt(:,:)/ssw0 ) / &
183 ( 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 ), &
195 ELSE IF ( nsalflx==5 )
THEN
196 tptfl(:)%cio = tptfl(:)%cio - &
197 sum( zdmass(:,:), dim=1) / dtt
subroutine glt_salflx_r(pqsalt, tpmxl, tptfl, pdmass, psalt)