/[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 - (show annotations) (download)
Wed Sep 26 18:09:14 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, checkpoint46l_pre, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, checkpoint46d_pre, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, checkpoint46j_post, checkpoint46k_post, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p10, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, chkpt44a_pre, checkpoint46i_post, ecco_c44_e20, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint47, checkpoint44, checkpoint45, checkpoint46h_post, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: release1_final, release1-branch, release1, ecco-branch, release1_coupled
Changes since 1.21: +28 -22 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/do_the_model_io.F,v 1.21 2001/05/29 14:01:37 adcroft 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 RETURN
100 END
101

  ViewVC Help
Powered by ViewVC 1.1.22