File indexing completed on 2023-11-05 05:11:26 UTC
view on githubraw file Latest commit 65754df4 on 2023-11-04 17:55:24 UTC
2e7aec9951 dngo*0001 #include "CTRL_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE CTRL_MAP_INI_GENARR( myThid )
0007
0008
0009
0010
0011
0012
4d72283393 Mart*0013
2e7aec9951 dngo*0014
0015
0016
0017
0018
0019
0020 IMPLICIT NONE
0021
0022
0023 #include "SIZE.h"
0024 #include "EEPARAMS.h"
0025 #include "PARAMS.h"
0026 #include "GRID.h"
0027
0028 #include "FFIELDS.h"
0029 #include "CTRL_SIZE.h"
4d72283393 Mart*0030 #include "CTRL.h"
2e7aec9951 dngo*0031 #include "CTRL_GENARR.h"
edcd27be69 Mart*0032 #include "CTRL_DUMMY.h"
65754df434 Mart*0033 #include "OPTIMCYCLE.h"
2e7aec9951 dngo*0034
0035
0036
0037 INTEGER myThid
0038
0039
0040 INTEGER ILNBLNk
0041 EXTERNAL ILNBLNK
0042
0043
0044
0045 INTEGER bi,bj
0046 INTEGER i,j
0047 INTEGER il
0048 INTEGER iarr
0049
0050 LOGICAL doglobalread
0051 LOGICAL ladinit
0052 CHARACTER*(MAX_LEN_FNAM) fnamebase
de57a2ec4b Mart*0053 CHARACTER*(MAX_LEN_FNAM) fnamegeneric
2e7aec9951 dngo*0054 _RL fac
0055 #ifdef ALLOW_GENARR2D_CONTROL
0056 _RL tmpfld2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy, nSx,nSy)
0057 #endif
0058 #ifdef ALLOW_GENARR3D_CONTROL
0059 INTEGER k
0060 _RL tmpfld3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
0061 #endif
0062
0063
0064 doglobalread = .FALSE.
0065 ladinit = .FALSE.
0066 fac = 1. _d 0
0067
0068 #ifdef ALLOW_GENARR2D_CONTROL
0069
0070
0071
0072
0073
0074
0075
0076 DO iarr = 1, maxCtrlArr2D
0077
0078
0079
0080
0081 DO bj=myByLo(myThid), myByHi(myThid)
0082 DO bi=myBxLo(myThid), myBxHi(myThid)
0083 DO j = 1,sNy
0084 DO i = 1,sNx
0085 tmpfld2d(i,j,bi,bj) = 0. _d 0
0086 ENDDO
0087 ENDDO
0088 ENDDO
0089 ENDDO
0090 fnamebase = xx_genarr2d_file(iarr)
0091 il=ILNBLNK( fnamebase )
de57a2ec4b Mart*0092 WRITE(fnamegeneric,'(2A,I10.10)')
2e7aec9951 dngo*0093 & fnamebase(1:il),'.',optimcycle
0094 CALL ACTIVE_READ_XY ( fnamegeneric, tmpfld2d, 1,
0095 & doglobalread, ladinit, optimcycle,
0096 & myThid, xx_genarr2d_dummy(iarr) )
0097 IF ( iarr .EQ. 1 ) THEN
0098 DO bj=myByLo(myThid), myByHi(myThid)
0099 DO bi=myBxLo(myThid), myBxHi(myThid)
0100 DO j = 1,sNy
0101 DO i = 1,sNx
0102 Qnetm(i,j,bi,bj) = Qnetm(i,j,bi,bj)
0103 & + fac*tmpfld2d(i,j,bi,bj)
0104 ENDDO
0105 ENDDO
0106 ENDDO
0107 ENDDO
0108 ENDIF
0109
0110 ENDDO
0111 _EXCH_XY_RS( Qnetm, myThid )
0112
0113 #endif /* ALLOW_GENARR2D_CONTROL */
0114
0115 #ifdef ALLOW_GENARR3D_CONTROL
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125 DO iarr = 1, maxCtrlArr3D
0126
0127 DO bj=myByLo(myThid), myByHi(myThid)
0128 DO bi=myBxLo(myThid), myBxHi(myThid)
0129 DO k = 1,Nr
0130 DO j = 1,sNy
0131 DO i = 1,sNx
0132 tmpfld3d(i,j,k,bi,bj) = 0. _d 0
0133 ENDDO
0134 ENDDO
0135 ENDDO
0136 ENDDO
0137 ENDDO
0138 fnamebase = xx_genarr3d_file(iarr)
0139 il=ILNBLNK( fnamebase )
de57a2ec4b Mart*0140 WRITE(fnamegeneric,'(2A,I10.10)')
2e7aec9951 dngo*0141 & fnamebase(1:il),'.',optimcycle
0142 CALL ACTIVE_READ_XYZ( fnamegeneric, tmpfld3d, 1,
0143 & doglobalread, ladinit, optimcycle,
0144 & myThid, xx_genarr3d_dummy(iarr) )
0145 IF ( iarr .EQ. 1 ) THEN
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159 ENDIF
0160
0161
0162 ENDDO
0163
0164 #endif /* ALLOW_GENARR3D_CONTROL */
0165
0166 RETURN
0167 END