File indexing completed on 2023-11-05 05:11:20 UTC
view on githubraw file Latest commit 65754df4 on 2023-11-04 17:55:24 UTC
e9a88bebd8 Patr*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
e9a88bebd8 Patr*0014
2e7aec9951 dngo*0015
0016
e9a88bebd8 Patr*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 #include "DYNVARS.h"
0028 #include "FFIELDS.h"
0029 #include "CTRL_SIZE.h"
4d72283393 Mart*0030 #include "CTRL.h"
e9a88bebd8 Patr*0031 #include "CTRL_GENARR.h"
edcd27be69 Mart*0032 #include "CTRL_DUMMY.h"
65754df434 Mart*0033 #include "OPTIMCYCLE.h"
e9a88bebd8 Patr*0034 #ifdef ALLOW_PTRACERS
0035 # include "PTRACERS_SIZE.h"
0036
0037 # include "PTRACERS_FIELDS.h"
0038 #endif
0039
0040
0041
0042 INTEGER myThid
0043
0044
0045 INTEGER ILNBLNk
0046 EXTERNAL ILNBLNK
0047
0048
0049
2e7aec9951 dngo*0050 INTEGER bi,bj
0051 INTEGER i,j,k
0052 INTEGER jmin,jmax
0053 INTEGER imin,imax
0054 INTEGER il
0055 INTEGER iarr
0056
0057 LOGICAL doglobalread
0058 LOGICAL ladinit
de57a2ec4b Mart*0059 CHARACTER*(MAX_LEN_FNAM) fnamebase
0060 CHARACTER*(MAX_LEN_FNAM) fnamegeneric
e9a88bebd8 Patr*0061 _RL fac
7c50f07931 Mart*0062 #ifdef ALLOW_GENARR2D_CONTROL
2e7aec9951 dngo*0063 _RL tmpfld2d(1-OLx:sNx+OLx,1-OLy:sNy+OLy, nSx,nSy)
7c50f07931 Mart*0064 #endif
0065 #ifdef ALLOW_GENARR3D_CONTROL
2e7aec9951 dngo*0066 _RL tmpfld3d(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
7c50f07931 Mart*0067 #endif
e9a88bebd8 Patr*0068
0069
0070 jmin = 1
0071 jmax = sNy
0072 imin = 1
0073 imax = sNx
0074
2e7aec9951 dngo*0075 doglobalread = .FALSE.
0076 ladinit = .FALSE.
e9a88bebd8 Patr*0077 fac = 1. _d 0
0078
0079 #ifdef ALLOW_GENARR2D_CONTROL
0080
0081
0082
0083
0084
0085
0086
0087 DO iarr = 1, maxCtrlArr2D
0088
0089 fnamebase = xx_genarr2d_file(iarr)
0090 il=ILNBLNK( fnamebase )
de57a2ec4b Mart*0091 WRITE(fnamegeneric,'(2A,I10.10)')
e9a88bebd8 Patr*0092 & fnamebase(1:il),'.',optimcycle
0093 CALL ACTIVE_READ_XY ( fnamegeneric, tmpfld2d, 1,
0094 & doglobalread, ladinit, optimcycle,
0095 & myThid, xx_genarr2d_dummy(iarr) )
0096 DO bj=myByLo(myThid), myByHi(myThid)
0097 DO bi=myBxLo(myThid), myBxHi(myThid)
2e7aec9951 dngo*0098 DO j = jmin,jmax
0099 DO i = imin,imax
0100 IF ( iarr .EQ. 1 ) THEN
e9a88bebd8 Patr*0101 theta(i,j,1,bi,bj) = theta(i,j,1,bi,bj)
0102 & + tmpfld2d(i,j,bi,bj)
2e7aec9951 dngo*0103 ELSEIF ( iarr .EQ. 2 ) THEN
e9a88bebd8 Patr*0104 salt(i,j,1,bi,bj) = salt(i,j,1,bi,bj)
0105 & + tmpfld2d(i,j,bi,bj)
2e7aec9951 dngo*0106 ENDIF
0107 ENDDO
0108 ENDDO
e9a88bebd8 Patr*0109 ENDDO
0110 ENDDO
0111
0112 ENDDO
57b21c88e4 Patr*0113
e9a88bebd8 Patr*0114 _EXCH_XYZ_RL( theta, myThid )
0115 _EXCH_XYZ_RL( salt, myThid )
0116
0117 #endif /* ALLOW_GENARR2D_CONTROL */
0118
0119 #ifdef ALLOW_GENARR3D_CONTROL
0120
0121
0122
0123
0124
0125
0126
0127 DO iarr = 1, maxCtrlArr3D
0128
0129 fnamebase = xx_genarr3d_file(iarr)
0130 il=ILNBLNK( fnamebase )
de57a2ec4b Mart*0131 WRITE(fnamegeneric,'(2A,I10.10)')
e9a88bebd8 Patr*0132 & fnamebase(1:il),'.',optimcycle
0133 CALL ACTIVE_READ_XYZ( fnamegeneric, tmpfld3d, 1,
0134 & doglobalread, ladinit, optimcycle,
0135 & myThid, xx_genarr3d_dummy(iarr) )
0136 DO bj=myByLo(myThid), myByHi(myThid)
0137 DO bi=myBxLo(myThid), myBxHi(myThid)
2e7aec9951 dngo*0138 DO k = 1,Nr
0139 DO j = jmin,jmax
0140 DO i = imin,imax
0141
57b21c88e4 Patr*0142
0143
2e7aec9951 dngo*0144
57b21c88e4 Patr*0145
0146
0147
2e7aec9951 dngo*0148 ENDDO
0149 ENDDO
0150 ENDDO
e9a88bebd8 Patr*0151 ENDDO
0152 ENDDO
0153
0154 ENDDO
57b21c88e4 Patr*0155
0156
0157
e9a88bebd8 Patr*0158
0159 #endif /* ALLOW_GENARR3D_CONTROL */
0160
0161 RETURN
0162 END