File indexing completed on 2023-08-04 05:10:41 UTC
view on githubraw file Latest commit 45315406 on 2023-08-03 16:50:12 UTC
809c36b928 Patr*0001 #include "SEAICE_OPTIONS.h"
0002
0003
53092bcb42 Mart*0004 SUBROUTINE ostres( COR_ICE, myThid )
8676990826 Jean*0005
809c36b928 Patr*0006
0007
8676990826 Jean*0008
809c36b928 Patr*0009 IMPLICIT NONE
0010
0011
0012 #include "SIZE.h"
0013 #include "EEPARAMS.h"
0014 #include "PARAMS.h"
0015 #include "FFIELDS.h"
03c669d1ab Jean*0016 #include "SEAICE_SIZE.h"
809c36b928 Patr*0017 #include "SEAICE_PARAMS.h"
03c669d1ab Jean*0018 #include "SEAICE.h"
809c36b928 Patr*0019
0020
0021
0022 _RL COR_ICE (1-OLx:sNx+OLx,1-OLy:sNy+OLy, nSx,nSy)
0023 INTEGER myThid
0024
0025
45315406aa Mart*0026 #ifdef SEAICE_BGRID_DYNAMICS
809c36b928 Patr*0027
cee16b76ae Dimi*0028
809c36b928 Patr*0029
cee16b76ae Dimi*0030 INTEGER i, j, bi, bj
809c36b928 Patr*0031 _RL SINWIN, COSWIN, SINWAT, COSWAT
45315406aa Mart*0032 # ifdef SEAICE_BICE_STRESS
1fe9fc5571 Mart*0033 _RL fuIce, fvIce
45315406aa Mart*0034 # endif
809c36b928 Patr*0035
16f85413ea Mart*0036
55f4fb1c97 Mart*0037 SINWIN=SIN(SEAICE_airTurnAngle*deg2rad)
0038 COSWIN=COS(SEAICE_airTurnAngle*deg2rad)
0039 SINWAT=SIN(SEAICE_waterTurnAngle*deg2rad)
0040 COSWAT=COS(SEAICE_waterTurnAngle*deg2rad)
809c36b928 Patr*0041
baa476eeba Dimi*0042
415022713b Dimi*0043 CALL EXCH_UV_XY_RL(WINDX, WINDY, .TRUE., myThid)
809c36b928 Patr*0044
45315406aa Mart*0045 # ifndef SEAICE_EXTERNAL_FLUXES
76a3a9dce3 Dimi*0046
0047
0048 DO bj=myByLo(myThid),myByHi(myThid)
0049 DO bi=myBxLo(myThid),myBxHi(myThid)
0050 DO j=1,sNy
0051 DO i=1,sNx
09510da3bb Dimi*0052 fu(I,J,bi,bj)=HALF
0053 & *(WINDX(I,J+1,bi,bj)+WINDX(I,J,bi,bj))
0054 fv(I,J,bi,bj)=HALF
0055 & *(WINDY(I+1,J,bi,bj)+WINDY(I,J,bi,bj))
809c36b928 Patr*0056 ENDDO
0057 ENDDO
0058 ENDDO
0059 ENDDO
415022713b Dimi*0060 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
45315406aa Mart*0061 # endif /* ifndef SEAICE_EXTERNAL_FLUXES */
809c36b928 Patr*0062
45315406aa Mart*0063 # ifdef SEAICE_BICE_STRESS
714116e714 Dimi*0064
3bb82eadff Dimi*0065 DO bj=myByLo(myThid),myByHi(myThid)
0066 DO bi=myBxLo(myThid),myBxHi(myThid)
0067 DO j=1,sNy
0068 DO i=1,sNx
55f4fb1c97 Mart*0069 fuIce=QUART*( DWATN(I,J,bi,bj)+DWATN(I,J+1,bi,bj) )*(
8676990826 Jean*0070 & COSWAT *
ac653e342a Mart*0071 & ( UICE(I,J, bi,bj)-GWATX(I,J, bi,bj)
0072 & + UICE(I,J+1,bi,bj)-GWATX(I,J+1,bi,bj) )
9004537479 Mart*0073 & -SIGN(SINWAT,COR_ICE(I,J,bi,bj)) *
3225bdc519 Mart*0074 & ( VICE(I,J, bi,bj)-GWATY(I,J, bi,bj)
0075 & + VICE(I,J+1,bi,bj)-GWATY(I,J+1,bi,bj) )
55f4fb1c97 Mart*0076 & )
0077 fvIce=QUART*( DWATN(I,J,bi,bj)+DWATN(I+1,J,bi,bj) )*(
8676990826 Jean*0078 & SIGN(SINWAT,COR_ICE(I,J,bi,bj)) *
3225bdc519 Mart*0079 & ( UICE(I, J,bi,bj)-GWATX(I, J,bi,bj)
0080 & + UICE(I+1,J,bi,bj)-GWATX(I+1,J,bi,bj) )
8676990826 Jean*0081 & + COSWAT *
0082 & ( VICE(I, J,bi,bj)-GWATY(I, J,bi,bj)
ac653e342a Mart*0083 & + VICE(I+1,J,bi,bj)-GWATY(I+1,J,bi,bj) )
55f4fb1c97 Mart*0084 & )
ac653e342a Mart*0085 fu(I,J,bi,bj)=(ONE-AREA(I,J,bi,bj))*fu(I,J,bi,bj)+
0086 & AREA(I,J,bi,bj)*fuIce
0087 fv(I,J,bi,bj)=(ONE-AREA(I,J,bi,bj))*fv(I,J,bi,bj)+
0088 & AREA(I,J,bi,bj)*fvIce
714116e714 Dimi*0089 ENDDO
0090 ENDDO
0091 ENDDO
3bb82eadff Dimi*0092 ENDDO
714116e714 Dimi*0093 CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
45315406aa Mart*0094 # endif /* SEAICE_BICE_STRESS */
0095 #endif /* SEAICE_BCGRID_DYNAMICS */
714116e714 Dimi*0096
809c36b928 Patr*0097 RETURN
0098 END