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

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

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


Revision 1.3 - (hide annotations) (download)
Tue Feb 18 05:33:55 2003 UTC (21 years, 3 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint48f_post, checkpoint48i_post, checkpoint50d_pre, checkpoint50e_post, checkpoint50c_post, checkpoint48h_post, checkpoint50c_pre, checkpoint50b_pre, checkpoint49, checkpoint48g_post, checkpoint50, checkpoint50d_post, checkpoint50b_post, checkpoint50f_post, checkpoint50f_pre, checkpoint50a_post, checkpoint50e_pre
Changes since 1.2: +9 -13 lines
Merging from release1_p12:
o Modifications for using pkg/exf with pkg/seaice
  - improved description of the various forcing configurations
  - added basic radiation bulk formulae to pkg/exf
  - units/sign fix for evap computation in exf_getffields.F
  - updated verification/global_with_exf/results/output.txt
o Added pkg/sbo for computing IERS Special Bureau for the Oceans
  (SBO) core products, including oceanic mass, center-of-mass,
  angular, and bottom pressure (see pkg/sbo/README.sbo).
o Lower bound for viscosity/diffusivity in pkg/kpp/kpp_routines.F
  to avoid negative values in shallow regions.
  - updated verification/natl_box/results/output.txt
  - updated verification/lab_sea/results/output.txt
o MPI gather, scatter: eesupp/src/gather_2d.F and scatter_2d.F
o Added useSingleCpuIO option (see PARAMS.h).
o Updated useSingleCpuIO option in mdsio_writefield.F to
  work with multi-field files, e.g., for single-file pickup.
o pkg/seaice:
  - bug fix in growth.F: QNET for no shortwave case
  - added HeffFile for specifying initial sea-ice thickness
  - changed SEAICE_EXTERNAL_FLUXES wind stress implementation
o Added missing /* */ to CPP comments in pkg/seaice, pkg/exf,
  kpp_transport_t.F, forward_step.F, and the_main_loop.F
o pkg/seaice:
  - adjoint-friendly modifications
  - added a SEAICE_WRITE_PICKUP at end of the_model_main.F

1 heimbach 1.2 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 dimitri 1.3 CALL SEAICE_EXCH ( UICE, myThid )
55     CALL SEAICE_EXCH ( VICE, myThid )
56     CALL SEAICE_EXCH ( HEFF, myThid )
57     CALL SEAICE_EXCH ( AREA, myThid )
58     _EXCH_XY_R8(TICE , myThid )
59     _EXCH_XY_R8(YNEG , myThid )
60     _EXCH_XY_R8(HSNOW, myThid )
61 heimbach 1.2
62 dimitri 1.3 #endif /* ALLOW_SEAICE */
63 heimbach 1.2
64     RETURN
65     END
66    
67     CStartofinterface
68     SUBROUTINE SEAICE_WRITE_PICKUP ( modelEnd, myCurrentTime,
69     & myIt, myThid )
70     C /==========================================================\
71     C | SUBROUTINE SEAICE_WRITE_PICKUP |
72     C | o Write sea ice pickup file for restarting. |
73     C |==========================================================|
74     C \==========================================================/
75     IMPLICIT NONE
76    
77     C == Global variables ===
78     #include "SIZE.h"
79     #include "EEPARAMS.h"
80     #include "PARAMS.h"
81     #include "SEAICE.h"
82    
83     LOGICAL DIFFERENT_MULTIPLE
84     EXTERNAL DIFFERENT_MULTIPLE
85     INTEGER IO_ERRCOUNT
86     EXTERNAL IO_ERRCOUNT
87    
88     C == Routine arguments ==
89     C modelEnd - Checkpoint call at end of model run.
90     C myCurrentTime - Current time of simulation ( s )
91     C myIt - Iteration number
92     C myThid - Thread number for this instance of the routine.
93     LOGICAL modelEnd
94     INTEGER myThid
95     INTEGER myIt
96     _RL myCurrentTime
97     CEndofinterface
98    
99     #ifdef ALLOW_SEAICE
100    
101     C == Common blocks ==
102     COMMON /PCKP_GBLFLS/ globalFile
103     LOGICAL globalFile
104    
105     C == Local variables ==
106     C permCheckPoint - Flag indicating whether a permanent checkpoint
107     C will be written.
108     LOGICAL permCheckPoint
109     CHARACTER*(MAX_LEN_FNAM) fn
110     INTEGER prec
111     LOGICAL lgf
112    
113     permCheckPoint = .FALSE.
114     permCheckPoint=
115     & DIFFERENT_MULTIPLE(pChkptFreq,myCurrentTime,
116     & myCurrentTime-deltaTClock)
117    
118     IF (
119     & (.NOT. modelEnd .AND. (
120     & permCheckPoint
121     & .OR.
122     & DIFFERENT_MULTIPLE(chkptFreq,
123     & myCurrentTime,myCurrentTime-deltaTClock)
124     & )
125     & )
126     & .OR.
127     & (
128     & modelEnd
129     & .AND. .NOT.
130     & permCheckPoint
131     & .AND. .NOT.
132     & DIFFERENT_MULTIPLE(chkptFreq,
133     & myCurrentTime,myCurrentTime-deltaTClock)
134     & )
135     & ) THEN
136    
137     C-- Going to do some IO. Make everyone except master thread wait.
138     _BARRIER
139     _BEGIN_MASTER( myThid )
140    
141     prec = precFloat64
142     lgf = globalFile
143    
144     C-- Write model fields
145     IF ( permCheckPoint ) THEN
146     WRITE(fn,'(A,I10.10)') 'pickup_seaice.',myIt
147     ELSE
148     WRITE(fn,'(A,A)') 'pickup_seaice.',checkPtSuff(nCheckLev)
149     ENDIF
150     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, TICE, 1, myIt,myThid)
151     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, YNEG, 2, myIt,myThid)
152     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 1, HSNOW, 3, myIt,myThid)
153     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, UICE, 2, myIt,myThid)
154     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, VICE, 3, myIt,myThid)
155     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, HEFF, 4, myIt,myThid)
156     CALL MDSWRITEFIELD(fn,prec,lgf,'RL', 3, AREA, 5, myIt,myThid)
157    
158     _END_MASTER( myThid )
159     _BARRIER
160    
161     ENDIF
162    
163 dimitri 1.3 #endif /* ALLOW_SEAICE */
164 heimbach 1.2
165     RETURN
166     END

  ViewVC Help
Powered by ViewVC 1.1.22