![]() |
|
|||
File indexing completed on 2025-03-03 06:10:57 UTC
view on githubraw file Latest commit b7b61e61 on 2025-03-02 15:55:22 UTC6d54cf9ca1 Ed H*0001 #include "AUTODIFF_OPTIONS.h" 2dcaa8b9a5 Patr*0002 0003 c ================================================================== 0004 c b7b61e618a Mart*0005 c adopen_adclose.F: Routines to handle the I/O of the TAF generated 2dcaa8b9a5 Patr*0006 c code. All files are direct access files. 0007 c Routines: 0008 c 0009 c o adopen - Open file (here a dummy routine). 0010 c o adclose - Close file (here a dummy routine). 0011 c 0012 c 0013 c The following input veriables are used throughout in the argument 0014 c lists: 0015 c 9274434acc Jean*0016 c name - character 2dcaa8b9a5 Patr*0017 c On entry, name is the extended tape name. 9274434acc Jean*0018 c len - integer 2dcaa8b9a5 Patr*0019 c On entry, len is the number of characters in name. 9274434acc Jean*0020 c tid - integer 2dcaa8b9a5 Patr*0021 c On entry, tid identifies the tape. 0022 c vid - integer 0023 c On entry, vid identifies the variable to be stored on 0024 c the tape. 9274434acc Jean*0025 c var - real array of dimension length 2dcaa8b9a5 Patr*0026 c On entry, var contains the values to be stored. 0027 c var must not be changed. 9274434acc Jean*0028 c size - integer 2dcaa8b9a5 Patr*0029 c On entry, size is the size in bytes of the type of 0030 c variable var. 9274434acc Jean*0031 c length - integer 2dcaa8b9a5 Patr*0032 c On entry, length is the dimension of the variable 0033 c stored on the tape. 9274434acc Jean*0034 c irec - integer 2dcaa8b9a5 Patr*0035 c On entry, irec is the record number to be written. 0036 c mythid - integer 0037 c On entry, mythid is the number of the thread or 0038 c instance of the program. 0039 c myiter - integer 0040 c On entry, myiter is the current iteration step during 0041 c the integration. 0042 c b7b61e618a Mart*0043 c TAF does not provide the two leading arguments mythid and myiter 2dcaa8b9a5 Patr*0044 c when compiling the MITgcmUV code. Instead the is a sed script avail- b7b61e618a Mart*0045 c able that does change the TAF-generated adjoint code. 2dcaa8b9a5 Patr*0046 c 0047 c Only the master thread is allowed to write data and only gobal 0048 c model arrays are allowed to be written be the subsequent routines. 0049 c Tiled data are to be stored in common blocks. This implies that at 0050 c least a two level checkpointing for the adjoint code has to be 0051 c available. 0052 c 0053 c ================================================================== 0054 0055 d151781088 Patr*0056 CBOP 0057 C !ROUTINE: adopen 0058 C !INTERFACE: 2dcaa8b9a5 Patr*0059 subroutine adopen( 0060 I mythid, 0061 cph( 0062 cph I myiter, 0063 cph) 0064 I name, 0065 I len, 0066 I tid, 0067 I vid, 0068 I size, 0069 I length 0070 & ) 0071 d151781088 Patr*0072 C !DESCRIPTION: \bv 2dcaa8b9a5 Patr*0073 c ================================================================== 0074 c SUBROUTINE adopen 0075 c ================================================================== b7b61e618a Mart*0076 c o Dummy routine expected to be available by TAF I/O. 2dcaa8b9a5 Patr*0077 c This routine is simply a dummy routine expected to be available by b7b61e618a Mart*0078 c the Transformation of Algorithm in Fortran (TAF). Files are opened 0079 c and closed by the routines that are called by *adread* and 2dcaa8b9a5 Patr*0080 c *adwrite*. 0081 c started: Christian Eckert eckert@mit.edu 30-Jun-1999 0082 c ================================================================== 0083 c SUBROUTINE adopen 0084 c ================================================================== d151781088 Patr*0085 C \ev 2dcaa8b9a5 Patr*0086 d151781088 Patr*0087 C !USES: 2dcaa8b9a5 Patr*0088 implicit none 0089 0090 c == global variables == 0091 d151781088 Patr*0092 C !INPUT/OUTPUT PARAMETERS: 2dcaa8b9a5 Patr*0093 c == routine arguments == d151781088 Patr*0094 c name - extended tape name. 0095 c len - number of characters in name. 0096 c tid - tape identifier. 0097 c vid - identifies the variable to be stored on tape. 0098 c size - size in bytes of the type of variable var. 0099 c length - dimension of the variable stored on the tape. 0100 c mythid - number of the thread or instance of the program. 2dcaa8b9a5 Patr*0101 0102 integer mythid 0103 cph( 0104 cph integer myiter 0105 cph) 0106 character*(*) name 0107 integer len 0108 integer tid 0109 integer vid 0110 integer size 0111 integer length 0112 d151781088 Patr*0113 C !LOCAL VARIABLES: 2dcaa8b9a5 Patr*0114 c == local variables == 0115 0116 c == end of interface == d151781088 Patr*0117 CEOP 2dcaa8b9a5 Patr*0118 0119 return 0120 end 0121 0122 d151781088 Patr*0123 CBOP 0124 C !ROUTINE: adclose 0125 C !INTERFACE: 2dcaa8b9a5 Patr*0126 subroutine adclose( 0127 I mythid, 0128 cph( 0129 cph I myiter, 0130 cph) 0131 I name, 0132 I len, 0133 I tid, 0134 I vid, 0135 I size, 0136 I length 0137 & ) 0138 0139 d151781088 Patr*0140 C !DESCRIPTION: \bv 2dcaa8b9a5 Patr*0141 c ================================================================== 0142 c SUBROUTINE adclose 0143 c ================================================================== b7b61e618a Mart*0144 c o Dummy routine expected to be available by TAF I/O. 2dcaa8b9a5 Patr*0145 c This routine is simply a dummy routine expected to be available by b7b61e618a Mart*0146 c the Transformation of Algorithm in Fortran (TAF). Files are opened 0147 c and closed by the routines that are called by *adread* and 2dcaa8b9a5 Patr*0148 c *adwrite*. 0149 c started: Christian Eckert eckert@mit.edu 30-Jun-1999 0150 c ================================================================== 0151 c SUBROUTINE adclose 0152 c ================================================================== d151781088 Patr*0153 C \ev 2dcaa8b9a5 Patr*0154 d151781088 Patr*0155 C !USES: 2dcaa8b9a5 Patr*0156 implicit none 0157 0158 c == global variables == 0159 d151781088 Patr*0160 C !INPUT/OUTPUT PARAMETERS: 2dcaa8b9a5 Patr*0161 c == routine arguments == d151781088 Patr*0162 c name - extended tape name. 0163 c len - number of characters in name. 0164 c tid - tape identifier. 0165 c vid - identifies the variable to be stored on tape. 0166 c size - size in bytes of the type of variable var. 0167 c length - dimension of the variable stored on the tape. 0168 c mythid - number of the thread or instance of the program. 2dcaa8b9a5 Patr*0169 0170 integer mythid 0171 cph( 0172 cph integer myiter 0173 cph) 0174 character*(*) name 0175 integer len 0176 integer tid 0177 integer vid 0178 integer size 0179 integer length 0180 d151781088 Patr*0181 C !LOCAL VARIABLES: 2dcaa8b9a5 Patr*0182 c == local variables == 0183 0184 c == end of interface == d151781088 Patr*0185 CEOP 2dcaa8b9a5 Patr*0186 0187 return 0188 end
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated from https://github.com/MITgcm/MITgcm by the 2.2.1-MITgcm-0.1 LXR engine. The LXR team |
![]() ![]() |