/[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.27 - (hide annotations) (download)
Tue Feb 18 05:33:53 2003 UTC (21 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint50c_post, checkpoint50c_pre, checkpoint48i_post, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48f_post, checkpoint48h_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint50g_post, checkpoint50e_pre, checkpoint50e_post, checkpoint50d_pre, checkpoint49, checkpoint48g_post, checkpoint50b_post
Changes since 1.26: +9 -3 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 dimitri 1.27 C $Header: /u/gcmpack/MITgcm/model/src/do_the_model_io.F,v 1.26 2003/01/03 03:52:44 jmc 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 cheisey 1.23 cswdblk --- add ---
39 cheisey 1.24 #ifdef ALLOW_BULK_FORCE
40 cheisey 1.23 #include "BULKF.h"
41     #include "FFIELDS.h"
42     #endif
43     cswdblk -- end add ---
44     cswdice -- add ---
45 cheisey 1.24 #ifdef ALLOW_THERM_SEAICE
46 cheisey 1.23 #include "ICE.h"
47     #include "ICE_DIAGS.h"
48     #endif
49     cswdice -- end add ---
50    
51    
52    
53 cnh 1.3 LOGICAL DIFFERENT_MULTIPLE
54     EXTERNAL DIFFERENT_MULTIPLE
55    
56 cnh 1.22 C !INPUT/OUTPUT PARAMETERS:
57 cnh 1.1 C == Routine arguments ==
58     C myThid - Thread number for this instance of the routine.
59     C myIter - Iteration number
60 cnh 1.3 C myCurrentTime - Current time of simulation ( s )
61 cnh 1.1 INTEGER myThid
62     INTEGER myIter
63 adcroft 1.13 _RL myCurrentTime
64 cnh 1.1
65 cnh 1.22 CEOP
66 cnh 1.1
67 cnh 1.10 C-- Generaly only thread 1 does IO here. It can not start until
68     C-- all threads fields are ready.
69 cnh 1.6 IF (
70 cnh 1.10 & DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime,
71     & myCurrentTime-deltaTClock)
72 cnh 1.6 & ) THEN
73    
74 cnh 1.3 _BARRIER
75 cnh 1.1
76 cnh 1.3 C-- Write "text-plots" of certain fields
77 cnh 1.10 CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' ,
78     & Nr, myIter, myThid )
79     CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' ,
80     & Nr, myIter, myThid )
81     CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' ,
82     & Nr, myIter, myThid )
83 jmc 1.19 CALL PLOT_FIELD_XYRL( etaN , 'Current etaN ' ,
84 cnh 1.10 & myIter, myThid )
85 adcroft 1.13
86 cnh 1.3 ENDIF
87    
88     C-- Write model state to binary file
89 heimbach 1.20 CALL WRITE_STATE( myCurrentTime, myIter, myThid )
90 cnh 1.5
91 jmc 1.19 #ifdef ALLOW_TIMEAVE
92 adcroft 1.16 C-- Do time averages
93     IF (taveFreq.GT.0.) THEN
94 jmc 1.19 CALL TIMEAVE_STATV_WRITE( myCurrentTime, myIter, myThid )
95 jmc 1.26 ENDIF
96     #endif
97 adcroft 1.21 #ifdef ALLOW_AIM
98 jmc 1.26 C-- Do AIM time averages
99     IF (useAIM)
100 jmc 1.25 & CALL AIM_WRITE_TAVE( myCurrentTime, myIter, myThid )
101 adcroft 1.21 #endif
102 adcroft 1.16
103     #ifdef ALLOW_GMREDI
104     C-- Do KPP diagnostics.
105 heimbach 1.17 IF (useGMRedi)
106 adcroft 1.16 & CALL GMREDI_DIAGS( myCurrentTime, myIter, myThid )
107     #endif
108    
109     #ifdef ALLOW_KPP
110     C-- Do KPP diagnostics.
111 heimbach 1.17 IF (useKPP)
112 adcroft 1.16 & CALL KPP_DO_DIAGS( myCurrentTime, myIter, myThid )
113     #endif
114 cheisey 1.23
115 dimitri 1.27 #ifdef ALLOW_SBO
116     C-- Do SBO diagnostics.
117     IF (useSBO) THEN
118     CALL SBO_CALC ( myCurrentTime, myIter, myThid )
119     CALL SBO_DIAGS( myCurrentTime, myIter, myThid )
120     ENDIF
121     #endif
122    
123 cheisey 1.23 cswdblk --- add ---
124 cheisey 1.24 #ifdef ALLOW_BULK_FORCE
125 cheisey 1.23 C-- Do bulkf diagnostics.
126 cheisey 1.24 IF (useBulkforce)
127 cheisey 1.23 & CALL BULKF_DIAGS( myCurrentTime, myIter, myThid )
128     #endif
129     cswdblk -- end add ---
130    
131     cswdice --- add ---
132 cheisey 1.24 #ifdef ALLOW_THERM_SEAICE
133 cheisey 1.23 C-- Do seaice diagnostics.
134 cheisey 1.24 IF (useThermSeaice)
135 cheisey 1.23 & CALL ICE_DIAGS( myCurrentTime, myIter, myThid )
136     #endif
137     cswdice -- end add ---
138 adcroft 1.16
139 cnh 1.1 RETURN
140     END
141    

  ViewVC Help
Powered by ViewVC 1.1.22