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

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

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


Revision 1.2 - (show annotations) (download)
Tue Nov 12 20:47:27 2002 UTC (21 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint47j_post, checkpoint48d_pre, branch-exfmods-tag, checkpoint47e_post, checkpoint47, checkpoint47f_post, checkpoint48d_post, checkpoint47c_post, checkpoint47d_post, checkpoint47a_post, checkpoint48a_post, checkpoint46n_post, checkpoint48e_post, checkpoint47h_post, checkpoint48c_post, checkpoint47i_post, checkpoint48, checkpoint47b_post, checkpoint47g_post, checkpoint48b_post, checkpoint47d_pre, checkpoint48c_pre
Branch point for: c24_e25_ice, ecco-branch, branch-exfmods-curt
Changes since 1.1: +170 -0 lines
Merging from release1_p8 branch:
o New package: pkg/seaice
  Sea ice model by D. Menemenlis (JPL) and Jinlun Zhang (Seattle).
  The sea-ice code is based on Hibler (1979-1980).
  Two sea-ice dynamic solvers, ADI and LSR, are included.
  In addition to computing prognostic sea-ice variables and diagnosing
  the forcing/external data fields that drive the ocean model,
  SEAICE_MODEL also sets theta to the freezing point under sea-ice.
  The implied surface heat flux is then stored in variable
  surfaceTendencyTice, which is needed by KPP package (kpp_calc.F and
  kpp_transport_t.F) to diagnose surface buoyancy fluxes and for the
  non-local transport term.  Because this call precedes model
  thermodynamics, temperature under sea-ice may not be "exactly" at
  the freezing point by the time theta is dumped or time-averaged.

1 C $Header:
2
3 #include "SEAICE_OPTIONS.h"
4
5 C-- File seaice_pickup.F: Routines to handle reading and writing
6 C-- sea ice pickup files.
7 C-- Contents
8 C-- o SEAICE_READ_PICKUP - Read sea ice pickup file for restarting.
9 C-- o SEAICE_WRITE_PICKUP - Write out sea ice pickup file.
10
11 CStartofinterface
12 SUBROUTINE SEAICE_READ_PICKUP ( myThid )
13 C /==========================================================\
14 C | SUBROUTINE SEAICE_READ_PICKUP |
15 C | o Read in sea ice pickup file for restarting. |
16 C |==========================================================|
17 C \==========================================================/
18 IMPLICIT NONE
19
20 C == Global variables ===
21 #include "SIZE.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #include "SEAICE.h"
25
26 C == Routine arguments ==
27 C myThid - Thread number for this instance of the routine.
28 INTEGER myThid
29 CEndofinterface
30
31 #ifdef ALLOW_SEAICE
32
33 C == Local variables ==
34 CHARACTER*(MAX_LEN_FNAM) fn
35
36 C-- Going to do some IO. Make everyone except master thread wait.
37 _BARRIER
38 _BEGIN_MASTER( myThid )
39
40 C-- Read ice model fields
41 WRITE(fn,'(A,I10.10)') 'pickup_seaice.',nIter0
42 CALL MDSREADFIELD( fn, precFloat64, 'RL', 1, TICE , 1, myThid )
43 CALL MDSREADFIELD( fn, precFloat64, 'RL', 1, YNEG , 2, myThid )
44 CALL MDSREADFIELD( fn, precFloat64, 'RL', 1, HSNOW, 3, myThid )
45 CALL MDSREADFIELD( fn, precFloat64, 'RL', 3, UICE , 2, myThid )
46 CALL MDSREADFIELD( fn, precFloat64, 'RL', 3, VICE , 3, myThid )
47 CALL MDSREADFIELD( fn, precFloat64, 'RL', 3, HEFF , 4, myThid )
48 CALL MDSREADFIELD( fn, precFloat64, 'RL', 3, AREA , 5, myThid )
49
50 _END_MASTER( myThid )
51 _BARRIER
52
53 C-- Update overlap regions
54 CALL EXCH_RL( UICE, OLx, OLx, OLy, OLy, 3, OLx, OLy,
55 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
56 CALL EXCH_RL( VICE, OLx, OLx, OLy, OLy, 3, OLx, OLy,
57 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
58 CALL EXCH_RL( HEFF, OLx, OLx, OLy, OLy, 3, OLx, OLy,
59 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
60 CALL EXCH_RL( AREA, OLx, OLx, OLy, OLy, 3, OLx, OLy,
61 I FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid )
62 _EXCH_XY_R4(TICE , myThid )
63 _EXCH_XY_R4(YNEG , myThid )
64 _EXCH_XY_R4(HSNOW, myThid )
65
66 #endif ALLOW_SEAICE
67
68 RETURN
69 END
70
71 CStartofinterface
72 SUBROUTINE SEAICE_WRITE_PICKUP ( modelEnd, myCurrentTime,
73 & myIt, myThid )
74 C /==========================================================\
75 C | SUBROUTINE SEAICE_WRITE_PICKUP |
76 C | o Write sea ice pickup file for restarting. |
77 C |==========================================================|
78 C \==========================================================/
79 IMPLICIT NONE
80
81 C == Global variables ===
82 #include "SIZE.h"
83 #include "EEPARAMS.h"
84 #include "PARAMS.h"
85 #include "SEAICE.h"
86
87 LOGICAL DIFFERENT_MULTIPLE
88 EXTERNAL DIFFERENT_MULTIPLE
89 INTEGER IO_ERRCOUNT
90 EXTERNAL IO_ERRCOUNT
91
92 C == Routine arguments ==
93 C modelEnd - Checkpoint call at end of model run.
94 C myCurrentTime - Current time of simulation ( s )
95 C myIt - Iteration number
96 C myThid - Thread number for this instance of the routine.
97 LOGICAL modelEnd
98 INTEGER myThid
99 INTEGER myIt
100 _RL myCurrentTime
101 CEndofinterface
102
103 #ifdef ALLOW_SEAICE
104
105 C == Common blocks ==
106 COMMON /PCKP_GBLFLS/ globalFile
107 LOGICAL globalFile
108
109 C == Local variables ==
110 C permCheckPoint - Flag indicating whether a permanent checkpoint
111 C will be written.
112 LOGICAL permCheckPoint
113 CHARACTER*(MAX_LEN_FNAM) fn
114 INTEGER prec
115 LOGICAL lgf
116
117 permCheckPoint = .FALSE.
118 permCheckPoint=
119 & DIFFERENT_MULTIPLE(pChkptFreq,myCurrentTime,
120 & myCurrentTime-deltaTClock)
121
122 IF (
123 & (.NOT. modelEnd .AND. (
124 & permCheckPoint
125 & .OR.
126 & DIFFERENT_MULTIPLE(chkptFreq,
127 & myCurrentTime,myCurrentTime-deltaTClock)
128 & )
129 & )
130 & .OR.
131 & (
132 & modelEnd
133 & .AND. .NOT.
134 & permCheckPoint
135 & .AND. .NOT.
136 & DIFFERENT_MULTIPLE(chkptFreq,
137 & myCurrentTime,myCurrentTime-deltaTClock)
138 & )
139 & ) THEN
140
141 C-- Going to do some IO. Make everyone except master thread wait.
142 _BARRIER
143 _BEGIN_MASTER( myThid )
144
145 prec = precFloat64
146 lgf = globalFile
147
148 C-- Write model fields
149 IF ( permCheckPoint ) THEN
150 WRITE(fn,'(A,I10.10)') 'pickup_seaice.',myIt
151 ELSE
152 WRITE(fn,'(A,A)') 'pickup_seaice.',checkPtSuff(nCheckLev)
153 ENDIF
154 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, TICE, 1, myIt,myThid)
155 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, YNEG, 2, myIt,myThid)
156 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, HSNOW, 3, myIt,myThid)
157 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, UICE, 2, myIt,myThid)
158 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, VICE, 3, myIt,myThid)
159 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, HEFF, 4, myIt,myThid)
160 CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, AREA, 5, myIt,myThid)
161
162 _END_MASTER( myThid )
163 _BARRIER
164
165 ENDIF
166
167 #endif ALLOW_SEAICE
168
169 RETURN
170 END

  ViewVC Help
Powered by ViewVC 1.1.22