/[MITgcm]/MITgcm/pkg/atm_compon_interf/atm_store_thsice.F
ViewVC logotype

Diff of /MITgcm/pkg/atm_compon_interf/atm_store_thsice.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by jmc, Fri Nov 20 22:50:53 2015 UTC revision 1.5 by jmc, Wed Jan 6 00:51:58 2016 UTC
# Line 28  C     == Global variables == Line 28  C     == Global variables ==
28    
29  #include "EEPARAMS.h"  #include "EEPARAMS.h"
30  #include "PARAMS.h"  #include "PARAMS.h"
 #include "ATMIDS.h"  
31  #include "CPL_PARAMS.h"  #include "CPL_PARAMS.h"
32  #ifdef ALLOW_THSICE  #ifdef ALLOW_THSICE
33  # include "THSICE_PARAMS.h"  # include "THSICE_PARAMS.h"
# Line 52  CEOP Line 51  CEOP
51  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
52  C     i, j   :: Loop counters  C     i, j   :: Loop counters
53        INTEGER i,j        INTEGER i,j
       _RL cplTimeFraction  
54    
55          IF ( atm_cplExch1W_sIce ) THEN
56  C     o Accumulate Sea-Ice Mass from thSIce pkg that will be exported  C     o Accumulate Sea-Ice Mass from thSIce pkg that will be exported
57  C       to the coupling layer. seaIceMass is per surface unit, in kg/m2.  C       to the coupling layer. seaIceMass is per surface unit, in kg/m2.
58  c      cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)  c      cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)
59  c      seaIceTime(bi,bj) = seaIceTime(bi,bj) + cplTimeFraction  c      sIceMassTime(bi,bj) = sIceMassTime(bi,bj) + cplTimeFraction
60  C-     Needs really to store the last time-step value and not the average  C-     Needs really to store the last time-step value and not the average
61         cplTimeFraction = 1. _d 0          sIceMassTime(bi,bj) = 1. _d 0
62         seaIceTime(bi,bj) = cplTimeFraction          DO j=1,sNy
63         DO j=1,sNy           DO i=1,sNx
64          DO i=1,sNx  c          seaIceMass(i,j,bi,bj) = seaIceMass(i,j,bi,bj) + cplTimeFraction*
65  c         seaIceMass(i,j,bi,bj) = seaIceMass(i,j,bi,bj) +             seaIceMass(i,j,bi,bj) =
           seaIceMass(i,j,bi,bj) =  
66       &                   ( snowHeight(i,j,bi,bj)*rhos       &                   ( snowHeight(i,j,bi,bj)*rhos
67       &                    + iceHeight(i,j,bi,bj)*rhoi       &                    + iceHeight(i,j,bi,bj)*rhoi
68       &                   )*iceMask(i,j,bi,bj)*cplTimeFraction       &                   )*iceMask(i,j,bi,bj)
69             ENDDO
70          ENDDO          ENDDO
71         ENDDO        ENDIF
72    
73        IF ( atm_cplExch_DIC ) THEN        IF ( ( atm_cplExch1W_sIce.AND.atm_cplExch_DIC )
74  C     o Accumulate Sea-Ice concentration (no-units) from thSIce pkg       &  .OR. atm_cplExch2W_sIce ) THEN
75    C     o Store Sea-Ice concentration (no-units) from thSIce pkg
76  C       that will be exported to the coupling layer.  C       that will be exported to the coupling layer.
77  c      cplTimeFraction = 1. _d 0 / DFLOAT(cplSendFrq_iter)          sIceFracTime(bi,bj) = 1. _d 0
78  c      fracIceTime(bi,bj) = fracIceTime(bi,bj) + cplTimeFraction          DO j=1,sNy
79  C-     Better to store the last time-step value and not the average           DO i=1,sNx
80         cplTimeFraction = 1. _d 0             sIceFrac_cpl(i,j,bi,bj) = iceMask(i,j,bi,bj)
81         fracIceTime(bi,bj) = cplTimeFraction           ENDDO
82         DO j=1,sNy          ENDDO
83          DO i=1,sNx        ENDIF
84  c         fracIce(i,j,bi,bj) = fracIce(i,j,bi,bj)  
85            fracIce(i,j,bi,bj) = 0. _d 0        IF ( atm_cplExch2W_sIce ) THEN
86       &                       + iceMask(i,j,bi,bj)*cplTimeFraction  C     o Store other thSIce state-vars
87    C       that will be exported to the coupling layer.
88            sIceThickTime(bi,bj) = 1. _d 0
89            sIceSnowHTime(bi,bj) = 1. _d 0
90            sIceQ1Time   (bi,bj) = 1. _d 0
91            sIceQ2Time   (bi,bj) = 1. _d 0
92            DO j=1,sNy
93             DO i=1,sNx
94               sIceThick_cpl(i,j,bi,bj) = iceHeight(i,j,bi,bj)
95               sIceSnowH_cpl(i,j,bi,bj) = snowHeight(i,j,bi,bj)
96               sIceQ1_cpl   (i,j,bi,bj) = Qice1(i,j,bi,bj)
97               sIceQ2_cpl   (i,j,bi,bj) = Qice2(i,j,bi,bj)
98             ENDDO
99          ENDDO          ENDDO
        ENDDO  
100        ENDIF        ENDIF
101    
102  #endif /* ALLOW_THSICE */  #endif /* ALLOW_THSICE */

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22