13 |
C | and updating of forcing terms in a single place. | |
C | and updating of forcing terms in a single place. | |
14 |
C | The approach to IO used here is that writes are only | |
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 | |
C | performed by thread 1 and that a process only writes out | |
16 |
C | its data ( since it doen't know about anyone elses data!)| |
C | its data ( it does not know about anyone elses data!) | |
17 |
C | Reading on the other hand is assumed to be from a file | |
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 | |
C | containing all the data for all the processes. Only the | |
19 |
C | portion of data of interest to this process is actually | |
C | portion of data of interest to this process is actually | |
20 |
C | loaded. To work well this assumes the existence of some | |
C | loaded. To work well this assumes the existence of some | |
21 |
C | reliable tool to join datasets together at the end of a | |
C | reliable tool to join datasets together at the end of a | |
22 |
C | run. | |
C | run - see joinds.p | |
|
C | Notes | |
|
|
C | ===== | |
|
|
C | We allow thread 2-nThreads to continue whilst thread 1 | |
|
|
C | does IO. The assumption is that the other threads won't | |
|
|
C | do anything to update their interior regions before | |
|
|
C | thread 1 has finished writing them out. | |
|
23 |
C \==========================================================/ |
C \==========================================================/ |
24 |
|
|
25 |
C == Global variables === |
C == Global variables === |
45 |
CHARACTER*(MAX_LEN_FNAM) suff |
CHARACTER*(MAX_LEN_FNAM) suff |
46 |
|
|
47 |
|
|
48 |
C-- Generaly only thread 1 does IO here. It can't start until everyone's |
C-- Generaly only thread 1 does IO here. It can not start until |
49 |
C-- fields are ready. |
C-- all threads fields are ready. |
50 |
IF ( MOD(myIter,1000) .EQ. 0 ) THEN |
IF ( |
51 |
|
& DIFFERENT_MULTIPLE(dumpFreq,myCurrentTime, |
52 |
|
& myCurrentTime-deltaTClock) |
53 |
|
& ) THEN |
54 |
|
|
55 |
_BARRIER |
_BARRIER |
56 |
|
|
57 |
C-- Write "text-plots" of certain fields |
C-- Write "text-plots" of certain fields |
58 |
CALL PLOT_FIELD_XYZR8( uVel , 'uVel ' , Nz, myIter, myThid ) |
CALL PLOT_FIELD_XYZRL( uVel , 'Current uVel ' , |
59 |
CALL PLOT_FIELD_XYZR8( vVel , 'vVel ' , Nz, myIter, myThid ) |
& Nr, myIter, myThid ) |
60 |
CALL PLOT_FIELD_XYZR8( theta, 'Theta ' , Nz, myIter, myThid ) |
CALL PLOT_FIELD_XYZRL( vVel , 'Current vVel ' , |
61 |
CALL PLOT_FIELD_XYZR8( rho, 'rho ' , Nz, myIter, myThid ) |
& Nr, myIter, myThid ) |
62 |
CALL PLOT_FIELD_XYR8( cg2d_x, 'cg2d_x ' , myIter, myThid ) |
CALL PLOT_FIELD_XYZRL( theta, 'Current theta ' , |
63 |
|
& Nr, myIter, myThid ) |
64 |
|
CALL PLOT_FIELD_XYRL( cg2d_x, 'Current cg2d_x ' , |
65 |
|
& myIter, myThid ) |
66 |
|
|
67 |
ENDIF |
ENDIF |
68 |
|
|
69 |
C-- Write model state to binary file |
C-- Write model state to binary file |
70 |
CALL WRITE_STATE( myCurrentTime, myIter, myThid ) |
CALL WRITE_STATE( .FALSE., myCurrentTime, myIter, myThid ) |
71 |
C WRITE(suff,'(I10.10)') myIter |
|
|
C CALL DFILE_SET_RW |
|
|
C CALL DFILE_SET_CONT_ON_ERROR |
|
|
C CALL WRITE_FLD_XYZ( 'U.',suff, uVel) |
|
|
C CALL WRITE_FLD_XYZ( 'V.',suff, vVel) |
|
|
C CALL WRITE_FLD_XYZ( 'T.',suff, theta) |
|
|
C CALL WRITE_FLD_XYZ( 'S.',suff, salt) |
|
|
C CALL WRITE_FLD_XYZ( 'W.',suff, IO_tmp3d) |
|
|
C CALL WRITE_FLD_XYZ('RHO.',suff, IO_tmp3d) |
|
|
C CALL WRITE_FLD_XYZ( 'PH.',suff, IO_tmp3d) |
|
|
C CALL WRITE_FLD_XY ( 'PS.',suff, IO_tmp2d) |
|
|
|
|
|
C-- Write model checkpoint files |
|
|
C nCheck = 1,2,...nCheckLev, 1,2,...nCheckLev, etc... |
|
|
C CALL WRITE_CHECKPOINT( myIter, myThid ) |
|
|
C nCheck = MOD(nCheck,nCheckLev)+1 |
|
|
C suff = checkPtSuff(nCheck) |
|
|
C CALL DFILE_SET_RW |
|
|
C CALL DFILE_SET_CONT_ON_ERROR |
|
|
C CALL WRITE_FLD_XYZ( 'uVel.',suff,uVel ) |
|
|
C CALL WRITE_FLD_XYZ( 'vVel.',suff,vVel ) |
|
|
C CALL WRITE_FLD_XYZ( 'theta.',suff,theta ) |
|
|
C CALL WRITE_FLD_XYZ( 'salt.',suff,salt ) |
|
|
C CALL WRITE_FLD_XY ('cg2d_x.',suff,cg2d_x) |
|
|
C CALL WRITE_FLD_XYZ( 'gu.',suff,gu ) |
|
|
C CALL WRITE_FLD_XYZ( 'gv.',suff,gv ) |
|
|
C CALL WRITE_FLD_XYZ( 'gunm1.',suff,gunm1 ) |
|
|
C CALL WRITE_FLD_XYZ( 'gvnm1.',suff,gvnm1 ) |
|
|
|
|
|
_BARRIER |
|
72 |
C |
C |
73 |
RETURN |
RETURN |
74 |
END |
END |