File indexing completed on 2018-03-02 18:44:28 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
a4eca6e929 Jean*0001 #include "THSICE_OPTIONS.h"
0002
0003
0004
0005
0006
0007 SUBROUTINE THSICE_DIFFUSION(
0008 I maskOc,
0009 U uIce, vIce,
0010 I bi, bj, myTime, myIter, myThid )
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 IMPLICIT NONE
0025
0026
0027
0028 #include "SIZE.h"
0029 #include "EEPARAMS.h"
0030 #include "PARAMS.h"
0031 #include "GRID.h"
0032 #include "THSICE_SIZE.h"
0033 #include "THSICE_PARAMS.h"
0034 #include "THSICE_VARS.h"
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 _RS maskOc(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0045 _RL uIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0046 _RL vIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0047 INTEGER bi,bj
0048 _RL myTime
0049 INTEGER myIter
0050 INTEGER myThid
0051
0052 #ifdef ALLOW_THSICE
0053
0054
0055
0056
a444616fe4 Jean*0057
a4eca6e929 Jean*0058 INTEGER i, j
a444616fe4 Jean*0059
a4eca6e929 Jean*0060 _RL iceFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
0061 _RL tmpFld, hIceEpsil
0062 LOGICAL dBugFlag
0063
0064
0065
0066
0067
ae605e558b Jean*0068 dBugFlag = debugLevel.GE.debLevC
a4eca6e929 Jean*0069 hIceEpsil = 1. _d -10
0070
0071 IF ( thSIce_diffK .GT. 0. ) THEN
0072 DO j=1-OLy,sNy+OLy
0073 DO i=1-OLx,sNx+OLx
0074 iceFld(i,j) = ( rhos*snowHeight(i,j,bi,bj)
0075 & +rhoi*iceHeight(i,j,bi,bj) )
0076
0077 ENDDO
0078 ENDDO
0079
0080 DO j=1-OLy,sNy+OLy
0081 DO i=1-OLx+1,sNx+OLx
0082 tmpFld = MAX( iceFld(i-1,j),iceFld(i,j) )
0083 & * maskOc(i-1,j)*maskOc(i,j)
0084 IF ( tmpFld.GT.hIceEpsil )
0085 & uIce(i,j) = uIce(i,j)
0086 & + thSIce_diffK*( iceFld(i-1,j)-iceFld(i,j) )
0087 & *recip_dxC(i,j,bi,bj)/tmpFld
0088 ENDDO
0089 ENDDO
0090
0091 DO j=1-OLy+1,sNy+OLy
0092 DO i=1-OLx,sNx+OLx
0093 tmpFld = MAX( iceFld(i,j-1),iceFld(i,j) )
0094 & *maskOc(i,j-1)*maskOc(i,j)
0095 IF ( tmpFld.GT.hIceEpsil )
0096 & vIce(i,j) = vIce(i,j)
0097 & + thSIce_diffK*( iceFld(i,j-1)-iceFld(i,j) )
0098 & *recip_dyC(i,j,bi,bj)/tmpFld
0099 ENDDO
0100 ENDDO
0101
0102 ENDIF
0103
0104 #endif /* ALLOW_THSICE */
0105
0106 RETURN
0107 END