Changeset 4148
- Timestamp:
- 2013-11-04T13:54:28+01:00 (11 years ago)
- Location:
- branches/2013/dev_LOCEAN_2013
- Files:
-
- 20 deleted
- 51 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_2013/DOC/TexFiles/Chapters/Chap_DIA.tex
r4147 r4148 1 1 % ================================================================ 2 % Chapter �I/O & Diagnostics2 % Chapter � I/O & Diagnostics 3 3 % ================================================================ 4 4 \chapter{Ouput and Diagnostics (IOM, DIA, TRD, FLO)} … … 31 31 "\textit{grep -i numout}" in the source code directory. 32 32 33 In the standard configuration, the user will find the model results in 34 NetCDF files containing mean values (or instantaneous values if 35 \key{diainstant} is defined) for every time-step where output is demanded. 36 These outputs are defined in the \mdl{diawri} module. 37 When defining \key{dimgout}, the output are written in DIMG format, 38 an IEEE output format. 39 40 Since version 3.2, an I/O server has been added which provides more 41 flexibility in the choice of the fields to be output as well as how the 42 writing work is distributed over the processors in massively parallel 43 computing. It is presented in next section. 44 33 By default, outpout files are written in NetCDF format but an IEEE output format, called DIMG, can be choosen when defining \key{dimgout}. Since version 3.2, when defining \key{iomput}, an I/O server has been added which provides more flexibility in the choice of the fields to be outputted as well as how the writing work is distributed over the processors in massively parallel computing. The complete description of the use of this I/O server is presented in next section. If neither \key{iomput} nor \key{dimgout} are defined, NEMO is producing NetCDF with the old IOIPSL library which has been kept for compatibility and its easy installation, but it is quite inefficient on parrallel machines. If \key{iomput} is not defined, output files are defined in the \mdl{diawri} module and containing mean (or instantaneous if \key{diainstant} is defined) values over a period of nn\_write time-step (namelist parameter). 45 34 46 35 %\gmcomment{ % start of gmcomment … … 53 42 54 43 55 Since version 3.2, iom\_put is the NEMO output interface. It was designed to be simple to use, 56 flexible and efficient. Two main functionalities are covered by iom\_put: 57 (1) the control of the output files through an external xml file defined by the user ; 58 (2) the distribution (or not) of all task related to output files on dedicated processors. 59 The first functionality allows the user to specify, without touching anything into the code, 60 the way he want to output data: \\ 44 Since version 3.2, iomput is the NEMO output interface. It was designed to be simple to use, flexible and efficient. The two main purposes of iomput are: \\ 45 (1) the complete and flexible control of the output files through an external xml file defined by the user \\ 46 (2) to achieve high performance outputs through the distribution (or not) of all tasks related to output files on dedicated processes. \\ 47 The first functionality allows the user to specify, without touching anything into the code, the way he want to output data: \\ 61 48 - choice of output frequencies that can be different for each file (including real months and years) \\ 62 - choice of file contents: decide which data will be written in which file (the same data can be 63 outputted in different files)\\64 - possibility to extract a subdomain (for example all TAO-PIRATA-RAMA moorings are already defined)\\65 - choice of the temporal operation to perform: mean, instantaneous, min, max\\49 - choice of file contents: decide which data will be written in which file (the same data can be outputted in different files) \\ 50 - possibility to split output files at a choosen frequency \\ 51 - possibility to extract a vertical or an horizontal subdomain \\ 52 - choice of the temporal operation to perform: average, accumulate, instantaneous, min, max and once \\ 66 53 - extremely large choice of data available \\ 67 54 - redefine variables name and long\_name \\ 68 In addition, iom\_put allows the user to output any variable (scalar, 2D or 3D) in the code 69 in a very easy way. All details of iom\_put functionalities are listed in the following subsections. 70 An example of the iodef.xml file that control the outputs can be found here: 71 NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/iodef.xml 72 73 The second functionality targets outputs performances when running on a very large number of processes. 74 The idea is to dedicate N specific processes to write the outputs, where N is defined by the user. 75 In the current version, this functionality is technically working however, its performance are usually poor 76 (for known reasons). Users can therefore test this functionality but they must be aware that expected 77 performance improvement will not be achieved before the release 3.4. 78 An example of xmlio\_server.def NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/xmlio\_server.def 79 55 In addition, iomput allows the user to output any variable (scalar, 2D or 3D) in the code in a very easy way. All details of iomput functionalities are listed in the following subsections. Example of the iodef.xml files that control the outputs can be found here: NEMOGCM/CONFIG/ORCA2\_LIM/EXP00/iodef*.xml 56 57 The second functionality targets outputs performances when running on a very large number of processes. First, iomput provides the possibility to dedicate N specific processes (in addition to NEMO processes) to write the outputs, where N is big enough (and defined by the user) to suppress the bottle neck associated with the the writing of the output files. Since version 3.5, this interface depends on an external code called \href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}. This new IO server takes advantage of the new functionalitiy of NetCDF4 that allows the user to write files in parallel and therefore to bypass the rebuilding phase. Note that writting in parallel into the same NetCDF files requires that your NetCDF4 library is linked to an HDF5 library that has been correctly compiled (i.e. with the configure option $--$enable-parallel). Note that the files created by iomput trough xios are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 80 58 81 59 \subsection{Basic knowledge} … … 93 71 \subsubsection{Structure of the xml file used in NEMO} 94 72 95 The xml file is split into 3 parts:73 The XML file used in XIOS is structured by 7 families of tags: context, axis, domain, grid, field, file and variable. Each tag family has hierarchy of three flavors (except for context): 96 74 \begin{description} 97 \item[field definition]: define all variables that can be output \\ 98 all lines in between the following two tags\\ 99 \verb? <field\_definition ...> ? \\ 100 \verb? </field\_definition ...> ? 75 \item[root]: declaration of the root element that can contain element groups or elements, for example : $<$file\_definition ...$/>$ \\ 76 \item[group]: declaration of a group element that can contain element groups or elements, for example : $<$file\_group ...$/>$ \\ 77 \item[element]: declaration of an element that can contain elements, for example : $<$file ...$/>$ \\ 78 \end{description} 79 80 Each element may have several attributes. Some attributes are mandatory, other are optional but have a default value and other are are completely optional. Id is a special attribute used to identify an element or a group of elements. It must be unique for a kind of element. It is optional, but no reference to the corresponding element can be done if it is not defined. 81 82 The XML file is split into context tags that are used to isolate IO definition from different codes or different parts of a code. No interference is possible between 2 different contexts. Each context has its own calendar and an associated timestep. In NEMO, we used the following contexts (that can be defined in any order): 83 \begin{description} 84 \item[contex xios]: context containing informations for XIOS \\ 85 \verb? <context id="xios" ... ? 86 \item[context nemo]: contex containing IO informations for NEMO (mother grid when using AGRIF) \\ 87 \verb? <context id="nemo" ... ? 88 \item[context 1\_nemo]: contex containing IO informations for NEMO child grid 1 (when using AGRIF) \\ 89 \verb? <context id="1_nemo" ... ? 90 \item[context n\_nemo]: contex containing IO informations for NEMO child grid n (when using AGRIF) \\ 91 \verb? <context id="n_nemo" ... ? 92 \end{description} 93 94 Each context tag related to NEMO (mother or child grids) is divided into 5 parts (that can be defined in any order): 95 \begin{description} 96 \item[field definition]: define all variables that can potentially be outputted \\ 97 \verb? <field_definition ... ? 101 98 \item[file definition]: define the netcdf files to be created and the variables they will contain \\ 102 all lines in between the following two tags \\ 103 \verb? <field\_definition> ? \\ 104 \verb? </field\_definition> ? 105 \item[axis and grid definitions]: define the horizontal and vertical grids \\ 106 all lines in between the following two set of two tags\\ 107 \verb? <axis\_definition ...> ? \\ 108 \verb? </axis\_definition ...> ? 109 and \\ 110 \verb? <grid\_definition ...> ? \\ 111 \verb? </grid\_definition ...> ? 99 \verb? <file_definition ... ? 100 \item[axis definitions]: define vertical axis \\ 101 \verb? <axis_definition ... ? 102 \item[domain definitions]: define the horizontal grids \\ 103 \verb? <domain_definition ... ? 104 \item[grid definitions]: define the 2D and 3D grids (association of an axis and a domain) \\ 105 \verb? <grid_definition ... ? 112 106 \end{description} 113 107 114 \subsubsection{Inheritance and group } 115 116 Xml extensively uses the concept of inheritance. \\ 108 the xios context contains only 1 tag: 109 \begin{description} 110 \item[variable definition]: define variables needed by xios. This can be seen as a kind of namelist for xios. \\ 111 \verb? <variable_definition ... ? 112 \end{description} 113 114 The XML file can be split in different parts to improve its readability and facilitate its use. The inclusing of XML files into the main XML file can be done through the attribute src: \\ 115 \verb? <context src="./nemo_def.xml" /> ? 116 In NEMO, by default, the field and domain définition is done in 2 séparate files: \\ 117 NEMOGCM/CONFIG/SHARED/field\_def.xml and \\ 118 NEMOGCM/CONFIG/SHARED/domain\_def.xml that are included in the main iodef.xml file through the following commands: \\ 119 \verb? <field_definition src="./field_def.xml" /> ? \\ 120 \verb? <domain_definition src="./domain_def.xml" /> ? 121 122 123 \subsubsection{Use of inheritance} 124 125 XML extensively uses the concept of inheritance. XML has a based tree structure with a parent-child oriented relation: all children inherit attributes from parent, but an attribute defined in a child replace the inherited attribute value. Note that the special attribute ''id'' is never inherited. \\ 117 126 \\ 118 example 1: \\ 119 \vspace{-30pt} 127 example 1: Direct inheritance. \\ 120 128 \begin{alltt} {{\scriptsize 121 129 \begin{verbatim} 122 <field_definition operation="ave (X)" >130 <field_definition operation="average" > 123 131 <field id="sst" /> <!-- averaged sst --> 124 <field id="sss" operation="inst (X)"/> <!-- instantaneous sss -->132 <field id="sss" operation="instant"/> <!-- instantaneous sss --> 125 133 </field_definition> 126 134 \end{verbatim} 127 135 }}\end{alltt} 128 136 129 The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''ave (X)''130 of the attribute ''operation'' from its parent ''field definition''. Note that a child can overwrite137 The field ''sst'' which is part (or a child) of the field\_definition will inherit the value ''average'' 138 of the attribute ''operation'' from its parent. Note that a child can overwrite 131 139 the attribute definition inherited from its parents. In the example above, the field ''sss'' will 132 therefore output instantaneous values instead of average values. 133 134 example 2: Use (or overwrite) attributes value of a field when listing the variables included in a file 135 \vspace{-20pt} 140 for example output instantaneous values instead of average values. \\ 141 \\ 142 example 2: Inheritance by reference. \\ 136 143 \begin{alltt} {{\scriptsize 137 144 \begin{verbatim} 138 145 <field_definition> 139 <field id="sst" description="sea surface temperature" />140 <field id="sss" description="sea surface salinity" />146 <field id="sst" long_name="sea surface temperature" /> 147 <field id="sss" long_name="sea surface salinity" /> 141 148 </field_definition> 142 149 143 150 <file_definition> 144 <file id=" file_1" />145 <field ref="sst"/> <!-- default def -->146 <field ref="sss" description="my description" /> <!-- overwrite -->151 <file id="myfile" output_freq="1d" /> 152 <field field_ref="sst" /> <!-- default def --> 153 <field field_ref="sss" long_name="my description" /> <!-- overwrite --> 147 154 </file> 148 155 </file_definition> 149 156 \end{verbatim} 150 157 }}\end{alltt} 151 152 With the help of the inheritance, the concept of group allow to define a set of attributes 153 for several fields or files. 154 155 example 3, group of fields: define a group ''T\_grid\_variables'' identified with the name 156 ''grid\_T''. By default variables of this group have no vertical axis but, following inheritance 157 rules, ''axis\_ref'' can be redefined for the field ''toce'' that is a 3D variable. 158 \vspace{-30pt} 159 \begin{alltt} {{\scriptsize 160 \begin{verbatim} 161 <field_definition> 162 <group id="grid_T" axis_ref="none" grid_ref="T_grid_variables"> 163 <field id="sst"/> 164 <field id="sss"/> 165 <field id="toce" axis_ref="deptht"/> <!-- overwrite axis def --> 166 </group> 167 </field_definition> 168 \end{verbatim} 169 }}\end{alltt} 170 171 example 4, group of files: define a group of file with the attribute output\_freq equal to 432000 (5 days) 172 \vspace{-30pt} 173 \begin{alltt} {{\scriptsize 174 \begin{verbatim} 175 <file_definition> 176 <group id="5d" output_freq="432000"> <!-- 5d files --> 177 <file id="5d_grid_T" name="auto"> <!-- T grid file --> 158 Inherite (and overwrite, if needed) the attributes of a tag you are refering to. 159 160 \subsubsection{Use of Group} 161 162 Groups can be used fort 2 purposes. \\ 163 164 First, the group can be used to define common attributes to be shared by the elements of the group through the inheritance. In the following example, we define a group of field that will share a common grid ''grid\_T\_2D''. Note that for the field ''toce'', we overwrite the grid definition inherited from the group by ''grid\_T\_3D''. 165 \begin{alltt} {{\scriptsize 166 \begin{verbatim} 167 <field_group id="grid_T" grid_ref="grid_T_2D"> 168 <field id="toce" long_name="temperature" unit="degC" grid_ref="grid_T_3D"/> 169 <field id="sst" long_name="sea surface temperature" unit="degC" /> 170 <field id="sss" long_name="sea surface salinity" unit="psu" /> 171 <field id="ssh" long_name="sea surface height" unit="m" /> 178 172 ... 179 </file> 180 <file id="5d_grid_U" name="auto"> <!-- U grid file --> 173 \end{verbatim} 174 }}\end{alltt} 175 176 Second, the group can be used to replace a list of elements. Several examples of groups of fields are proposed at the end of the file \\ 177 NEMOGCM/CONFIG/SHARED/field\_def.xml. For example, a short list of usual variables related to the U grid: 178 \begin{alltt} {{\scriptsize 179 \begin{verbatim} 180 <field_group id="groupU" > 181 <field field_ref="uoce" /> 182 <field field_ref="suoce" /> 183 <field field_ref="utau" /> 184 </field_group> 185 \end{verbatim} 186 }}\end{alltt} 187 that can be directly include in a file through the following syntaxe: 188 \begin{alltt} {{\scriptsize 189 \begin{verbatim} 190 <file id="myfile_U" output_freq="1d" /> 191 <field_group group_ref="groupU"/> 192 <field field_ref="uocetr_eff" /> <!-- add another field --> 193 </file> 194 \end{verbatim} 195 }}\end{alltt} 196 197 \subsection{Detailed functionalities } 198 199 The file NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml provides several examples of the use of the new functionalities offered by the XML interface of XIOS. 200 201 \subsubsection{Define horizontal subdomains} 202 Horizontal subdomains are defined through the attributs zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj of the tag family domain. It must therefore be done in the domain part of the XML file. For example, in NEMOGCM/CONFIG/SHARED/domain\_def.xml, we provide the following example of a definition of a 5 by 5 box with the bottom left corner at point (10,10). 203 \begin{alltt} {{\scriptsize 204 \begin{verbatim} 205 <domain_group id="grid_T"> 206 <domain id="myzoom" zoom_ibegin="10" zoom_jbegin="10" zoom_ni="5" zoom_nj="5" /> 207 \end{verbatim} 208 }}\end{alltt} 209 The use of this subdomain is done through the redefinition of the attribute domain\_ref of the tag family field. For example: 210 \begin{alltt} {{\scriptsize 211 \begin{verbatim} 212 <file id="myfile_vzoom" output_freq="1d" > 213 <field field_ref="toce" domain_ref="myzoom"/> 214 </file> 215 \end{verbatim} 216 }}\end{alltt} 217 Moorings are seen as an extrem case corresponding to a 1 by 1 subdomain. The Equatorial section, the TAO, RAMA and PIRATA moorings are alredy registered in the code and can therefore be outputted without taking care of their (i,j) position in the grid. These predefined domains can be activated by the use of specific domain\_ref: ''EqT'', ''EqU'' or ''EqW'' for the equatorial sections and the mooring position for TAO, RAMA and PIRATA followed by ''T'' (for example: ''8s137eT'', ''1.5s80.5eT'' ...) 218 \begin{alltt} {{\scriptsize 219 \begin{verbatim} 220 <file id="myfile_vzoom" output_freq="1d" > 221 <field field_ref="toce" domain_ref="0n180wT"/> 222 </file> 223 \end{verbatim} 224 }}\end{alltt} 225 Note that if the domain decomposition used in XIOS cuts the subdomain in several parts and if you use the ''multiple\_file'' type for your output files, you will endup with several files you will need to rebuild using unprovided tools (like ncpdq and ncrcat, \href{http://nco.sourceforge.net/nco.html#Concatenation}{see nco manual}). We are therefore advising to use the ''one\_file'' type in this case. 226 227 \subsubsection{Define vertical zooms} 228 Vertical zooms are defined through the attributs zoom\_begin and zoom\_end of the tag family axis. It must therefore be done in the axis part of the XML file. For example, in NEMOGCM/CONFIG/ORCA2\_LIM/iodef\_demo.xml, we provide the following example: 229 \begin{alltt} {{\scriptsize 230 \begin{verbatim} 231 <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 232 <axis id="deptht" /> 233 <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 234 \end{verbatim} 235 }}\end{alltt} 236 The use of this vertical zoom is done through the redefinition of the attribute axis\_ref of the tag family field. For example: 237 \begin{alltt} {{\scriptsize 238 \begin{verbatim} 239 <file id="myfile_hzoom" output_freq="1d" > 240 <field field_ref="toce" axis_ref="deptht_myzoom"/> 241 </file> 242 \end{verbatim} 243 }}\end{alltt} 244 245 \subsubsection{Control of the output file names} 246 247 The output file names are defined by the attributs ''name'' and ''name\_suffix'' of the tag family file. for example: 248 \begin{alltt} {{\scriptsize 249 \begin{verbatim} 250 <file_group id="1d" output_freq="1d" name="myfile_1d" > 251 <file id="myfileA" name_suffix="_AAA" > <!-- will create file "myfile_1d_AAA" --> 181 252 ... 182 </file> 183 </group> 184 </file_definition> 185 \end{verbatim} 186 }}\end{alltt} 187 188 \subsubsection{Control of the xml attributes from NEMO} 189 190 The values of some attributes are automatically defined by NEMO (and any definition 191 given in the xml file is overwritten). By convention, these attributes are defined to ''auto'' 192 (for string) or ''0000'' (for integer) in the xml file (but this is not necessary). 253 </file> 254 <file id="myfileB" name_suffix="_BBB" > <!-- will create file "myfile_1d_BBB" --> 255 ... 256 </file> 257 </file_group> 258 \end{verbatim} 259 }}\end{alltt} 260 However it is also often very convienent to define the file name with the name of the experience, the output file frequency and the date of the beginning and the end of the simulation (which are informations stored either in the namelist or in the XML file). To do so, we added the following rule: if the id of the tag file is ''fileN''(where N = 1 to 99) or one of the predefined section or mooring (see next subsection), the following part of the name and the name\_suffix (that can be inherited) will be automatically replaced by: \\ 261 \\ 262 \begin{tabular}{|p{4cm}|p{8cm}|} 263 \hline 264 \centering part of the name automatically to be replaced & 265 by \\ 266 \hline 267 \hline 268 \centering @expname@ & 269 the experience name (from cn\_exp in the namelist) \\ 270 \hline 271 \centering @freq@ & 272 output frequency (from attribute output\_freq) \\ 273 \hline 274 \centering @startdate@ & 275 starting date of the simulation (from nn\_date0 in the restart or the namelist). \verb?yyyymmdd? format \\ 276 \hline 277 \centering @startdatefull@ & 278 starting date of the simulation (from nn\_date0 in the restart or the namelist). \verb?yyyymmdd_hh:mm:ss? format \\ 279 \hline 280 \centering @enddate@ & 281 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \verb?yyyymmdd? format \\ 282 \hline 283 \centering @enddatefull@ & 284 ending date of the simulation (from nn\_date0 and nn\_itend in the namelist). \verb?yyyymmdd_hh:mm:ss? format \\ 285 \hline 286 \end{tabular} 287 \\ 288 289 For example, 290 291 \begin{alltt} {{\scriptsize 292 \begin{verbatim} 293 <file id="myfile_hzoom" name="myfile_@expname@_@startdate@_freq@freq@" output_freq="1d" > 294 \end{verbatim} 295 }}\end{alltt} 296 297 With, in the namelist: 298 299 \begin{alltt} {{\scriptsize 300 \begin{verbatim} 301 cn_exp = "ORCA2" 302 nn_date0 = 19891231 303 ln_rstart = .false. 304 \end{verbatim} 305 }}\end{alltt} 306 307 will give the following file name radical: 308 309 \begin{alltt} {{\scriptsize 310 \begin{verbatim} 311 myfile_ORCA2_19891231_freq1d 312 \end{verbatim} 313 }}\end{alltt} 314 315 316 \subsubsection{Other controls of the xml attributes from NEMO} 317 318 The values of some attributes are automatically defined by NEMO (and any definition given in the xml file is overwritten). By convention, these attributes are defined to ''auto'' (for string) or ''0000'' (for integer) in the xml file (but this is not necessary). 193 319 194 320 Here is the list of these attributes: \\ … … 202 328 \multicolumn{2}{|c|}{field\_definition} & freq\_op & \np{rn\_rdt} \\ 203 329 \hline 204 \multicolumn{2}{|c|}{SBC} & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc} \\ 205 \hline 206 1h, 2h, 3h, 4h, 6h, 12h & \_grid\_T, \_grid\_U, & name & filename defined by \\ 207 1d, 3d, 5d & \_grid\_V, \_grid\_W, & & a call to rou{dia\_nam} \\ 208 1m, 2m, 3m, 4m, 6m & \_icemod, \_ptrc\_T, & & following NEMO \\ 209 1y, 2y, 5y, 10y & \_diad\_T, \_scalar & & nomenclature \\ 330 \multicolumn{2}{|c|}{SBC} & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_fsbc} \\ 331 \hline 332 \multicolumn{2}{|c|}{ptrc\_T} & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 333 \hline 334 \multicolumn{2}{|c|}{diad\_T} & freq\_op & \np{rn\_rdt} $\times$ \np{nn\_dttrc} \\ 210 335 \hline 211 336 \multicolumn{2}{|c|}{EqT, EqU, EqW} & jbegin, ni, & according to the grid \\ 212 337 \multicolumn{2}{|c|}{ } & name\_suffix & \\ 213 338 \hline 214 \multicolumn{2}{|c|}{TAO, RAMA and PIRATA moorings} & ibegin, jbegin,& according to the grid \\339 \multicolumn{2}{|c|}{TAO, RAMA and PIRATA moorings} & zoom\_ibegin, zoom\_jbegin, & according to the grid \\ 215 340 \multicolumn{2}{|c|}{ } & name\_suffix & \\ 216 341 \hline … … 218 343 219 344 220 \subsection{ Detailed functionalities }221 222 345 \subsubsection{Tag list} 223 346 224 \begin{description} 225 226 \item[context]: define the model using the xml file. Id is the only attribute accepted. 227 Its value must be ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom. Child of simulation tag. 228 229 \item[field]: define the field to be output. Accepted attributes are axis\_ref, description, enable, 230 freq\_op, grid\_ref, id (if child of field\_definition), level, operation, name, ref (if child of file), 231 unit, zoom\_ref. Child of field\_definition, file or group of fields tag. 232 233 \item[field\_definition]: definition of the part of the xml file corresponding to the field definition. 234 Accept the same attributes as field tag. Child of context tag. 235 236 \item[group]: define a group of file or field. Accept the same attributes as file or field. 237 238 \item[file]: define the output file's characteristics. Accepted attributes are description, enable, 239 output\_freq, output\_level, id, name, name\_suffix. Child of file\_definition or group of files tag. 240 241 \item[file\_definition]: definition of the part of the xml file corresponding to the file definition. 242 Accept the same attributes as file tag. Child of context tag. 243 244 \item[axis]: definition of the vertical axis. Accepted attributes are description, id, positive, size, unit. 245 Child of axis\_definition tag. 246 247 \item[axis\_definition]: definition of the part of the xml file corresponding to the vertical axis definition. 248 Accept the same attributes as axis tag. Child of context tag 249 250 \item[grid]: definition of the horizontal grid. Accepted attributes are description and id. 251 Child of axis\_definition tag. 252 253 \item[grid\_definition]: definition of the part of the xml file corresponding to the horizontal grid definition. 254 Accept the same attributes as grid tag. Child of context tag 255 256 \item[zoom]: definition of a subdomain of an horizontal grid. Accepted attributes are description, id, 257 i/jbegin, ni/j. Child of grid tag. 258 259 \end{description} 347 348 \begin{tabular}{|p{2cm}|p{2.5cm}|p{3.5cm}|p{2cm}|p{2cm}|} 349 \hline 350 tag name & 351 description & 352 accepted attribute & 353 child of & 354 parent of \\ 355 \hline 356 \hline 357 simulation & 358 this tag is the root tag which encapsulates all the content of the xml file & 359 none & 360 none & 361 context \\ 362 \hline 363 context & 364 encapsulates parts of the xml file dédicated to different codes or different parts of a code & 365 id (''xios'', ''nemo'' or ''n\_nemo'' for the nth AGRIF zoom), src, time\_origin & 366 simulation & 367 all root tags: ...\_definition \\ 368 \hline 369 \hline 370 field\_definition & 371 encapsulates the definition of all the fields that can potentially be outputted & 372 axis\_ref, default\_value, domain\_ref, enabled, grid\_ref, level, operation, prec, src & 373 context & 374 field or field\_group \\ 375 \hline 376 field\_group & 377 encapsulates a group of fields & 378 axis\_ref, default\_value, domain\_ref, enabled, group\_ref, grid\_ref, id, level, operation, prec, src & 379 field\_definition, field\_group, file & 380 field or field\_group \\ 381 \hline 382 field & 383 define a specific field & 384 axis\_ref, default\_value, domain\_ref, enabled, field\_ref, grid\_ref, id, level, long\_name, name, operation, prec, standard\_name, unit & 385 field\_definition, field\_group, file & 386 none \\ 387 \hline 388 \hline 389 file\_definition & 390 encapsulates the definition of all the files that will be outputted & 391 enabled, min\_digits, name, name\_suffix, output\_level, split\_format, split\_freq, sync\_freq, type, src & 392 context & 393 file or file\_group \\ 394 \hline 395 file\_group & 396 encapsulates a group of files that will be outputted & 397 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, split\_format, split\_freq, sync\_freq, type, src & 398 file\_definition, file\_group & 399 file or file\_group \\ 400 \hline 401 file & 402 defile the contentof a file to be outputted & 403 enabled, description, id, min\_digits, name, name\_suffix, output\_freq, output\_level, split\_format, split\_freq, sync\_freq, type, src & 404 file\_definition, file\_group & 405 field \\ 406 \hline 407 \end{tabular} 408 \begin{tabular}{|p{2cm}|p{2.5cm}|p{3.5cm}|p{2cm}|p{2cm}|} 409 \hline 410 tag name & 411 description & 412 accepted attribute & 413 child of & 414 parent of \\ 415 \hline 416 \hline 417 axis\_definition & 418 define all the vertical axis potentially used by the variables & 419 src & 420 context & 421 axis\_group, axis \\ 422 \hline 423 axis\_group & 424 encapsulates a group of vertical axis & 425 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 426 axis\_definition, axis\_group & 427 axis\_group, axis \\ 428 \hline 429 axis & 430 define a vertical axis & 431 id, lon\_name, positive, src, standard\_name, unit, zoom\_begin, zoom\_end, zoom\_size & 432 axis\_definition, axis\_group & 433 none \\ 434 \hline 435 \hline 436 domain\_definition & 437 define all the horizontal domains potentially used by the variables & 438 src & 439 context & 440 domain\_group, domain \\ 441 \hline 442 domain\_group & 443 encapsulates a group of horizontal domains & 444 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 445 domain\_definition, domain\_group & 446 domain\_group, domain \\ 447 \hline 448 domain & 449 define an horizontal domain & 450 id, lon\_name, src, zoom\_ibegin, zoom\_jbegin, zoom\_ni, zoom\_nj & 451 domain\_definition, domain\_group & 452 none \\ 453 \hline 454 \hline 455 grid\_definition & 456 define all the grid (association of a domain and/or an axis) potentially used by the variables & 457 src & 458 context & 459 grid\_group, grid \\ 460 \hline 461 grid\_group & 462 encapsulates a group of grids & 463 id, domain\_ref, axis\_ref & 464 grid\_definition, grid\_group & 465 grid\_group, grid \\ 466 \hline 467 grid & 468 define a grid & 469 id, domain\_ref, axis\_ref & 470 grid\_definition, grid\_group & 471 none \\ 472 \hline 473 \end{tabular} 260 474 261 475 262 476 \subsubsection{Attributes list} 263 477 264 Applied to a tag or a group of tags. 265 266 % table to be added ? 267 Another table, perhaps? 268 269 %%%% 270 271 Attribute 272 Applied to? 273 Definition 274 Comment 275 axis\_ref 276 field 277 String defining the vertical axis of the variable. It refers to the id of the vertical axis defined in the axis tag. 278 Use ''non'' if the variable has no vertical axis 279 280 %%%%%% 281 282 \begin{description} 283 284 \item[axis\_ref]: field attribute. String defining the vertical axis of the variable. 285 It refers to the id of the vertical axis defined in the axis tag. 286 Use ''none'' if the variable has no vertical axis 287 288 \item[description]: this attribute can be applied to all tags but it is used only with the field tag. 289 In this case, the value of description will be used to define, in the output netcdf file, 290 the attributes long\_name and standard\_name of the variable. 291 292 \item[enabled]: field and file attribute. Logical to switch on/off the output of a field or a file. 293 294 \item[freq\_op]: field attribute (automatically defined, see part 1.4 (''control of the xml attributes'')). 295 An integer defining the frequency in seconds at which NEMO is calling iom\_put for this variable. 296 It corresponds to the model time step (rn\_rdt in the namelist) except for the variables computed 297 at the frequency of the surface boundary condition (rn\_rdt ? nn\_fsbc in the namelist). 298 299 \item[grid\_ref]: field attribute. String defining the horizontal grid of the variable. 300 It refers to the id of the grid tag. 301 302 \item[ibegin]: zoom attribute. Integer defining the zoom starting point along x direction. 303 Automatically defined for TAO/RAMA/PIRATA moorings (see part 1.4). 304 305 \item[id]: exists for all tag. This is a string defining the name to a specific tag that will be used 306 later to refer to this tag. Tags of the same category must have different ids. 307 308 \item[jbegin]: zoom attribute. Integer defining the zoom starting point along y direction. 309 Automatically defined for TAO/RAMA/PIRATA moorings and equatorial section (see part 1.4). 310 311 \item[level]: field attribute. Integer from 0 to 10 defining the output priority of a field. 312 See output\_level attribute definition 313 314 \item[operation]: field attribute. String defining the type of temporal operation to perform on a variable. 315 Possible choices are ''ave(X)'' for temporal mean, ''inst(X)'' for instantaneous, ''t\_min(X)'' for temporal min 316 and ''t\_max(X)'' for temporal max. 317 318 \item[output\_freq]: file attribute. Integer defining the operation frequency in seconds. 319 For example 86400 for daily mean. 320 321 \item[output\_level]: file attribute. Integer from 0 to 10 defining the output priority of variables in a file: 322 all variables listed in the file with a level smaller or equal to output\_level will be output. 323 Other variables won't be output even if they are listed in the file. 324 325 \item[positive]: axis attribute (always .FALSE.). Logical defining the vertical axis convention used 326 in \NEMO (positive downward). Define the attribute positive of the variable in the netcdf output file. 327 328 \item[prec]: field attribute. Integer defining the output precision. 329 Not implemented, we always output real4 arrays. 330 331 \item[name]: field or file attribute. String defining the name of a variable or a file. 332 If the name of a file is undefined, its id is used as a name. 2 files must have different names. 333 Files with specific ids will have their name automatically defined (see part 1.4). 334 Note that is name will be automatically completed by the cpu number (if needed) and ''.nc'' 335 336 \item[name\_suffix]: file attribute. String defining a suffix to be inserted after the name 337 and before the cpu number and the ''.nc'' termination. Files with specific ids have an 338 automatic definition of their suffix (see part 1.4). 339 340 \item[ni]: zoom attribute. Integer defining the zoom extent along x direction. 341 Automatically defined for equatorial sections (see part 1.4). 342 343 \item[nj]: zoom attribute. Integer defining the zoom extent along x direction. 344 345 \item[ref]: field attribute. String referring to the id of the field we want to add in a file. 346 347 \item[size]: axis attribute. use unknown... 348 349 \item[unit]: field attribute. String defining the unit of a variable and the associated 350 attribute in the netcdf output file. 351 352 \item[zoom\_ref]: field attribute. String defining the subdomain of data on which 353 the file should be written (to ouput data only in a limited area). 354 It refers to the id of a zoom defined in the zoom tag. 355 \end{description} 356 357 358 \subsection{IO\_SERVER} 478 \begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 479 \hline 480 attribute name & 481 description & 482 example & 483 accepted by \\ 484 \hline 485 \hline 486 axis\_ref & 487 refers to the id of a vertical axis & 488 axis\_ref="deptht" & 489 field, grid families \\ 490 \hline 491 enabled & 492 switch on/off the output of a field or a file & 493 enabled=".TRUE." & 494 field, file families \\ 495 \hline 496 default\_value & 497 missing\_value definition & 498 default\_value="1.e20" & 499 field family \\ 500 \hline 501 description & 502 just for information, not used & 503 description="ocean T grid variables" & 504 all tags \\ 505 \hline 506 domain\_ref & 507 refers to the id of a domain & 508 domain\_ref="grid\_T" & 509 field or grid families \\ 510 \hline 511 field\_ref= & 512 id of the field we want to add in a file & 513 field\_ref="toce" & 514 field \\ 515 \hline 516 grid\_ref & 517 refers to the id of a grid & 518 grid\_ref="grid\_T\_2D" & 519 field family \\ 520 \hline 521 group\_ref & 522 refer to a group of variables & 523 group\_ref="mooring" & 524 field\_group \\ 525 \hline 526 id & 527 allow to identify a tag & 528 id="nemo" & 529 accepted by all tags except simulation \\ 530 \hline 531 level & 532 output priority of a field: 0 (high) to 10 (low)& 533 level="1" & 534 field family \\ 535 \hline 536 long\_name & 537 define the long\_name attribute in the NetCDF file & 538 long\_name="Vertical T levels" & 539 field \\ 540 \hline 541 min\_digits & 542 specify the minimum of digits used in the core number in the name of the NetCDF file & 543 min\_digits="4" & 544 file family \\ 545 \hline 546 name & 547 name of a variable or a file. If the name of a file is undefined, its id is used as a name & 548 name="tos" & 549 field or file families \\ 550 \hline 551 name\_suffix & 552 suffix to be inserted after the name and before the cpu number and the ''.nc'' termination of a file & 553 name\_suffix="\_myzoom" & 554 file family \\ 555 \hline 556 \end{tabular} 557 \begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 558 \hline 559 attribute name & 560 description & 561 example & 562 accepted by \\ 563 \hline 564 \hline 565 operation & 566 type of temporal operation: average, accumulate, instantaneous, min, max and once & 567 operation="average" & 568 field family \\ 569 \hline 570 output\_freq & 571 operation frequency. units can be ts (timestep), y, mo, d, h, mi, s. & 572 output\_freq="1d12h" & 573 field family \\ 574 \hline 575 output\_level & 576 output priority of variables in a file: 0 (high) to 10 (low). All variables listed in the file with a level smaller or equal to output\_level will be output. Other variables won't be output even if they are listed in the file. & 577 output\_level="10"& 578 file family \\ 579 \hline 580 positive & 581 convention used for the orientation of vertival axis (positive downward in \NEMO). & 582 positive="down" & 583 axis family \\ 584 \hline 585 prec & 586 output precision: real 4 or real 8 & 587 prec="4" & 588 field family \\ 589 \hline 590 split\_format & 591 date format used in the name of splitted output files. can be spécified using the following syntaxe: \%y, \%mo, \%d, \%h \%mi and \%s & 592 split\_format="\%yy\%mom\%dd" & 593 file family \\ 594 \hline 595 split\_freq & 596 split output files frequency. units can be ts (timestep), y, mo, d, h, mi, s. & 597 split\_freq="1mo" & 598 file family \\ 599 \hline 600 src & 601 allow to include a file & 602 src="./field\_def.xml" & 603 accepted by all tags except simulation \\ 604 \hline 605 standard\_name & 606 define the standard\_name attribute in the NetCDF file & 607 standard\_name="Eastward\_Sea\_Ice\_Transport" & 608 field \\ 609 \hline 610 sync\_freq & 611 NetCDF file synchronization frequency (update of the time\_counter). units can be ts (timestep), y, mo, d, h, mi, s. & 612 sync\_freq="10d" & 613 file family \\ 614 \hline 615 \end{tabular} 616 \begin{tabular}{|p{2cm}|p{4cm}|p{4cm}|p{2cm}|} 617 \hline 618 attribute name & 619 description & 620 example & 621 accepted by \\ 622 \hline 623 \hline 624 time\_origin & 625 specify the origin of the time counter & 626 time\_origin="1900-01-01 00:00:00"& 627 context \\ 628 \hline 629 type (1)& 630 specify if the output files must be splitted (multiple\_file) or not (one\_file) & 631 type="multiple\_file" & 632 file familly \\ 633 \hline 634 type (2)& 635 define the type of a variable tag & 636 type="boolean" & 637 variable \\ 638 \hline 639 unit & 640 unit of a variable or the vertical axis & 641 unit="m" & 642 field and axis families \\ 643 \hline 644 zoom\_ibegin & 645 starting point along x direction of the zoom. Automatically defined for TAO/RAMA/PIRATA moorings & 646 zoom\_ibegin="1" & 647 domain family \\ 648 \hline 649 zoom\_jbegin & 650 starting point along y direction of the zoom. Automatically defined for TAO/RAMA/PIRATA moorings & 651 zoom\_jbegin="1" & 652 domain family \\ 653 \hline 654 zoom\_ni & 655 zoom extent along x direction & 656 zoom\_ni="1" & 657 domain family \\ 658 \hline 659 zoom\_nj & 660 zoom extent along y direction & 661 zoom\_nj="1" & 662 domain family \\ 663 \hline 664 \end{tabular} 665 666 \subsection{XIOS: the IO\_SERVER} 359 667 360 668 \subsubsection{Attached or detached mode?} 361 669 362 Iom\_put is based on the io\_server developed by Yann Meurdesoif from IPSL 363 (see \href{http://forge.ipsl.jussieu.fr/ioserver/browser}{here} for the source code or 364 see its copy in NEMOGCM/EXTERNAL directory). 365 This server can be used in ''attached mode'' (as a library) or in ''detached mode'' 366 (as an external executable on n cpus). In attached mode, each cpu of NEMO will output 367 its own subdomain. In detached mode, the io\_server will gather data from NEMO 368 and output them split over n files with n the number of cpu dedicated to the io\_server. 369 370 \subsubsection{Control the io\_server: the namelist file xmlio\_server.def} 371 372 % 373 %Again, a small table might be more readable? 374 %Name 375 %Type 376 %Description 377 %Comment 378 %Using_server 379 %Logical 380 %Switch to use the server in attached or detached mode 381 %(.TRUE. corresponding to detached mode). 382 383 The control of the use of the io\_server is done through the namelist file of the io\_server 384 called xmlio\_server.def. 385 386 \textbf{using\_server}: logical, switch to use the server in attached or detached mode 387 (.TRUE. corresponding to detached mode). 388 389 \textbf{using\_oasis}: logical, set to .TRUE. if NEMO is used in coupled mode. 390 391 \textbf{client\_id} = ''oceanx'' : character, used only in coupled mode. 392 Specify the id used in OASIS to refer to NEMO. The same id must be used to refer to NEMO 393 in the \$NBMODEL part of OASIS namcouple in the call of prim\_init\_comp\_proto in cpl\_oasis3f90 394 395 \textbf{server\_id} = ''ionemo'' : character, used only in coupled mode. 396 Specify the id used in OASIS to refer to the IO\_SERVER when used in detached mode. 397 Use the same id to refer to the io\_server in the \$NBMODEL part of OASIS namcouple. 398 399 \textbf{global\_mpi\_buffer\_size}: integer; define the size in Mb of the MPI buffer used by the io\_server. 400 401 \subsubsection{Number of cpu used by the io\_server in detached mode} 402 403 The number of cpu used by the io\_server is specified only when launching the model. 404 Here is an example of 2 cpus for the io\_server and 6 cpu for opa using mpirun: 405 406 \texttt{ -p 2 -e ./ioserver} 407 408 \texttt{ -p 6 -e ./opa } 409 670 Iomput is based on \href{http://forge.ipsl.jussieu.fr/ioserver/wiki}{XIOS}, the io\_server developed by Yann Meurdesoif from IPSL. This server can be used in ''attached mode'' (as a library) or in ''detached mode'' (as an external executable on n cpus). The ''attached mode'' is simpler to use but much less efficient. If the type of file is ''multiple\_file'', then in attached(detached) mode, each NEMO(XIOS) process will output its own subdomain: if NEMO(XIOS) is runnning on N cores, the ouput files will be splitted into N files. If the type of file is ''one\_file'', the output files will be directly recombined into one unique file either in ''detached mode'' or ''attached mode''. 671 672 \subsubsection{Control of xios: the xios context in iodef.xml} 673 674 The control of the use of xios is done through the xios context in iodef.xml. 675 676 \begin{tabular}{|p{3cm}|p{6.5cm}|p{2.5cm}|} 677 \hline 678 variable name & 679 description & 680 example \\ 681 \hline 682 \hline 683 buffer\_size & 684 buffer size used by XIOS to send data from NEMO to XIOS. Larger is more efficient. Note that needed/used buffer sizes are summarized at the end of the job & 685 25000000 \\ 686 \hline 687 buffer\_server\_factor\_size & 688 ratio between NEMO and XIOS buffer size. Should be 2. & 689 2 \\ 690 \hline 691 info\_level & 692 verbosity level (0 to 100) & 693 0 \\ 694 \hline 695 using\_server & 696 activate attached(false) or detached(true) mode & 697 true \\ 698 \hline 699 using\_oasis & 700 xios is used with OASIS(true) or not (false) & 701 false \\ 702 \hline 703 oasis\_codes\_id & 704 when using oasis, define the identifier of NEMO in the namcouple. Not that the identifier of XIOS is xios.x & 705 oceanx \\ 706 \hline 707 \end{tabular} 708 709 \subsubsection{Number of cpu used by XIOS in detached mode} 710 711 The number of cores used by the xios is specified only when launching the model. The number or cores dedicated to XIOS should be from ~1/10 to ~1/50 of the number or cores dedicated to NEMO (according of the amount of data to be created). Here is an example of 2 cpus for the io\_server and 62 cpu for opa using mpirun: 712 713 \texttt{ mpirun -np 2 ./nemo.exe : -np 62 ./xios\_server.exe } 410 714 411 715 \subsection{Practical issues} … … 413 717 \subsubsection{Add your own outputs} 414 718 415 It is very easy to add you own outputs with iom \_put. 4 points must be followed.719 It is very easy to add you own outputs with iomput. 4 points must be followed. 416 720 \begin{description} 417 721 \item[1-] in NEMO code, add a \\ … … 429 733 <field_definition> 430 734 ... 431 <field id="identifier" description="blabla"/>735 <field id="identifier" long_name="blabla" ... /> 432 736 ... 433 737 </field_definition> 434 738 \end{verbatim} 435 739 }}\end{alltt} 436 attributes axis\_ref and grid\_ref must be consistent with the size of the array to pass to iom \_put.740 attributes axis\_ref and grid\_ref must be consistent with the size of the array to pass to iomput. 437 741 if your array is computed within the surface module each nn\_fsbc time\_step, 438 742 add the field definition within the group defined with the id ''SBC'': $<$group id=''SBC''...$>$ … … 442 746 \begin{alltt} {{\scriptsize 443 747 \begin{verbatim} 444 <file id="file _1" .../>748 <file id="file1" .../> 445 749 ... 446 750 <field ref="identifier" /> … … 451 755 452 756 \end{description} 453 454 \subsubsection{Several time axes in the output file}455 456 If your output file contains variables with different operations (see operation definition),457 IOIPSL will create one specific time axis for each operation. Note that inst(X) will have458 a time axis corresponding to the end each output period whereas all other operators459 will have a time axis centred in the middle of the output periods.460 461 \subsubsection{Error/bug messages from IOIPSL}462 463 If you get the following error in the standard output file:464 \vspace{-20pt}465 \begin{alltt} {{\scriptsize466 \begin{verbatim}467 FATAL ERROR FROM ROUTINE flio_dom_set468 --> too many domains simultaneously defined469 --> please unset useless domains470 --> by calling flio_dom_unset471 \end{verbatim}472 }}\end{alltt}473 474 You must increase the value of dom\_max\_nb in fliocom.f90 (multiply it by 10 for example).475 476 If you mix, in the same file, variables with different freq\_op (see definition above),477 like for example variables from the surface module with other variables,478 IOIPSL will print in the standard output file warning messages saying there may be a bug.479 \vspace{-20pt}480 \begin{alltt} {{\scriptsize481 \begin{verbatim}482 WARNING FROM ROUTINE histvar_seq483 --> There were 10 errors in the learned sequence of variables484 --> for file 4485 --> This looks like a bug, please report it.486 \end{verbatim}487 }}\end{alltt}488 489 Don't worry, there is no bug, everything is properly working!490 491 % } %end \gmcomment492 757 493 758 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/AMM12/EXP00/iodef.xml
r4147 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 26 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE/EXP00/iodef.xml
r4147 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 25 26 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 27 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 33 34 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 34 35 35 <file id="5d_grid_T" name="auto" description="ocean T grid variables" >36 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 36 37 <field field_ref="toce" name="votemper" /> 37 38 <field field_ref="soce" name="vosaline" /> … … 47 48 </file> 48 49 49 <file id="5d_grid_U" name="auto" description="ocean U grid variables" >50 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 50 51 <field field_ref="uoce" name="vozocrtx" /> 51 52 <field field_ref="utau" name="sozotaux" /> 52 53 </file> 53 54 54 <file id="5d_grid_V" name="auto" description="ocean V grid variables" >55 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 55 56 <field field_ref="voce" name="vomecrty" /> 56 57 <field field_ref="vtau" name="sometauy" /> 57 58 </file> 58 59 59 <file id="5d_grid_W" name="auto" description="ocean W grid variables" >60 <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 60 61 <field field_ref="woce" name="vovecrtz" /> 61 62 <field field_ref="avt" name="votkeavt" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_BFM/EXP00/iodef.xml
r3771 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 26 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/iodef.xml
r3771 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 26 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 33 35 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 34 36 35 <file id=" 5d_grid_T" name="auto" description="ocean T grid variables" >37 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 36 38 <field field_ref="toce" name="votemper" /> 37 39 <field field_ref="soce" name="vosaline" /> … … 47 49 </file> 48 50 49 <file id=" 5d_grid_U" name="auto" description="ocean U grid variables" >51 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 50 52 <field field_ref="uoce" name="vozocrtx" /> 51 53 <field field_ref="utau" name="sozotaux" /> 52 54 </file> 53 55 54 <file id=" 5d_grid_V" name="auto" description="ocean V grid variables" >56 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 55 57 <field field_ref="voce" name="vomecrty" /> 56 58 <field field_ref="vtau" name="sometauy" /> 57 59 </file> 58 60 59 <file id=" 5d_grid_W" name="auto" description="ocean W grid variables" >61 <file id="file4" name_suffix="_grid_W" description="ocean W grid variables" > 60 62 <field field_ref="woce" name="vovecrtz" /> 61 63 <field field_ref="avt" name="votkeavt" /> … … 63 65 </file> 64 66 65 <file id=" 5d_ptrc_T" name="auto" description="lobster sms variables" >67 <file id="file5" name="_ptrc_T" description="lobster sms variables" > 66 68 <field field_ref="DET" /> 67 69 <field field_ref="ZOO" /> … … 82 84 <file_group id="1y" output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files --> 83 85 84 <file id=" 1y_diad_T" name="auto" description="additional lobster diagnostics" >86 <file id="file6" name_suffix="_diad_T" description="additional lobster diagnostics" > 85 87 <field field_ref="FNO3PHY" /> 86 88 <field field_ref="FNH4PHY" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_ar5.xml
r3771 r4148 26 26 --> 27 27 28 <file_definition type="multiple_file" output_level="10" sync_freq="1d" min_digits="4">28 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" output_level="10" sync_freq="2mo" min_digits="4"> 29 29 <!-- 30 30 +++++++++++++++++++++++++++++++++++++++++++++++ daily ++++++++++++++++++++++++++++++++++++++++++++++++++ 31 31 --> 32 32 <file_group id="1d" output_freq="1d" enabled=".TRUE."> <!-- 1d files --> 33 <file id=" 1d_grid_T" name="auto" name_suffix="_table2.2" > <!-- grid T -->33 <file id="file1" name_suffix="_grid_T_table2.2" > <!-- grid T --> 34 34 <field field_ref="sst" name='tos' long_name="sea_surface_temperature" level="2" /> 35 35 <field field_ref="sst2" name='tossq' long_name="square_of_sea_surface_temperature" level="2" /> … … 43 43 <!-- 44 44 .............................................. grid T ................................................. 45 --> 46 <file_group id="1m_grid_T" name="auto" > <!-- grid T --> 47 48 <file id="1m grid_T table 2.2" name_suffix="_table2.2" > 49 <field field_ref="botpres" name="pbo" long_name="sea_water_pressure_at_sea_floor" /> 50 <!-- pso : sea_water_pressure_at_sea_water_surface = 0 --> 51 <field field_ref="ssh" name="zos" long_name="sea_surface_height_above_geoid" /> 52 <field field_ref="ssh2" name="zossq" long_name="square_of_sea_surface_height_above_geoid" level="2" /> 53 <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0 no time changes --> 54 <field field_ref="cellthc" name="thkcello" long_name="cell_thickness" /> <!-- no time changes --> 55 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> 56 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" level="1" /> 57 <field field_ref="sst2" name="tossq" long_name="square_of_sea_surface_temperature" level="2" /> 58 <field field_ref="soce" name="so" long_name="sea_water_salinity" /> 59 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" level="1" /> 60 <field field_ref="rhop" name="rhopoto" long_name="sea_water_potential_density" level="2" /> 61 <!-- no agessc : sea_water_age_since_surface_contact --> 62 <!-- no cfc11 : moles_per_unit_mass_of_cfc11_in_sea_water --> 63 <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline --> 64 <!-- mlotst : ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 65 <!-- mlotstsq : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 66 <field field_ref="mldkz5" name='omlmax' long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" /> 67 </file> 68 69 <file id="1m grid_T table 2.5" name_suffix="_table2.5" > 70 <field field_ref="rain" name="pr" long_name="rainfall_flux" level="1" /> 71 <field field_ref="snow_ao_cea" name="prsn" long_name="snowfall_flux" level="1" /> 72 <field field_ref="evap_ao_cea" name="evs" long_name="water_evaporation_flux" level="1" /> 73 <field field_ref="runoffs" name="friver" long_name="water_flux_into_sea_water_from_rivers" level="1" /> 74 <field field_ref="calving" name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs" level="1" /> 75 <field field_ref="isnwmlt_cea" name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 76 <field field_ref="empmr" name="wfo" long_name="water_flux_into_sea_water" level="1" /> 77 <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp --> 78 <field field_ref="erp" name="wfcorr" long_name="water_flux_correction" level="1" /> <!-- usually = 0 --> 79 </file> 80 81 <file id="1m grid_T table 2.6" name_suffix="_table2.6" > 82 <!-- vsfpr : virtual_salt_flux_into_sea_water_due_to_rainfall = 0 --> 83 <!-- vsfevap : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 --> 84 <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers = 0 --> 85 <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 86 <!-- vsf : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real --> 87 <!-- wfcorr : virtual_salt_flux_correction = 0 --> 88 <field field_ref="fsal_virt_cea" name="sfdsi" long_name="downward_sea_ice_basal_salt_flux" level="1" /> 89 <!-- sfriver : salt_flux_into_sea_water_from_rivers = 0 --> 90 </file> 91 92 <file id="1m grid_T table 2.7" name_suffix="_table2.7" > 93 <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 --> 94 <field field_ref="hflx_rain_cea" name="hfrainds" long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water" level="1" /> 95 <field field_ref="hflx_evap_cea" name="hfevapds" long_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" /> 96 <field field_ref="hflx_rnf_cea" name="hfrunoffds" long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water" level="1" /> 97 <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics" level="1" /> 98 <field field_ref="hflx_ice_cea" name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 99 <field field_ref="hflx_cal_cea" name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics" level="1" /> 100 <!-- rlds : surface_net_downward_longwave_flux : not available --> 101 <!-- hfls : surface_downward_latent_heat_flux : not available --> 102 <!-- hfss : surface_downward_sensible_heat_flux: not available --> 103 <field field_ref="qns" name="nshfls" long_name="surface_net_downward_non_solar_flux" level="1" /> 104 <field field_ref="qsr" name="rsntds" long_name="surface_net_downward_shortwave_flux" level="1" /> 105 <field field_ref="qsr3d" name="rsds" long_name="downwelling_shortwave_flux_in_sea_water" level="1" /> 106 <field field_ref="qrp" name="hfcorr" long_name="heat_flux_correction" level="1" /> 107 </file> 108 </file_group> 45 --> 46 <file id="file2" name_suffix="_grid_T_table2.2" > 47 <field field_ref="botpres" name="pbo" long_name="sea_water_pressure_at_sea_floor" /> 48 <!-- pso : sea_water_pressure_at_sea_water_surface = 0 --> 49 <field field_ref="ssh" name="zos" long_name="sea_surface_height_above_geoid" /> 50 <field field_ref="ssh2" name="zossq" long_name="square_of_sea_surface_height_above_geoid" level="2" /> 51 <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0 no time changes --> 52 <field field_ref="cellthc" name="thkcello" long_name="cell_thickness" /> <!-- no time changes --> 53 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> 54 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" level="1" /> 55 <field field_ref="sst2" name="tossq" long_name="square_of_sea_surface_temperature" level="2" /> 56 <field field_ref="soce" name="so" long_name="sea_water_salinity" /> 57 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" level="1" /> 58 <field field_ref="rhop" name="rhopoto" long_name="sea_water_potential_density" level="2" /> 59 <!-- no agessc : sea_water_age_since_surface_contact --> 60 <!-- no cfc11 : moles_per_unit_mass_of_cfc11_in_sea_water --> 61 <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline --> 62 <!-- mlotst : ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 63 <!-- mlotstsq : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline --> 64 <field field_ref="mldkz5" name='omlmax' long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" /> 65 </file> 66 67 <file id="file3" name_suffix="_grid_T_table2.5" > 68 <field field_ref="rain" name="pr" long_name="rainfall_flux" level="1" /> 69 <field field_ref="snow_ao_cea" name="prsn" long_name="snowfall_flux" level="1" /> 70 <field field_ref="evap_ao_cea" name="evs" long_name="water_evaporation_flux" level="1" /> 71 <field field_ref="runoffs" name="friver" long_name="water_flux_into_sea_water_from_rivers" level="1" /> 72 <field field_ref="calving" name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs" level="1" /> 73 <field field_ref="isnwmlt_cea" name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 74 <field field_ref="empmr" name="wfo" long_name="water_flux_into_sea_water" level="1" /> 75 <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp --> 76 <field field_ref="erp" name="wfcorr" long_name="water_flux_correction" level="1" /> <!-- usually = 0 --> 77 </file> 78 79 <file id="file4" name_suffix="_grid_T_table2.6" > 80 <!-- vsfpr : virtual_salt_flux_into_sea_water_due_to_rainfall = 0 --> 81 <!-- vsfevap : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 --> 82 <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers = 0 --> 83 <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 84 <!-- vsf : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real --> 85 <!-- wfcorr : virtual_salt_flux_correction = 0 --> 86 <field field_ref="fsal_virt_cea" name="sfdsi" long_name="downward_sea_ice_basal_salt_flux" level="1" /> 87 <!-- sfriver : salt_flux_into_sea_water_from_rivers = 0 --> 88 </file> 89 90 <file id="file5" name_suffix="_grid_T_table2.7" > 91 <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 --> 92 <field field_ref="hflx_rain_cea" name="hfrainds" long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water" level="1" /> 93 <field field_ref="hflx_evap_cea" name="hfevapds" long_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" /> 94 <field field_ref="hflx_rnf_cea" name="hfrunoffds" long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water" level="1" /> 95 <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics" level="1" /> 96 <field field_ref="hflx_ice_cea" name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" /> 97 <field field_ref="hflx_cal_cea" name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics" level="1" /> 98 <!-- rlds : surface_net_downward_longwave_flux : not available --> 99 <!-- hfls : surface_downward_latent_heat_flux : not available --> 100 <!-- hfss : surface_downward_sensible_heat_flux: not available --> 101 <field field_ref="qns" name="nshfls" long_name="surface_net_downward_non_solar_flux" level="1" /> 102 <field field_ref="qsr" name="rsntds" long_name="surface_net_downward_shortwave_flux" level="1" /> 103 <field field_ref="qsr3d" name="rsds" long_name="downwelling_shortwave_flux_in_sea_water" level="1" /> 104 <field field_ref="qrp" name="hfcorr" long_name="heat_flux_correction" level="1" /> 105 </file> 109 106 <!-- 110 107 .............................................. grid U ................................................. 111 --> 112 <file_group id="1m_grid_U" name="auto" > <!-- grid U --> 113 114 <file id="1m grid_U table 2.3" name_suffix="_table2.3" > 115 <field field_ref="uoce" name="uo" long_name="sea_water_x_velocity" /> 116 <field field_ref="u_masstr" name="umo" long_name="ocean_mass_x_transport" level="1" /> 117 <field field_ref="u_heattr" name="hfx" long_name="ocean_heat_x_transport" level="1" /> 118 <field field_ref="ueiv_heattr" name="hfxba" long_name="ocean_heat_x_transport_due_to_bolus_advection" level="2" /> 119 <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion" level="2" /> 120 </file> 121 122 <file id="1m grid_U table 2.8" name_suffix="_table2.8" > 123 <field field_ref="utau" name="tauuo" long_name="surface_downward_x_stress" level="1" /> 124 <!-- tauucorr : surface_downward_x_stress_correction = 0 --> 125 </file> 126 127 </file_group> 108 --> 109 <file id="file6" name_suffix="_grid_U_table2.3" > 110 <field field_ref="uoce" name="uo" long_name="sea_water_x_velocity" /> 111 <field field_ref="u_masstr" name="umo" long_name="ocean_mass_x_transport" level="1" /> 112 <field field_ref="u_heattr" name="hfx" long_name="ocean_heat_x_transport" level="1" /> 113 <field field_ref="ueiv_heattr" name="hfxba" long_name="ocean_heat_x_transport_due_to_bolus_advection" level="2" /> 114 <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion" level="2" /> 115 </file> 116 117 <file id="file7" name_suffix="_grid_U_table2.8" > 118 <field field_ref="utau" name="tauuo" long_name="surface_downward_x_stress" level="1" /> 119 <!-- tauucorr : surface_downward_x_stress_correction = 0 --> 120 </file> 128 121 <!-- 129 122 .............................................. grid V ................................................. 130 --> 131 <file_group id="1m_grid_V" name="auto" > <!-- grid V --> 132 133 <file id="1m grid_V table 2.3" name_suffix="_table2.3" > 134 <field field_ref="voce" name="vo" long_name="sea_water_y_velocity" /> 135 <field field_ref="v_masstr" name="vmo" long_name="ocean_mass_y_transport" level="1" /> 136 <field field_ref="v_heattr" name="hfy" long_name="ocean_heat_y_transport" level="1" /> 137 <field field_ref="veiv_heattr" name="hfyba" long_name="ocean_heat_y_transport_due_to_bolus_advection" level="2" /> 138 <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion" level="2" /> 139 </file> 140 141 <file id="1m grid_V table 2.8" name_suffix="_table2.8" > 142 <field field_ref="vtau" name="tauvo" long_name="surface_downward_y_stress" level="1" /> 143 <!-- tauvcorr : surface_downward_y_stress_correction = 0 --> 144 </file> 145 146 </file_group> 123 --> 124 <file id="file8" name_suffix="_grid_V_table2.3" > 125 <field field_ref="voce" name="vo" long_name="sea_water_y_velocity" /> 126 <field field_ref="v_masstr" name="vmo" long_name="ocean_mass_y_transport" level="1" /> 127 <field field_ref="v_heattr" name="hfy" long_name="ocean_heat_y_transport" level="1" /> 128 <field field_ref="veiv_heattr" name="hfyba" long_name="ocean_heat_y_transport_due_to_bolus_advection" level="2" /> 129 <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion" level="2" /> 130 </file> 131 132 <file id="file9" name_suffix="_grid_V_table2.8" > 133 <field field_ref="vtau" name="tauvo" long_name="surface_downward_y_stress" level="1" /> 134 <!-- tauvcorr : surface_downward_y_stress_correction = 0 --> 135 </file> 147 136 <!-- 148 137 .............................................. grid W ................................................. 149 --> 150 <file_group id="1m_grid_W" name="auto" > <!-- grid W --> 151 152 <file id="1m grid_W table 2.3" name_suffix="_table2.3" > 153 <field field_ref="w_masstr" name="wmo" long_name="upward_ocean_mass_transport" /> 154 <field field_ref="w_masstr2" name="wmosq" long_name="square_pf_upward_ocean_mass_transport" /> 155 </file> 156 157 <file id="1m grid_W table 2.9" name_suffix="_table2.9" > 158 <field field_ref="avt" name="difvho" long_name="ocean_vertical_heat_diffusivity" level="2" /> 159 <field field_ref="avs" name="difvso" long_name="ocean_vertical_salt_diffusivity" level="2" /> 160 <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and nn_havtb --> 161 <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides" level="2" /> 162 <!-- tnpeo : tendency_of_ocean_potential_energy_content : not available --> 163 <!-- tnpeot : tendency_of_ocean_potential_energy_content_due_to_tides : not available --> 164 <!-- tnpeotb : tendency_of_ocean_potential_energy_content_due_to_background : not available --> 165 <field field_ref="avm" name="difvmo" long_name="ocean_vertical_momentum_diffusivity" level="2" /> 166 <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb --> 167 <field field_ref="av_tide" name="difvmto" long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer --> 168 <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? --> 169 <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available --> 170 </file> 171 172 <file id="1m grid_W table 2.10" name_suffix="_table2.10" > 173 <!-- if ln_traldf_lap = .true. --> 174 <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity" level="2" /> 175 <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso --> 176 <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time --> 177 <!-- if ln_traldf_bilap = .true. --> 178 <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity" level="2" /--> 179 <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso --> 180 <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time --> 181 <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available --> 182 <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap --> 183 <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap --> 184 <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available --> 185 </file> 186 187 </file_group> 138 --> 139 <file id="file10" name_suffix="_grid_W_table2.3" > 140 <field field_ref="w_masstr" name="wmo" long_name="upward_ocean_mass_transport" /> 141 <field field_ref="w_masstr2" name="wmosq" long_name="square_pf_upward_ocean_mass_transport" /> 142 </file> 143 144 <file id="file11" name_suffix="_grid_W_table2.9" > 145 <field field_ref="avt" name="difvho" long_name="ocean_vertical_heat_diffusivity" level="2" /> 146 <field field_ref="avs" name="difvso" long_name="ocean_vertical_salt_diffusivity" level="2" /> 147 <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and nn_havtb --> 148 <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides" level="2" /> 149 <!-- tnpeo : tendency_of_ocean_potential_energy_content : not available --> 150 <!-- tnpeot : tendency_of_ocean_potential_energy_content_due_to_tides : not available --> 151 <!-- tnpeotb : tendency_of_ocean_potential_energy_content_due_to_background : not available --> 152 <field field_ref="avm" name="difvmo" long_name="ocean_vertical_momentum_diffusivity" level="2" /> 153 <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb --> 154 <field field_ref="av_tide" name="difvmto" long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer --> 155 <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? --> 156 <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available --> 157 </file> 158 159 <file id="file12" name_suffix="_grid_W_table2.10" > 160 <!-- if ln_traldf_lap = .true. --> 161 <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity" level="2" /> 162 <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso --> 163 <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time --> 164 <!-- if ln_traldf_bilap = .true. --> 165 <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity" level="2" /--> 166 <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso --> 167 <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time --> 168 <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available --> 169 <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap --> 170 <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap --> 171 <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available --> 172 </file> 188 173 <!-- 189 174 .............................................. scalar ................................................. 190 191 <file id=" 1m_scalar" name="auto" name_suffix="_table2.2" > <!-- scalar -->175 --> 176 <file id="file13" name_suffix="_scalar_table2.2" > <!-- scalar --> 192 177 <field field_ref="masstot" name="masso" long_name="sea_water_mass" /> 193 178 <field field_ref="voltot" name="volo" long_name="sea_water_volume" /> … … 200 185 <!-- 201 186 .............................................. icemod ................................................. 202 203 <file id=" 1m_icemod" name="auto" name_suffix="_table2.2" > <!-- scalar -->187 --> 188 <file id="file14" name_suffix="_icemod_table2.2" > <!-- scalar --> 204 189 <field field_ref="ice_pres" /> 205 190 <field field_ref="ice_cover" name="sic" long_name="sea_ice_area_fraction" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_default.xml
r3771 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 26 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 31 33 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files --> 32 34 33 <file id=" 1d_grid_T" name="auto" description="ocean T grid variables" >35 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 34 36 <field field_ref="sst" name="tos" long_name="sea_surface_temperature" /> 35 37 <field field_ref="sss" name="sos" long_name="sea_surface_salinity" /> … … 37 39 </file> 38 40 39 <file id=" 1d_grid_U" name="auto" description="ocean U grid variables" >41 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 40 42 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> 41 43 </file> 42 44 43 <file id=" 1d_grid_V" name="auto" description="ocean V grid variables" >45 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 44 46 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> 45 47 </file> 46 48 47 49 </file_group> 50 48 51 <file_group id="3d" output_freq="3d" output_level="10" enabled=".TRUE."/> <!-- 3d files --> 49 52 50 53 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 51 54 52 <file id=" 5d_grid_T" name="auto" description="ocean T grid variables" >55 <file id="file4" name_suffix="_grid_T" description="ocean T grid variables" > 53 56 <field field_ref="toce" name="thetao" long_name="sea_water_potential_temperature" /> 54 57 <field field_ref="soce" name="so" long_name="sea_water_salinity" /> … … 66 69 </file> 67 70 68 <file id=" 5d_grid_U" name="auto" description="ocean U grid variables" >71 <file id="file5" name_suffix="_grid_U" description="ocean U grid variables" > 69 72 <field field_ref="uoce" name="uo" long_name="sea_water_x_velocity" /> 70 73 <field field_ref="suoce" name="uos" long_name="sea_surface_x_velocity" /> … … 72 75 </file> 73 76 74 <file id=" 5d_grid_V" name="auto" description="ocean V grid variables" >77 <file id="file6" name_suffix="_grid_V" description="ocean V grid variables" > 75 78 <field field_ref="voce" name="vo" long_name="sea_water_y_velocity" /> 76 79 <field field_ref="svoce" name="vos" long_name="sea_surface_y_velocity" /> … … 78 81 </file> 79 82 80 <file id=" 5d_grid_W" name="auto" description="ocean W grid variables" >83 <file id="file7" name_suffix="_grid_W" description="ocean W grid variables" > 81 84 <field field_ref="woce" name="wo" long_name="ocean vertical velocity" /> 82 85 <field field_ref="avt" name="difvho" long_name="ocean_vertical_heat_diffusivity" /> 83 86 </file> 84 87 85 <file id=" 5d_icemod" name="auto" description="ice variables" >88 <file id="file8" name_suffix="_icemod" description="ice variables" > 86 89 <field field_ref="ice_pres" /> 87 90 <field field_ref="snowthic_cea" name="snd" long_name="surface_snow_thickness" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_demo.xml
r3771 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4"> 24 24 25 25 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."> <!-- 1h files --> 26 <file id=" 1h_grid_T" name="auto" description="ocean T grid variables" >26 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 27 27 <field field_ref="sst" /> 28 28 <field field_ref="qsr" /> … … 32 32 33 33 <file_group id="1d" output_freq="1d" output_level="10" enabled=".TRUE."> <!-- 1d files --> 34 35 <file_group id="1d_grid_T" name="auto" description="ocean T grid variables" > 36 37 <!-- example of "hand made" zoom --> 38 <file id="blabla_1" name_suffix="_myzoom" > 39 <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml --> 40 <field_group id="blabla" domain_ref="myzoom" > 41 <field field_ref="toce" /> 42 <field field_ref="soce" /> 43 </field_group> 44 </file> 45 46 <!-- mooring: automatic definition of the file name suffix based on id="0n180wT" --> 47 <!-- include a group of variables. see field_def.xml for mooring variables definition --> 48 <file id="0n180wT" name_suffix="auto" > 49 <field_group group_ref="mooring"/> 50 </file> 51 52 <!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" --> 53 <!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow --> 54 <file id="EqT" name_suffix="auto" > 55 <field_group id="EqT" domain_ref="EqT" > 56 <field field_ref="toce" name="votemper" axis_ref="deptht_zoom" /> 57 </field_group> 58 </file> 59 60 <!-- global file with different operations on data --> 61 <file id="blabla_2" > 62 <field field_ref="toce" default_value="-10" /> <!-- redefine the missing value --> 63 <field field_ref="sst" name="sstmooring1" domain_ref="0n180wT" /> <!-- include a mooring --> 64 <field field_ref="sst" name="sst_1d_ave" /> <!-- mean --> 65 <field field_ref="sst" name="sst_1d_inst" operation="instant" /> <!-- instant value --> 66 <field field_ref="sst" name="sst_1d_max" operation="maximum" /> <!-- max --> 67 <field field_ref="suoce" /> <!-- include a U-grid variable in the list --> 68 </file> 69 70 </file_group> 34 35 <!-- example of "hand made" zoom --> 36 <file id="file2" name_suffix="_grid_T_myzoom" > 37 <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml --> 38 <field_group id="blabla" domain_ref="myzoom" > 39 <field field_ref="toce" /> 40 <field field_ref="soce" /> 41 </field_group> 42 </file> 43 44 <!-- mooring: automatic definition of the file name suffix based on id="0n180wT" --> 45 <!-- include a group of variables. see field_def.xml for mooring variables definition --> 46 <file id="0n180wT" > 47 <field_group group_ref="mooring"/> 48 </file> 49 50 <!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" --> 51 <!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow --> 52 <file id="EqT" > 53 <field_group id="EqT" domain_ref="EqT" > 54 <field field_ref="toce" name="votemper" axis_ref="deptht_myzoom" /> 55 </field_group> 56 </file> 57 58 <!-- global file with different operations on data --> 59 <file id="file3" > 60 <field field_ref="toce" default_value="-10" /> <!-- redefine the missing value --> 61 <field field_ref="sst" name="sstmooring1" domain_ref="0n180wT" /> <!-- include a mooring --> 62 <field field_ref="sst" name="sst_1d_ave" /> <!-- mean --> 63 <field field_ref="sst" name="sst_1d_inst" operation="instant" /> <!-- instant value --> 64 <field field_ref="sst" name="sst_1d_max" operation="maximum" /> <!-- max --> 65 <field field_ref="suoce" /> <!-- include a U-grid variable in the list --> 66 </file> 67 71 68 </file_group> 72 73 </file_definition>69 70 </file_definition> 74 71 75 72 <!-- … … 82 79 <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" > 83 80 <axis id="deptht" /> 84 <axis id="deptht_ zoom" zoom_begin="1" zoom_end="10" />81 <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" /> 85 82 </axis_group> 86 83 <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef_oldstyle.xml
r3771 r4148 21 21 --> 22 22 23 <file_definition type="multiple_file" sync_freq="1d" min_digits="4">23 <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4"> 24 24 25 <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files --> 26 25 27 <file_group id="1h" output_freq="1h" output_level="10" enabled=".TRUE."/> <!-- 1h files --> 26 28 <file_group id="2h" output_freq="2h" output_level="10" enabled=".TRUE."/> <!-- 2h files --> … … 33 35 <file_group id="5d" output_freq="5d" output_level="10" enabled=".TRUE."> <!-- 5d files --> 34 36 35 <file id=" 5d_grid_T" name="auto" description="ocean T grid variables" >37 <file id="file1" name_suffix="_grid_T" description="ocean T grid variables" > 36 38 <field field_ref="toce" name="votemper" /> 37 39 <field field_ref="soce" name="vosaline" /> … … 52 54 </file> 53 55 54 <file id=" 5d_grid_U" name="auto" description="ocean U grid variables" >56 <file id="file2" name_suffix="_grid_U" description="ocean U grid variables" > 55 57 <field field_ref="uoce" name="vozocrtx" /> 56 58 <field field_ref="uoce_eiv" name="vozoeivu" /> … … 58 60 </file> 59 61 60 <file id=" 5d_grid_V" name="auto" description="ocean V grid variables" >62 <file id="file3" name_suffix="_grid_V" description="ocean V grid variables" > 61 63 <field field_ref="voce" name="vomecrty" /> 62 64 <field field_ref="voce_eiv" name="vomeeivv" /> … … 64 66 </file> 65 67 66 <file id=" 5d_grid_W" name="auto" description="ocean Wgrid variables" >68 <file id="file4" name_suffix="_grid_W" description="ocean V grid variables" > 67 69 <field field_ref="woce" name="vovecrtz" /> 68 70 <field field_ref="avt" name="votkeavt" /> … … 71 73 </file> 72 74 73 <file id=" 5d_icemod" name="auto" description="icevariables" >75 <file id="file5" name_suffix="_icemod" description="ocean V grid variables" > 74 76 <field field_ref="ice_pres" /> 75 77 <field field_ref="snowthic_cea" name="isnowthi" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/iodef.xml
r3771 r4148 58 58 <field field_ref="qsr" name="soshfldo" /> 59 59 <field field_ref="saltflx" name="sosfldow" /> 60 <field field_ref="fmmflx" name="sofmflup" /> 60 61 <field field_ref="qt" name="sohefldo" /> 61 62 <field field_ref="mldr10_1" name="somxl010" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg
r4147 r4148 5 5 &namtrc ! tracers definition 6 6 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 7 ln_top_euler = .true. ! use Euler time-stepping for TOP 7 8 ! ! name ! title of the field ! initial data ! initial data ! save ! 8 9 ! ! ! ! units ! from file ! or not ! … … 58 59 &namtrc_adv ! advection scheme for passive tracer 59 60 !----------------------------------------------------------------------- 61 ln_trcadv_tvd = .false. ! TVD scheme 62 ln_trcadv_muscl = .true. ! MUSCL scheme 60 63 / 61 64 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
r4147 r4148 97 97 sn_mld = 'dyna_grid_T' , 120 , 'somixhgt' , .true. , .true. , 'yearly' , '' , '' 98 98 sn_emp = 'dyna_grid_T' , 120 , 'sowaflup' , .true. , .true. , 'yearly' , '' , '' 99 sn_ sfx = 'dyna_grid_T' , 120 , 'sowaflcd' , .true. , .true. , 'yearly' , '' , ''99 sn_fmf = 'dyna_grid_T' , 120 , 'iowaflup' , .true. , .true. , 'yearly' , '' , '' 100 100 sn_ice = 'dyna_grid_T' , 120 , 'soicecov' , .true. , .true. , 'yearly' , '' , '' 101 101 sn_qsr = 'dyna_grid_T' , 120 , 'soshfldo' , .true. , .true. , 'yearly' , '' , '' -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
r4147 r4148 5 5 &namtrc ! tracers definition 6 6 !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 7 ln_top_euler = .true. ! use Euler time-stepping for TOP 7 8 nn_writetrc = 1460 ! time step frequency for sn_tracer outputs 8 9 ! … … 61 62 &namtrc_adv ! advection scheme for passive tracer 62 63 !----------------------------------------------------------------------- 64 ln_trcadv_tvd = .false. ! TVD scheme 65 ln_trcadv_muscl = .true. ! MUSCL scheme 63 66 / 64 67 !----------------------------------------------------------------------- -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/field_def.xml
r3824 r4148 53 53 54 54 <field id="empmr" long_name="Net Upward Water Flux" unit="kg/m2/s" /> 55 <field id="saltflx" long_name="Downward salt flux" unit="PSU/m2/s" /> 55 <field id="saltflx" long_name="Downward salt flux" unit="PSU/m2/s" /> 56 <field id="fmmflx" long_name="Water flux due to freezing/melting" unit="kg/m2/s" /> 56 57 <field id="snowpre" long_name="Snow precipitation" unit="kg/m2/s" /> 57 58 <field id="runoffs" long_name="River Runoffs" unit="Kg/m2/s" /> -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/namelist_ice_lim2_ref
r4147 r4148 89 89 ! ! ! (if <0 months) ! name ! (logical) ! (T/F) ! 'monthly' ! filename ! pairing ! 90 90 sn_hicif = 'ice_damping', -1. , 'hicif' , .true. , .true. , 'yearly' , '' , '' 91 sn_ cnf= 'ice_damping', -1. , 'frld' , .true. , .true. , 'yearly' , '' , ''91 sn_frld = 'ice_damping', -1. , 'frld' , .true. , .true. , 'yearly' , '' , '' 92 92 ! 93 93 cn_dir = './' ! root directory for the location of the runoff files -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r4147 r4148 14 14 nn_dttrc = 1 ! time step frequency for passive sn_tracers 15 15 nn_writetrc = 5475 ! time step frequency for sn_tracer outputs 16 ln_top_euler = .false. ! use Euler time-stepping for TOP 16 17 ln_rsttr = .false. ! start from a restart file (T) or not (F) 17 18 nn_rsttr = 0 ! restart control = 0 initial time step is not compared to the restart file value … … 33 34 !----------------------------------------------------------------------- 34 35 ln_trcadv_cen2 = .false. ! 2nd order centered scheme 35 ln_trcadv_tvd = . false. ! TVD scheme36 ln_trcadv_muscl = . true. ! MUSCL scheme36 ln_trcadv_tvd = .true. ! TVD scheme 37 ln_trcadv_muscl = .false. ! MUSCL scheme 37 38 ln_trcadv_muscl2 = .false. ! MUSCL2 scheme + cen2 at boundaries 38 39 ln_trcadv_ubs = .false. ! UBS scheme -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/cfg.txt
r4147 r4148 1 1 ORCA2_LIM3 OPA_SRC LIM_SRC_3 2 O2L3 OPA_SRC LIM_SRC_3 TOP_SRC3 2 GYRE_BFM OPA_SRC TOP_SRC 4 3 GYRE OPA_SRC … … 9 8 GYRE_PISCES OPA_SRC TOP_SRC 10 9 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC 11 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC12 AGRIF OPA_SRC LIM_SRC_2 NST_SRC13 GYRE_LONG OPA_SRC14 GYRE_4 OPA_SRC15 ORCA2LIMPIS_LONG OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC16 ORCA2LIMPIS_16 OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC17 ORCA2OFFPIS_LONG OPA_SRC OFF_SRC TOP_SRC18 ORCA2OFFPIS_16 OPA_SRC OFF_SRC TOP_SRC19 AMM12_LONG OPA_SRC20 AMM12_32 OPA_SRC21 ORCA2AGUL_1_2 OPA_SRC LIM_SRC_2 NST_SRC22 SAS_LONG OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC23 SAS_32 OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC -
branches/2013/dev_LOCEAN_2013/NEMOGCM/CONFIG/makenemo
r3764 r4148 106 106 export AGRIFUSE=10 107 107 declare -a TAB 108 list_key=0 109 chk_key=1 108 110 #- 109 111 #- FCM and functions location --- … … 112 114 #- 113 115 #- Choice of the options --- 114 while getopts :hd:n:r:m:j:e:s:v:t: V116 while getopts :hd:n:r:m:j:e:s:v:t:k: V 115 117 do 116 118 case $V in 117 119 (h) x_h=${OPTARG}; 118 120 echo "Usage : "${b_n} \ 119 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] ";121 " [-h] [-n name] [-m arch] [-d "dir1 dir2"] [-r conf] [-s Path] [-e Path] [-j No] [-v No] [-k 0/1]"; 120 122 echo " -h : help"; 121 123 echo " -h institute : specific help for consortium members"; … … 128 130 echo " -j No : number of processes used to compile (0=nocompilation)"; 129 131 echo " -v No : set verbosity level for compilation [0-3]"; 132 echo " -k 0/1 : used cpp keys check (default = 1 -> check activated)"; 130 133 echo " -t dir : temporary directory for compilation" 131 134 echo ""; … … 141 144 echo "Example to clean "; 142 145 echo "./makenemo clean"; 146 echo ""; 147 echo "Example to list the available keys of a CONFIG "; 148 echo "./makenemo list_key"; 143 149 echo ""; 144 150 echo "Example to add and remove keys"; … … 158 164 (j) x_j=${OPTARG};; 159 165 (t) x_t=${OPTARG};; 160 (e) x_e=${OPTARG};; 161 (s) x_s=${OPTARG};; 162 (v) x_v=${OPTARG};; 166 (e) x_e=${OPTARG};; 167 (s) x_s=${OPTARG};; 168 (v) x_v=${OPTARG};; 169 (k) chk_key=${OPTARG};; 163 170 (:) echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; 164 171 exit 2;; … … 188 195 export ${list_del_key} 189 196 shift 197 ;; 198 list_key) 199 list_key=1 190 200 ;; 191 201 *) … … 222 232 [ "${CMP_NAM}" == help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit 223 233 224 #- When used for the first time, choose a compiler ---225 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm ${CMP_NAM} || exit226 227 234 #- 228 235 #- Choose a default configuration if needed --- 229 236 #- ORCA2_LIM or last one used --- 230 237 . ${COMPIL_DIR}/Fcheck_config.sh cfg.txt ${NEW_CONF} || exit 231 232 238 233 239 if [ ${#NEW_CONF} -eq 0 ] ; then … … 269 275 . ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 270 276 277 # build the complete list of the cpp keys of this configuration 278 if [ $chk_key -eq 1 ] ; then 279 for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ) 280 do 281 echo $i | grep key_ | sed -e "s/=.*//" 282 done | sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt 283 if [ $list_key -eq 1 ]; then 284 cat ${COMPIL_DIR}/full_key_list.txt 285 exit 0 286 fi 287 fi 288 271 289 #- At this stage new configuration has been added, 272 290 #- We add or remove keys … … 278 296 . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key} 279 297 fi 298 299 #- check that all keys are really existing... 300 if [ $chk_key -eq 1 ] ; then 301 for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ) 302 do 303 if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then 304 kk=${kk/=*/} 305 nb=$( grep -c $kk ${COMPIL_DIR}/full_key_list.txt ) 306 if [ $nb -eq 0 ]; then 307 echo 308 echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..." 309 echo "we stop..." 310 echo 311 exit 1 312 fi 313 fi 314 done 315 fi 316 317 #- At this stage cpp keys have been updated. we can check the arch file 318 #- When used for the first time, choose a compiler --- 319 . ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm cpp.fcm ${CMP_NAM} || exit 280 320 281 321 #- At this stage the configuration has beeen chosen … … 317 357 rm -rf ${NEMO_TDIR}/${NEW_CONF}/BLD 318 358 rm -rf ${NEMO_TDIR}/${NEW_CONF}/EXP00/opa 359 rm -f ${COMPIL_DIR}/*history ${COMPIL_DIR}/*fcm ${COMPIL_DIR}/*txt 319 360 echo "cleaning ${NEW_CONF} WORK, BLD" 320 361 fi -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
r3625 r4148 217 217 zemp_snw = rdm_snw(ji,jj) * r1_rdtice ! snow melting = pure water that enters the ocean 218 218 zfmm = rdm_ice(ji,jj) * r1_rdtice ! Freezing minus Melting (F-M) 219 220 fmmflx(ji,jj) = zfmm ! F/M mass flux save at least for biogeochemical model 219 221 220 222 ! salt flux at the ice/ocean interface (sea ice fraction) [PSU*kg/m2/s] -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
r3625 r4148 226 226 zemp_snw = rdm_snw(ji,jj) * r1_rdtice ! snow melting = pure water that enters the ocean 227 227 zfmm = rdm_ice(ji,jj) * r1_rdtice ! Freezing minus mesting 228 229 fmmflx(ji,jj) = zfmm ! F/M mass flux save at least for biogeochemical model 228 230 229 231 emp(ji,jj) = zemp + zemp_snw + zfmm ! mass flux + F/M mass flux (always ice/ocean mass exchange) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
r4147 r4148 72 72 INTEGER , SAVE :: jf_eiv ! index of v-eiv 73 73 INTEGER , SAVE :: jf_eiw ! index of w-eiv 74 INTEGER , SAVE :: jf_ sfx! index of downward salt flux74 INTEGER , SAVE :: jf_fmf ! index of downward salt flux 75 75 76 76 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_dyn ! structure of input fields (file informations, fields read) … … 254 254 wndm(:,:) = sf_dyn(jf_wnd)%fnow(:,:,1) * tmask(:,:,1) ! wind speed - needed for gas exchange 255 255 emp (:,:) = sf_dyn(jf_emp)%fnow(:,:,1) * tmask(:,:,1) ! E-P 256 sfx (:,:) = 0.0_wp ! enable testing with old inputs ! downward salt flux 257 ! sfx (:,:) = sf_dyn(jf_sfx)%fnow(:,:,1) * tmask(:,:,1) ! downward salt flux (v3.5+) 256 fmmflx(:,:) = sf_dyn(jf_fmf)%fnow(:,:,1) * tmask(:,:,1) ! downward salt flux (v3.5+) 258 257 fr_i(:,:) = sf_dyn(jf_ice)%fnow(:,:,1) * tmask(:,:,1) ! Sea-ice fraction 259 258 qsr (:,:) = sf_dyn(jf_qsr)%fnow(:,:,1) * tmask(:,:,1) ! solar radiation … … 302 301 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 303 302 CALL prt_ctl(tab2d_1=hmld , clinfo1=' hmld - : ', mask1=tmask, ovlap=1 ) 304 CALL prt_ctl(tab2d_1= sfx , clinfo1=' sfx- : ', mask1=tmask, ovlap=1 )303 CALL prt_ctl(tab2d_1=fmmflx , clinfo1=' fmmflx - : ', mask1=tmask, ovlap=1 ) 305 304 CALL prt_ctl(tab2d_1=emp , clinfo1=' emp - : ', mask1=tmask, ovlap=1 ) 306 305 CALL prt_ctl(tab2d_1=wndm , clinfo1=' wspd - : ', mask1=tmask, ovlap=1 ) … … 332 331 TYPE(FLD_N) :: sn_tem, sn_sal, sn_mld, sn_emp, sn_ice, sn_qsr, sn_wnd ! informations about the fields to be read 333 332 TYPE(FLD_N) :: sn_uwd, sn_vwd, sn_wwd, sn_avt, sn_ubl, sn_vbl ! " " 334 TYPE(FLD_N) :: sn_ahu, sn_ahv, sn_ahw, sn_eiu, sn_eiv, sn_eiw, sn_sfx ! " " 333 TYPE(FLD_N) :: sn_ahu, sn_ahv, sn_ahw, sn_eiu, sn_eiv, sn_eiw, sn_fmf ! " " 334 !!---------------------------------------------------------------------- 335 335 ! 336 336 NAMELIST/namdta_dyn/cn_dir, ln_dynwzv, ln_dynbbl, ln_degrad, & 337 337 & sn_tem, sn_sal, sn_mld, sn_emp, sn_ice, sn_qsr, sn_wnd, & 338 338 & sn_uwd, sn_vwd, sn_wwd, sn_avt, sn_ubl, sn_vbl, & 339 & sn_ahu, sn_ahv, sn_ahw, sn_eiu, sn_eiv, sn_eiw, sn_ sfx339 & sn_ahu, sn_ahv, sn_ahw, sn_eiu, sn_eiv, sn_eiw, sn_fmf 340 340 ! 341 341 REWIND( numnam_ref ) ! Namelist namdta_dyn in reference namelist : Offline: init. of dynamical data … … 347 347 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist', lwp ) 348 348 WRITE ( numond, namdta_dyn ) 349 349 350 ! ! store namelist information in an array 350 351 ! ! Control print … … 369 370 ENDIF 370 371 371 jf_tem = 1 ; jf_sal = 2 ; jf_mld = 3 ; jf_emp = 4 ; jf_ sfx= 5 ; jf_ice = 6 ; jf_qsr = 7372 jf_tem = 1 ; jf_sal = 2 ; jf_mld = 3 ; jf_emp = 4 ; jf_fmf = 5 ; jf_ice = 6 ; jf_qsr = 7 372 373 jf_wnd = 8 ; jf_uwd = 9 ; jf_vwd = 10 ; jf_wwd = 11 ; jf_avt = 12 ; jfld = 12 373 374 ! 374 375 slf_d(jf_tem) = sn_tem ; slf_d(jf_sal) = sn_sal ; slf_d(jf_mld) = sn_mld 375 slf_d(jf_emp) = sn_emp ; slf_d(jf_ sfx ) = sn_sfx; slf_d(jf_ice) = sn_ice376 slf_d(jf_emp) = sn_emp ; slf_d(jf_fmf ) = sn_fmf ; slf_d(jf_ice) = sn_ice 376 377 slf_d(jf_qsr) = sn_qsr ; slf_d(jf_wnd) = sn_wnd ; slf_d(jf_avt) = sn_avt 377 378 slf_d(jf_uwd) = sn_uwd ; slf_d(jf_vwd) = sn_vwd ; slf_d(jf_wwd) = sn_wwd … … 407 408 ENDIF 408 409 ENDIF 409 ! Salt flux and concntration/dilution terms (new from v3.5) !! disabled to allow testing with old input files410 !! jf_sfx = jfld + 1 ; jfld = jfld + 1411 !! slf_d(jf_sfx) = sn_sfx412 410 413 411 ALLOCATE( sf_dyn(jfld), STAT=ierr ) ! set sf structure -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
r4147 r4148 464 464 IF( nn_dyn2d(ib_bdy) .gt. 0 .and. ( nn_dyn2d_dta(ib_bdy) .eq. 1 .or. nn_dyn2d_dta(ib_bdy) .eq. 3 ) ) THEN 465 465 466 IF( nn_ tra(ib_bdy) .ne. 4 ) THEN ! runoff condition : no ssh reading466 IF( nn_dyn2d(ib_bdy) .ne. jp_frs .and. nn_tra(ib_bdy) .ne. 4 ) THEN ! runoff condition : no ssh reading 467 467 jfld = jfld + 1 468 468 blf_i(jfld) = bn_ssh … … 560 560 ! Recalculate field counts 561 561 !------------------------- 562 nb_bdy_fld_sum = 0563 562 IF( ib_bdy .eq. 1 ) THEN 563 nb_bdy_fld_sum = 0 564 564 nb_bdy_fld(ib_bdy) = jfld 565 565 nb_bdy_fld_sum = jfld … … 604 604 ALLOCATE( dta_bdy(ib_bdy)%u2d(ilen0(2)) ) 605 605 ALLOCATE( dta_bdy(ib_bdy)%v2d(ilen0(3)) ) 606 IF ( nn_dyn2d_dta(ib_bdy).eq.1.or.nn_dyn2d_dta(ib_bdy).eq.3) THEN606 IF ( nn_dyn2d(ib_bdy) .ne. jp_frs .and. (nn_dyn2d_dta(ib_bdy).eq.1.or.nn_dyn2d_dta(ib_bdy).eq.3) ) THEN 607 607 jfld = jfld + 1 608 608 dta_bdy(ib_bdy)%ssh => bf(jfld)%fnow(:,1,1) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice_lim2.F90
- Property svn:keywords set to Id
r3680 r4148 32 32 !!---------------------------------------------------------------------- 33 33 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 34 !! $Id : bdyice.F90 2715 2011-03-30 15:58:35Z rblod$34 !! $Id$ 35 35 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- … … 76 76 INTEGER, INTENT(in) :: ib_bdy ! BDY set index 77 77 !! 78 INTEGER :: jb, j k, jgrd ! dummy loop indices78 INTEGER :: jb, jgrd ! dummy loop indices 79 79 INTEGER :: ii, ij ! local scalar 80 80 REAL(wp) :: zwgt, zwgt1 ! local scalar … … 86 86 ! 87 87 DO jb = 1, idx%nblen(jgrd) 88 DO jk = 1, jpkm189 88 ii = idx%nbi(jb,jgrd) 90 89 ij = idx%nbj(jb,jgrd) … … 94 93 hicif(ii,ij) = ( hicif(ii,ij) * zwgt1 + dta%hicif(jb) * zwgt ) * tmask(ii,ij,1) ! Ice depth 95 94 hsnif(ii,ij) = ( hsnif(ii,ij) * zwgt1 + dta%hsnif(jb) * zwgt ) * tmask(ii,ij,1) ! Snow depth 96 END DO97 95 END DO 98 96 CALL lbc_bdy_lnk( frld, 'T', 1., ib_bdy ) ! lateral boundary conditions -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
r4147 r4148 1049 1049 1050 1050 bdytmask(:,:) = tmask(:,:,1) 1051 IF( .not. ln_mask_file ) THEN 1052 ! If .not. ln_mask_file then we need to derive mask on U and V grid 1053 ! from mask on T grid here. 1054 bdyumask(:,:) = 0.e0 1055 bdyvmask(:,:) = 0.e0 1056 DO ij=1, jpjm1 1057 DO ii=1, jpim1 1058 bdyumask(ii,ij)=bdytmask(ii,ij)*bdytmask(ii+1, ij ) 1059 bdyvmask(ii,ij)=bdytmask(ii,ij)*bdytmask(ii ,ij+1) 1060 END DO 1061 END DO 1062 CALL lbc_lnk( bdyumask(:,:), 'U', 1. ) ; CALL lbc_lnk( bdyvmask(:,:), 'V', 1. ) ! Lateral boundary cond. 1063 ENDIF 1051 1064 1052 1065 ! bdy masks and bmask are now set to zero on boundary points: -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
r4147 r4148 350 350 DO jn = 1, nptr 351 351 tn_jk(:,:,jn) = ptr_tjk( tsn(:,:,:,jp_tem), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 352 sn_jk(:,:,jn) = ptr_tjk( tsn(:,:,:,jp_sal), btmsk(:,:,jn) ) * r1_sjk(:,:,jn) 352 353 END DO 353 354 ENDIF … … 570 571 !!-------------------------------------------------------------------- 571 572 ! 572 CALL wrk_alloc( jp i, zphi , zfoo )573 CALL wrk_alloc( jp i, jpk, z_1 )573 CALL wrk_alloc( jpj , zphi , zfoo ) 574 CALL wrk_alloc( jpj , jpk, z_1 ) 574 575 575 576 ! define time axis … … 885 886 ENDIF 886 887 ! 887 CALL wrk_dealloc( jp i, zphi , zfoo )888 CALL wrk_dealloc( jp i, jpk, z_1 )888 CALL wrk_dealloc( jpj , zphi , zfoo ) 889 CALL wrk_dealloc( jpj , jpk, z_1 ) 889 890 ! 890 891 END SUBROUTINE dia_ptr_wri -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
r4147 r4148 176 176 !!---------------------------------------------------------------------- 177 177 !! *** ROUTINE zgr_z *** 178 !! 178 !! 179 179 !! ** Purpose : set the depth of model levels and the resulting 180 180 !! vertical scale factors. … … 645 645 END DO 646 646 END DO 647 IF( lk_mpp ) CALL mpp_sum( icompt ) 647 648 IF( icompt == 0 ) THEN 648 649 IF(lwp) WRITE(numout,*)' no isolated ocean grid points' … … 1105 1106 INTEGER :: ios ! Local integer output status for namelist read 1106 1107 REAL(wp) :: zrmax, ztaper ! temporary scalars 1107 ! 1108 REAL(wp), POINTER, DIMENSION(:,: ) :: zenv, ztmp, zmsk, zri, zrj, zhbat 1108 REAL(wp) :: zrfact ! temporary scalars 1109 REAL(wp), POINTER, DIMENSION(:,: ) :: ztmpi1, ztmpi2, ztmpj1, ztmpj2 1110 1111 ! 1112 REAL(wp), POINTER, DIMENSION(:,: ) :: zenv, zri, zrj, zhbat 1109 1113 1110 1114 NAMELIST/namzgr_sco/ln_s_sh94, ln_s_sf12, ln_sigcrit, rn_sbot_min, rn_sbot_max, rn_hc, rn_rmax,rn_theta, & … … 1114 1118 IF( nn_timing == 1 ) CALL timing_start('zgr_sco') 1115 1119 ! 1116 CALL wrk_alloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat ) 1117 ! 1120 CALL wrk_alloc( jpi, jpj, ztmpi1, ztmpi2, ztmpj1, ztmpj2 ) 1121 CALL wrk_alloc( jpi, jpj, zenv, zri, zrj, zhbat ) 1122 ! 1118 1123 REWIND( numnam_ref ) ! Namelist namzgr_sco in reference namelist : Sigma-stretching parameters 1119 1124 READ ( numnam_ref, namzgr_sco, IOSTAT = ios, ERR = 901) … … 1168 1173 ! ! ============================= 1169 1174 ! use r-value to create hybrid coordinates 1170 DO jj = 1, jpj 1171 DO ji = 1, jpi 1172 zenv(ji,jj) = MAX( bathy(ji,jj), rn_sbot_min ) 1173 END DO 1174 END DO 1175 ! DO jj = 1, jpj 1176 ! DO ji = 1, jpi 1177 ! zenv(ji,jj) = MAX( bathy(ji,jj), 0._wp ) 1178 ! END DO 1179 ! END DO 1180 ! CALL lbc_lnk( zenv, 'T', 1._wp ) 1181 zenv(:,:) = bathy(:,:) 1175 1182 ! 1176 1183 ! Smooth the bathymetry (if required) … … 1180 1187 jl = 0 1181 1188 zrmax = 1._wp 1182 ! ! ================ ! 1183 DO WHILE( jl <= 10000 .AND. zrmax > rn_rmax ) ! Iterative loop ! 1184 ! ! ================ ! 1189 ! 1190 ! set scaling factor used in reducing vertical gradients 1191 zrfact = ( 1._wp - rn_rmax ) / ( 1._wp + rn_rmax ) 1192 ! 1193 ! initialise temporary evelope depth arrays 1194 ztmpi1(:,:) = zenv(:,:) 1195 ztmpi2(:,:) = zenv(:,:) 1196 ztmpj1(:,:) = zenv(:,:) 1197 ztmpj2(:,:) = zenv(:,:) 1198 ! 1199 ! initialise temporary r-value arrays 1200 zri(:,:) = 1._wp 1201 zrj(:,:) = 1._wp 1202 ! ! ================ ! 1203 DO WHILE( jl <= 10000 .AND. ( zrmax - rn_rmax ) > 1.e-8_wp ) ! Iterative loop ! 1204 ! ! ================ ! 1185 1205 jl = jl + 1 1186 1206 zrmax = 0._wp 1187 zmsk(:,:) = 0._wp 1207 ! we set zrmax from previous r-values (zri abd zrj) first 1208 ! if set after current r-value calculation (as previously) 1209 ! we could exit DO WHILE prematurely before checking r-value 1210 ! of current zenv 1211 DO jj = 1, nlcj 1212 DO ji = 1, nlci 1213 zrmax = MAX( zrmax, ABS(zri(ji,jj)), ABS(zrj(ji,jj)) ) 1214 END DO 1215 END DO 1216 zri(:,:) = 0._wp 1217 zrj(:,:) = 0._wp 1188 1218 DO jj = 1, nlcj 1189 1219 DO ji = 1, nlci 1190 1220 iip1 = MIN( ji+1, nlci ) ! force zri = 0 on last line (ji=ncli+1 to jpi) 1191 1221 ijp1 = MIN( jj+1, nlcj ) ! force zrj = 0 on last raw (jj=nclj+1 to jpj) 1192 zri(ji,jj) = ABS( zenv(iip1,jj ) - zenv(ji,jj) ) / ( zenv(iip1,jj ) + zenv(ji,jj) ) 1193 zrj(ji,jj) = ABS( zenv(ji ,ijp1) - zenv(ji,jj) ) / ( zenv(ji ,ijp1) + zenv(ji,jj) ) 1194 zrmax = MAX( zrmax, zri(ji,jj), zrj(ji,jj) ) 1195 IF( zri(ji,jj) > rn_rmax ) zmsk(ji ,jj ) = 1._wp 1196 IF( zri(ji,jj) > rn_rmax ) zmsk(iip1,jj ) = 1._wp 1197 IF( zrj(ji,jj) > rn_rmax ) zmsk(ji ,jj ) = 1._wp 1198 IF( zrj(ji,jj) > rn_rmax ) zmsk(ji ,ijp1) = 1._wp 1222 IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(iip1,jj) > 0._wp)) THEN 1223 zri(ji,jj) = ( zenv(iip1,jj ) - zenv(ji,jj) ) / ( zenv(iip1,jj ) + zenv(ji,jj) ) 1224 END IF 1225 IF( (zenv(ji,jj) > 0._wp) .AND. (zenv(ji,ijp1) > 0._wp)) THEN 1226 zrj(ji,jj) = ( zenv(ji ,ijp1) - zenv(ji,jj) ) / ( zenv(ji ,ijp1) + zenv(ji,jj) ) 1227 END IF 1228 IF( zri(ji,jj) > rn_rmax ) ztmpi1(ji ,jj ) = zenv(iip1,jj ) * zrfact 1229 IF( zri(ji,jj) < -rn_rmax ) ztmpi2(iip1,jj ) = zenv(ji ,jj ) * zrfact 1230 IF( zrj(ji,jj) > rn_rmax ) ztmpj1(ji ,jj ) = zenv(ji ,ijp1) * zrfact 1231 IF( zrj(ji,jj) < -rn_rmax ) ztmpj2(ji ,ijp1) = zenv(ji ,jj ) * zrfact 1199 1232 END DO 1200 1233 END DO 1201 1234 IF( lk_mpp ) CALL mpp_max( zrmax ) ! max over the global domain 1202 ! lateral boundary condition on zmsk: keep 1 along closed boundary (use of MAX)1203 ztmp(:,:) = zmsk(:,:) ; CALL lbc_lnk( zmsk, 'T', 1._wp )1204 DO jj = 1, nlcj1205 DO ji = 1, nlci1206 zmsk(ji,jj) = MAX( zmsk(ji,jj), ztmp(ji,jj) )1207 END DO1208 END DO1209 1235 ! 1210 IF(lwp)WRITE(numout,*) 'zgr_sco : iter= ',jl, ' rmax= ', zrmax , ' nb of pt= ', INT( SUM(zmsk(:,:) ) )1236 IF(lwp)WRITE(numout,*) 'zgr_sco : iter= ',jl, ' rmax= ', zrmax 1211 1237 ! 1212 1238 DO jj = 1, nlcj 1213 1239 DO ji = 1, nlci 1214 iip1 = MIN( ji+1, nlci ) ! last line (ji=nlci) 1215 ijp1 = MIN( jj+1, nlcj ) ! last raw (jj=nlcj) 1216 iim1 = MAX( ji-1, 1 ) ! first line (ji=nlci) 1217 ijm1 = MAX( jj-1, 1 ) ! first raw (jj=nlcj) 1218 IF( zmsk(ji,jj) == 1._wp ) THEN 1219 ztmp(ji,jj) = ( & 1220 & zenv(iim1,ijp1)*zmsk(iim1,ijp1) + zenv(ji,ijp1)*zmsk(ji,ijp1) + zenv(iip1,ijp1)*zmsk(iip1,ijp1) & 1221 & + zenv(iim1,jj )*zmsk(iim1,jj ) + zenv(ji,jj )* 2._wp + zenv(iip1,jj )*zmsk(iip1,jj ) & 1222 & + zenv(iim1,ijm1)*zmsk(iim1,ijm1) + zenv(ji,ijm1)*zmsk(ji,ijm1) + zenv(iip1,ijm1)*zmsk(iip1,ijm1) & 1223 & ) / ( & 1224 & zmsk(iim1,ijp1) + zmsk(ji,ijp1) + zmsk(iip1,ijp1) & 1225 & + zmsk(iim1,jj ) + 2._wp + zmsk(iip1,jj ) & 1226 & + zmsk(iim1,ijm1) + zmsk(ji,ijm1) + zmsk(iip1,ijm1) & 1227 & ) 1228 ENDIF 1240 zenv(ji,jj) = MAX(zenv(ji,jj), ztmpi1(ji,jj), ztmpi2(ji,jj), ztmpj1(ji,jj), ztmpj2(ji,jj) ) 1229 1241 END DO 1230 1242 END DO 1231 1243 ! 1232 DO jj = 1, nlcj 1233 DO ji = 1, nlci 1234 IF( zmsk(ji,jj) == 1._wp ) zenv(ji,jj) = MAX( ztmp(ji,jj), bathy(ji,jj) ) 1235 END DO 1236 END DO 1237 ! 1238 ! Apply lateral boundary condition CAUTION: keep the value when the lbc field is zero 1239 ztmp(:,:) = zenv(:,:) ; CALL lbc_lnk( zenv, 'T', 1._wp ) 1240 DO jj = 1, nlcj 1241 DO ji = 1, nlci 1242 IF( zenv(ji,jj) == 0._wp ) zenv(ji,jj) = ztmp(ji,jj) 1243 END DO 1244 END DO 1244 CALL lbc_lnk( zenv, 'T', 1._wp ) 1245 1245 ! ! ================ ! 1246 1246 END DO ! End loop ! 1247 1247 ! ! ================ ! 1248 1248 ! 1249 ! Fill ghost rows with appropriate values to avoid undefined e3 values with some mpp decompositions 1250 DO ji = nlci+1, jpi 1251 zenv(ji,1:nlcj) = zenv(nlci,1:nlcj) 1252 END DO 1253 ! 1254 DO jj = nlcj+1, jpj 1255 zenv(:,jj) = zenv(:,nlcj) 1256 END DO 1249 ! DO jj = 1, jpj 1250 ! DO ji = 1, jpi 1251 ! zenv(ji,jj) = MAX( zenv(ji,jj), rn_sbot_min ) ! set all points to avoid undefined scale values 1252 ! END DO 1253 ! END DO 1257 1254 ! 1258 1255 ! Envelope bathymetry saved in hbatt 1259 1256 hbatt(:,:) = zenv(:,:) 1257 1260 1258 IF( MINVAL( gphit(:,:) ) * MAXVAL( gphit(:,:) ) <= 0._wp ) THEN 1261 1259 CALL ctl_warn( ' s-coordinates are tapered in vicinity of the Equator' ) … … 1503 1501 END DO 1504 1502 ! 1505 CALL wrk_dealloc( jpi, jpj, zenv, ztmp, zmsk, zri, zrj, zhbat ) 1506 ! 1503 CALL wrk_dealloc( jpi, jpj, zenv, ztmpi1, ztmpi2, ztmpj1, ztmpj2, zri, zrj, zhbat ) ! 1507 1504 IF( nn_timing == 1 ) CALL timing_stop('zgr_sco') 1508 1505 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r3771 r4148 36 36 USE xios 37 37 # endif 38 USE ioipsl, ONLY : ju2ymds ! for calendar 38 39 39 40 IMPLICIT NONE … … 52 53 PRIVATE iom_p1d, iom_p2d, iom_p3d 53 54 #if defined key_iomput 54 PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_ set_grid_attr55 PRIVATE set_grid, set_scalar, set_xmlatt, set_mooring 55 PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 56 PRIVATE set_grid, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 56 57 # endif 57 58 … … 130 131 131 132 ! end file definition 132 dtime%second=rdt133 134 135 136 133 dtime%second = rdt 134 CALL xios_set_timestep(dtime) 135 CALL xios_close_context_definition() 136 137 CALL xios_update_calendar(0) 137 138 #endif 138 139 139 140 END SUBROUTINE iom_init 140 141 … … 174 175 LOGICAL , INTENT(in ), OPTIONAL :: ldiof ! Interp On the Fly, needed for AGRIF (default = .FALSE.) 175 176 176 CHARACTER(LEN= 100) :: clname ! the name of the file based on cdname [[+clcpu]+clcpu]177 CHARACTER(LEN= 100) :: cltmpn ! tempory name to store clname (in writting mode)177 CHARACTER(LEN=256) :: clname ! the name of the file based on cdname [[+clcpu]+clcpu] 178 CHARACTER(LEN=256) :: cltmpn ! tempory name to store clname (in writting mode) 178 179 CHARACTER(LEN=10) :: clsuffix ! ".nc" or ".dimg" 179 180 CHARACTER(LEN=15) :: clcpu ! the cpu number (max jpmax_digits digits) 180 CHARACTER(LEN= 100) :: clinfo ! info character181 CHARACTER(LEN=256) :: clinfo ! info character 181 182 LOGICAL :: llok ! check the existence 182 183 LOGICAL :: llwrt ! local definition of ldwrt … … 561 562 REAL(wp) :: zscf, zofs ! sacle_factor and add_offset 562 563 INTEGER :: itmp ! temporary integer 563 CHARACTER(LEN= 100) :: clinfo ! info character564 CHARACTER(LEN= 100) :: clname ! file name564 CHARACTER(LEN=256) :: clinfo ! info character 565 CHARACTER(LEN=256) :: clname ! file name 565 566 CHARACTER(LEN=1) :: clrankpv, cldmspc ! 566 567 !--------------------------------------------------------------------- … … 1010 1011 !!---------------------------------------------------------------------- 1011 1012 1012 1013 1013 #if defined key_iomput 1014 1014 1015 SUBROUTINE iom_set_domain_attr( cd name, ni_glo, nj_glo, ibegin, jbegin, ni, nj, zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj, &1015 SUBROUTINE iom_set_domain_attr( cdid, ni_glo, nj_glo, ibegin, jbegin, ni, nj, zoom_ibegin, zoom_jbegin, zoom_ni, zoom_nj, & 1016 1016 & data_dim, data_ibegin, data_ni, data_jbegin, data_nj, lonvalue, latvalue, mask ) 1017 CHARACTER(LEN=*) , INTENT(in) :: cd name1017 CHARACTER(LEN=*) , INTENT(in) :: cdid 1018 1018 INTEGER , OPTIONAL, INTENT(in) :: ni_glo, nj_glo, ibegin, jbegin, ni, nj 1019 1019 INTEGER , OPTIONAL, INTENT(in) :: data_dim, data_ibegin, data_ni, data_jbegin, data_nj … … 1022 1022 LOGICAL, DIMENSION(:,:), OPTIONAL, INTENT(in) :: mask 1023 1023 1024 IF ( xios_is_valid_domain (cd name) ) THEN1025 CALL xios_set_domain_attr ( cd name, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, &1026 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj 1027 & zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj, 1024 IF ( xios_is_valid_domain (cdid) ) THEN 1025 CALL xios_set_domain_attr ( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1026 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1027 & zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj, & 1028 1028 & lonvalue=lonvalue, latvalue=latvalue,mask=mask ) 1029 1029 ENDIF 1030 1030 1031 IF ( xios_is_valid_domaingroup(cd name) ) THEN1032 CALL xios_set_domaingroup_attr( cd name, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, &1033 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj 1034 & zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj, 1031 IF ( xios_is_valid_domaingroup(cdid) ) THEN 1032 CALL xios_set_domaingroup_attr( cdid, ni_glo=ni_glo, nj_glo=nj_glo, ibegin=ibegin, jbegin=jbegin, ni=ni, nj=nj, & 1033 & data_dim=data_dim, data_ibegin=data_ibegin, data_ni=data_ni, data_jbegin=data_jbegin, data_nj=data_nj , & 1034 & zoom_ibegin=zoom_ibegin, zoom_jbegin=zoom_jbegin, zoom_ni=zoom_ni, zoom_nj=zoom_nj, & 1035 1035 & lonvalue=lonvalue, latvalue=latvalue,mask=mask ) 1036 1036 ENDIF 1037 CALL xios_solve_inheritance() 1037 1038 1038 1039 END SUBROUTINE iom_set_domain_attr 1039 1040 1040 1041 1041 SUBROUTINE iom_set_axis_attr( cd name, paxis )1042 CHARACTER(LEN=*) , INTENT(in) :: cd name1042 SUBROUTINE iom_set_axis_attr( cdid, paxis ) 1043 CHARACTER(LEN=*) , INTENT(in) :: cdid 1043 1044 REAL(wp), DIMENSION(:), INTENT(in) :: paxis 1044 IF ( xios_is_valid_axis (cdname) ) CALL xios_set_axis_attr ( cdname, size=size(paxis),value=paxis ) 1045 IF ( xios_is_valid_axisgroup(cdname) ) CALL xios_set_axisgroup_attr( cdname, size=size(paxis),value=paxis ) 1045 IF ( xios_is_valid_axis (cdid) ) CALL xios_set_axis_attr ( cdid, size=size(paxis),value=paxis ) 1046 IF ( xios_is_valid_axisgroup(cdid) ) CALL xios_set_axisgroup_attr( cdid, size=size(paxis),value=paxis ) 1047 CALL xios_solve_inheritance() 1046 1048 END SUBROUTINE iom_set_axis_attr 1047 1049 1048 1050 1049 SUBROUTINE iom_set_field_attr( cd name, freq_op)1050 CHARACTER(LEN=*) , INTENT(in) :: cd name1051 SUBROUTINE iom_set_field_attr( cdid, freq_op, freq_offset ) 1052 CHARACTER(LEN=*) , INTENT(in) :: cdid 1051 1053 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_op 1052 IF ( xios_is_valid_field (cdname) ) CALL xios_set_field_attr ( cdname, freq_op=freq_op ) 1053 IF ( xios_is_valid_fieldgroup(cdname) ) CALL xios_set_fieldgroup_attr( cdname, freq_op=freq_op ) 1054 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: freq_offset 1055 IF ( xios_is_valid_field (cdid) ) CALL xios_set_field_attr ( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1056 IF ( xios_is_valid_fieldgroup(cdid) ) CALL xios_set_fieldgroup_attr( cdid, freq_op=freq_op, freq_offset=freq_offset ) 1057 CALL xios_solve_inheritance() 1054 1058 END SUBROUTINE iom_set_field_attr 1055 1059 1056 1060 1057 SUBROUTINE iom_set_file_attr( cd name, name, name_suffix )1058 CHARACTER(LEN=*) , INTENT(in) :: cd name1061 SUBROUTINE iom_set_file_attr( cdid, name, name_suffix ) 1062 CHARACTER(LEN=*) , INTENT(in) :: cdid 1059 1063 CHARACTER(LEN=*),OPTIONAL , INTENT(in) :: name, name_suffix 1060 IF ( xios_is_valid_file (cdname) ) CALL xios_set_file_attr ( cdname, name=name, name_suffix=name_suffix ) 1061 IF ( xios_is_valid_filegroup(cdname) ) CALL xios_set_filegroup_attr( cdname, name=name, name_suffix=name_suffix ) 1064 IF ( xios_is_valid_file (cdid) ) CALL xios_set_file_attr ( cdid, name=name, name_suffix=name_suffix ) 1065 IF ( xios_is_valid_filegroup(cdid) ) CALL xios_set_filegroup_attr( cdid, name=name, name_suffix=name_suffix ) 1066 CALL xios_solve_inheritance() 1062 1067 END SUBROUTINE iom_set_file_attr 1063 1068 1064 1069 1065 SUBROUTINE iom_set_grid_attr( cdname, mask ) 1066 CHARACTER(LEN=*) , INTENT(in) :: cdname 1070 SUBROUTINE iom_get_file_attr( cdid, name, name_suffix, output_freq ) 1071 CHARACTER(LEN=*) , INTENT(in ) :: cdid 1072 CHARACTER(LEN=*),OPTIONAL , INTENT(out) :: name, name_suffix, output_freq 1073 LOGICAL :: llexist1,llexist2,llexist3 1074 !--------------------------------------------------------------------- 1075 IF( PRESENT( name ) ) name = '' ! default values 1076 IF( PRESENT( name_suffix ) ) name_suffix = '' 1077 IF( PRESENT( output_freq ) ) output_freq = '' 1078 IF ( xios_is_valid_file (cdid) ) THEN 1079 CALL xios_solve_inheritance() 1080 CALL xios_is_defined_file_attr ( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3) 1081 IF(llexist1) CALL xios_get_file_attr ( cdid, name = name ) 1082 IF(llexist2) CALL xios_get_file_attr ( cdid, name_suffix = name_suffix ) 1083 IF(llexist3) CALL xios_get_file_attr ( cdid, output_freq = output_freq ) 1084 ENDIF 1085 IF ( xios_is_valid_filegroup(cdid) ) THEN 1086 CALL xios_solve_inheritance() 1087 CALL xios_is_defined_filegroup_attr( cdid, name = llexist1, name_suffix = llexist2, output_freq = llexist3) 1088 IF(llexist1) CALL xios_get_filegroup_attr( cdid, name = name ) 1089 IF(llexist2) CALL xios_get_filegroup_attr( cdid, name_suffix = name_suffix ) 1090 IF(llexist3) CALL xios_get_filegroup_attr( cdid, output_freq = output_freq ) 1091 ENDIF 1092 END SUBROUTINE iom_get_file_attr 1093 1094 1095 SUBROUTINE iom_set_grid_attr( cdid, mask ) 1096 CHARACTER(LEN=*) , INTENT(in) :: cdid 1067 1097 LOGICAL, DIMENSION(:,:,:), OPTIONAL, INTENT(in) :: mask 1068 IF ( xios_is_valid_grid (cdname) ) CALL xios_set_grid_attr ( cdname, mask=mask ) 1069 IF ( xios_is_valid_gridgroup(cdname) ) CALL xios_set_gridgroup_attr( cdname, mask=mask ) 1098 IF ( xios_is_valid_grid (cdid) ) CALL xios_set_grid_attr ( cdid, mask=mask ) 1099 IF ( xios_is_valid_gridgroup(cdid) ) CALL xios_set_gridgroup_attr( cdid, mask=mask ) 1100 CALL xios_solve_inheritance() 1070 1101 END SUBROUTINE iom_set_grid_attr 1071 1102 … … 1073 1104 SUBROUTINE set_grid( cdgrd, plon, plat ) 1074 1105 !!---------------------------------------------------------------------- 1075 !! *** ROUTINE ***1106 !! *** ROUTINE set_grid *** 1076 1107 !! 1077 1108 !! ** Purpose : define horizontal grids … … 1101 1132 END SELECT 1102 1133 ! 1103 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = zmask(:,:,1) /= 0. )1104 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = zmask(:,:,:) /= 0. )1134 CALL iom_set_domain_attr( "grid_"//cdgrd , mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,1),(/ni,nj /)) /= 0. ) 1135 CALL iom_set_grid_attr ( "grid_"//cdgrd//"_3D", mask = RESHAPE(zmask(nldi:nlei,nldj:nlej,:),(/ni,nj,jpk/)) /= 0. ) 1105 1136 ENDIF 1106 1137 … … 1110 1141 SUBROUTINE set_scalar 1111 1142 !!---------------------------------------------------------------------- 1112 !! *** ROUTINE ***1143 !! *** ROUTINE set_scalar *** 1113 1144 !! 1114 1145 !! ** Purpose : define fake grids for scalar point … … 1126 1157 SUBROUTINE set_xmlatt 1127 1158 !!---------------------------------------------------------------------- 1128 !! *** ROUTINE ***1159 !! *** ROUTINE set_xmlatt *** 1129 1160 !! 1130 1161 !! ** Purpose : automatic definitions of some of the xml attributs... 1131 1162 !! 1132 1163 !!---------------------------------------------------------------------- 1133 CHARACTER(len=6),DIMENSION( 8) :: clsuff ! suffix name1134 1164 CHARACTER(len=1),DIMENSION( 3) :: clgrd ! suffix name 1135 CHARACTER(len= 50) :: clname ! filename1165 CHARACTER(len=256) :: clsuff ! suffix name 1136 1166 CHARACTER(len=1) :: cl1 ! 1 character 1137 1167 CHARACTER(len=2) :: cl2 ! 1 character 1138 CHARACTER(len=255) :: tfo 1139 INTEGER :: idt ! time-step in seconds 1140 INTEGER :: iddss, ihhss ! number of seconds in 1 day, 1 hour and 1 year 1141 INTEGER :: iyymo ! number of months in 1 year 1142 INTEGER :: jg, jh, jd, jm, jy ! loop counters 1168 INTEGER :: ji, jg ! loop counters 1143 1169 INTEGER :: ix, iy ! i-,j- index 1144 1170 REAL(wp) ,DIMENSION(11) :: zlontao ! longitudes of tao moorings … … 1150 1176 !!---------------------------------------------------------------------- 1151 1177 ! 1152 idt = NINT( rdttra(1) )1153 iddss = NINT( rday ) ! number of seconds in 1 day1154 ihhss = NINT( rmmss * rhhmm ) ! number of seconds in 1 hour1155 iyymo = NINT( raamo ) ! number of months in 1 year1156 1157 1178 ! frequency of the call of iom_put (attribut: freq_op) 1158 tfo = TRIM(i2str(idt))//'s' 1159 CALL iom_set_field_attr('field_definition', freq_op=tfo) 1160 CALL iom_set_field_attr('SBC' , freq_op=TRIM(i2str(idt* nn_fsbc ))//'s') 1161 CALL iom_set_field_attr('ptrc_T', freq_op=TRIM(i2str(idt* nn_dttrc))//'s') 1162 CALL iom_set_field_attr('diad_T', freq_op=TRIM(i2str(idt* nn_dttrc))//'s') 1179 WRITE(cl1,'(i1)') 1 ; CALL iom_set_field_attr('field_definition', freq_op = cl1//'ts', freq_offset='0ts') 1180 WRITE(cl1,'(i1)') nn_fsbc ; CALL iom_set_field_attr('SBC' , freq_op = cl1//'ts', freq_offset='0ts') 1181 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('ptrc_T' , freq_op = cl1//'ts', freq_offset='0ts') 1182 WRITE(cl1,'(i1)') nn_dttrc ; CALL iom_set_field_attr('diad_T' , freq_op = cl1//'ts', freq_offset='0ts') 1163 1183 1164 1184 ! output file names (attribut: name) 1165 clsuff(:) = (/ 'grid_T', 'grid_U', 'grid_V', 'grid_W', 'icemod', 'ptrc_T', 'diad_T', 'scalar' /) 1166 DO jg = 1, SIZE(clsuff) ! grid type 1167 DO jh = 1, 24 ! 1-24 hours 1168 WRITE(cl2,'(i2)') jh 1169 CALL dia_nam( clname, jh * ihhss, clsuff(jg), ldfsec = .TRUE. ) 1170 CALL iom_set_file_attr(TRIM(ADJUSTL(cl2))//'h_'//clsuff(jg), name=TRIM(clname)) 1171 END DO 1172 DO jd = 1, 30 ! 1-30 days 1173 WRITE(cl1,'(i1)') jd 1174 CALL dia_nam( clname, jd * iddss, clsuff(jg), ldfsec = .TRUE. ) 1175 CALL iom_set_file_attr(cl1//'d_'//clsuff(jg), name=TRIM(clname)) 1176 END DO 1177 DO jm = 1, 11 ! 1-11 months 1178 WRITE(cl1,'(i1)') jm 1179 CALL dia_nam( clname, -jm, clsuff(jg) ) 1180 CALL iom_set_file_attr(cl1//'m_'//clsuff(jg), name=TRIM(clname)) 1181 END DO 1182 DO jy = 1, 50 ! 1-50 years 1183 WRITE(cl2,'(i2)') jy 1184 CALL dia_nam( clname, -jy * iyymo, clsuff(jg) ) 1185 CALL iom_set_file_attr(TRIM(ADJUSTL(cl2))//'y_'//clsuff(jg), name=TRIM(clname)) 1186 END DO 1185 DO ji = 1, 9 1186 WRITE(cl1,'(i1)') ji 1187 CALL iom_update_file_name('file'//cl1) 1188 END DO 1189 DO ji = 1, 99 1190 WRITE(cl2,'(i2.2)') ji 1191 CALL iom_update_file_name('file'//cl2) 1187 1192 END DO 1188 1193 … … 1193 1198 ! Equatorial section (attributs: jbegin, ni, name_suffix) 1194 1199 CALL dom_ngb( 0., 0., ix, iy, cl1 ) 1195 CALL iom_set_domain_attr('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 1196 CALL iom_set_file_attr('Eq'//cl1, name_suffix= '_Eq') 1200 CALL iom_set_domain_attr ('Eq'//cl1, zoom_jbegin=iy, zoom_ni=jpiglo) 1201 CALL iom_get_file_attr ('Eq'//cl1, name_suffix = clsuff ) 1202 CALL iom_set_file_attr ('Eq'//cl1, name_suffix = TRIM(clsuff)//'_Eq') 1203 CALL iom_update_file_name('Eq'//cl1) 1197 1204 END DO 1198 1205 ! TAO moorings (attributs: ibegin, jbegin, name_suffix) … … 1214 1221 SUBROUTINE set_mooring( plon, plat) 1215 1222 !!---------------------------------------------------------------------- 1216 !! *** ROUTINE ***1223 !! *** ROUTINE set_mooring *** 1217 1224 !! 1218 1225 !! ** Purpose : automatic definitions of moorings xml attributs... … … 1223 1230 !!$ CHARACTER(len=1),DIMENSION(4) :: clgrd = (/ 'T', 'U', 'V', 'W' /) ! suffix name 1224 1231 CHARACTER(len=1),DIMENSION(1) :: clgrd = (/ 'T' /) ! suffix name 1225 CHARACTER(len=50) :: clname ! file name 1232 CHARACTER(len=256) :: clname ! file name 1233 CHARACTER(len=256) :: clsuff ! suffix name 1226 1234 CHARACTER(len=1) :: cl1 ! 1 character 1227 1235 CHARACTER(len=6) :: clon,clat ! name of longitude, latitude … … 1269 1277 ENDIF 1270 1278 clname = TRIM(ADJUSTL(clat))//TRIM(ADJUSTL(clon)) 1271 CALL iom_set_domain_attr(TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 1272 CALL iom_set_file_attr(TRIM(clname)//cl1, name_suffix= '_'//TRIM(clname)) 1279 CALL iom_set_domain_attr (TRIM(clname)//cl1, zoom_ibegin= ix, zoom_jbegin= iy) 1280 CALL iom_get_file_attr (TRIM(clname)//cl1, name_suffix = clsuff ) 1281 CALL iom_set_file_attr (TRIM(clname)//cl1, name_suffix = TRIM(clsuff)//'_'//TRIM(clname)) 1282 CALL iom_update_file_name(TRIM(clname)//cl1) 1273 1283 END DO 1274 1284 END DO … … 1277 1287 END SUBROUTINE set_mooring 1278 1288 1289 1290 SUBROUTINE iom_update_file_name( cdid ) 1291 !!---------------------------------------------------------------------- 1292 !! *** ROUTINE iom_update_file_name *** 1293 !! 1294 !! ** Purpose : 1295 !! 1296 !!---------------------------------------------------------------------- 1297 CHARACTER(LEN=*) , INTENT(in) :: cdid 1298 ! 1299 CHARACTER(LEN=256) :: clname 1300 CHARACTER(LEN=20) :: clfreq 1301 CHARACTER(LEN=20) :: cldate 1302 INTEGER :: idx 1303 INTEGER :: jn 1304 INTEGER :: itrlen 1305 INTEGER :: iyear, imonth, iday, isec 1306 REAL(wp) :: zsec 1307 LOGICAL :: llexist 1308 !!---------------------------------------------------------------------- 1309 1310 DO jn = 1,2 1311 1312 IF( jn == 1 ) CALL iom_get_file_attr( cdid, name = clname, output_freq = clfreq ) 1313 IF( jn == 2 ) CALL iom_get_file_attr( cdid, name_suffix = clname ) 1314 1315 IF ( TRIM(clname) /= '' ) THEN 1316 1317 idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 1318 DO WHILE ( idx /= 0 ) 1319 clname = clname(1:idx-1)//TRIM(cexper)//clname(idx+9:LEN_TRIM(clname)) 1320 idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 1321 END DO 1322 1323 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1324 DO WHILE ( idx /= 0 ) 1325 IF ( TRIM(clfreq) /= '' ) THEN 1326 itrlen = LEN_TRIM(clfreq) 1327 IF ( clfreq(itrlen-1:itrlen) == 'mo' ) clfreq = clfreq(1:itrlen-1) 1328 clname = clname(1:idx-1)//TRIM(clfreq)//clname(idx+6:LEN_TRIM(clname)) 1329 ELSE 1330 CALL ctl_stop('error in the name of file id '//TRIM(cdid), & 1331 & ' attribute output_freq is undefined -> cannot replace @freq@ in '//TRIM(clname) ) 1332 ENDIF 1333 idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 1334 END DO 1335 1336 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1337 DO WHILE ( idx /= 0 ) 1338 cldate = iom_sdate( fjulday - rdttra(1) / rday ) 1339 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 1340 idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 1341 END DO 1342 1343 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 1344 DO WHILE ( idx /= 0 ) 1345 cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. ) 1346 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 1347 idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 1348 END DO 1349 1350 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 1351 DO WHILE ( idx /= 0 ) 1352 cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 1353 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 1354 idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 1355 END DO 1356 1357 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 1358 DO WHILE ( idx /= 0 ) 1359 cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 1360 clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 1361 idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 1362 END DO 1363 1364 IF( jn == 1 ) CALL iom_set_file_attr( cdid, name = clname ) 1365 IF( jn == 2 ) CALL iom_set_file_attr( cdid, name_suffix = clname ) 1366 1367 ENDIF 1368 1369 END DO 1370 1371 END SUBROUTINE iom_update_file_name 1372 1373 1374 FUNCTION iom_sdate( pjday, ld24, ldfull ) 1375 !!---------------------------------------------------------------------- 1376 !! *** ROUTINE iom_sdate *** 1377 !! 1378 !! ** Purpose : send back the date corresponding to the given julian day 1379 !! 1380 !!---------------------------------------------------------------------- 1381 REAL(wp), INTENT(in ) :: pjday ! julian day 1382 LOGICAL , INTENT(in ), OPTIONAL :: ld24 ! true to force 24:00 instead of 00:00 1383 LOGICAL , INTENT(in ), OPTIONAL :: ldfull ! true to get the compleate date: yyyymmdd_hh:mm:ss 1384 ! 1385 CHARACTER(LEN=20) :: iom_sdate 1386 CHARACTER(LEN=50) :: clfmt ! format used to write the date 1387 INTEGER :: iyear, imonth, iday, ihour, iminute, isec 1388 REAL(wp) :: zsec 1389 LOGICAL :: ll24, llfull 1390 ! 1391 IF( PRESENT(ld24) ) THEN ; ll24 = ld24 1392 ELSE ; ll24 = .FALSE. 1393 ENDIF 1394 1395 IF( PRESENT(ldfull) ) THEN ; llfull = ldfull 1396 ELSE ; llfull = .FALSE. 1397 ENDIF 1398 1399 CALL ju2ymds( pjday, iyear, imonth, iday, zsec ) 1400 isec = NINT(zsec) 1401 1402 IF ( ll24 .AND. isec == 0 ) THEN ! 00:00 of the next day -> move to 24:00 of the current day 1403 CALL ju2ymds( pjday - 1., iyear, imonth, iday, zsec ) 1404 isec = 86400 1405 ENDIF 1406 1407 IF( iyear < 10000 ) THEN ; clfmt = "i4.4,2i2.2" ! format used to write the date 1408 ELSE ; WRITE(clfmt, "('i',i1,',2i2.2')") INT(LOG10(REAL(iyear,wp))) + 1 1409 ENDIF 1410 1411 IF( llfull ) THEN 1412 clfmt = TRIM(clfmt)//",'_',i2.2,':',i2.2,':',i2.2" 1413 ihour = isec / 3600 1414 isec = MOD(isec, 3600) 1415 iminute = isec / 60 1416 isec = MOD(isec, 60) 1417 WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday, ihour, iminute, isec ! date of the end of run 1418 ELSE 1419 WRITE(iom_sdate, '('//TRIM(clfmt)//')') iyear, imonth, iday ! date of the end of run 1420 ENDIF 1421 1422 END FUNCTION iom_sdate 1423 1279 1424 #else 1280 1425 … … 1285 1430 1286 1431 #endif 1287 1288 FUNCTION i2str(int)1289 IMPLICIT NONE1290 INTEGER, INTENT(IN) :: int1291 CHARACTER(LEN=255) :: i2str1292 1293 WRITE(i2str,*) int1294 1295 END FUNCTION i2str1296 1432 1297 1433 !!====================================================================== -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
r4147 r4148 163 163 164 164 ! Arrays used in mpp_lbc_north_3d() 165 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: ztab, znorthloc166 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, SAVE :: znorthgloio167 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: zfoldwk ! Workspace for message transfers avoiding mpi_allgather165 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: tab_3d, xnorthloc 166 REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, SAVE :: xnorthgloio 167 REAL(wp), DIMENSION(:,:,:) , ALLOCATABLE, SAVE :: foldwk ! Workspace for message transfers avoiding mpi_allgather 168 168 169 169 ! Arrays used in mpp_lbc_north_2d() 170 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: ztab_2d, znorthloc_2d171 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: znorthgloio_2d172 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: zfoldwk_2d ! Workspace for message transfers avoiding mpi_allgather170 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: tab_2d, xnorthloc_2d 171 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: xnorthgloio_2d 172 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: foldwk_2d ! Workspace for message transfers avoiding mpi_allgather 173 173 174 174 ! Arrays used in mpp_lbc_north_e() 175 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: ztab_e, znorthloc_e176 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: znorthgloio_e175 REAL(wp), DIMENSION(:,:) , ALLOCATABLE, SAVE :: tab_e, xnorthloc_e 176 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: xnorthgloio_e 177 177 178 178 ! North fold arrays used to minimise the use of allgather operations. Set in nemo_northcomms (nemogcm) so need to be public … … 208 208 & t2p1(jpi,jprecj ,2) , t2p2(jpi,jprecj ,2) , & 209 209 ! 210 & ztab(jpiglo,4,jpk) , znorthloc(jpi,4,jpk) , znorthgloio(jpi,4,jpk,jpni) , &211 & zfoldwk(jpi,4,jpk) , &212 ! 213 & ztab_2d(jpiglo,4) , znorthloc_2d(jpi,4) , znorthgloio_2d(jpi,4,jpni) , &214 & zfoldwk_2d(jpi,4) , &215 ! 216 & ztab_e(jpiglo,4+2*jpr2dj) , znorthloc_e(jpi,4+2*jpr2dj) , znorthgloio_e(jpi,4+2*jpr2dj,jpni) , &210 & tab_3d(jpiglo,4,jpk) , xnorthloc(jpi,4,jpk) , xnorthgloio(jpi,4,jpk,jpni) , & 211 & foldwk(jpi,4,jpk) , & 212 ! 213 & tab_2d(jpiglo,4) , xnorthloc_2d(jpi,4) , xnorthgloio_2d(jpi,4,jpni) , & 214 & foldwk_2d(jpi,4) , & 215 ! 216 & tab_e(jpiglo,4+2*jpr2dj) , xnorthloc_e(jpi,4+2*jpr2dj) , xnorthgloio_e(jpi,4+2*jpr2dj,jpni) , & 217 217 ! 218 218 & STAT=lib_mpp_alloc ) … … 2608 2608 ityp = -1 2609 2609 ijpjm1 = 3 2610 ztab(:,:,:) = 0.e02611 ! 2612 DO jj = nlcj - ijpj +1, nlcj ! put in znorthloc the last 4 jlines of pt3d2610 tab_3d(:,:,:) = 0.e0 2611 ! 2612 DO jj = nlcj - ijpj +1, nlcj ! put in xnorthloc the last 4 jlines of pt3d 2613 2613 ij = jj - nlcj + ijpj 2614 znorthloc(:,ij,:) = pt3d(:,jj,:)2614 xnorthloc(:,ij,:) = pt3d(:,jj,:) 2615 2615 END DO 2616 2616 ! 2617 ! ! Build in procs of ncomm_north the znorthgloio2617 ! ! Build in procs of ncomm_north the xnorthgloio 2618 2618 itaille = jpi * jpk * ijpj 2619 2619 IF ( l_north_nogather ) THEN … … 2625 2625 ij = jj - nlcj + ijpj 2626 2626 DO ji = 1, nlci 2627 ztab(ji+nimpp-1,ij,:) = pt3d(ji,jj,:)2627 tab_3d(ji+nimpp-1,ij,:) = pt3d(ji,jj,:) 2628 2628 END DO 2629 2629 END DO … … 2650 2650 2651 2651 DO jr = 1,nsndto(ityp) 2652 CALL mppsend(5, znorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) )2652 CALL mppsend(5, xnorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) ) 2653 2653 END DO 2654 2654 DO jr = 1,nsndto(ityp) 2655 CALL mpprecv(5, zfoldwk, itaille, isendto(jr,ityp))2655 CALL mpprecv(5, foldwk, itaille, isendto(jr,ityp)) 2656 2656 iproc = isendto(jr,ityp) + 1 2657 2657 ildi = nldit (iproc) … … 2660 2660 DO jj = 1, ijpj 2661 2661 DO ji = ildi, ilei 2662 ztab(ji+iilb-1,jj,:) = zfoldwk(ji,jj,:)2662 tab_3d(ji+iilb-1,jj,:) = foldwk(ji,jj,:) 2663 2663 END DO 2664 2664 END DO … … 2675 2675 2676 2676 IF ( ityp .lt. 0 ) THEN 2677 CALL MPI_ALLGATHER( znorthloc , itaille, MPI_DOUBLE_PRECISION, &2678 & znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2677 CALL MPI_ALLGATHER( xnorthloc , itaille, MPI_DOUBLE_PRECISION, & 2678 & xnorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2679 2679 ! 2680 2680 DO jr = 1, ndim_rank_north ! recover the global north array … … 2685 2685 DO jj = 1, ijpj 2686 2686 DO ji = ildi, ilei 2687 ztab(ji+iilb-1,jj,:) = znorthgloio(ji,jj,:,jr)2687 tab_3d(ji+iilb-1,jj,:) = xnorthgloio(ji,jj,:,jr) 2688 2688 END DO 2689 2689 END DO … … 2691 2691 ENDIF 2692 2692 ! 2693 ! The ztabarray has been either:2693 ! The tab_3d array has been either: 2694 2694 ! a. Fully populated by the mpi_allgather operation or 2695 2695 ! b. Had the active points for this domain and northern neighbours populated … … 2698 2698 ! this domain will be identical. 2699 2699 ! 2700 CALL lbc_nfd( ztab, cd_type, psgn ) ! North fold boundary condition2700 CALL lbc_nfd( tab_3d, cd_type, psgn ) ! North fold boundary condition 2701 2701 ! 2702 2702 DO jj = nlcj-ijpj+1, nlcj ! Scatter back to pt3d 2703 2703 ij = jj - nlcj + ijpj 2704 2704 DO ji= 1, nlci 2705 pt3d(ji,jj,:) = ztab(ji+nimpp-1,ij,:)2705 pt3d(ji,jj,:) = tab_3d(ji+nimpp-1,ij,:) 2706 2706 END DO 2707 2707 END DO … … 2740 2740 ityp = -1 2741 2741 ijpjm1 = 3 2742 ztab_2d(:,:) = 0.e02743 ! 2744 DO jj = nlcj-ijpj+1, nlcj ! put in znorthloc_2d the last 4 jlines of pt2d2742 tab_2d(:,:) = 0.e0 2743 ! 2744 DO jj = nlcj-ijpj+1, nlcj ! put in xnorthloc_2d the last 4 jlines of pt2d 2745 2745 ij = jj - nlcj + ijpj 2746 znorthloc_2d(:,ij) = pt2d(:,jj)2746 xnorthloc_2d(:,ij) = pt2d(:,jj) 2747 2747 END DO 2748 2748 2749 ! ! Build in procs of ncomm_north the znorthgloio_2d2749 ! ! Build in procs of ncomm_north the xnorthgloio_2d 2750 2750 itaille = jpi * ijpj 2751 2751 IF ( l_north_nogather ) THEN … … 2757 2757 ij = jj - nlcj + ijpj 2758 2758 DO ji = 1, nlci 2759 ztab_2d(ji+nimpp-1,ij) = pt2d(ji,jj)2759 tab_2d(ji+nimpp-1,ij) = pt2d(ji,jj) 2760 2760 END DO 2761 2761 END DO … … 2783 2783 2784 2784 DO jr = 1,nsndto(ityp) 2785 CALL mppsend(5, znorthloc_2d, itaille, isendto(jr,ityp), ml_req_nf(jr) )2785 CALL mppsend(5, xnorthloc_2d, itaille, isendto(jr,ityp), ml_req_nf(jr) ) 2786 2786 END DO 2787 2787 DO jr = 1,nsndto(ityp) 2788 CALL mpprecv(5, zfoldwk_2d, itaille, isendto(jr,ityp))2788 CALL mpprecv(5, foldwk_2d, itaille, isendto(jr,ityp)) 2789 2789 iproc = isendto(jr,ityp) + 1 2790 2790 ildi = nldit (iproc) … … 2793 2793 DO jj = 1, ijpj 2794 2794 DO ji = ildi, ilei 2795 ztab_2d(ji+iilb-1,jj) = zfoldwk_2d(ji,jj)2795 tab_2d(ji+iilb-1,jj) = foldwk_2d(ji,jj) 2796 2796 END DO 2797 2797 END DO … … 2808 2808 2809 2809 IF ( ityp .lt. 0 ) THEN 2810 CALL MPI_ALLGATHER( znorthloc_2d , itaille, MPI_DOUBLE_PRECISION, &2811 & znorthgloio_2d, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2810 CALL MPI_ALLGATHER( xnorthloc_2d , itaille, MPI_DOUBLE_PRECISION, & 2811 & xnorthgloio_2d, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2812 2812 ! 2813 2813 DO jr = 1, ndim_rank_north ! recover the global north array … … 2818 2818 DO jj = 1, ijpj 2819 2819 DO ji = ildi, ilei 2820 ztab_2d(ji+iilb-1,jj) = znorthgloio_2d(ji,jj,jr)2820 tab_2d(ji+iilb-1,jj) = xnorthgloio_2d(ji,jj,jr) 2821 2821 END DO 2822 2822 END DO … … 2824 2824 ENDIF 2825 2825 ! 2826 ! The ztab array has been either:2826 ! The tab array has been either: 2827 2827 ! a. Fully populated by the mpi_allgather operation or 2828 2828 ! b. Had the active points for this domain and northern neighbours populated … … 2831 2831 ! this domain will be identical. 2832 2832 ! 2833 CALL lbc_nfd( ztab_2d, cd_type, psgn ) ! North fold boundary condition2833 CALL lbc_nfd( tab_2d, cd_type, psgn ) ! North fold boundary condition 2834 2834 ! 2835 2835 ! … … 2837 2837 ij = jj - nlcj + ijpj 2838 2838 DO ji = 1, nlci 2839 pt2d(ji,jj) = ztab_2d(ji+nimpp-1,ij)2839 pt2d(ji,jj) = tab_2d(ji+nimpp-1,ij) 2840 2840 END DO 2841 2841 END DO … … 2870 2870 ! 2871 2871 ijpj=4 2872 ztab_e(:,:) = 0.e02872 tab_e(:,:) = 0.e0 2873 2873 2874 2874 ij=0 2875 ! put in znorthloc_e the last 4 jlines of pt2d2875 ! put in xnorthloc_e the last 4 jlines of pt2d 2876 2876 DO jj = nlcj - ijpj + 1 - jpr2dj, nlcj +jpr2dj 2877 2877 ij = ij + 1 2878 2878 DO ji = 1, jpi 2879 znorthloc_e(ji,ij)=pt2d(ji,jj)2879 xnorthloc_e(ji,ij)=pt2d(ji,jj) 2880 2880 END DO 2881 2881 END DO 2882 2882 ! 2883 2883 itaille = jpi * ( ijpj + 2 * jpr2dj ) 2884 CALL MPI_ALLGATHER( znorthloc_e(1,1) , itaille, MPI_DOUBLE_PRECISION, &2885 & znorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )2884 CALL MPI_ALLGATHER( xnorthloc_e(1,1) , itaille, MPI_DOUBLE_PRECISION, & 2885 & xnorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr ) 2886 2886 ! 2887 2887 DO jr = 1, ndim_rank_north ! recover the global north array … … 2892 2892 DO jj = 1, ijpj+2*jpr2dj 2893 2893 DO ji = ildi, ilei 2894 ztab_e(ji+iilb-1,jj) = znorthgloio_e(ji,jj,jr)2894 tab_e(ji+iilb-1,jj) = xnorthgloio_e(ji,jj,jr) 2895 2895 END DO 2896 2896 END DO … … 2900 2900 ! 2. North-Fold boundary conditions 2901 2901 ! ---------------------------------- 2902 CALL lbc_nfd( ztab_e(:,:), cd_type, psgn, pr2dj = jpr2dj )2902 CALL lbc_nfd( tab_e(:,:), cd_type, psgn, pr2dj = jpr2dj ) 2903 2903 2904 2904 ij = jpr2dj … … 2907 2907 ij = ij +1 2908 2908 DO ji= 1, nlci 2909 pt2d(ji,jj) = ztab_e(ji+nimpp-1,ij)2909 pt2d(ji,jj) = tab_e(ji+nimpp-1,ij) 2910 2910 END DO 2911 2911 END DO -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r4147 r4148 71 71 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sfx , sfx_b !: salt flux [PSU/m2/s] 72 72 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tot !: total E-P over ocean and ice [Kg/m2/s] 73 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx !: freshwater budget: freezing/melting [Kg/m2/s] 73 74 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] 74 75 !! … … 116 117 & qsr_tot(jpi,jpj) , qsr (jpi,jpj) , & 117 118 & emp (jpi,jpj) , emp_b(jpi,jpj) , & 118 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj) 119 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 119 120 ! 120 121 ALLOCATE( rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , & -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r4147 r4148 373 373 ! 374 374 IF( TRIM( sn_rcv_tau%cldes ) /= 'oce and ice' ) THEN ! 'oce and ice' case ocean stress on ocean mesh used 375 srcv(jpr_it x1:jpr_itz2)%laction = .FALSE. ! ice components not received375 srcv(jpr_itz1:jpr_itz2)%laction = .FALSE. ! ice components not received (itx1 and ity1 used later) 376 376 srcv(jpr_itx1)%clgrid = 'U' ! ocean stress used after its transformation 377 377 srcv(jpr_ity1)%clgrid = 'V' ! i.e. it is always at U- & V-points for i- & j-comp. resp. … … 896 896 !! third as 2 components on the cp_ice_msh point 897 897 !! 898 !! In 'oce and ice' case, only one vector stress field898 !! Except in 'oce and ice' case, only one vector stress field 899 899 !! is received. It has already been processed in sbc_cpl_rcv 900 900 !! so that it is now defined as (i,j) components given at U- 901 !! and V-points, respectively. Therefore, hereonly the third901 !! and V-points, respectively. Therefore, only the third 902 902 !! transformation is done and only if the ice-grid is a 'I'-grid. 903 903 !! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r4147 r4148 153 153 sfx(:,:) = 0.0_wp ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero) 154 154 ! only if sea-ice is present 155 156 fmmflx(:,:) = 0.0_wp ! freezing-melting array initialisation 155 157 156 158 ! ! restartability … … 371 373 ! (includes virtual salt flux beneath ice 372 374 ! in linear free surface case) 375 CALL iom_put( "fmmflx", fmmflx ) ! Freezing-melting water flux 373 376 CALL iom_put( "qt" , qns + qsr ) ! total heat flux 374 377 CALL iom_put( "qns" , qns ) ! solar heat flux -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/SAS_SRC/diawri.F90
r3331 r4148 259 259 CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux" , "Kg/m2/s", & ! (emp-rnf) 260 260 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 261 CALL histdef( nid_T, "so waflcd", "concentration/dilution water flux" , "kg/m2/s", & ! (emps-rnf)262 &jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )261 CALL histdef( nid_T, "sosfldow", "downward salt flux" , "PSU/m2/s", & ! (sfx) 262 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 263 263 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qns + qsr 264 264 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 309 309 CALL histwrite( nid_T, "sst_m", it, sst_m, ndim_hT, ndex_hT ) ! sea surface temperature 310 310 CALL histwrite( nid_T, "sss_m", it, sss_m, ndim_hT, ndex_hT ) ! sea surface salinity 311 CALL histwrite( nid_T, "sowaflup", it, emp , ndim_hT, ndex_hT ) ! upward water flux 312 CALL histwrite( nid_T, "sowaflcd", it, emps , ndim_hT, ndex_hT ) ! c/d water flux 311 CALL histwrite( nid_T, "sowaflup", it, (emp - rnf ) , ndim_hT, ndex_hT ) ! upward water flux 312 CALL histwrite( nid_T, "sosfldow", it, sfx , ndim_hT, ndex_hT ) ! downward salt flux 313 ! (includes virtual salt flux beneath ice 314 ! in linear free surface case) 315 313 316 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 314 317 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90
r4147 r4148 143 143 ! 144 144 NAMELIST/namsbc_sas/cn_dir, ln_3d_uv, sn_tem, sn_sal, sn_usp, sn_vsp, sn_ssh 145 !!---------------------------------------------------------------------- 145 146 146 147 REWIND( numnam_ref ) ! Namelist namsbc_sas in reference namelist : Input fields -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
r4147 r4148 263 263 zdep = MIN( 1., 1000. / fsdept(ji,jj,jk) ) 264 264 zlam1b = xlam1 * MAX( 0.e0, ( trn(ji,jj,jk,jpfer) * 1.e9 - ztotlig(ji,jj,jk) ) ) 265 zcoag = zfeequi * zlam1b * zstep + 1E-4 * ( 1. - zlamfac ) * zdep * zstep * zfecoll265 zcoag = zfeequi * zlam1b * zstep + 1E-4 * ( 1. - zlamfac ) * zdep * zstep * trn(ji,jj,jk,jpfer) 266 266 267 267 ! Compute the coagulation of colloidal iron. This parameterization … … 278 278 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zscave * zdenom1 + zaggdfea + zaggdfeb 279 279 #else 280 zlam1b = 3.53E3 * trn(ji,jj,jk,jpgoc) * xdiss(ji,jj,jk) + 1E-4 * ( 1. - zlamfac ) * zdep280 zlam1b = 3.53E3 * trn(ji,jj,jk,jpgoc) * xdiss(ji,jj,jk) 281 281 zaggdfeb = zlam1b * zstep * zfecoll 282 282 ! -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
r4147 r4148 109 109 ! then the first atmospheric CO2 record read is at years(1) 110 110 zyr_dec = REAL( nyear + nn_offset, wp ) + REAL( nday_year, wp ) / REAL( nyear_len(1), wp ) 111 jm = 2112 DO WHILE( jm <= nmaxrec .AND. years(jm -1) < zyr_dec .AND. years(jm) >=zyr_dec ) ; jm = jm + 1 ; END DO111 jm = 1 112 DO WHILE( jm <= nmaxrec .AND. years(jm) < zyr_dec ) ; jm = jm + 1 ; END DO 113 113 iind = jm ; iindm1 = jm - 1 114 114 zdco2dt = ( atcco2h(iind) - atcco2h(iindm1) ) / ( years(iind) - years(iindm1) + rtrn ) … … 196 196 END DO 197 197 198 t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) ) 199 t_atm_co2_flx = glob_sum( satmco2(:,:) * patm(:,:) * e1e2t(:,:) )! Total atmospheric pCO2198 t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) ) ! Cumulative Total Flux of Carbon 199 t_atm_co2_flx = glob_sum( satmco2(:,:) * e1e2t(:,:) ) ! Total atmospheric pCO2 200 200 201 201 IF(ln_ctl) THEN ! print mean trends (used for debugging) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
r4147 r4148 54 54 !!---------------------------------------------------------------------- 55 55 !! NEMO/TOP 3.3 , NEMO Consortium (2010) 56 !! $Id: p4zmeso.F90 3 295 2012-01-30 15:49:07Z cetlod $56 !! $Id: p4zmeso.F90 3160 2011-11-20 14:27:18Z cetlod $ 57 57 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 58 58 !!---------------------------------------------------------------------- … … 72 72 REAL(wp) :: zcompadi, zcompaph, zcompapoc, zcompaz, zcompam 73 73 REAL(wp) :: zgraze2 , zdenom, zdenom2, zncratio 74 REAL(wp) :: zfact , zstep, zfood, zfoodlim 74 REAL(wp) :: zfact , zstep, zfood, zfoodlim, zproport 75 REAL(wp) :: zmortzgoc, zfrac, zfracfe, zratio, zratio2 75 76 REAL(wp) :: zepshert, zepsherv, zgrarsig, zgraztot, zgraztotf 76 REAL(wp) :: zgrarem2, zgrafer2, zgrapoc2, zprcaca, zmortz2, z mortzgoc, zgrasrat77 REAL(wp) :: zgrarem2, zgrafer2, zgrapoc2, zprcaca, zmortz2, zgrasrat 77 78 #if defined key_kriest 78 79 REAL znumpoc … … 80 81 REAL(wp) :: zrespz2, ztortz2, zgrazd, zgrazz, zgrazpof 81 82 REAL(wp) :: zgrazn, zgrazpoc, zgraznf, zgrazf 82 REAL(wp) :: zgrazfff, zgrazffe 83 REAL(wp) :: zgrazfffp, zgrazfffg, zgrazffep, zgrazffeg 84 CHARACTER (len=25) :: charout 83 85 REAL(wp) :: zrfact2 84 86 REAL(wp), POINTER, DIMENSION(:,:,:) :: zgrazing 85 CHARACTER (len=25) :: charout 87 86 88 !!--------------------------------------------------------------------- 87 89 ! 88 90 IF( nn_timing == 1 ) CALL timing_start('p4z_meso') 89 91 ! 90 IF( ln_diatrc .AND. lk_iomput ) CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 91 ! 92 IF( ln_diatrc .AND. lk_iomput ) THEN 93 CALL wrk_alloc( jpi, jpj, jpk, zgrazing ) 94 zgrazing(:,:,:) = 0._wp 95 ENDIF 96 92 97 DO jk = 1, jpkm1 93 98 DO jj = 1, jpj … … 118 123 119 124 zfood = xprefc * zcompadi + xprefz * zcompaz + xprefp * zcompaph + xprefpoc * zcompapoc 120 zfoodlim = MAX( 0., zfood - MIN( 0.5 * zfood 125 zfoodlim = MAX( 0., zfood - MIN( 0.5 * zfood, xthresh2 ) ) 121 126 zdenom = zfoodlim / ( xkgraz2 + zfoodlim ) 122 127 zdenom2 = zdenom / ( zfood + rtrn ) … … 135 140 ! ---------------------------------- 136 141 # if ! defined key_kriest 137 zgrazffe = grazflux * zstep * wsbio4(ji,jj,jk) & 138 & * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes) 139 zgrazfff = zgrazffe * trn(ji,jj,jk,jpbfe) / (trn(ji,jj,jk,jpgoc) + rtrn) 142 zgrazffeg = grazflux * zstep * wsbio4(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes) 143 zgrazfffg = zgrazffeg * trn(ji,jj,jk,jpbfe) / (trn(ji,jj,jk,jpgoc) + rtrn) 144 # endif 145 zgrazffep = grazflux * zstep * wsbio3(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes) 146 zgrazfffp = zgrazffep * trn(ji,jj,jk,jpsfe) / (trn(ji,jj,jk,jppoc) + rtrn) 147 ! 148 # if ! defined key_kriest 149 zgraztot = zgrazd + zgrazz + zgrazn + zgrazpoc + zgrazffep + zgrazffeg 150 ! Compute the proportion of filter feeders 151 zproport = (zgrazffep + zgrazffeg)/(rtrn + zgraztot) 152 ! Compute fractionation of aggregates. It is assumed that diatoms based aggregates are more prone to fractionation 153 ! since they are more porous (marine snow instead of fecal pellets) 154 zratio = trn(ji,jj,jk,jpgsi) / ( trn(ji,jj,jk,jpgoc) + rtrn ) 155 zratio2 = zratio * zratio 156 zfrac = zproport * zgrazffeg * ( 0.1 + 3.9 * zratio2 / ( 1.**2 + zratio2 ) ) 157 158 zfracfe = zfrac * trn(ji,jj,jk,jpbfe) / (trn(ji,jj,jk,jpgoc) + rtrn) 159 160 zgrazffep = zproport * zgrazffep 161 zgrazffeg = zproport * zgrazffeg 162 zgrazfffp = zproport * zgrazfffp 163 zgrazfffg = zproport * zgrazfffg 164 zgraztot = zgrazd + zgrazz + zgrazn + zgrazpoc + zgrazffep + zgrazffeg 165 zgraztotf = zgrazf + zgraznf + zgrazz * ferat3 + zgrazpof + zgrazfffp + zgrazfffg 140 166 # else 141 zgrazffe = grazflux * zstep * wsbio3(ji,jj,jk) & 142 & * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes) 143 zgrazfff = zgrazffe * trn(ji,jj,jk,jpsfe) / (trn(ji,jj,jk,jppoc) + rtrn) 167 zgraztot = zgrazd + zgrazz + zgrazn + zgrazpoc + zgrazffep 168 ! Compute the proportion of filter feeders 169 zproport = zgrazffep / ( zgraztot + rtrn ) 170 zgrazffep = zproport * zgrazffep 171 zgrazfffp = zproport * zgrazfffp 172 zgraztot = zgrazd + zgrazz + zgrazn + zgrazpoc + zgrazffep 173 zgraztotf = zgrazf + zgraznf + zgrazz * ferat3 + zgrazpof + zgrazfffp 144 174 # endif 145 !146 zgraztot = zgrazd + zgrazz + zgrazn + zgrazpoc + zgrazffe147 zgraztotf = zgrazf + zgraznf + zgrazz * ferat3 + zgrazpof + zgrazfff148 175 149 176 ! Total grazing ( grazing by microzoo is already computed in p4zmicro ) … … 159 186 zepshert = epsher2 * MIN( 1., zncratio ) 160 187 zepsherv = zepshert * MIN( 1., zgrasrat / ferat3 ) 161 zgrarem2 = zgraztot * ( 1. - zepsherv - unass2 ) + zrespz2 &162 & + ( 1. - zepsherv - unass2 ) /( 1. - zepsherv + rtrn) * ztortz2163 zgrafer2 = zgraztot * MAX( 0. , ( 1. - unass2 ) * zgrasrat - ferat3 * zepsherv ) &164 & + ferat3 * ( zrespz2 + ( 1. - zepsherv - unass2 ) /( 1. - zepsherv + rtrn) * ztortz2 )188 zgrarem2 = zgraztot * ( 1. - zepsherv - unass2 ) + zrespz2 & 189 & + ( 1. - zepsherv - unass2 ) /( 1. - zepsherv ) * ztortz2 190 zgrafer2 = zgraztot * MAX( 0. , ( 1. - unass2 ) * zgrasrat - ferat3 * zepsherv ) & 191 & + ferat3 * ( zrespz2 + ( 1. - zepsherv - unass2 ) /( 1. - zepsherv ) * ztortz2 ) 165 192 zgrapoc2 = zgraztot * unass2 166 193 … … 174 201 tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) + zgrarsig 175 202 tra(ji,jj,jk,jptal) = tra(ji,jj,jk,jptal) + rno3 * zgrarsig 176 #if defined key_kriest 177 tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zgrapoc2 178 tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) + zgrapoc2 * xkr_dmeso 179 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + zgraztotf * unass2 180 #else 181 tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zgrapoc2 182 tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + zgraztotf * unass2 183 #endif 203 184 204 zmortz2 = ztortz2 + zrespz2 185 zmortzgoc = unass2 / ( 1. - zepsherv + rtrn) * ztortz2205 zmortzgoc = unass2 / ( 1. - zepsherv ) * ztortz2 186 206 tra(ji,jj,jk,jpmes) = tra(ji,jj,jk,jpmes) - zmortz2 + zepsherv * zgraztot 187 207 tra(ji,jj,jk,jpdia) = tra(ji,jj,jk,jpdia) - zgrazd … … 205 225 #if defined key_kriest 206 226 znumpoc = trn(ji,jj,jk,jpnum) / ( trn(ji,jj,jk,jppoc) + rtrn ) 207 tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zmortzgoc - zgrazpoc - zgrazffe 208 tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) - zgrazpoc * znumpoc &209 & + zmortzgoc * xkr_dmeso - zgrazffe* znumpoc * wsbio4(ji,jj,jk) / ( wsbio3(ji,jj,jk) + rtrn )210 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + ferat3 * zmortz2 - zgrazfff - zgrazpof227 tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) + zmortzgoc - zgrazpoc - zgrazffep + zgrapoc2 228 tra(ji,jj,jk,jpnum) = tra(ji,jj,jk,jpnum) - zgrazpoc * znumpoc + zgrapoc2 * xkr_dmeso & 229 & + zmortzgoc * xkr_dmeso - zgrazffep * znumpoc * wsbio4(ji,jj,jk) / ( wsbio3(ji,jj,jk) + rtrn ) 230 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) + ferat3 * zmortz2 - zgrazfffp - zgrazpof + zgraztotf * unass2 211 231 #else 212 tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) - zgrazpoc 213 tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zmortzgoc - zgrazffe 214 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) - zgrazpof 215 tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + ferat3 * zmortzgoc - zgrazfff 232 tra(ji,jj,jk,jppoc) = tra(ji,jj,jk,jppoc) - zgrazpoc - zgrazffep + zfrac 233 tra(ji,jj,jk,jpgoc) = tra(ji,jj,jk,jpgoc) + zmortzgoc - zgrazffeg + zgrapoc2 - zfrac 234 tra(ji,jj,jk,jpsfe) = tra(ji,jj,jk,jpsfe) - zgrazpof - zgrazfffp + zfracfe 235 tra(ji,jj,jk,jpbfe) = tra(ji,jj,jk,jpbfe) + ferat3 * zmortzgoc - zgrazfffg + zgraztotf * unass2 - zfracfe 216 236 #endif 217 218 237 END DO 219 238 END DO -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
r4147 r4148 201 201 zconctemp2 = trn(ji,jj,jk,jpdia) - zconctemp 202 202 ! 203 zpislopead (ji,jj,jk) = pislope * ( 1.+ zadap * EXP( enano(ji,jj,jk) ) )203 zpislopead (ji,jj,jk) = pislope * ( 1.+ zadap * EXP( -0.21 * enano(ji,jj,jk) ) ) 204 204 zpislopead2(ji,jj,jk) = (pislope * zconctemp2 + pislope2 * zconctemp) / ( trn(ji,jj,jk,jpdia) + rtrn ) 205 205 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
r3751 r4148 69 69 REAL(wp) :: zwflux, zfminus, zfplus 70 70 REAL(wp) :: zlim, zfact, zfactcal 71 REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit 71 REAL(wp) :: zo2, zno3, zflx, zpdenit, z1pdenit, zdenitt, zolimit 72 72 REAL(wp) :: zsiloss, zcaloss, zwsbio3, zwsbio4, zwscal, zdep, zwstpoc 73 73 REAL(wp) :: ztrfer, ztrpo4, zwdust … … 105 105 DO ji = 1, jpi 106 106 zdep = rfact2 / fse3t(ji,jj,1) 107 ! zwflux = ( emps(ji,jj) - emp(ji,jj) ) & 108 ! & * tsn(ji,jj,1,jp_sal) / ( tsn(ji,jj,1,jp_sal) - 6.0 ) / 1000. 109 zwflux = 0. 110 zfminus = MIN( 0., -zwflux ) * trn(ji,jj,1,jpfer) * zdep 111 zfplus = MAX( 0., -zwflux ) * 10E-9 * zdep 107 zwflux = fmmflx(ji,jj) / 1000._wp 108 zfminus = MIN( 0._wp, -zwflux ) * trn(ji,jj,1,jpfer) * zdep 109 zfplus = MAX( 0._wp, -zwflux ) * icefeinput * zdep 112 110 zironice(ji,jj) = zfplus + zfminus 113 111 END DO … … 135 133 ENDIF 136 134 zsidep(:,:) = 8.8 * 0.075 * dust(:,:) * rfact2 / fse3t(:,:,1) / ( 28.1 * rmtss ) 137 zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * rfact2 / fse3t(:,:,1) / ( 31. * rmtss ) 135 zpdep (:,:) = 0.1 * 0.021 * dust(:,:) * rfact2 / fse3t(:,:,1) / ( 31. * rmtss ) / po4r 138 136 ! ! Iron solubilization of particles in the water column 139 137 zwdust = 0.005 / ( wdust * 55.85 * 30.42 ) / ( 45. * rday ) … … 246 244 #endif 247 245 248 ! THEN this loss is scaled at each bottom grid cell for 249 ! equilibrating the total budget of silica in the ocean. 250 ! Thus, the amount of silica lost in the sediments equal 251 ! the supply at the surface (dust+rivers) 246 ! This loss is scaled at each bottom grid cell for equilibrating the total budget of silica in the ocean. 247 ! Thus, the amount of silica lost in the sediments equal the supply at the surface (dust+rivers) 252 248 ! ------------------------------------------------------ 253 249 #if ! defined key_sed … … 302 298 303 299 #if ! defined key_sed 304 zpdenit = MIN( ( trn(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 ) 300 ! The 0.5 factor in zpdenit and zdenitt is to avoid negative NO3 concentration after both denitrification 301 ! in the sediments and just above the sediments. Not very clever, but simpliest option. 302 zpdenit = MIN( 0.5 * ( trn(ji,jj,ikt,jpno3) - rtrn ) / rdenit, zdenit2d(ji,jj) * zwstpoc * zrivno3 ) 305 303 z1pdenit = zwstpoc * zrivno3 - zpdenit 306 trn(ji,jj,ikt,jpdoc) = trn(ji,jj,ikt,jpdoc) + z1pdenit 307 trn(ji,jj,ikt,jppo4) = trn(ji,jj,ikt,jppo4) + zpdenit 308 trn(ji,jj,ikt,jpnh4) = trn(ji,jj,ikt,jpnh4) + zpdenit 309 trn(ji,jj,ikt,jpno3) = trn(ji,jj,ikt,jpno3) - rdenit * zpdenit 310 trn(ji,jj,ikt,jptal) = trn(ji,jj,ikt,jptal) + rno3 * ( 1. + rdenit ) * zpdenit 311 trn(ji,jj,ikt,jpdic) = trn(ji,jj,ikt,jpdic) + zpdenit 304 zolimit = MIN( ( trn(ji,jj,ikt,jpoxy) - rtrn ) / o2ut, z1pdenit * ( 1.- nitrfac(ji,jj,ikt) ) ) 305 zdenitt = MIN( 0.5 * ( trn(ji,jj,ikt,jpno3) - rtrn ) / rdenit, z1pdenit * nitrfac(ji,jj,ikt) ) 306 trn(ji,jj,ikt,jpdoc) = trn(ji,jj,ikt,jpdoc) + z1pdenit - zolimit - zdenitt 307 trn(ji,jj,ikt,jppo4) = trn(ji,jj,ikt,jppo4) + zpdenit + zolimit + zdenitt 308 trn(ji,jj,ikt,jpnh4) = trn(ji,jj,ikt,jpnh4) + zpdenit + zolimit + zdenitt 309 trn(ji,jj,ikt,jpno3) = trn(ji,jj,ikt,jpno3) - rdenit * (zpdenit + zdenitt) 310 trn(ji,jj,ikt,jpoxy) = trn(ji,jj,ikt,jpoxy) - zolimit * o2ut 311 trn(ji,jj,ikt,jptal) = trn(ji,jj,ikt,jptal) + rno3 * (zolimit + (1.+rdenit) * (zpdenit + zdenitt) ) 312 trn(ji,jj,ikt,jpdic) = trn(ji,jj,ikt,jpdic) + zpdenit + zolimit + zdenitt 312 313 zwork4(ji,jj) = rdenit * zpdenit * fse3t(ji,jj,ikt) 313 314 #endif -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
r4147 r4148 156 156 DO ji = 1, jpi 157 157 IF( tmask(ji,jj,jk) == 1 ) THEN 158 zwsmax = 0. 8* fse3t(ji,jj,jk) / xstep158 zwsmax = 0.5 * fse3t(ji,jj,jk) / xstep 159 159 wsbio3(ji,jj,jk) = MIN( wsbio3(ji,jj,jk), zwsmax * FLOAT( iiter1 ) ) 160 160 wsbio4(ji,jj,jk) = MIN( wsbio4(ji,jj,jk), zwsmax * FLOAT( iiter2 ) ) … … 217 217 zaggdoc = ( ( 0.369 * 0.3 * trn(ji,jj,jk,jpdoc) + 102.4 * trn(ji,jj,jk,jppoc) ) * zfact & 218 218 & + 2.4 * zstep * trn(ji,jj,jk,jppoc) ) * 0.3 * trn(ji,jj,jk,jpdoc) 219 ! zaggdoc = ( 0.83 * trn(ji,jj,jk,jpdoc) + 271. * trn(ji,jj,jk,jppoc) ) * zfact * trn(ji,jj,jk,jpdoc)220 219 ! transfer of DOC to GOC : 221 220 ! 1st term is shear aggregation 222 221 ! 2nd term is differential settling 223 222 zaggdoc2 = ( 3.53E3 * zfact + 0.1 * zstep ) * trn(ji,jj,jk,jpgoc) * 0.3 * trn(ji,jj,jk,jpdoc) 224 ! zaggdoc2 = 1.07e4 * zfact * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpdoc)225 223 ! tranfer of DOC to POC due to brownian motion 226 ! zaggdoc3 = 0.02 * ( 16706. * trn(ji,jj,jk,jppoc) + 231. * trn(ji,jj,jk,jpdoc) ) * zstep * trn(ji,jj,jk,jpdoc)227 224 zaggdoc3 = ( 5095. * trn(ji,jj,jk,jppoc) + 114. * 0.3 * trn(ji,jj,jk,jpdoc) ) *zstep * 0.3 * trn(ji,jj,jk,jpdoc) 228 225 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
r4147 r4148 77 77 ! 78 78 IF( ln_rsttr .AND. kt == nittrc000 ) CALL p4z_rst( nittrc000, 'READ' ) !* read or initialize all required fields 79 IF( ln_rsttr .AND. ln_pisclo ) CALL p4z_clo ! damping on closed seas80 79 IF( ln_pisdmp .AND. MOD( kt - nn_dttrc, nn_pisdmp ) == 0 ) CALL p4z_dmp( kt ) ! Relaxation of some tracers 81 80 ! … … 165 164 NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_ncontent, xkr_mass_min, xkr_mass_max 166 165 #endif 167 NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp , ln_pisclo166 NAMELIST/nampisdmp/ ln_pisdmp, nn_pisdmp 168 167 NAMELIST/nampismass/ ln_check_mass 169 168 INTEGER :: ios ! Local integer output status for namelist read … … 234 233 WRITE(numout,*) ' Relaxation of tracer to glodap mean value ln_pisdmp =', ln_pisdmp 235 234 WRITE(numout,*) ' Frequency of Relaxation nn_pisdmp =', nn_pisdmp 236 WRITE(numout,*) ' Restoring of tracer to initial value on closed seas ln_pisclo =', ln_pisclo237 235 WRITE(numout,*) ' ' 238 236 ENDIF … … 436 434 END SUBROUTINE p4z_chk_mass 437 435 438 SUBROUTINE p4z_clo439 !!---------------------------------------------------------------------440 !! *** ROUTINE p4z_clo ***441 !!442 !! ** Purpose : Closed sea domain initialization443 !!444 !! ** Method : if a closed sea is located only in a model grid point445 !! we restore to initial data446 !!447 !! ** Action : ictsi1(), ictsj1() : south-west closed sea limits (i,j)448 !! ictsi2(), ictsj2() : north-east Closed sea limits (i,j)449 !!----------------------------------------------------------------------450 INTEGER, PARAMETER :: npicts = 4 ! number of closed sea451 INTEGER, DIMENSION(npicts) :: ictsi1, ictsj1 ! south-west closed sea limits (i,j)452 INTEGER, DIMENSION(npicts) :: ictsi2, ictsj2 ! north-east closed sea limits (i,j)453 INTEGER :: ji, jj, jk, jn, jl, jc ! dummy loop indices454 INTEGER :: ierr ! local integer455 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta ! 4D workspace456 !!----------------------------------------------------------------------457 458 IF(lwp) WRITE(numout,*)459 IF(lwp) WRITE(numout,*)' p4z_clo : closed seas '460 IF(lwp) WRITE(numout,*)'~~~~~~~'461 462 ! initial values463 ictsi1(:) = 1 ; ictsi2(:) = 1464 ictsj1(:) = 1 ; ictsj2(:) = 1465 466 ! set the closed seas (in data domain indices)467 ! -------------------468 469 IF( cp_cfg == "orca" ) THEN470 !471 SELECT CASE ( jp_cfg )472 ! ! =======================473 CASE ( 2 ) ! ORCA_R2 configuration474 ! ! =======================475 ! ! Caspian Sea476 ictsi1(1) = 11 ; ictsj1(1) = 103477 ictsi2(1) = 17 ; ictsj2(1) = 112478 ! ! Great North American Lakes479 ictsi1(2) = 97 ; ictsj1(2) = 107480 ictsi2(2) = 103 ; ictsj2(2) = 111481 ! ! Black Sea 1 : west part of the Black Sea482 ictsi1(3) = 174 ; ictsj1(3) = 107483 ictsi2(3) = 181 ; ictsj2(3) = 112484 ! ! Black Sea 2 : est part of the Black Sea485 ictsi1(4) = 2 ; ictsj1(4) = 107486 ictsi2(4) = 6 ; ictsj2(4) = 112487 ! ! =======================488 CASE ( 4 ) ! ORCA_R4 configuration489 ! ! =======================490 ! ! Caspian Sea491 ictsi1(1) = 4 ; ictsj1(1) = 53492 ictsi2(1) = 4 ; ictsj2(1) = 56493 ! ! Great North American Lakes494 ictsi1(2) = 49 ; ictsj1(2) = 55495 ictsi2(2) = 51 ; ictsj2(2) = 56496 ! ! Black Sea497 ictsi1(3) = 88 ; ictsj1(3) = 55498 ictsi2(3) = 91 ; ictsj2(3) = 56499 ! ! Baltic Sea500 ictsi1(4) = 75 ; ictsj1(4) = 59501 ictsi2(4) = 76 ; ictsj2(4) = 61502 ! ! =======================503 ! ! =======================504 CASE ( 025 ) ! ORCA_R025 configuration505 ! ! =======================506 ! Caspian + Aral sea507 ictsi1(1) = 1330 ; ictsj1(1) = 645508 ictsi2(1) = 1400 ; ictsj2(1) = 795509 ! ! Azov Sea510 ictsi1(2) = 1284 ; ictsj1(2) = 722511 ictsi2(2) = 1304 ; ictsj2(2) = 747512 !513 END SELECT514 !515 ENDIF516 517 ! convert the position in local domain indices518 ! --------------------------------------------519 DO jc = 1, npicts520 ictsi1(jc) = mi0( ictsi1(jc) )521 ictsj1(jc) = mj0( ictsj1(jc) )522 523 ictsi2(jc) = mi1( ictsi2(jc) )524 ictsj2(jc) = mj1( ictsj2(jc) )525 END DO526 527 ! Restore close seas values to initial data528 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping529 !530 CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) ! Memory allocation531 !532 CALL trc_dta( nittrc000, ztrcdta ) ! read tracer data at nittrc000533 !534 DO jn = 1, jptra535 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file536 jl = n_trc_index(jn)537 DO jc = 1, npicts538 DO jk = 1, jpkm1539 DO jj = ictsj1(jc), ictsj2(jc)540 DO ji = ictsi1(jc), ictsi2(jc)541 trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk,jl) * tmask(ji,jj,jk)542 trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn)543 ENDDO544 ENDDO545 ENDDO546 ENDDO547 ENDIF548 ENDDO549 CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )550 ENDIF551 !552 END SUBROUTINE p4z_clo553 436 #else 554 437 !!====================================================================== -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/sms_pisces.F90
r4147 r4148 58 58 LOGICAL :: ln_pisdmp !: restoring or not of nutrients to a mean value 59 59 INTEGER :: nn_pisdmp !: frequency of relaxation or not of nutrients to a mean value 60 LOGICAL :: ln_pisclo !: Restoring or not of nutrients to initial value on closed seas61 60 62 61 !!* Mass conservation -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
r4147 r4148 11 11 !! 3.3 ! 2010-06 (C. Ethe, G. Madec) merge TRA-TRC 12 12 !!---------------------------------------------------------------------- 13 #if defined key_top && defined key_trcdmp 14 !!---------------------------------------------------------------------- 15 !! key_trcdmp internal damping 13 #if defined key_top 16 14 !!---------------------------------------------------------------------- 17 15 !! trc_dmp : update the tracer trend with the internal damping … … 25 23 USE prtctl_trc ! Print control for debbuging 26 24 USE trdtra 25 USE trdmod_oce 27 26 28 27 IMPLICIT NONE … … 30 29 31 30 PUBLIC trc_dmp ! routine called by step.F90 31 PUBLIC trc_dmp_clo ! routine called by step.F90 32 32 PUBLIC trc_dmp_alloc ! routine called by nemogcm.F90 33 33 34 LOGICAL , PUBLIC, PARAMETER :: lk_trcdmp = .TRUE. !: internal damping flag35 36 ! !!* Namelist namtrc_dmp : passive tracer newtonian damping *37 INTEGER :: nn_hdmp_tr ! = 0/-1/'latitude' for damping over passive tracer38 INTEGER :: nn_zdmp_tr ! = 0/1/2 flag for damping in the mixed layer39 REAL(wp) :: rn_surf_tr ! surface time scale for internal damping [days]40 REAL(wp) :: rn_bot_tr ! bottom time scale for internal damping [days]41 REAL(wp) :: rn_dep_tr ! depth of transition between rn_surf and rn_bot [meters]42 INTEGER :: nn_file_tr ! = 1 create a damping.coeff NetCDF file43 44 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: restotr ! restoring coeff. on tracers (s-1) 35 36 INTEGER, PARAMETER :: npncts = 5 ! number of closed sea 37 INTEGER, DIMENSION(npncts) :: nctsi1, nctsj1 ! south-west closed sea limits (i,j) 38 INTEGER, DIMENSION(npncts) :: nctsi2, nctsj2 ! north-east closed sea limits (i,j) 45 39 46 40 !! * Substitutions … … 86 80 INTEGER, INTENT( in ) :: kt ! ocean time-step index 87 81 !! 88 INTEGER :: ji, jj, jk, jn ! dummy loop indices82 INTEGER :: ji, jj, jk, jn, jl ! dummy loop indices 89 83 REAL(wp) :: ztra ! temporary scalars 90 84 CHARACTER (len=22) :: charout 91 85 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrtrd 86 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta ! 4D workspace 92 87 !!---------------------------------------------------------------------- 93 88 ! … … 99 94 100 95 IF( l_trdtrc ) CALL wrk_alloc( jpi, jpj, jpk, ztrtrd ) ! temporary save of trends 101 102 ! 1. Newtonian damping trends on tracer fields 103 ! -------------------------------------------- 104 ! Initialize the input fields for newtonian damping 105 CALL trc_dta( kt ) 106 ! ! =========== 107 DO jn = 1, jptra ! tracer loop 108 ! ! =========== 109 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 110 111 IF( lutini(jn) ) THEN 96 ! 97 IF( nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping 98 ! 99 CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) ! Memory allocation 100 CALL trc_dta( kt, ztrcdta ) ! read tracer data at nit000 101 ! ! =========== 102 DO jn = 1, jptra ! tracer loop 103 ! ! =========== 104 IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn) ! save trends 112 105 ! 113 SELECT CASE ( nn_zdmp_trc ) 114 ! 115 CASE( 0 ) !== newtonian damping throughout the water column ==! 116 DO jk = 1, jpkm1 117 DO jj = 2, jpjm1 118 DO ji = fs_2, fs_jpim1 ! vector opt. 119 ztra = restotr(ji,jj,jk) * ( trdta(ji,jj,jk,jn) - trb(ji,jj,jk,jn) ) 120 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 106 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file 107 108 jl = n_trc_index(jn) 109 110 SELECT CASE ( nn_zdmp_tr ) 111 ! 112 CASE( 0 ) !== newtonian damping throughout the water column ==! 113 DO jk = 1, jpkm1 114 DO jj = 2, jpjm1 115 DO ji = fs_2, fs_jpim1 ! vector opt. 116 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk,jl) - trb(ji,jj,jk,jn) ) 117 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 118 END DO 121 119 END DO 122 120 END DO 123 END DO124 !125 CASE ( 1 ) !== no damping in the turbocline (avt > 5 cm2/s) ==!126 DO jk = 1, jpkm1127 DO jj = 2, jpjm1128 DO ji = fs_2, fs_jpim1 ! vector opt.129 IF( avt(ji,jj,jk) <= 5.e-4 ) THEN130 ztra = restotr(ji,jj,jk) * ( trdta(ji,jj,jk,jn) - trb(ji,jj,jk,jn) )131 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra132 END IF121 ! 122 CASE ( 1 ) !== no damping in the turbocline (avt > 5 cm2/s) ==! 123 DO jk = 1, jpkm1 124 DO jj = 2, jpjm1 125 DO ji = fs_2, fs_jpim1 ! vector opt. 126 IF( avt(ji,jj,jk) <= 5.e-4 ) THEN 127 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk,jl) - trb(ji,jj,jk,jn) ) 128 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 129 ENDIF 130 END DO 133 131 END DO 134 132 END DO 135 END DO136 !137 CASE ( 2 ) !== no damping in the mixed layer ==!138 DO jk = 1, jpkm1139 DO jj = 2, jpjm1140 DO ji = fs_2, fs_jpim1 ! vector opt.141 IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN142 ztra = restotr(ji,jj,jk,jn) * ( trdta(ji,jj,jk,jn) - trb(ji,jj,jk,jn) )143 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra144 END IF133 ! 134 CASE ( 2 ) !== no damping in the mixed layer ==! 135 DO jk = 1, jpkm1 136 DO jj = 2, jpjm1 137 DO ji = fs_2, fs_jpim1 ! vector opt. 138 IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN 139 ztra = restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk,jl) - trb(ji,jj,jk,jn) ) 140 tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + ztra 141 END IF 142 END DO 145 143 END DO 146 144 END DO 147 END DO 148 ! 149 END SELECT 150 ! 151 ENDIF 152 ! 153 IF( l_trdtrc ) THEN 154 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 155 CALL trd_tra( kt, 'TRC', jn, jptra_trd_dmp, ztrtrd ) 156 END IF 157 ! ! =========== 158 END DO ! tracer loop 159 ! ! =========== 145 ! 146 END SELECT 147 ! 148 ENDIF 149 ! 150 IF( l_trdtrc ) THEN 151 ztrtrd(:,:,:) = tra(:,:,:,jn) - ztrtrd(:,:,:) 152 CALL trd_tra( kt, 'TRC', jn, jptra_trd_dmp, ztrtrd ) 153 END IF 154 ! ! =========== 155 END DO ! tracer loop 156 ! ! =========== 157 CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 158 ENDIF 159 ! 160 160 IF( l_trdtrc ) CALL wrk_dealloc( jpi, jpj, jpk, ztrtrd ) 161 161 ! ! print mean trends (used for debugging) … … 168 168 ! 169 169 END SUBROUTINE trc_dmp 170 171 SUBROUTINE trc_dmp_clo( kt ) 172 !!--------------------------------------------------------------------- 173 !! *** ROUTINE trc_dmp_clo *** 174 !! 175 !! ** Purpose : Closed sea domain initialization 176 !! 177 !! ** Method : if a closed sea is located only in a model grid point 178 !! we restore to initial data 179 !! 180 !! ** Action : nctsi1(), nctsj1() : south-west closed sea limits (i,j) 181 !! nctsi2(), nctsj2() : north-east Closed sea limits (i,j) 182 !!---------------------------------------------------------------------- 183 INTEGER, INTENT( in ) :: kt ! ocean time-step index 184 ! 185 INTEGER :: ji, jj, jk, jn, jl, jc ! dummy loop indicesa 186 REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta ! 4D workspace 187 188 !!---------------------------------------------------------------------- 189 190 IF( kt == nit000 ) THEN 191 ! initial values 192 nctsi1(:) = 1 ; nctsi2(:) = 1 193 nctsj1(:) = 1 ; nctsj2(:) = 1 194 195 ! set the closed seas (in data domain indices) 196 ! ------------------- 197 198 IF( cp_cfg == "orca" ) THEN 199 ! 200 SELECT CASE ( jp_cfg ) 201 ! ! ======================= 202 CASE ( 2 ) ! ORCA_R2 configuration 203 ! ! ======================= 204 ! ! Caspian Sea 205 nctsi1(1) = 11 ; nctsj1(1) = 103 206 nctsi2(1) = 17 ; nctsj2(1) = 112 207 ! ! Great North American Lakes 208 nctsi1(2) = 97 ; nctsj1(2) = 107 209 nctsi2(2) = 103 ; nctsj2(2) = 111 210 ! ! Black Sea 1 : west part of the Black Sea 211 nctsi1(3) = 174 ; nctsj1(3) = 107 212 nctsi2(3) = 181 ; nctsj2(3) = 112 213 ! ! Black Sea 2 : est part of the Black Sea 214 nctsi1(4) = 2 ; nctsj1(4) = 107 215 nctsi2(4) = 6 ; nctsj2(4) = 112 216 ! ! Baltic Sea 217 nctsi1(5) = 145 ; nctsj1(5) = 116 218 nctsi2(5) = 150 ; nctsj2(5) = 126 219 ! ! ======================= 220 CASE ( 4 ) ! ORCA_R4 configuration 221 ! ! ======================= 222 ! ! Caspian Sea 223 nctsi1(1) = 4 ; nctsj1(1) = 53 224 nctsi2(1) = 4 ; nctsj2(1) = 56 225 ! ! Great North American Lakes 226 nctsi1(2) = 49 ; nctsj1(2) = 55 227 nctsi2(2) = 51 ; nctsj2(2) = 56 228 ! ! Black Sea 229 nctsi1(3) = 88 ; nctsj1(3) = 55 230 nctsi2(3) = 91 ; nctsj2(3) = 56 231 ! ! Baltic Sea 232 nctsi1(4) = 75 ; nctsj1(4) = 59 233 nctsi2(4) = 76 ; nctsj2(4) = 61 234 ! ! ======================= 235 CASE ( 025 ) ! ORCA_R025 configuration 236 ! ! ======================= 237 ! Caspian + Aral sea 238 nctsi1(1) = 1330 ; nctsj1(1) = 645 239 nctsi2(1) = 1400 ; nctsj2(1) = 795 240 ! ! Azov Sea 241 nctsi1(2) = 1284 ; nctsj1(2) = 722 242 nctsi2(2) = 1304 ; nctsj2(2) = 747 243 ! 244 END SELECT 245 ! 246 ENDIF 247 ! 248 249 ! convert the position in local domain indices 250 ! -------------------------------------------- 251 DO jc = 1, npncts 252 nctsi1(jc) = mi0( nctsi1(jc) ) 253 nctsj1(jc) = mj0( nctsj1(jc) ) 254 255 nctsi2(jc) = mi1( nctsi2(jc) ) 256 nctsj2(jc) = mj1( nctsj2(jc) ) 257 END DO 258 ! 259 ENDIF 260 261 ! Restore close seas values to initial data 262 IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! Initialisation of tracer from a file that may also be used for damping 263 ! 264 IF(lwp) WRITE(numout,*) 265 IF(lwp) WRITE(numout,*) ' trc_dmp_clo : Restoring of nutrients on close seas at time-step kt = ', kt 266 IF(lwp) WRITE(numout,*) 267 ! 268 CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) ! Memory allocation 269 ! 270 CALL trc_dta( kt , ztrcdta ) ! read tracer data at nittrc000 271 ! 272 DO jn = 1, jptra 273 IF( ln_trc_ini(jn) ) THEN ! update passive tracers arrays with input data read from file 274 jl = n_trc_index(jn) 275 DO jc = 1, npncts 276 DO jk = 1, jpkm1 277 DO jj = nctsj1(jc), nctsj2(jc) 278 DO ji = nctsi1(jc), nctsi2(jc) 279 trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk,jl) * tmask(ji,jj,jk) 280 trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 281 ENDDO 282 ENDDO 283 ENDDO 284 ENDDO 285 ENDIF 286 ENDDO 287 CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta ) 288 ENDIF 289 ! 290 END SUBROUTINE trc_dmp_clo 170 291 171 292 … … 199 320 END SELECT 200 321 201 IF( .NOT. lk_dtatrc ) & 202 & CALL ctl_stop( 'no passive tracer data define key_dtatrc' ) 203 204 IF( .NOT. lk_tradmp ) & 322 IF( .NOT. ln_tradmp ) & 205 323 & CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' ) 206 324 ! … … 214 332 ! 215 333 END SUBROUTINE trc_dmp_init 334 216 335 #else 217 336 !!---------------------------------------------------------------------- 218 !! Default key NO internal damping 219 !!---------------------------------------------------------------------- 220 LOGICAL , PUBLIC, PARAMETER :: lk_trcdmp = .FALSE. !: internal damping flag 337 !! Dummy module : No passive tracer 338 !!---------------------------------------------------------------------- 221 339 CONTAINS 222 340 SUBROUTINE trc_dmp( kt ) ! Empty routine … … 225 343 END SUBROUTINE trc_dmp 226 344 #endif 345 346 227 347 !!====================================================================== 228 348 END MODULE trcdmp -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90
r4147 r4148 13 13 !! trc_nam_trp : read the passive tracer namelist for transport 14 14 !!---------------------------------------------------------------------- 15 USE trc ! ocean passive tracers variables 15 USE oce_trc ! shared ocean passive tracers variables 16 USE trc ! passive tracers variables 16 17 USE in_out_manager ! ocean dynamics and active tracers variables 17 18 USE lib_mpp ! distributed memory computing library … … 49 50 INTEGER , PUBLIC :: nn_trczdf_exp !: number of sub-time step (explicit time stepping) 50 51 51 52 #if defined key_trcdmp53 52 ! !!: ** newtonian damping namelist (nam_trcdmp) ** 54 INTEGER , PUBLIC :: nn_hdmp_tr = -1 ! = 0/-1/'latitude' for damping over passive tracer55 INTEGER , PUBLIC :: nn_ zdmp_tr = 0 ! = 0/1/2 flag for damping in the mixed layer56 REAL(wp), PUBLIC :: rn_surf_tr = 50. ! surface time scale for internal damping [days]57 REAL(wp), PUBLIC :: rn_ bot_tr = 360. ! bottom time scale for internal damping[days]58 REAL(wp), PUBLIC :: rn_ dep_tr = 800. ! depth of transition between rn_surf and rn_bot [meters]59 INTEGER , PUBLIC :: nn_file_tr = 2 ! = 1 create a damping.coeff NetCDF file60 #endif 53 ! !!* Namelist namtrc_dmp : passive tracer newtonian damping * 54 INTEGER , PUBLIC :: nn_hdmp_tr ! = 0/-1/'latitude' for damping over passive tracer 55 INTEGER , PUBLIC :: nn_zdmp_tr ! = 0/1/2 flag for damping in the mixed layer 56 REAL(wp), PUBLIC :: rn_surf_tr ! surface time scale for internal damping [days] 57 REAL(wp), PUBLIC :: rn_bot_tr ! bottom time scale for internal damping [days] 58 REAL(wp), PUBLIC :: rn_dep_tr ! depth of transition between rn_surf and rn_bot [meters] 59 INTEGER , PUBLIC :: nn_file_tr ! = 1 create a damping.coeff NetCDF file 61 60 62 61 !!---------------------------------------------------------------------- … … 84 83 NAMELIST/namtrc_zdf/ ln_trczdf_exp , nn_trczdf_exp 85 84 NAMELIST/namtrc_rad/ ln_trcrad 86 #if defined key_trcdmp 87 NAMELIST/namtrc_dmp/ ln_trcdmp, nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, & 85 NAMELIST/namtrc_dmp/ nn_hdmp_tr, nn_zdmp_tr, rn_surf_tr, & 88 86 & rn_bot_tr , rn_dep_tr , nn_file_tr 89 #endif90 87 !!---------------------------------------------------------------------- 91 88 … … 174 171 175 172 176 # if defined key_trcdmp177 173 REWIND( numnat_ref ) ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping 178 174 READ ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909) … … 184 180 WRITE ( numont, namtrc_dmp ) 185 181 186 IF( lzoom ) nn_zdmp_tr c= 0 ! restoring to climatology at closed north or south boundaries182 IF( lzoom ) nn_zdmp_tr = 0 ! restoring to climatology at closed north or south boundaries 187 183 188 184 IF(lwp) THEN ! Namelist print … … 191 187 WRITE(numout,*) '~~~~~~~' 192 188 WRITE(numout,*) ' Namelist namtrc_dmp : set damping parameter' 193 WRITE(numout,*) ' add a damping term or not ln_trcdmp = ', ln_trcdmp194 189 WRITE(numout,*) ' tracer damping option nn_hdmp_tr = ', nn_hdmp_tr 195 190 WRITE(numout,*) ' mixed layer damping option nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)' … … 199 194 WRITE(numout,*) ' create a damping.coeff file nn_file_tr = ', nn_file_tr 200 195 ENDIF 201 #endif202 196 ! 203 197 END SUBROUTINE trc_nam_trp -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r3680 r4148 66 66 CALL trc_sbc( kstp ) ! surface boundary condition 67 67 IF( lk_trabbl ) CALL trc_bbl( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 68 IF( lk_trcdmp ) CALL trc_dmp( kstp ) ! internal damping trends 68 IF( ln_trcdmp ) CALL trc_dmp( kstp ) ! internal damping trends 69 IF( ln_trcdmp_clo ) CALL trc_dmp_clo( kstp ) ! internal damping trends on closed seas only 69 70 CALL trc_adv( kstp ) ! horizontal & vertical advection 70 71 CALL trc_ldf( kstp ) ! lateral mixing -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
r4147 r4148 92 92 USE sbc_oce , ONLY : emp => emp !: freshwater budget: volume flux [Kg/m2/s] 93 93 USE sbc_oce , ONLY : emp_b => emp_b !: freshwater budget: volume flux [Kg/m2/s] 94 USE sbc_oce , ONLY : sfx => sfx !: downward salt flux [PSU/m2/s]94 USE sbc_oce , ONLY : fmmflx => fmmflx !: freshwater budget: volume flux [Kg/m2/s] 95 95 USE sbc_oce , ONLY : rnf => rnf !: river runoff [Kg/m2/s] 96 96 USE sbc_oce , ONLY : ln_dm2dc => ln_dm2dc !: Daily mean to Diurnal Cycle short wave (qsr) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trc.F90
r4147 r4148 28 28 INTEGER, PUBLIC :: numrtr !: logical unit for trc restart (read ) 29 29 INTEGER, PUBLIC :: numrtw !: logical unit for trc restart ( write ) 30 LOGICAL, PUBLIC :: ln_top_euler !: boolean term for euler integration in the first timestep31 30 32 31 !! passive tracers fields (before,now,after) … … 55 54 CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out !: suffix of pass. tracer restart name (output) 56 55 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdttrc !: vertical profile of passive tracer time step 56 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration 57 57 LOGICAL , PUBLIC :: ln_trcdta !: Read inputs data from files 58 58 LOGICAL , PUBLIC :: ln_trcdmp !: internal damping flag 59 LOGICAL , PUBLIC :: ln_trcdmp_clo !: internal damping flag on closed seas 59 60 INTEGER , PUBLIC :: nittrc000 !: first time step of passive tracers model 60 61 … … 142 143 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fr_i_tm !: average ice fraction [m/s] 143 144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tm !: freshwater budget: volume flux [Kg/m2/s] 144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sfx_tm !: downward salt flux [PSU/m2/s]145 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: fmmflx_tm !: freshwater budget: freezing/melting [Kg/m2/s] 145 146 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_b_hold !: hold emp from the beginning of each sub-stepping[m] 146 147 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr_tm !: solar radiation average [m] … … 182 183 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdivb_temp, rotb_temp 183 184 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmld_temp, qsr_temp, fr_i_temp,wndm_temp 184 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_temp, sfx_temp, emp_b_temp185 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_temp, fmmflx_temp, emp_b_temp 185 186 ! 186 187 #if defined key_trabbl -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
r4147 r4148 259 259 ENDDO 260 260 ENDIF 261 !262 IF( .NOT.ln_trcdmp ) THEN!== deallocate data structure ==!261 262 IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN !== deallocate data structure ==! 263 263 ! (data used only for initialisation) 264 264 IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only use to initialize the run' -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r4147 r4148 60 60 !! 61 61 NAMELIST/namtrc/ nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, & 62 & cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, ln_trcdmp,&63 & ln_t op_euler62 & cn_trcrst_in, cn_trcrst_out, sn_tracer, ln_trcdta, & 63 & ln_trcdmp, ln_trcdmp_clo, ln_top_euler 64 64 #if defined key_trdmld_trc || defined key_trdtrc 65 65 NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, & … … 109 109 WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta 110 110 WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp 111 WRITE(numout,*) ' Restoring of tracer on closed seas ln_trcdmp_clo = ', ln_trcdmp_clo 111 112 WRITE(numout,*) ' Use euler integration for TRC (y/n) ln_top_euler = ', ln_top_euler 112 113 WRITE(numout,*) ' ' … … 170 171 171 172 172 IF( ln_trcdmp .AND. .NOT.ln_trcdta ) THEN 173 CALL ctl_warn( 'trc_nam: passive tracer damping requires data from files we set ln_trcdta to TRUE' ) 174 ln_trcdta = .TRUE. 175 ENDIF 173 IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data 176 174 ! 177 IF( ln_rsttr .AND. .NOT.ln_trcdmp .AND. ln_trcdta ) THEN 178 CALL ctl_warn( 'trc_nam: passive tracer restart and data intialisation, ', & 179 & 'we keep the restart values and set ln_trcdta to FALSE' ) 180 ln_trcdta = .FALSE. 181 ENDIF 175 IF( ln_trcdmp .OR. ln_trcdmp_clo ) ln_trcdta = .TRUE. ! damping : need to have clim data 182 176 ! 183 177 IF( .NOT.ln_trcdta ) THEN … … 188 182 IF( ln_rsttr ) THEN 189 183 WRITE(numout,*) 190 WRITE(numout,*) ' read a restart file for passive tracer : ', TRIM( cn_trcrst_in ) 191 WRITE(numout,*) 192 ELSE 193 IF( .NOT.ln_trcdta ) THEN 194 WRITE(numout,*) 195 WRITE(numout,*) ' All the passive tracers are initialised with constant values ' 196 WRITE(numout,*) 197 ENDIF 184 WRITE(numout,*) ' Read a restart file for passive tracer : ', TRIM( cn_trcrst_in ) 185 WRITE(numout,*) 186 ENDIF 187 IF( ln_trcdta .AND. .NOT.ln_rsttr ) THEN 188 WRITE(numout,*) 189 WRITE(numout,*) ' Some of the passive tracers are initialised from climatologies ' 190 WRITE(numout,*) 191 ENDIF 192 IF( .NOT.ln_trcdta ) THEN 193 WRITE(numout,*) 194 WRITE(numout,*) ' All the passive tracers are initialised with constant values ' 195 WRITE(numout,*) 198 196 ENDIF 199 197 ENDIF -
branches/2013/dev_LOCEAN_2013/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
r3680 r4148 124 124 fr_i_tm (:,:) = fr_i_tm (:,:) + fr_i (:,:) 125 125 emp_tm (:,:) = emp_tm (:,:) + emp (:,:) 126 sfx_tm (:,:) = sfx_tm (:,:) + sfx(:,:)126 fmmflx_tm(:,:) = fmmflx_tm(:,:) + fmmflx(:,:) 127 127 qsr_tm (:,:) = qsr_tm (:,:) + qsr (:,:) 128 128 wndm_tm (:,:) = wndm_tm (:,:) + wndm (:,:) … … 212 212 emp_temp (:,:) = emp (:,:) 213 213 emp_b_temp (:,:) = emp_b (:,:) 214 sfx_temp (:,:) = sfx(:,:)214 fmmflx_temp(:,:) = fmmflx(:,:) 215 215 qsr_temp (:,:) = qsr (:,:) 216 216 wndm_temp (:,:) = wndm (:,:) … … 316 316 fr_i_tm (:,:) = fr_i_tm (:,:) + fr_i (:,:) 317 317 emp_tm (:,:) = emp_tm (:,:) + emp (:,:) 318 sfx_tm (:,:) = sfx_tm (:,:) + sfx(:,:)318 fmmflx_tm(:,:) = fmmflx_tm (:,:) + fmmflx(:,:) 319 319 qsr_tm (:,:) = qsr_tm (:,:) + qsr (:,:) 320 320 wndm_tm (:,:) = wndm_tm (:,:) + wndm (:,:) … … 335 335 qsr (:,:) = qsr_tm (:,:) * r1_ndttrc 336 336 emp (:,:) = emp_tm (:,:) * r1_ndttrc 337 sfx (:,:) = sfx_tm(:,:) * r1_ndttrc337 fmmflx(:,:) = fmmflx_tm (:,:) * r1_ndttrc 338 338 fr_i (:,:) = fr_i_tm (:,:) * r1_ndttrc 339 339 # if defined key_trabbl … … 351 351 qsr (:,:) = qsr_tm (:,:) * r1_ndttrcp1 352 352 emp (:,:) = emp_tm (:,:) * r1_ndttrcp1 353 sfx (:,:) = sfx_tm(:,:) * r1_ndttrcp1353 fmmflx(:,:) = fmmflx_tm (:,:) * r1_ndttrcp1 354 354 fr_i (:,:) = fr_i_tm (:,:) * r1_ndttrcp1 355 355 # if defined key_trabbl … … 501 501 CALL lbc_lnk( emp (:,:) , 'T', 1. ) 502 502 CALL lbc_lnk( emp_b (:,:) , 'T', 1. ) 503 CALL lbc_lnk( sfx(:,:) , 'T', 1. )503 CALL lbc_lnk( fmmflx(:,:) , 'T', 1. ) 504 504 CALL lbc_lnk( qsr (:,:) , 'T', 1. ) 505 505 CALL lbc_lnk( wndm (:,:) , 'T', 1. ) … … 601 601 fr_i_tm(:,:) = 0._wp 602 602 emp_tm (:,:) = 0._wp 603 sfx_tm(:,:) = 0._wp603 fmmflx_tm(:,:) = 0._wp 604 604 qsr_tm (:,:) = 0._wp 605 605 wndm_tm(:,:) = 0._wp … … 708 708 fr_i (:,:) = fr_i_temp (:,:) 709 709 emp (:,:) = emp_temp (:,:) 710 sfx (:,:) = sfx_temp(:,:)710 fmmflx(:,:) = fmmflx_temp(:,:) 711 711 emp_b (:,:) = emp_b_temp (:,:) 712 712 qsr (:,:) = qsr_temp (:,:) … … 827 827 fr_i_tm (:,:) = fr_i (:,:) 828 828 emp_tm (:,:) = emp (:,:) 829 sfx_tm (:,:) = sfx(:,:)829 fmmflx_tm (:,:) = fmmflx(:,:) 830 830 qsr_tm (:,:) = qsr (:,:) 831 831 wndm_tm (:,:) = wndm (:,:) … … 1056 1056 & rnf_temp(jpi,jpj) , h_rnf_temp(jpi,jpj) , & 1057 1057 & tsn_temp(jpi,jpj,jpk,2) , emp_b_temp(jpi,jpj), & 1058 & emp_temp(jpi,jpj) , sfx_temp(jpi,jpj) ,&1058 & emp_temp(jpi,jpj) , fmmflx_temp(jpi,jpj), & 1059 1059 & hmld_temp(jpi,jpj) , qsr_temp(jpi,jpj) , & 1060 1060 & fr_i_temp(jpi,jpj) , fr_i_tm(jpi,jpj) , & … … 1104 1104 & sshv_n_tm(jpi,jpj) , sshv_b_hold(jpi,jpj), & 1105 1105 & tsn_tm(jpi,jpj,jpk,2) , & 1106 & emp_tm(jpi,jpj) , sfx_tm(jpi,jpj) ,&1106 & emp_tm(jpi,jpj) , fmmflx_tm(jpi,jpj) , & 1107 1107 & emp_b_hold(jpi,jpj) , & 1108 1108 & hmld_tm(jpi,jpj) , qsr_tm(jpi,jpj) , & -
branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/COMPILE/Fcheck_archfile.sh
r3294 r4148 59 59 # 60 60 #- 61 cpeval () 62 { 63 cat > $2 << EOF 61 64 62 if [ ${#2} -eq 0 ]; then 63 if [ ! -f ${COMPIL_DIR}/$1 ]; then 64 echo "Warning !!!" 65 echo "NO compiler chosen" 66 echo "Try makenemo -h for help" 67 echo "EXITING..." 68 exit 1 69 fi 70 else 71 myfile=$( find ${MAIN_DIR}/ARCH -name arch-${2}.fcm -print ) 72 if [ ${#myfile} -gt 0 ]; then 73 ln -sf ${myfile} ${COMPIL_DIR}/$1 74 else 75 echo "Warning !!!" 76 echo "Compiler not existing" 77 echo "Try makenemo -h for help" 78 echo "EXITING..." 79 exit 1 80 fi 65 #========================================================== 66 # Automatically generated by Fcheck_archfile.sh from 67 # $1 68 #========================================================== 69 70 EOF 71 while read line 72 do 73 eval "echo \"$line\" >> $2" 74 done < $1 75 } 76 # cleaning related to the old version 77 rm -f $( find ${COMPIL_DIR} -type l -name $1 -print ) 78 # 79 if [ ${#3} -eq 0 ]; then # arch not specified 80 if [ ! -f ${COMPIL_DIR}/arch.history ]; then 81 echo "Warning !!!" 82 echo "NO compiler chosen" 83 echo "Try makenemo -h for help" 84 echo "EXITING..." 85 exit 1 86 else # use the arch file defined in arch.history 87 myarch=$( cat ${COMPIL_DIR}/arch.history ) 88 if [ ! -f $myarch ]; then 89 echo "Warning !!!" 90 echo "previously used arch file no more found:" 91 echo $myarch 92 echo "EXITING..." 93 exit 1 94 else 95 if [ -f ${COMPIL_DIR}/$1 ]; then 96 # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 97 mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 98 if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 99 echo $mycpp > ${COMPIL_DIR}/cpp.history 100 cpeval ${myarch} ${COMPIL_DIR}/$1 101 fi 102 # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 103 mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 104 [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 105 # has myarch file been updated since we copied it in ${COMPIL_DIR}? 106 myarchdir=$( dirname ${myarch} ) 107 myarchname=$( basename ${myarch} ) 108 myarch=$( find -L $myarchdir -cnewer ${COMPIL_DIR}/$1 -name $myarchname -print ) 109 [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 110 else 111 cpeval ${myarch} ${COMPIL_DIR}/$1 112 fi 113 fi 114 fi 115 else 116 nb=$( find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print | wc -l ) 117 if [ $nb -eq 0 ]; then # no arch file found 118 echo "Warning !!!" 119 echo "Compiler not existing" 120 echo "Try makenemo -h for help" 121 echo "EXITING..." 122 exit 1 123 fi 124 if [ $nb -gt 1 ]; then # more than 1 arch file found 125 echo "Warning !!!" 126 echo "more than 1 arch file for the same compiler have been found" 127 find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print 128 echo "keep only 1" 129 echo "EXITING..." 130 exit 1 131 fi 132 myarch=$( find ${MAIN_DIR}/ARCH -name arch-${3}.fcm -print ) 133 # we were already using this arch file ? 134 if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then 135 if [ -f ${COMPIL_DIR}/$1 ]; then 136 # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}? 137 mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" ) 138 if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then 139 echo $mycpp > ${COMPIL_DIR}/cpp.history 140 cpeval ${myarch} ${COMPIL_DIR}/$1 141 fi 142 # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}? 143 mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print ) 144 [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 145 # has myarch file been updated since we copied it in ${COMPIL_DIR}? 146 myarch=$( find -L ${MAIN_DIR}/ARCH -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print ) 147 [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1 148 else 149 cpeval ${myarch} ${COMPIL_DIR}/$1 150 fi 151 else 152 ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history 153 echo ${myarch} > ${COMPIL_DIR}/arch.history 154 cpeval ${myarch} ${COMPIL_DIR}/$1 155 fi 81 156 fi 157 158 #- do we need xios library? 159 use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput ) 160 have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" ) 161 if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]] 162 then 163 sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 164 mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 165 fi 166 167 #- do we need oasis libraries? 168 use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 ) 169 for liboa in psmile.MPI1 mct mpeu scrip mpp_io 170 do 171 have_liboa=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-l${liboa}" ) 172 if [[ ( $use_oasis -eq 0 ) && ( $have_liboa -ge 1 ) ]] 173 then 174 sed -e "s/-l${liboa}//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$ 175 mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1 176 fi 177 done 178 -
branches/2013/dev_LOCEAN_2013/NEMOGCM/TOOLS/COMPILE/Flist_archfile.sh
r3294 r4148 61 61 62 62 echo "Available compilers for -m option :" 63 for file in $(ls ${MAIN_DIR}/ARCH | grep fcm)63 for file in $(ls ${MAIN_DIR}/ARCH | grep "fcm$" ) 64 64 do 65 65 zvar1=${file#arch-} … … 71 71 72 72 if [ "$1" == "all" ]; then 73 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v fcm)73 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" ) 74 74 do 75 75 echo "Available compilers at ${dir} :" 76 for file in $(ls ${MAIN_DIR}/ARCH/${dir} | grep fcm)76 for file in $(ls ${MAIN_DIR}/ARCH/${dir} | grep "fcm$" ) 77 77 do 78 78 zvar1=${file#arch-} … … 84 84 elif [ -d ${MAIN_DIR}/ARCH/${1} ]; then 85 85 echo "Available compilers at $1 :" 86 for file in $(ls ${MAIN_DIR}/ARCH/$1 | grep fcm)86 for file in $(ls ${MAIN_DIR}/ARCH/$1 | grep "fcm$" ) 87 87 do 88 88 zvar1=${file#arch-} … … 93 93 else 94 94 echo "Available consortium member sub-directories :" 95 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v fcm)95 for dir in $(ls ${MAIN_DIR}/ARCH | grep -v "fcm$" ) 96 96 do 97 97 echo ${dir}
Note: See TracChangeset
for help on using the changeset viewer.