/[MITgcm]/MITgcm/pkg/seaice/seaice_model.F
ViewVC logotype

Contents of /MITgcm/pkg/seaice/seaice_model.F

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


Revision 1.18 - (show annotations) (download)
Mon May 3 16:30:20 2004 UTC (20 years, 1 month ago) by dimitri
Branch: MAIN
Changes since 1.17: +2 -2 lines
50 -> 50.0 for compiler compatibility

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_model.F,v 1.17 2004/05/03 06:58:39 dimitri Exp $
2 C $Name: $
3
4 #include "SEAICE_OPTIONS.h"
5
6 CStartOfInterface
7 SUBROUTINE seaice_model( myTime, myIter, myThid )
8 C /===========================================================\
9 C | SUBROUTINE SEAICE_MODEL |
10 C | o Time stepping of a dynamic/thermodynamic sea ice model. |
11 C | Dynamics solver: Zhang/Hibler, JGR, 102, 8691-8702, 1997 |
12 C | Thermodynamics: Hibler, MWR, 108, 1943-1973, 1980 |
13 C | Rheology: Hibler, JPO, 9, 815- 846, 1979 |
14 C | Snow: Zhang et al. , JPO, 28, 191- 217, 1998 |
15 C | Parallel forward ice model written by Jinlun Zhang PSC/UW|
16 C | & coupled into MITgcm by Dimitris Menemenlis (JPL) 2/2001|
17 C | zhang@apl.washington.edu / menemenlis@jpl.nasa.gov |
18 C |===========================================================|
19 C \===========================================================/
20 IMPLICIT NONE
21
22 C === Global variables ===
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "DYNVARS.h"
26 #include "PARAMS.h"
27 #include "GRID.h"
28 #include "FFIELDS.h"
29 #include "SEAICE.h"
30 #include "SEAICE_PARAMS.h"
31
32 #ifdef SEAICE_EXTERNAL_FORCING
33 # include "SEAICE_FFIELDS.h"
34 #endif
35
36 #ifdef ALLOW_AUTODIFF_TAMC
37 # include "tamc.h"
38 #endif
39
40 C === Routine arguments ===
41 C myTime - Simulation time
42 C myIter - Simulation timestep number
43 C myThid - Thread no. that called this routine.
44 _RL myTime
45 INTEGER myIter
46 INTEGER myThid
47 CEndOfInterface
48
49 #ifdef ALLOW_SEAICE
50
51 C === Local variables ===
52 C i,j,bi,bj - Loop counters
53
54 INTEGER i, j, bi, bj, kgeo
55
56 #ifdef SEAICE_EXTERNAL_FORCING
57 C-- Atmospheric state and runoff are from
58 C pkg/exf, which does not update edges.
59 CALL EXCH_UV_XY_RL(uwind,vwind,.TRUE.,myThid)
60 _EXCH_XY_R8( atemp, myThid )
61 _EXCH_XY_R8( aqh, myThid )
62 _EXCH_XY_R8( lwdown, myThid )
63 _EXCH_XY_R8( swdown, mythid )
64 _EXCH_XY_R8( precip, myThid )
65 _EXCH_XY_R8( evap, myThid )
66 _EXCH_XY_R8( runoff, myThid )
67 #else /* SEAICE_EXTERNAL_FORCING */
68 C-- Load atmospheric state and runoff.
69 CALL SEAICE_GET_FORCING ( myTime, myIter, myThid )
70 #endif /* SEAICE_EXTERNAL_FORCING */
71
72 C-- As a proxy for geostrophic velocity,
73 C choose the level that is >= 50 m with kgeo > 1
74 KGEO = 2
75 DO WHILE ( abs(rC(KGEO)) .LT. 50.0 .AND. KGEO .LT. Nr )
76 KGEO = KGEO + 1
77 ENDDO
78 DO bj=myByLo(myThid),myByHi(myThid)
79 DO bi=myBxLo(myThid),myBxHi(myThid)
80 DO j=0,sNy+1
81 DO i=0,sNx+1
82 GWATX(I,J,bi,bj)=HALF*(uVel(i,j,KGEO,bi,bj)
83 & +uVel(i,j-1,KGEO,bi,bj))
84 GWATY(I,J,bi,bj)=HALF*(vVel(i,j,KGEO,bi,bj)
85 & +vVel(i-1,j,KGEO,bi,bj))
86 #ifdef SEAICE_DEBUG
87 c write(*,'(2i4,2i2,f7.1,7f12.3)')
88 c & ,i,j,bi,bj,UVM(I,J,bi,bj)
89 c & ,GWATX(I,J,bi,bj),GWATY(I,J,bi,bj)
90 c & ,uVel(i+1,j,3,bi,bj),uVel(i+1,j+1,3,bi,bj)
91 c & ,vVel(i,j+1,3,bi,bj),vVel(i+1,j+1,3,bi,bj)
92 #endif
93 ENDDO
94 ENDDO
95 ENDDO
96 ENDDO
97
98 #ifdef ALLOW_AUTODIFF_TAMC
99 CADJ STORE uwind = comlev1, key = ikey_dynamics
100 CADJ STORE vwind = comlev1, key = ikey_dynamics
101 CADJ STORE heff = comlev1, key = ikey_dynamics
102 # ifdef SEAICE_ALLOW_DYNAMICS
103 CADJ STORE area = comlev1, key = ikey_dynamics
104 # endif
105 #endif /* ALLOW_AUTODIFF_TAMC */
106
107 C solve ice momentum equations and calculate ocean surface stress
108 CALL DYNSOLVER ( myTime, myIter, myThid )
109
110 #ifdef ALLOW_AUTODIFF_TAMC
111 # ifdef SEAICE_ALLOW_DYNAMICS
112 CADJ STORE heff = comlev1, key = ikey_dynamics
113 CADJ STORE area = comlev1, key = ikey_dynamics
114 CADJ STORE uice = comlev1, key = ikey_dynamics
115 CADJ STORE vice = comlev1, key = ikey_dynamics
116 # endif
117 #endif /* ALLOW_AUTODIFF_TAMC */
118 C NOW DO ADVECTION
119 CALL ADVECT( UICE, VICE, HEFF, HEFFM, myThid )
120 CALL ADVECT( UICE, VICE, AREA, HEFFM, myThid )
121
122 C NOW DO GROWTH
123 C MUST CALL GROWTH ONLY AFTER CALLING ADVECTION
124 CALL GROWTH( myTime, myIter, myThid)
125
126 C-- Update overlap regions for a bunch of stuff
127 _BARRIER
128 CALL SEAICE_EXCH( HEFF, myThid )
129 CALL SEAICE_EXCH( AREA, myThid )
130 CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid)
131 _EXCH_XY_R4(EmPmR, myThid )
132 _EXCH_XY_R4(Qnet , myThid )
133 _EXCH_XY_R4(surfaceTendencyTice, myThid )
134 #ifdef SHORTWAVE_HEATING
135 _EXCH_XY_R4(Qsw , myThid )
136 #endif
137 _EXCH_XYZ_R8(theta , myThid )
138
139 C-- Sea ice diagnostics.
140 C <= moved to S/R do_the_model_io with other pkgs
141
142 C-- Write sea ice restart files
143 C <= moved to S/R packages_write_pickup with other pkgs
144
145 C---------------------------------------------------
146 C OOH NOOOO we need to move the whole stuff
147 C---------------------------------------------------
148 #ifdef ALLOW_AUTODIFF_TAMC
149 CRG CADJ store UICE,VICE,AREA,HEFF,fu,fv,EmPmR,Qnet,Qsw = comlev1_bibj
150 #endif
151
152 C-- Call sea-ice cost function routine
153 CRG CALL SEAICE_COST( myTime, myIter, myThid )
154
155 #endif /* ALLOW_SEAICE */
156
157 RETURN
158 END

  ViewVC Help
Powered by ViewVC 1.1.22