/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_apply_flux_ctrl.F
ViewVC logotype

Contents of /MITgcm_contrib/dgoldberg/streamice/streamice_apply_flux_ctrl.F

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


Revision 1.2 - (show annotations) (download)
Wed Aug 27 19:29:13 2014 UTC (10 years, 10 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
updating contrib streamice repo with latest files, and separated out convergence checks; and parameterised maximum iteration counts and interface w shelfice for coupling

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/streamice_apply_flux_ctrl.F,v 1.1 2013/06/12 21:30:21 dgoldberg Exp $
2 C $Name: $
3
4 #include "STREAMICE_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 CBOP
9 SUBROUTINE STREAMICE_APPLY_FLUX_CTRL ( myThid )
10
11 C /============================================================\
12 C | SUBROUTINE |
13 C | o |
14 C |============================================================|
15 C | |
16 C \============================================================/
17 IMPLICIT NONE
18
19 C === Global variables ===
20 #include "SIZE.h"
21 #include "GRID.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #include "STREAMICE.h"
25 #ifdef ALLOW_STREAMICE_FLUX_CONTROL
26 #include "STREAMICE_CTRL_FLUX.h"
27 #endif
28
29 INTEGER myThid
30
31 #ifdef ALLOW_STREAMICE
32 #ifdef ALLOW_STREAMICE_FLUX_CONTROL
33
34 INTEGER bi, bj, i, j, k
35 _RS maskval
36 CHARACTER*(MAX_LEN_MBUF) msgBuf
37 _RL streamice_flux_scale_current (n_fluxes_max)
38
39
40 !!!!!!! IN PLACE OF THIS, THERE WOULD BE CALL TO SOMETHING
41 !!!!!! LIKE CTRL_GENTIME_2D IN ORDER TO PROPERLY INTERPOLATE
42 !!!!!! THE SCALINGS TO THE CURRENT TIME STEP
43
44 DO i=1,n_fluxes
45 streamice_flux_scale_current (i) =
46 & streamice_ctrl_flux_scale (i,1)
47 ENDDO
48
49 !!!!!!!!
50 !!!!!!!
51 !!!!!!!!
52
53 DO bj = myByLo(myThid), myByHi(myThid)
54 DO bi = myBxLo(myThid), myBxHi(myThid)
55 DO j=1,sNy
56 DO i=1,sNx
57 IF (streamice_umask(i,j,bi,bj).eq.3.0 .OR.
58 & streamice_vmask(i,j,bi,bj).eq.3.0) THEN
59
60 maskval = INT(streamice_ctrl_flux_mask(i,j,bi,bj))
61
62 DO k=1,n_fluxes_max
63 IF (maskval.eq.streamice_ctrl_flux_id(k)) THEN
64 IF (streamice_umask(i,j,bi,bj).eq.3.0
65 u_bdry_values_SI (i,j,bi,bj) =
66 & u_bdry_values_SI_base(i,j,bi,bj) *
67 & streamice_flux_scale_current (k)
68 ENDIF
69 IF (streamice_vmask(i,j,bi,bj).eq.3.0
70 v_bdry_values_SI (i,j,bi,bj) =
71 & v_bdry_values_SI_base(i,j,bi,bj) *
72 & streamice_flux_scale_current (k)
73 ENDIF
74 EXIT
75 ENDIF
76 ENDDO
77 ENDIF
78 ENDDO
79 ENDDO
80 ENDDO
81 ENDDO
82 #endif
83 #endif
84 RETURN
85 END

  ViewVC Help
Powered by ViewVC 1.1.22