Changeset 1531 for palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex
- Timestamp:
- Jan 26, 2015 1:58:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/TUTORIAL/SOURCE/user_defined_code.tex
r1515 r1531 616 616 \texttt{!-- No calls for single grid points are allowed at locations before and}\\ 617 617 \texttt{!-- after the timestep, since these calls are not within an i,j-loop}\\ 618 ~~~~~~ ~\texttt{SELECT CASE ( location )}\\618 ~~~~~~\texttt{SELECT CASE ( location )}\\ 619 619 \texttt{...}\\ 620 620 ~~~~~~~~~~\texttt{CASE ( 'after\_timestep' )}\\ 621 621 \texttt{!}\\ 622 \texttt{!-- Enter actions to be done after every timestep here}\\622 \texttt{!-- \hspace{6mm}Enter actions to be done after every timestep here}\\ 623 623 \par\medskip 624 624 ~~~~~~~~~~\texttt{CASE ( 'u-tendency' )}\\ 625 625 \texttt{!}\\ 626 \texttt{!-- Enter actions to be done in the u-tendency term here}\\627 ~~~~~~~~~~~~~ \texttt{\textcolor{blue}{DO i = nxl, nxr}}\\628 ~~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{DO j = nys, nyn}}\\629 ~~~~~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{DO k = nxb+1, nzt}}\\630 ~~~~~~~~~~~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{tend(k,j,i) = tend(k,j,i) - const * u(k,j,i) ...}}\\631 ~~~~~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{ENDDO}}\\632 ~~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{ENDDO}}\\633 ~~~~~~~~~~~~~ \texttt{\textcolor{blue}{ENDDO}}\\626 \texttt{!-- \hspace{6mm}Enter actions to be done in the u-tendency term here}\\ 627 ~~~~~~~~~~~~~~\texttt{\textcolor{blue}{DO i = nxl, nxr}}\\ 628 ~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{DO j = nys, nyn}}\\ 629 ~~~~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{DO k = nxb+1, nzt}}\\ 630 ~~~~~~~~~~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{tend(k,j,i) = tend(k,j,i) - const * u(k,j,i) ...}}\\ 631 ~~~~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{ENDDO}}\\ 632 ~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{ENDDO}}\\ 633 ~~~~~~~~~~~~~~\texttt{\textcolor{blue}{ENDDO}}\\ 634 634 \par\bigskip 635 635 ~~~~~~~~~~\texttt{CASE ( 'v-tendency' )}\\ … … 671 671 \node [yellow,shift={(9.2 cm,3.0cm)}] at (current page.south west){~\texttt{SUBROUTINE user\_actions\_ij( i, j, location )}\\ 672 672 \par\medskip 673 ~~~ \texttt{USE control\_parameters}\\674 ~~~ \texttt{USE pegrid}\\675 ~~~ \texttt{USE user}\\673 ~~~~~~\texttt{USE control\_parameters}\\ 674 ~~~~~~\texttt{USE pegrid}\\ 675 ~~~~~~\texttt{USE user}\\ 676 676 \par\medskip 677 ~~~ \texttt{IMPLICIT NONE}\677 ~~~~~~\texttt{IMPLICIT NONE}\ 678 678 \par\medskip 679 ~~~ \texttt{CHARACTER (LEN=*) :: location}\\679 ~~~~~~\texttt{CHARACTER (LEN=*) :: location}\\ 680 680 \par\medskip 681 ~~~ \texttt{INTEGER(iwp) :: i, idum, j}\\681 ~~~~~~\texttt{INTEGER(iwp) :: i, idum, j}\\ 682 682 \par\medskip 683 683 \texttt{!}\\ 684 684 \texttt{!-- Here the user-defined actions follow}\\ 685 685 \vspace{0.5mm} 686 ~~~ \texttt{SELECT CASE ( location )}\\686 ~~~~~~\texttt{SELECT CASE ( location )}\\ 687 687 \par\medskip 688 ~~~~~~ \texttt{CASE ( 'u-tendency' )}\\688 ~~~~~~~~~\texttt{CASE ( 'u-tendency' )}\\ 689 689 \texttt{!}\\ 690 \texttt{!--Enter actions to be done in the u-tendency term here}\\691 ~~~~~~~~~ \texttt{\textcolor{blue}{DO k = nzb+1, nzt-1}}\\692 ~~~~~~~~~~~~~~~ \texttt{\textcolor{blue}{tend(k,j,i) = tend(k,j,i) + ...}}\\693 ~~~~~~~~~ \texttt{\textcolor{blue}{ENDDO}}\\690 ~~~~~~\texttt{!-- Enter actions to be done in the u-tendency term here}\\ 691 ~~~~~~~~~~~~\texttt{\textcolor{blue}{DO k = nzb+1, nzt-1}}\\ 692 ~~~~~~~~~~~~~~~~~~\texttt{\textcolor{blue}{tend(k,j,i) = tend(k,j,i) + ...}}\\ 693 ~~~~~~~~~~~~\texttt{\textcolor{blue}{ENDDO}}\\ 694 694 \par\medskip 695 ~~~~~~ \texttt{CASE ( 'v-tendency' )}};695 ~~~~~~~~~\texttt{CASE ( 'v-tendency' )}}; 696 696 % {% 697 697 % \begin{tikzpicture}[remember picture, overlay]
Note: See TracChangeset
for help on using the changeset viewer.