Changeset 5213 for branches/2015/dev_r5021_UKMO1_CICE_coupling/DOC/TexFiles
- Timestamp:
- 2015-04-15T17:03:58+02:00 (9 years ago)
- Location:
- branches/2015/dev_r5021_UKMO1_CICE_coupling/DOC/TexFiles
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_r5021_UKMO1_CICE_coupling/DOC/TexFiles/Chapters/Chap_DIA.tex
r5003 r5213 74 74 The second functionality targets output performance when running in parallel (\key{mpp\_mpi}). Iomput provides the possibility to specify N dedicated I/O processes (in addition to the NEMO processes) to collect and write the outputs. With an appropriate choice of N by the user, the bottleneck associated with the writing of the output files can be greatly reduced. 75 75 76 Since version 3.5, the iom\_put interface depends on an external code called \href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}. This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing 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 through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3.76 In version 3.6, the iom\_put interface depends on an external code called \href{https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/branchs/xios-1.0}{XIOS-1.0}. This new IO server can take advantage of the parallel I/O functionality of NetCDF4 to create a single output file and therefore to bypass the rebuilding phase. Note that writing 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 through XIOS are incompatible with NetCDF3. All post-processsing and visualization tools must therefore be compatible with NetCDF4 and not only NetCDF3. 77 77 78 78 Even if not using the parallel I/O functionality of NetCDF4, using N dedicated I/O servers, where N is typically much less than the number of NEMO processors, will reduce the number of output files created. This can greatly reduce the post-processing burden usually associated with using large numbers of NEMO processors. Note that for smaller configurations, the rebuilding phase can be avoided, even without a parallel-enabled NetCDF4 library, simply by employing only one dedicated I/O server. … … 543 543 \end{tabular} 544 544 545 \subsubsection{Advanced use of XIOS functionalities} 545 546 546 547 \subsection{XML reference tables} 548 549 (1) Simple computation: directly define the computation when refering to the variable in the file definition. 550 551 \vspace{-20pt} 552 \begin{alltt} {{\scriptsize 553 \begin{verbatim} 554 <field field\_ref="sst" name="tosK" unit="degK" > sst + 273.15 </field> 555 <field field\_ref="taum" name="taum2" unit="N2/m4" long\_name="square of wind stress module" > taum * taum </field> 556 <field field\_ref="qt" name="stupid\_check" > qt - qsr - qns </field> 557 \end{verbatim} 558 }}\end{alltt} 559 560 (2) Simple computation: define a new variable and use it in the file definition. 561 562 in field\_definition: 563 \vspace{-20pt} 564 \begin{alltt} {{\scriptsize 565 \begin{verbatim} 566 <field id="sst2" long\_name="square of sea surface temperature" unit="degC2" > sst * sst </field > 567 \end{verbatim} 568 }}\end{alltt} 569 in file\_definition: 570 \vspace{-20pt} 571 \begin{alltt} {{\scriptsize 572 \begin{verbatim} 573 <field field\_ref="sst2" > sst2 </field> 574 \end{verbatim} 575 }}\end{alltt} 576 Note that in this case, the following syntaxe $<$field field\_ref="sst2" /$>$ is not working as sst2 won't be evaluated. 577 578 (3) Change of variable precision: 579 580 \vspace{-20pt} 581 \begin{alltt} {{\scriptsize 582 \begin{verbatim} 583 <!-- force to keep real 8 --> 584 <field field\_ref="sst" name="tos\_r8" prec="8" /> 585 <!-- integer 2 with add\_offset and scale\_factor attributes --> 586 <field field\_ref="sss" name="sos\_i2" prec="2" add\_offset="20." scale\_factor="1.e-3" /> 587 \end{verbatim} 588 }}\end{alltt} 589 Note that, then the code is crashing, writting real4 variables forces a numerical convection from real8 to real4 which will create an internal error in NetCDF and will avoid the creation of the output files. Forcing double precision outputs with prec="8" (for example in the field\_definition) will avoid this problem. 590 591 (4) add user defined attributes: 592 593 \vspace{-20pt} 594 \begin{alltt} {{\scriptsize 595 \begin{verbatim} 596 <file\_group id="1d" output\_freq="1d" output\_level="10" enabled=".TRUE."> <!-- 1d files --> 597 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 598 <field field\_ref="sst" name="tos" > 599 <variable id="my\_attribute1" type="string" > blabla </variable> 600 <variable id="my\_attribute2" type="integer" > 3 </variable> 601 <variable id="my\_attribute3" type="float" > 5.0 </variable> 602 </field> 603 <variable id="my\_global\_attribute" type="string" > blabla\_global </variable> 604 </file> 605 </file\_group> 606 \end{verbatim} 607 }}\end{alltt} 608 609 (5) use of the ``@'' function: example 1, weighted temporal average 610 611 - define a new variable in field\_definition 612 \vspace{-20pt} 613 \begin{alltt} {{\scriptsize 614 \begin{verbatim} 615 <field id="toce\_e3t" long\_name="temperature * e3t" unit="degC*m" grid\_ref="grid\_T\_3D" > toce * e3t </field > 616 \end{verbatim} 617 }}\end{alltt} 618 - use it when defining your file. 619 \vspace{-20pt} 620 \begin{alltt} {{\scriptsize 621 \begin{verbatim} 622 <file\_group id="5d" output\_freq="5d" output\_level="10" enabled=".TRUE." > <!-- 5d files --> 623 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 624 <field field\_ref="toce" operation="instant" freq\_op="5d" > @toce\_e3t / @e3t </field> 625 </file> 626 </file\_group> 627 \end{verbatim} 628 }}\end{alltt} 629 The freq\_op="5d" attribute is used to define the operation frequency of the ``@'' function: here 5 day. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @toce\_e3t will do the 5-day mean of toce*e3t. Operation="instant" refers to the temporal operation to be performed on the field''@toce\_e3t / @e3t'': here the temporal average is alreday done by the ``@'' function so we just use instant to do the ratio of the 2 mean values. field\_ref="toce" means that attributes not explicitely defined, are inherited from toce field. Note that in this case, freq\_op must be equal to the file output\_freq. 630 631 (6) use of the ``@'' function: example 2, monthly SSH standard deviation 632 633 - define a new variable in field\_definition 634 \vspace{-20pt} 635 \begin{alltt} {{\scriptsize 636 \begin{verbatim} 637 <field id="ssh2" long\_name="square of sea surface temperature" unit="degC2" > ssh * ssh </field > 638 \end{verbatim} 639 }}\end{alltt} 640 - use it when defining your file. 641 \vspace{-20pt} 642 \begin{alltt} {{\scriptsize 643 \begin{verbatim} 644 <file\_group id="1m" output\_freq="1m" output\_level="10" enabled=".TRUE." > <!-- 1m files --> 645 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 646 <field field\_ref="ssh" name="sshstd" long\_name="sea\_surface\_temperature\_standard\_deviation" operation="instant" freq\_op="1m" > sqrt( @ssh2 - @ssh * @ssh ) </field> 647 </file> 648 </file\_group> 649 \end{verbatim} 650 }}\end{alltt} 651 The freq\_op="1m" attribute is used to define the operation frequency of the ``@'' function: here 1 month. The temporal operation done by the ``@'' is the one defined in the field definition: here we use the default, average. So, in the above case, @ssh2 will do the monthly mean of ssh*ssh. Operation="instant" refers to the temporal operation to be performed on the field ''sqrt( @ssh2 - @ssh * @ssh )'': here the temporal average is alreday done by the ``@'' function so we just use instant. field\_ref="ssh" means that attributes not explicitely defined, are inherited from ssh field. Note that in this case, freq\_op must be equal to the file output\_freq. 652 653 (7) use of the ``@'' function: example 3, monthly average of SST diurnal cycle 654 655 - define 2 new variables in field\_definition 656 \vspace{-20pt} 657 \begin{alltt} {{\scriptsize 658 \begin{verbatim} 659 <field id="sstmax" field\_ref="sst" long\_name="max of sea surface temperature" operation="maximum" /> 660 <field id="sstmin" field\_ref="sst" long\_name="min of sea surface temperature" operation="minimum" /> 661 \end{verbatim} 662 }}\end{alltt} 663 - use these 2 new variables when defining your file. 664 \vspace{-20pt} 665 \begin{alltt} {{\scriptsize 666 \begin{verbatim} 667 <file\_group id="1m" output\_freq="1m" output\_level="10" enabled=".TRUE." > <!-- 1m files --> 668 <file id="file1" name\_suffix="\_grid\_T" description="ocean T grid variables" > 669 <field field\_ref="sst" name="sstdcy" long\_name="amplitude of sst diurnal cycle" operation="average" freq\_op="1d" > @sstmax - @sstmin </field> 670 </file> 671 </file\_group> 672 \end{verbatim} 673 }}\end{alltt} 674 The freq\_op="1d" attribute is used to define the operation frequency of the ``@'' function: here 1 day. The temporal operation done by the ``@'' is the one defined in the field definition: here maximum for sstmax and minimum for sstmin. So, in the above case, @sstmax will do the daily max and @sstmin the daily min. Operation="average" refers to the temporal operation to be performed on the field ``@sstmax - @sstmin'': here monthly mean (of daily max - daily min of the sst). field\_ref="sst" means that attributes not explicitely defined, are inherited from sst field. 675 676 547 677 548 678 \subsubsection{Tag list} -
branches/2015/dev_r5021_UKMO1_CICE_coupling/DOC/TexFiles/Chapters/Chap_TRA.tex
r4147 r5213 1077 1077 correctly set ($i.e.$ that $T_o$ and $S_o$ are provided in input files and read 1078 1078 using \mdl{fldread}, see \S\ref{SBC_fldread}). 1079 The restoring coefficient $\gamma$ is a three-dimensional array initialized by the 1080 user in routine \rou{dtacof} also located in module \mdl{tradmp}. 1079 The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. The file name is specified by the namelist variable \np{cn\_resto}. The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 1081 1080 1082 1081 The two main cases in which \eqref{Eq_tra_dmp} is used are \textit{(a)} … … 1092 1091 diagnostic method \citep{Sarmiento1982}. It allows us to find the velocity 1093 1092 field consistent with the model dynamics whilst having a $T$, $S$ field 1094 close to a given climatological field ($T_o$, $S_o$). The time scale 1095 associated with $S_o$ is generally not a constant but spatially varying 1096 in order to respect other properties. For example, it is usually set to zero 1097 in the mixed layer (defined either on a density or $S_o$ criterion) 1098 \citep{Madec_al_JPO96} and in the equatorial region 1099 \citep{Reverdin1991, Fujio1991, Marti_PhD92} since these two regions 1100 have a short time scale of adjustment; while smaller $\gamma$ are used 1101 in the deep ocean where the typical time scale is long \citep{Sarmiento1982}. 1102 In addition the time scale is reduced (even to zero) along the western 1103 boundary to allow the model to reconstruct its own western boundary 1104 structure in equilibrium with its physics. 1105 The choice of the shape of the Newtonian damping is controlled by two 1106 namelist parameters \np{nn\_hdmp} and \np{nn\_zdmp}. The former allows us to specify: the 1107 width of the equatorial band in which no damping is applied; a decrease 1108 in the vicinity of the coast; and a damping everywhere in the Red and Med Seas. 1109 The latter sets whether damping should act in the mixed layer or not. 1110 The time scale associated with the damping depends on the depth as 1111 a hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as 1112 bottom value and a transition depth of \np{rn\_dep}. 1093 close to a given climatological field ($T_o$, $S_o$). 1113 1094 1114 1095 The robust diagnostic method is very efficient in preventing temperature … … 1118 1099 by stabilising the water column too much. 1119 1100 1120 An example of the computation of $\gamma$ for a robust diagnostic experiment 1121 with the ORCA2 model is provided in the \mdl{tradmp} module 1122 (subroutines \rou{dtacof} and \rou{cofdis} which compute the coefficient 1123 and the distance to the bathymetry, respectively). These routines are 1124 provided as examples and can be customised by the user. 1101 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or only below the mixed layer (defined either on a density or $S_o$ criterion). It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here \citep{Madec_al_JPO96}. 1102 1103 \subsection[DMP\_TOOLS]{Generating resto.nc using DMP\_TOOLS} 1104 1105 DMP\_TOOLS can be used to generate a netcdf file containing the restoration coefficient $\gamma$. Note that in order to maintain bit comparison with previous NEMO versions DMP\_TOOLS must be compiled and run on the same machine as the NEMO model. A mesh\_mask.nc file for the model configuration is required as an input. This can be generated by carrying out a short model run with the namelist parameter \np{nn\_msh} set to 1. The namelist parameter \np{ln\_tradmp} will also need to be set to .false. for this to work. The \nl{nam\_dmp\_create} namelist in the DMP\_TOOLS directory is used to specify options for the restoration coefficient. 1106 1107 %--------------------------------------------nam_dmp_create------------------------------------------------- 1108 \namdisplay{nam_dmp_create} 1109 %------------------------------------------------------------------------------------------------------- 1110 1111 \np{cp\_cfg}, \np{cp\_cpz}, \np{jp\_cfg} and \np{jperio} specify the model configuration being used and should be the same as specified in \nl{namcfg}. The variable \nl{lzoom} is used to specify that the damping is being used as in case \textit{a} above to provide boundary conditions to a zoom configuration. In the case of the arctic or antarctic zoom configurations this includes some specific treatment. Otherwise damping is applied to the 6 grid points along the ocean boundaries. The open boundaries are specified by the variables \np{lzoom\_n}, \np{lzoom\_e}, \np{lzoom\_s}, \np{lzoom\_w} in the \nl{nam\_zoom\_dmp} name list. 1112 1113 The remaining switch namelist variables determine the spatial variation of the restoration coefficient in non-zoom configurations. \np{ln\_full\_field} specifies that newtonian damping should be applied to the whole model domain. \np{ln\_med\_red\_seas} specifies grid specific restoration coefficients in the Mediterranean Sea for the ORCA4, ORCA2 and ORCA05 configurations. If \np{ln\_old\_31\_lev\_code} is set then the depth variation of the coeffients will be specified as a function of the model number. This option is included to allow backwards compatability of the ORCA2 reference configurations with previous model versions. \np{ln\_coast} specifies that the restoration coefficient should be reduced near to coastlines. This option only has an effect if \np{ln\_full\_field} is true. \np{ln\_zero\_top\_layer} specifies that the restoration coefficient should be zero in the surface layer. Finally \np{ln\_custom} specifies that the custom module will be called. This module is contained in the file custom.F90 and can be edited by users. For example damping could be applied in a specific region. 1114 1115 The restoration coefficient can be set to zero in equatorial regions by specifying a positive value of \np{nn\_hdmp}. Equatorward of this latitude the restoration coefficient will be zero with a smooth transition to the full values of a 10$^{\circ}$ latitud band. This is often used because of the short adjustment time scale in the equatorial region \citep{Reverdin1991, Fujio1991, Marti_PhD92}. The time scale associated with the damping depends on the depth as a hyperbolic tangent, with \np{rn\_surf} as surface value, \np{rn\_bot} as bottom value and a transition depth of \np{rn\_dep}. 1125 1116 1126 1117 % ================================================================ -
branches/2015/dev_r5021_UKMO1_CICE_coupling/DOC/TexFiles/Namelist/namtra_dmp
r3294 r5213 2 2 &namtra_dmp ! tracer: T & S newtonian damping 3 3 !----------------------------------------------------------------------- 4 ln_tradmp = .true. ! add a damping termn (T) or not (F) 5 nn_hdmp = -1 ! horizontal shape =-1, damping in Med and Red Seas only 6 ! =XX, damping poleward of XX degrees (XX>0) 7 ! + F(distance-to-coast) + Red and Med Seas 8 nn_zdmp = 0 ! vertical shape =0 damping throughout the water column 9 ! =1 no damping in the mixing layer (kz criteria) 10 ! =2 no damping in the mixed layer (rho crieria) 11 rn_surf = 50. ! surface time scale of damping [days] 12 rn_bot = 360. ! bottom time scale of damping [days] 13 rn_dep = 800. ! depth of transition between rn_surf and rn_bot [meters] 14 nn_file = 0 ! create a damping.coeff NetCDF file (=1) or not (=0) 4 ln_tradmp = .true. ! add a damping termn (T) or not (F) 5 nn_zdmp = 0 ! vertical shape =0 damping throughout the water column 6 ! =1 no damping in the mixing layer (kz criteria) 7 ! =2 no damping in the mixed layer (rho crieria) 8 cn_resto = 'resto.nc' ! Name of file containing restoration coefficient field (use dmp_tools to create this) 9 15 10 /
Note: See TracChangeset
for help on using the changeset viewer.