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

Annotation of /MITgcm/model/src/ini_forcing.F

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


Revision 1.16 - (hide annotations) (download)
Wed May 5 18:32:34 1999 UTC (25 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint21, checkpoint22, checkpoint23, checkpoint24, checkpoint25
Changes since 1.15: +27 -23 lines
Implemented new I/O package (mdsio.F). This package does parallel
I/O in much the same way as dfile.F used to except it uses "direct
access" rather than (f77) unformatted sequential access.

Problems with dfile.F package included:
  o unnecessary memory use (each process had two global sized buffers)
  o inability to read the files it had written without post-processing
  o "tiled" files were tiled by process/thread rather than actual tiles
  o created huge numbers of files with no alternatives

Features of the mdsio.F package:
  o direct-access binary writes
  o no excessive memory use
  o ability to read/write from multiple record files
  o "tiled" files are based on "WRAPPER" tiles so that the number
    and content of files is independent of the number of threads
    and/or processes
  o option to create single "global" files rather than "tiled" files
  o ability to read both "global" and "tiled" files
    [Caveat: the tiling of files must match the model tiles]
  o checkpoints now use a single file per model section
    ie.  one file for the hydrostatic model core, one file
    for the non-hydrostatic extensions and one file for the C-D
    extensions
  o the mid-level I/O routines now is broken into more source files
    read_write_fld.F supplies basic I/O routines with the same interface
                     as the original I/O package
    read_write_rec.F supplies I/O routines which allow multiple records
    write_state.F    writes the model state
    checkpoint.F     supplies the read/write checkpoint routines

All the example input data has had to be modified to be direct-access.
Otherwise only routines that used I/O have been affected and not
all of those have been due to the continuity of arguments in
the read_write_fld.F routines.

What needs to be done?  We have to create a suite of conversion
utilities for users with old-style data. Also supply the option
for using old-style I/O, not just for die-hards but for reading
data too extensive to be converted. And more...

1 adcroft 1.16 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.15 1998/12/15 00:20:34 adcroft Exp $
2 cnh 1.1
3 cnh 1.12 #include "CPP_OPTIONS.h"
4 cnh 1.1
5     CStartOfInterface
6     SUBROUTINE INI_FORCING( myThid )
7     C /==========================================================\
8     C | SUBROUTINE INI_FORCING |
9     C | o Set model initial forcing fields. |
10     C \==========================================================/
11 adcroft 1.14 IMPLICIT NONE
12 cnh 1.1
13     C === Global variables ===
14     #include "SIZE.h"
15     #include "EEPARAMS.h"
16     #include "PARAMS.h"
17     #include "GRID.h"
18     #include "FFIELDS.h"
19    
20     C == Routine arguments ==
21     C myThid - Number of this instance of INI_FORCING
22     INTEGER myThid
23     CEndOfInterface
24    
25     C == Local variables ==
26     C iG, jG - Global coordinate index
27     C bi,bj - Loop counters
28     C I,J,K
29     INTEGER iG, jG
30     INTEGER bi, bj
31     INTEGER I, J, K
32    
33 cnh 1.6 _BARRIER
34    
35 adcroft 1.10 DO bj = myByLo(myThid), myByHi(myThid)
36     DO bi = myBxLo(myThid), myBxHi(myThid)
37     DO j=1-OLy,sNy+OLy
38     DO i=1-OLx,sNx+OLx
39 adcroft 1.15 fu (i,j,bi,bj) = 0. _d 0
40     fv (i,j,bi,bj) = 0. _d 0
41     Qnet (i,j,bi,bj) = 0. _d 0
42     EmPmR(i,j,bi,bj) = 0. _d 0
43     SST (i,j,bi,bj) = 0. _d 0
44     SSS (i,j,bi,bj) = 0. _d 0
45 adcroft 1.16 Qsw (i,j,bi,bj) = 0. _d 0
46 adcroft 1.10 ENDDO
47     ENDDO
48     ENDDO
49     ENDDO
50 adcroft 1.15 C
51 adcroft 1.16 _BEGIN_MASTER(myThid)
52     IF ( zonalWindFile .NE. ' ' ) THEN
53     CALL READ_FLD_XY_RS( zonalWindFile, ' ', fu, 0, myThid )
54     ENDIF
55     IF ( meridWindFile .NE. ' ' ) THEN
56     CALL READ_FLD_XY_RS( meridWindFile, ' ', fv, 0, myThid )
57     ENDIF
58     IF ( surfQFile .NE. ' ' ) THEN
59     CALL READ_FLD_XY_RS( surfQFile, ' ', Qnet, 0, myThid )
60     ENDIF
61     IF ( EmPmRfile .NE. ' ' ) THEN
62     CALL READ_FLD_XY_RS( EmPmRfile, ' ', EmPmR, 0, myThid )
63     ENDIF
64     IF ( thetaClimFile .NE. ' ' ) THEN
65     CALL READ_FLD_XY_RS( thetaClimFile, ' ', SST, 0, myThid )
66     ENDIF
67     IF ( saltClimFile .NE. ' ' ) THEN
68     CALL READ_FLD_XY_RS( saltClimFile, ' ', SSS, 0, myThid )
69     ENDIF
70     c IF ( surfQswFile .NE. ' ' ) THEN
71     c CALL READ_FLD_XY_RS( surfQswFile, ' ', Qsw, 0, myThid )
72     c ENDIF
73     _END_MASTER(myThid)
74     C
75 adcroft 1.15 _EXCH_XY_R4(fu , myThid )
76     _EXCH_XY_R4(fv , myThid )
77     _EXCH_XY_R4(Qnet , myThid )
78     _EXCH_XY_R4(EmPmR, myThid )
79     _EXCH_XY_R4(SST , myThid )
80     _EXCH_XY_R4(SSS , myThid )
81 adcroft 1.16 _EXCH_XY_R4(Qsw , myThid )
82 adcroft 1.10
83 adcroft 1.15 C CALL PLOT_FIELD_XYRS( fu, 'S/R INI_FORCING FU',1,myThid)
84     C CALL PLOT_FIELD_XYRS( fv, 'S/R INI_FORCING FV',1,myThid)
85 cnh 1.1
86     RETURN
87     END

  ViewVC Help
Powered by ViewVC 1.1.22