/[MITgcm]/MITgcm/model/src/do_the_model_io.F
ViewVC logotype

Contents of /MITgcm/model/src/do_the_model_io.F

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


Revision 1.22.4.1 - (show annotations) (download)
Fri Jan 31 05:06:50 2003 UTC (21 years, 4 months ago) by dimitri
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p11, release1_p12, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.22: +9 -1 lines
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.
Modified Files:
	doc/tag-index model/inc/CPP_OPTIONS.h model/inc/PARAMS.h
	model/src/do_the_model_io.F model/src/packages_boot.F
	model/src/packages_check.F model/src/packages_readparms.F
	model/src/the_model_main.F

1 C $Header: /u/gcmpack/MITgcm/model/src/do_the_model_io.F,v 1.22 2001/09/26 18:09:14 cnh Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: DO_THE_MODEL_IO
8 C !INTERFACE:
9 SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
10 C !DESCRIPTION: \bv
11 C *==========================================================*
12 C | SUBROUTINE DO_THE_MODEL_IO
13 C | o Controlling routine for IO in model main time-stepping
14 C | loop.
15 C *==========================================================*
16 C | Many systems do not have thread safe IO so it is easier
17 C | to lump everything together and do dumping of fields
18 C | and updating of forcing terms in a single place.
19 C | The approach to IO used here is that writes are only
20 C | performed by thread 1 and that a process only writes out
21 C | its data ( it does not know about anyone elses data!)
22 C | Reading on the other hand is assumed to be from a file
23 C | containing all the data for all the processes. Only the
24 C | portion of data of interest to this process is actually
25 C | loaded. To work well this assumes the existence of some
26 C | reliable tool to join datasets together at the end of a
27 C | run - see joinds.p
28 C *==========================================================*
29 C \ev
30
31 C !USES:
32 IMPLICIT NONE
33 C == Global variables ===
34 #include "SIZE.h"
35 #include "EEPARAMS.h"
36 #include "PARAMS.h"
37 #include "DYNVARS.h"
38 LOGICAL DIFFERENT_MULTIPLE
39 EXTERNAL DIFFERENT_MULTIPLE
40
41 C !INPUT/OUTPUT PARAMETERS:
42 C == Routine arguments ==
43 C myThid - Thread number for this instance of the routine.
44 C myIter - Iteration number
45 C myCurrentTime - Current time of simulation ( s )
46 INTEGER myThid
47 INTEGER myIter
48 _RL myCurrentTime
49
50 CEOP
51
52 C-- Generaly only thread 1 does IO here. It can not start until
53 C-- all threads fields are ready.
54 IF (
55 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
56 & myCurrentTime-deltaTClock)
57 & ) THEN
58
59 _BARRIER
60
61 C-- Write "text-plots" of certain fields
62 CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' ,
63 & Nr, myIter, myThid )
64 CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' ,
65 & Nr, myIter, myThid )
66 CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
67 & Nr, myIter, myThid )
68 CALL PLOT_FIELD_XYRL( etaN , 'Current etaN ' ,
69 & myIter, myThid )
70
71 ENDIF
72
73 C-- Write model state to binary file
74 CALL WRITE_STATE( myCurrentTime, myIter, myThid )
75
76 #ifdef ALLOW_TIMEAVE
77 C-- Do time averages
78 IF (taveFreq.GT.0.) THEN
79 CALL TIMEAVE_STATV_WRITE( myCurrentTime, myIter, myThid )
80 #ifdef ALLOW_AIM
81 IF (useAIM)
82 & CALL AIM_WRITE_DIAGS( myCurrentTime, myIter, myThid )
83 #endif
84 ENDIF
85 #endif
86
87 #ifdef ALLOW_GMREDI
88 C-- Do KPP diagnostics.
89 IF (useGMRedi)
90 & CALL GMREDI_DIAGS( myCurrentTime, myIter, myThid )
91 #endif
92
93 #ifdef ALLOW_KPP
94 C-- Do KPP diagnostics.
95 IF (useKPP)
96 & CALL KPP_DO_DIAGS( myCurrentTime, myIter, myThid )
97 #endif
98
99 #ifdef ALLOW_SBO
100 C-- Do SBO diagnostics.
101 IF (useSBO) THEN
102 CALL SBO_CALC ( myCurrentTime, myIter, myThid )
103 CALL SBO_DIAGS( myCurrentTime, myIter, myThid )
104 ENDIF
105 #endif
106
107 RETURN
108 END
109

  ViewVC Help
Powered by ViewVC 1.1.22