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

Annotation 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 - (hide 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 cnh 1.22 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 adcroft 1.21 C $Name: $
3 cnh 1.1
4 cnh 1.11 #include "CPP_OPTIONS.h"
5 cnh 1.1
6 cnh 1.22 CBOP
7     C !ROUTINE: DO_THE_MODEL_IO
8     C !INTERFACE:
9 heimbach 1.20 SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
10 cnh 1.22 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 adcroft 1.12 IMPLICIT NONE
33 cnh 1.1 C == Global variables ===
34     #include "SIZE.h"
35     #include "EEPARAMS.h"
36     #include "PARAMS.h"
37     #include "DYNVARS.h"
38 cnh 1.3 LOGICAL DIFFERENT_MULTIPLE
39     EXTERNAL DIFFERENT_MULTIPLE
40    
41 cnh 1.22 C !INPUT/OUTPUT PARAMETERS:
42 cnh 1.1 C == Routine arguments ==
43     C myThid - Thread number for this instance of the routine.
44     C myIter - Iteration number
45 cnh 1.3 C myCurrentTime - Current time of simulation ( s )
46 cnh 1.1 INTEGER myThid
47     INTEGER myIter
48 adcroft 1.13 _RL myCurrentTime
49 cnh 1.1
50 cnh 1.22 CEOP
51 cnh 1.1
52 cnh 1.10 C-- Generaly only thread 1 does IO here. It can not start until
53     C-- all threads fields are ready.
54 cnh 1.6 IF (
55 cnh 1.10 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
56     & myCurrentTime-deltaTClock)
57 cnh 1.6 & ) THEN
58    
59 cnh 1.3 _BARRIER
60 cnh 1.1
61 cnh 1.3 C-- Write "text-plots" of certain fields
62 cnh 1.10 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 jmc 1.19 CALL PLOT_FIELD_XYRL( etaN , 'Current etaN ' ,
69 cnh 1.10 & myIter, myThid )
70 adcroft 1.13
71 cnh 1.3 ENDIF
72    
73     C-- Write model state to binary file
74 heimbach 1.20 CALL WRITE_STATE( myCurrentTime, myIter, myThid )
75 cnh 1.5
76 jmc 1.19 #ifdef ALLOW_TIMEAVE
77 adcroft 1.16 C-- Do time averages
78     IF (taveFreq.GT.0.) THEN
79 jmc 1.19 CALL TIMEAVE_STATV_WRITE( myCurrentTime, myIter, myThid )
80 adcroft 1.21 #ifdef ALLOW_AIM
81     IF (useAIM)
82     & CALL AIM_WRITE_DIAGS( myCurrentTime, myIter, myThid )
83     #endif
84 adcroft 1.16 ENDIF
85     #endif
86    
87     #ifdef ALLOW_GMREDI
88     C-- Do KPP diagnostics.
89 heimbach 1.17 IF (useGMRedi)
90 adcroft 1.16 & CALL GMREDI_DIAGS( myCurrentTime, myIter, myThid )
91     #endif
92    
93     #ifdef ALLOW_KPP
94     C-- Do KPP diagnostics.
95 heimbach 1.17 IF (useKPP)
96 adcroft 1.16 & CALL KPP_DO_DIAGS( myCurrentTime, myIter, myThid )
97     #endif
98    
99 cnh 1.1 RETURN
100     END
101    

  ViewVC Help
Powered by ViewVC 1.1.22