1 |
jmc |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/salt_plume/salt_plume_do_exch.F,v 1.1 2012/02/04 14:50:24 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "SALT_PLUME_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
CBOP |
7 |
|
|
C !ROUTINE: SALT_PLUME_DO_EXCH |
8 |
|
|
C !INTERFACE: |
9 |
|
|
SUBROUTINE SALT_PLUME_DO_EXCH( |
10 |
|
|
I myTime, myIter, myThid ) |
11 |
|
|
|
12 |
|
|
C !DESCRIPTION: \bv |
13 |
|
|
C *==========================================================* |
14 |
|
|
C | SUBROUTINE SALT_PLUME_DO_EXCH |
15 |
|
|
C | o Apply Exchanges to SALT_PLUME variables when necessary |
16 |
|
|
C *==========================================================* |
17 |
jmc |
1.2 |
C | o If coupled, prior to EXCH call, also apply update |
18 |
|
|
C | from coupling interface |
19 |
|
|
C *==========================================================* |
20 |
jmc |
1.1 |
C \ev |
21 |
|
|
|
22 |
|
|
C !USES: |
23 |
|
|
IMPLICIT NONE |
24 |
|
|
|
25 |
|
|
C == Global variables == |
26 |
|
|
#include "SIZE.h" |
27 |
|
|
#include "EEPARAMS.h" |
28 |
|
|
#include "PARAMS.h" |
29 |
|
|
#include "SALT_PLUME.h" |
30 |
jmc |
1.2 |
#ifdef ALLOW_OCN_COMPON_INTERF |
31 |
|
|
# include "CPL_PARAMS.h" |
32 |
|
|
# include "OCNCPL.h" |
33 |
|
|
#endif /* ALLOW_OCN_COMPON_INTERF */ |
34 |
jmc |
1.1 |
|
35 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
36 |
|
|
C myTime :: Current time in simulation |
37 |
|
|
C myIter :: Current iteration number in simulation |
38 |
|
|
C myThid :: my Thread Id. number |
39 |
|
|
_RL myTime |
40 |
|
|
INTEGER myIter |
41 |
|
|
INTEGER myThid |
42 |
|
|
CEOP |
43 |
|
|
|
44 |
|
|
C !LOCAL VARIABLES: |
45 |
jmc |
1.2 |
#ifdef ALLOW_OCN_COMPON_INTERF |
46 |
|
|
INTEGER bi, bj, i, j |
47 |
|
|
#endif /* ALLOW_OCN_COMPON_INTERF */ |
48 |
|
|
|
49 |
|
|
#ifdef ALLOW_OCN_COMPON_INTERF |
50 |
|
|
c IF ( useSALT_PLUME .AND. useCoupler ) THEN |
51 |
|
|
IF ( useCoupler ) THEN |
52 |
|
|
IF ( useImportSltPlm ) THEN |
53 |
|
|
C- Take a fraction (SPsalFRAC) of the coupler-imported salt-flux |
54 |
|
|
C and apply it to salt-plume array (for vertical redistribution) |
55 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
56 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
57 |
|
|
DO j=1-OLy,sNy+OLy |
58 |
|
|
DO i=1-OLx,sNx+OLx |
59 |
|
|
saltPlumeFlux(i,j,bi,bj) = saltPlmFlx_cpl(i,j,bi,bj) |
60 |
|
|
& * SPsalFRAC |
61 |
|
|
ENDDO |
62 |
|
|
ENDDO |
63 |
|
|
ENDDO |
64 |
|
|
ENDDO |
65 |
|
|
ENDIF |
66 |
|
|
ENDIF |
67 |
|
|
#endif /* ALLOW_OCN_COMPON_INTERF */ |
68 |
jmc |
1.1 |
|
69 |
|
|
IF ( useSALT_PLUME ) THEN |
70 |
|
|
_EXCH_XY_RL( saltPlumeFlux, myThid ) |
71 |
|
|
ENDIF |
72 |
|
|
|
73 |
|
|
RETURN |
74 |
|
|
END |