/[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.13 - (hide annotations) (download)
Tue May 18 18:01:12 1999 UTC (25 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint22, checkpoint23, checkpoint24, checkpoint25
Changes since 1.12: +18 -2 lines
Modifications/additions for KPP mixing scheme. Instigated by Dimitri.

1 adcroft 1.13 C $Header: /u/gcmpack/models/MITgcmUV/model/src/do_the_model_io.F,v 1.12 1998/12/09 16:11:51 adcroft Exp $
2 cnh 1.1
3 cnh 1.11 #include "CPP_OPTIONS.h"
4 cnh 1.1
5 cnh 1.3 SUBROUTINE DO_THE_MODEL_IO(myCurrentTime, myIter, myThid)
6 cnh 1.1 C /==========================================================\
7     C | SUBROUTINE DO_THE_MODEL_IO |
8     C | o Controlling routine for IO in model main time-stepping |
9     C | loop. |
10     C |==========================================================|
11     C | Many systems do not have thread safe IO so it is easier |
12     C | to lump everything together and do dumping of fields |
13     C | and updating of forcing terms in a single place. |
14     C | The approach to IO used here is that writes are only |
15     C | performed by thread 1 and that a process only writes out |
16 cnh 1.10 C | its data ( it does not know about anyone elses data!) |
17 cnh 1.1 C | Reading on the other hand is assumed to be from a file |
18     C | containing all the data for all the processes. Only the |
19     C | portion of data of interest to this process is actually |
20     C | loaded. To work well this assumes the existence of some |
21     C | reliable tool to join datasets together at the end of a |
22 cnh 1.10 C | run - see joinds.p |
23 cnh 1.1 C \==========================================================/
24 adcroft 1.12 IMPLICIT NONE
25 cnh 1.1
26     C == Global variables ===
27     #include "SIZE.h"
28     #include "EEPARAMS.h"
29     #include "PARAMS.h"
30     #include "DYNVARS.h"
31     #include "CG2D.h"
32 adcroft 1.13 #ifdef ALLOW_KPP
33     #include "KPPMIX.h"
34     #endif
35 cnh 1.1
36 cnh 1.3 LOGICAL DIFFERENT_MULTIPLE
37     EXTERNAL DIFFERENT_MULTIPLE
38    
39 cnh 1.1 C == Routine arguments ==
40     C myThid - Thread number for this instance of the routine.
41     C myIter - Iteration number
42 cnh 1.3 C myCurrentTime - Current time of simulation ( s )
43 cnh 1.1 INTEGER myThid
44     INTEGER myIter
45 adcroft 1.13 _RL myCurrentTime
46 cnh 1.1
47     C == Local variables ==
48 cnh 1.3 C suff - Hold suffix part of a filename
49     CHARACTER*(MAX_LEN_FNAM) suff
50    
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     CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' ,
69     & myIter, myThid )
70 adcroft 1.13
71     #ifdef ALLOW_KPP
72     IF (KPPmixingMaps) THEN
73     CALL PLOT_FIELD_XYRL ( KPPhbl , 'KPPhbl' ,
74     & myIter, myThid )
75     CALL PLOT_FIELD_XYZRL ( KPPviscAz , 'KPPviscAz' ,
76     & Nr, myIter, myThid )
77     CALL PLOT_FIELD_XYZRL ( KPPdiffKzT, 'KPPdiffKzT',
78     & Nr, myIter, myThid )
79     CALL PLOT_FIELD_XYZRL ( KPPghat , 'KPPghat' ,
80     & Nr, myIter, myThid )
81     ENDIF
82     #endif
83 cnh 1.3
84     ENDIF
85    
86     C-- Write model state to binary file
87 adcroft 1.7 CALL WRITE_STATE( .FALSE., myCurrentTime, myIter, myThid )
88 cnh 1.5
89 cnh 1.1 C
90     RETURN
91     END
92    

  ViewVC Help
Powered by ViewVC 1.1.22