New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14526 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex – NEMO

Ignore:
Timestamp:
2021-02-22T17:37:38+01:00 (3 years ago)
Author:
nicolasmartin
Message:

Modify \nlst LaTeX macro for better efficienty
Only one line is needed now to include the highlighted source code, the caption and the cross-reference

\newcommand{\nlst}[1]{
   \begin{listing}
      \newmintedfile{fortran}{../../../namelists/#1}
      \caption{\forcode{&#1}}
      \label{lst:#1}
   \end{listing}
}
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex

    r14525 r14526  
    2525\clearpage 
    2626 
    27 \begin{listing} 
    28   \nlst{namsbc} 
    29   \caption{\forcode{&namsbc}} 
    30   \label{lst:namsbc} 
    31 \end{listing} 
     27\nlst{namsbc} 
    3228 
    3329The ocean needs seven fields as surface boundary condition: 
     
    438434\label{subsec:SBC_SAS} 
    439435 
    440 \begin{listing} 
    441   \nlst{namsbc_sas} 
    442   \caption{\forcode{&namsbc_sas}} 
    443   \label{lst:namsbc_sas} 
    444 \end{listing} 
     436\nlst{namsbc_sas} 
    445437 
    446438In some circumstances, it may be useful to avoid calculating the 3D temperature, 
     
    503495% parameterization'' (i.e NCAR, COARE, ECMWF...) 
    504496 
    505 \begin{listing} 
    506   \nlst{namsbc_flx} 
    507   \caption{\forcode{&namsbc_flx}} 
    508   \label{lst:namsbc_flx} 
    509 \end{listing} 
     497\nlst{namsbc_flx} 
    510498 
    511499In the flux formulation (\np[=.true.]{ln_flx}{ln\_flx}), 
     
    525513% L. Brodeau, December 2019... % 
    526514 
    527 \begin{listing} 
    528   \nlst{namsbc_blk} 
    529   \caption{\forcode{&namsbc_blk}} 
    530   \label{lst:namsbc_blk} 
    531 \end{listing} 
     515\nlst{namsbc_blk} 
    532516 
    533517If the bulk formulation is selected (\np[=.true.]{ln_blk}{ln\_blk}), the air-sea 
     
    884868\label{sec:SBC_cpl} 
    885869 
    886 \begin{listing} 
    887   \nlst{namsbc_cpl} 
    888   \caption{\forcode{&namsbc_cpl}} 
    889   \label{lst:namsbc_cpl} 
    890 \end{listing} 
     870\nlst{namsbc_cpl} 
    891871 
    892872In the coupled formulation of the surface boundary condition, 
     
    920900\label{sec:SBC_apr} 
    921901 
    922 \begin{listing} 
    923   \nlst{namsbc_apr} 
    924   \caption{\forcode{&namsbc_apr}} 
    925   \label{lst:namsbc_apr} 
    926 \end{listing} 
     902\nlst{namsbc_apr} 
    927903 
    928904The optional atmospheric pressure can be used to force ocean and ice dynamics 
     
    956932\label{sec:SBC_TDE} 
    957933 
    958 \begin{listing} 
    959   \nlst{nam_tide} 
    960   \caption{\forcode{&nam_tide}} 
    961   \label{lst:nam_tide} 
    962 \end{listing} 
     934\nlst{nam_tide} 
    963935 
    964936\subsection{Tidal constituents} 
     
    10431015\label{sec:SBC_rnf} 
    10441016 
    1045 \begin{listing} 
    1046   \nlst{namsbc_rnf} 
    1047   \caption{\forcode{&namsbc_rnf}} 
    1048   \label{lst:namsbc_rnf} 
    1049 \end{listing} 
     1017\nlst{namsbc_rnf} 
    10501018 
    10511019%River runoff generally enters the ocean at a nonzero depth rather than through the surface. 
     
    11811149\label{sec:SBC_isf} 
    11821150 
    1183 \begin{listing} 
    1184   \nlst{namisf} 
    1185   \caption{\forcode{&namisf}} 
    1186   \label{lst:namisf} 
    1187 \end{listing} 
     1151\nlst{namisf} 
    11881152 
    11891153The namelist variable in \nam{isf}{isf}, \np{ln_isf}{ln\_isf}, controls the ice shelf interactions: 
     
    14911455\label{sec:SBC_ICB_icebergs} 
    14921456 
    1493 \begin{listing} 
    1494   \nlst{namberg} 
    1495   \caption{\forcode{&namberg}} 
    1496   \label{lst:namberg} 
    1497 \end{listing} 
     1457\nlst{namberg} 
    14981458 
    14991459Icebergs are modelled as lagrangian particles in \NEMO\ \citep{marsh.ivchenko.ea_GMD15}. 
     
    15641524\label{sec:SBC_wave} 
    15651525 
    1566 \begin{listing} 
    1567   \nlst{namsbc_wave} 
    1568   \caption{\forcode{&namsbc_wave}} 
    1569   \label{lst:namsbc_wave} 
    1570 \end{listing} 
     1526\nlst{namsbc_wave} 
    15711527 
    15721528Ocean waves represent the interface between the ocean and the atmosphere, so \NEMO\ is extended to incorporate 
     
    18181774\label{subsec:SBC_ssr} 
    18191775 
    1820 \begin{listing} 
    1821   \nlst{namsbc_ssr} 
    1822   \caption{\forcode{&namsbc_ssr}} 
    1823   \label{lst:namsbc_ssr} 
    1824 \end{listing} 
     1776\nlst{namsbc_ssr} 
    18251777 
    18261778Options are defined through the \nam{sbc_ssr}{sbc\_ssr} namelist variables. 
     
    19271879\label{subsec:SBC_fwb} 
    19281880 
    1929 \begin{listing} 
    1930   \nlst{namsbc_fwb} 
    1931   \caption{\forcode{&namsbc_fwb}} 
    1932   \label{lst:namsbc_fwb} 
    1933 \end{listing} 
     1881\nlst{namsbc_fwb} 
    19341882 
    19351883For global ocean simulations, it can be useful to introduce a control of the 
Note: See TracChangeset for help on using the changeset viewer.