1 |
jmc |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/atm_compon_interf/atm_store_thsice.F,v 1.1 2013/09/11 20:17:27 jmc Exp $ |
2 |
jmc |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "PACKAGES_CONFIG.h" |
5 |
|
|
#include "CPP_OPTIONS.h" |
6 |
|
|
|
7 |
|
|
CBOP |
8 |
|
|
C !ROUTINE: ATM_STORE_THSICE |
9 |
|
|
C !INTERFACE: |
10 |
|
|
SUBROUTINE ATM_STORE_THSICE( |
11 |
|
|
I bi, bj, |
12 |
|
|
I myTime, myIter, myThid ) |
13 |
|
|
|
14 |
|
|
C !DESCRIPTION: \bv |
15 |
|
|
C *==========================================================* |
16 |
|
|
C | SUBROUTINE ATM_STORE_THSICE |
17 |
|
|
C | o Routine for saving Sea-Ice fields from thSIce pkg |
18 |
|
|
C | for export to coupling layer. |
19 |
|
|
C *==========================================================* |
20 |
|
|
C | This version interfaces to the THSICE package. |
21 |
|
|
C *==========================================================* |
22 |
|
|
C \ev |
23 |
|
|
|
24 |
|
|
C !USES: |
25 |
|
|
IMPLICIT NONE |
26 |
|
|
|
27 |
|
|
C == Global variables == |
28 |
|
|
#include "SIZE.h" |
29 |
|
|
|
30 |
|
|
#include "EEPARAMS.h" |
31 |
|
|
#include "PARAMS.h" |
32 |
jmc |
1.2 |
#include "ATMIDS.h" |
33 |
jmc |
1.1 |
#include "CPL_PARAMS.h" |
34 |
|
|
#ifdef ALLOW_THSICE |
35 |
|
|
# include "THSICE_PARAMS.h" |
36 |
|
|
# include "THSICE_VARS.h" |
37 |
|
|
#endif |
38 |
|
|
C == Global variables for coupling interface == |
39 |
|
|
#include "ATMCPL.h" |
40 |
|
|
|
41 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
42 |
|
|
C bi, bj :: Tile indices |
43 |
|
|
C myTime :: Current model time |
44 |
|
|
C myIter :: Current timestep number |
45 |
|
|
C myThid :: my Thread Id number |
46 |
|
|
INTEGER bi, bj |
47 |
|
|
_RL myTime |
48 |
|
|
INTEGER myIter |
49 |
|
|
INTEGER myThid |
50 |
|
|
CEOP |
51 |
|
|
|
52 |
|
|
#ifdef ALLOW_THSICE |
53 |
|
|
C !LOCAL VARIABLES: |
54 |
|
|
C i, j :: Loop counters |
55 |
|
|
INTEGER i,j |
56 |
|
|
_RL cplTimeFraction |
57 |
|
|
|
58 |
|
|
C o Accumulate Sea-Ice Mass from thSIce pkg that will be exported |
59 |
|
|
C to the coupling layer. seaIceMass is per surface unit, in kg/m2. |
60 |
|
|
c cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
61 |
|
|
c seaIceTime(bi,bj) = seaIceTime(bi,bj) + cplTimeFraction |
62 |
|
|
C- Needs really to store the last time-step value and not the average |
63 |
|
|
cplTimeFraction = 1. _d 0 |
64 |
|
|
seaIceTime(bi,bj) = cplTimeFraction |
65 |
|
|
DO j=1,sNy |
66 |
|
|
DO i=1,sNx |
67 |
|
|
c seaIceMass(i,j,bi,bj) = seaIceMass(i,j,bi,bj) + |
68 |
|
|
seaIceMass(i,j,bi,bj) = |
69 |
|
|
& ( snowHeight(i,j,bi,bj)*rhos |
70 |
|
|
& + iceHeight(i,j,bi,bj)*rhoi |
71 |
|
|
& )*iceMask(i,j,bi,bj)*cplTimeFraction |
72 |
|
|
ENDDO |
73 |
|
|
ENDDO |
74 |
|
|
|
75 |
jmc |
1.2 |
IF ( atmCpl_exchange_DIC ) THEN |
76 |
jmc |
1.1 |
C o Accumulate Sea-Ice concentration (no-units) from thSIce pkg |
77 |
|
|
C that will be exported to the coupling layer. |
78 |
|
|
cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter) |
79 |
|
|
fracIceTime(bi,bj) = fracIceTime(bi,bj) + cplTimeFraction |
80 |
|
|
DO j=1,sNy |
81 |
|
|
DO i=1,sNx |
82 |
|
|
fracIce(i,j,bi,bj) = fracIce(i,j,bi,bj) |
83 |
|
|
& + iceMask(i,j,bi,bj)*cplTimeFraction |
84 |
|
|
ENDDO |
85 |
|
|
ENDDO |
86 |
jmc |
1.2 |
ENDIF |
87 |
jmc |
1.1 |
|
88 |
|
|
#endif /* ALLOW_THSICE */ |
89 |
|
|
|
90 |
|
|
RETURN |
91 |
|
|
END |