<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Yanhong,<div><br></div><div>I think that you have the right idea. Your term looks like a restoring term to zero (0 - vVel)*ksol and provided that you actually use apply_forcing_u (check if the preprocessed file appy_forcing.f contains your code still), it should work. Try with k_sol=1/deltaT (which should almost be like setting uVel to zero in the absence of other forcing) or k_sol = 1/(2*deltaT) to see if there’s any effect.</div><div><br></div><div>A different way without editing the main code would be to use the rbcs package, where you could specify a field of ksol and add a condition in rbcs_add_tendency.F, maybe that’s a little “safer”?</div><div><br></div><div>Martin</div><div><br><div><br><blockquote type="cite"><div>On 10. Oct 2023, at 04:05, 赖燕红 <yhlai@pku.edu.cn> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><p style="font-size:14px;text-wrap:wrap;">
Hello everyone!
</p><p style="font-size:14px;text-wrap:wrap;">
<br>
</p><p style="font-size:14px;text-wrap:wrap;">
I want to reduce u and v to zero in regions where the temperature is lower than 1700 K.
</p><p style="font-size:14px;text-wrap:wrap;">
I tried to realize this goal by adding a linear drag in model/src/apply_forcing.F,
</p><p style="font-size:14px;text-wrap:wrap;">
and the following codes are added in the subroutine APPLY_FORCING_U
</p><p style="font-size:14px;text-wrap:wrap;">
<br>
</p><p style="font-size:14px;text-wrap:wrap;">
%%%%%%%%%%%%
</p><p style="font-size:14px;text-wrap:wrap;">
_RL T_sol<br>
_RL k_sol
</p><p style="font-size:14px;text-wrap:wrap;">
T_sol = 1700<br>
k_sol = 1/86400
</p><p style="font-size:14px;text-wrap:wrap;">
<br>
</p>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;"> DO j=0,sNy+1
DO i=1,sNx+1
IF ( theta(i,j,k,bi,bj) .LE. T_sol ) THEN
gU_arr(i,j) = gU_arr(i,j)
& -uVel(i,j,k,bi,bj)*k_sol
ENDIF
ENDDO
ENDDO</pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">%%%%%%%%%%%</pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;"></pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">But these codes seems do not work, and results are the same to the case without these additional codes, </pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">that is to say U in regions with T<T_sol did not reduce to zero,</pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">Do you know what's wrong with these codes?</pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">Or is it possible to directly set the velocity equal to zero in regions where temperature below 1700 K ?</pre>
<pre wrap="soft" style="font-size:14px;font-family:SimSun;overflow-wrap:break-word;">
Looking forward to your suggestions! Thanks in advance.
Best,
Yanhong </pre>_______________________________________________<br>MITgcm-support mailing list<br>MITgcm-support@mitgcm.org<br>http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support<br></div></blockquote></div><br></div></body></html>