commit 18ea7526c5371f788a09b91a636ac19c051aab4d
Author: Vincent Eymet <vincent.eymet@meso-star.com>
Date: Fri, 16 Oct 2026 14:50:45 +0200
Initial commit
Diffstat:
12 files changed, 643 insertions(+), 0 deletions(-)
diff --git a/.gitattributes b/.gitattributes
@@ -0,0 +1,3 @@
+*.png filter=wad
+*.pdf filter=wad
+*.jpg filter=wad
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,19 @@
+*.sw[po]
+*.[ao]
+*.sig
+*.err
+*~
+*.aux
+*.bbl
+*.blg
+*.dvi
+*.log
+*.nav
+*.out
+*.snm
+*.toc
+*.vrb
+*.bcf
+*.idx
+*.xml
+*.pdf
+\ No newline at end of file
diff --git a/f1 b/f1
@@ -0,0 +1,10 @@
+#!/bin/bash
+FILE=gas_opt_prop
+
+pdflatex -shell-escape $FILE.tex
+#bibtex $FILE
+#pdflatex -shell-escape $FILE.tex
+#bibtex $FILE
+#pdflatex -shell-escape $FILE.tex
+
+exit 0
diff --git a/f2 b/f2
@@ -0,0 +1,10 @@
+#!/bin/bash
+FILE=gas_opt_prop_en
+
+pdflatex -shell-escape $FILE.tex
+#bibtex $FILE
+#pdflatex -shell-escape $FILE.tex
+#bibtex $FILE
+#pdflatex -shell-escape $FILE.tex
+
+exit 0
diff --git a/figures/dsi_flux_lw.pdf b/figures/dsi_flux_lw.pdf
@@ -0,0 +1 @@
+#$# git-wad 797d2ba92f56f622bcefe435e1a060e301c9c84cd83a939bcfcffa6f39c28599 30023
+\ No newline at end of file
diff --git a/figures/dsi_flux_sw.pdf b/figures/dsi_flux_sw.pdf
@@ -0,0 +1 @@
+#$# git-wad 55537207c3a3c2e39e92e7f37a83a9ea66400fd146ad3418ee7a415faf56ae84 30098
+\ No newline at end of file
diff --git a/figures/ka_lw.pdf b/figures/ka_lw.pdf
@@ -0,0 +1 @@
+#$# git-wad 40a335aee29c1f71cba308d91ff76cd1e0263e46e16df0ce5a79ca3e27ef11e2 28357
+\ No newline at end of file
diff --git a/figures/si_flux_nominal_lw.pdf b/figures/si_flux_nominal_lw.pdf
@@ -0,0 +1 @@
+#$# git-wad 594189539ce09fd11d8995c29ed5c1c755bd0525bff0ee168df1290c1f65b37b 25834
+\ No newline at end of file
diff --git a/figures/si_flux_nominal_sw.pdf b/figures/si_flux_nominal_sw.pdf
@@ -0,0 +1 @@
+#$# git-wad d35a806d6d512fc89896861ab48ae808b285dc6987df1ae30b3d9bd172273073 25242
+\ No newline at end of file
diff --git a/gas_opt_prop.tex b/gas_opt_prop.tex
@@ -0,0 +1,187 @@
+\documentclass[epsf,psfig,fancyheadings,12pt]{article}
+%\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage[francais]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage{fancyhdr}
+\usepackage{amsmath}
+\usepackage{graphics}
+\usepackage{subfigure}
+\usepackage[final]{epsfig}
+\usepackage{mathrsfs}
+\usepackage{auto-pst-pdf}
+\usepackage{pstricks,pst-node,pst-text,pst-3d}
+\usepackage{amssymb}
+\usepackage{multirow}
+\usepackage{rotating}
+\usepackage{hyperref}
+\usepackage{graphicx}
+\usepackage{animate}
+\usepackage{listings}
+\makeatletter
+% double spacing lines
+\renewcommand{\baselinestretch}{1}
+\newcommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\spacefactor1000}
+%pour faire reference toujours avec la meme norme
+%lyx !
+\newcommand{\eq}[1]{Eq.~\ref{eq:#1}}
+\newcommand{\fig}[1]{Fig.~\ref{fig:#1}}
+\newcommand{\tab}[1]{Tab.~\ref{tab:#1}}
+\newcommand{\para}[1]{Sec.~\ref{para:#1}}
+\newcommand{\ap}[1]{Appendix~\ref{ap:#1}}
+\newcommand{\ul}{\underline}
+%
+\makeatother
+
+%\fancyhf{}%
+% Utiliser \fancyhead[L] pour mettre du texte dans la partie de gauche
+% du header
+%\fancyhead[L]{}%
+%\fancyhead[R]{\thepage}%
+%\renewcommand{\headrulewidth}{0pt} % ça c'est pour faire une ligne horizontale
+%\headsep=25pt % ça c'est pour laisser de la place entre le header et le texte
+%\pagestyle{fancy}%
+
+% margins
+\setlength{\topmargin}{-0.75in}
+\setlength{\textheight}{9in}
+\setlength{\oddsidemargin}{-.50in}
+\setlength{\textwidth}{7.5in}
+
+
+
+\begin{document}
+
+
+\title{High-Tune: gas optical properties file format}
+
+\maketitle
+\begin{center}
+\author{\bf|Méso|Star>}\\
+ (\url{http://www.meso-star.com}) \\
+\end{center}
+\vspace{1cm}
+
+\tableofcontents
+
+\newpage
+\section{Contexte}
+Ce document présente le format de fichier fournissant toutes les données permettant de calculer les propriétés optiques (coefficients d'absorption et de diffusion, LW \& SW) {\bf du mélange gazeux} uniquement.
+Le fichier de données utilise le format ASCII, et la convention suivante: chaque donnée est décrite par une ligne de commentaire, suivie par la donnée numérique. Une seule valeur numérique est donnée par ligne. Les valeurs numériques d'un tableau de dimension $N$ sont donc fournies sur $N$ lignes.
+
+\section{Description du modèle et utilisation des données}
+
+Les données fournies dans ce fichier concernent une atmosphère plan-parallèle stratifiée: l'atmosphère est divisée en $N_{lev}$ niveaux (de pression, ou d'altitude) délimitant $N_{lay}=N_{lev}-1$ mailles. Un certain nombre de données sont fournies pour les niveaux, d'autres sont fournies pour les mailles (hypothèse de maille homogène, ce qui revient à fournir pour les mailles une donnée moyenne). Enfin, il existe deux grand domaines spectraux: le longwave (LW) et le shortwave (SW). Pour chacun de ces domaines, un certain nombre d'intervalles est défini. Enfin, dans chacun de ces intervalles, un certain nombre de points de quadrature est défini (différent dans chaque intervalle).
+
+\begin{figure}[!h]
+\centering
+\includegraphics[width=0.80\textwidth,angle=0]{./figures/ka_lw.pdf}
+\caption[]{Evolution du coefficient d'absorption pour les dix points de quadrature du premier intervalle spectral LW, pour la première maille atmosphérique (profil MLS) en fonction de la concentration molaire de vapeur d'eau.}
+\label{fig:ka_lw}
+\end{figure}
+
+La principale chose à retenir est la possibilité de reconstruire les propriétés optiques du mélange de gaz (coefficients d'absorption et de diffuion) à partir des données fournies dans ce fichier atmosphérique, ainsi que de la composition locale en vapeur d'eau (variable, imposée par les données LES). Le fichier atmosphérique contient en effet les valeurs des coefficients d'absorption et de diffusion tabulés en fonction de la fraction molaire de vapeur d'eau $x_{H_{2}O}$. On peut en effet constater (figure \ref{fig:ka_lw}) que le logarithme du coefficient d'absorption évolue de façon linéaire avec le logarithme de $x_{H_{2}O}$ sur une large gamme de concentration molaire, et ce pour chaque point de quadrature. Il est donc facile d'interpoler les propriétés optiques du mélange de gaz pour toute valeur de $x_{H_{2}O}(local)$ (imposée, dans le cas du projet High-Tune, par les données nuageuses LES) à partir des valeurs tabulés dans le fichier atmosphérique.
+
+\begin{figure}[htbp]
+% \hspace*{-2.2cm}
+ \centering
+ \mbox{
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/si_flux_nominal_lw.pdf}
+ }
+ \quad
+ \hspace{-0.5cm}
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/dsi_flux_lw.pdf}
+ }
+ }
+ \caption{(a) Profil de flux intégrés sur le domaine LW, obtenus à l'aide des épaisseurs optiques d'absorption nominales de ECRAD sur un profil standard MLS; (b) Ecart sur les flux radiatif (intégrés sur le domaine LW) obtenus d'une part à l'aide des épaisseurs optiques d'absorption nominales, et d'autre part à l'aide des épaisseurs optiques d'absorption interpolées à partir de la tabulation et des valeurs nominales de $x_{H_{2}O}$}
+ \label{fig:si_flux_lw}
+\end{figure}
+
+\begin{figure}[htbp]
+% \hspace*{-2.2cm}
+ \centering
+ \mbox{
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/si_flux_nominal_sw.pdf}
+ }
+ \quad
+ \hspace{-0.5cm}
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/dsi_flux_sw.pdf}
+ }
+ }
+ \caption{(a) Profil de flux intégrés sur le domaine SW, obtenus à l'aide des épaisseurs optiques d'absorption nominales de ECRAD sur un profil standard MLS; (b) Ecart sur les flux radiatif (intégrés sur le domaine SW) obtenus d'une part à l'aide des épaisseurs optiques d'absorption nominales, et d'autre part à l'aide des épaisseurs optiques d'absorption interpolées à partir de la tabulation et des valeurs nominales de $x_{H_{2}O}$}
+ \label{fig:si_flux_sw}
+\end{figure}
+
+
+Un travail de validation de l'hypothèse de linéarité des propriétés optiques avec la fraction molaire de vapeur d'eau a été conduit sur la base suivante: nous disposons d'un code de transfert radiatif (LW \& SW) basé sur l'utilisation de solutions analytiques, donc sans diffusion (en cours de publication) qui a été adapté à l'utilisation de données spectrales en k-distribution à ordre de quadrature variable, donc permettant d'utiliser les données spectrales issues de ECRAD. Nous avons effectué deux calculs de transfert radiatif (flux intégrés sur le domaine LW) sur un profil atmosphérique MLS modifié: dans un premier temps, nous avons isolé dans les données LES, la colonne contenant la maille présentant la plus forte humidité spécifique. Le profil vertical de $x_{H_{2}O}$ du profil MLS standard a donc été remplacé, dans chaque maille atmosphérique, par les données issues de cette colonne LES dans la zone contenant le nuage (pour z<4 km), et n'a pas été modifié en dehors de cette zone. Les deux calculs de transfert radiatif effectués ont utilisé:
+
+\begin{itemize}
+\item d'une part, les coefficients d'absorption issus de ECRAD pour le profil MLS modifié. Les résultats sont présentés en figure \ref{fig:si_flux_lw}(a) pour le LW et en figure \ref{fig:si_flux_sw}(a) pour le SW.
+\item d'autre part en utilisant les coefficient d'absorption obtenus par interpolation à partir des valeurs locales de $x_{H_{2}O}$, et de la tabulation établie par utilisation de ECRAD, sur 20 points $x_{H_{2}O}$ répartis de façon uniforme en log entre 10$^{-6}$ et 1. La figure \ref{fig:si_flux_lw}(b) montre les différences entre les flux radiatifs obtenus par cette méthode et les résultats précédents (référence) pour le LW, et la figure \ref{fig:si_flux_sw}(b) montre les mêmes écarts pour le domaine SW.
+\end{itemize}
+
+Les résultats étant extrêmement proches, on considère à cette étape que la méthodologie consistant à tabuler les propriétés optiques du mélange en fonction de $x_{H_{2}O}$ dans le but d'interpoler ces quantités pour n'importe quelle valeur locale de $x_{H_{2}O}$, est bien validée. Au besoin, il est possible de rajouter des données dans la tabulation afin d'améliorer la précision sur le transfert radiatif.
+
+\newpage
+\section{Format de fichier}
+
+Les données fournies dans le fichier atmosphérique, séparées par une ligne de commentaire, sont les suivantes:
+
+\begin{itemize}
+\item Le nombre de niveaux atmosphériques $N_{lev}$ (1 entier)
+\item Le nombre de mailles atmosphériques $N_{lay}$ (1 entier)
+\item La température du sol (1 réel) [K]
+\item La pression à chaque niveau ($N_{lev}$ réels) [Pa]
+\item La température à chaque niveau ($N_{lev}$ réels) [K]
+\item L'altitude à chaque niveau ($N_{lev}$ réels) [m]
+\item La fraction molaire nominale de vapeur d'eau dans le mélange $x_{H_{2}O}(nominal)$, pour chaque maille ($N_{lay}$ réels) [mole de $H_{2}O$ par mole de mélange]
+\item Le nombre de profils verticaux de fraction molaire de vapeur d'eau $x_{H_{2}O}$ pour la tabulation ($N_{w}$).
+\item Pour chacun des $N_{w}$ profils verticaux de $x_{H_{2}O}$ de la tabulation: la valeur de $x_{H_{2}O}$ pour chacune des $N_{lay}$ mailles atmosphériques. ($N_{w}xN_{lay} réels$) [mole de $H_{2}O$ par mole de mélange]
+\item L'émissivité du sol pour le domaine LW (1 réel)
+\item L'émissivité du sol pour le domaine SW (1 réel)
+\item Le nombre d'intervalles spectraux pour le domaine LW $N_{b,LW}$ (1 entier)
+\item Le nombre d'intervalles spectraux pour le domaine SW $N_{b,SW}$ (1 entier)
+\item Pour chacun des $i_{b} \in [1,N_{b,LW}]$ intervalles du domaine LW:
+\begin{itemize}
+\item le nombre d'onde inférieure de l'intervalle (1 réel) [cm$^{-1}$]
+\item le nombre d'onde supérieure de l'intervalle (1 réel) [cm$^{-1}$]
+\item le nombre de points de quadrature $N_{g}(i_{b})$ (1 entier)
+\item les $N_{g}(i_{b})$ poids de quadrature de l'intervalle ($N_{g}(i_{b})$ réels)
+\end{itemize}
+\item Pour chacun des $i_{b} \in [1,N_{b,SW}]$ intervalles du domaine SW:
+\begin{itemize}
+\item le nombre d'onde inférieure de l'intervalle (1 réel) [cm$^{-1}$]
+\item le nombre d'onde supérieure de l'intervalle (1 réel) [cm$^{-1}$]
+\item le nombre de points de quadrature $N_{g}(i_{b})$ (1 entier)
+\item les $N_{g}(i_{b})$ poids de quadrature de l'intervalle ($N_{g}(i_{b})$ réels)
+\end{itemize}
+\item Pour chacun des $i_{b} \in [1,N_{b,LW}]$ intervalles du domaine LW, et pour chacun des $i_{g} \in [1,N_{g}(i_{b})]$ points de quadrature:
+\begin{itemize}
+\item le coefficient d'absorption {\bf nominal} du mélange de gaz, pour chaque maille ($N_{lay}$ réels) [m$^{-1}$]
+\item le coefficient d'absorption du mélange de gaz {\bf pour chaque point de tabulation} $i_{w}$, pour chaque maille ($N_{w}xN_{lay}$ réels) [m$^{-1}$]
+\end{itemize}
+\item Pour chacun des $i_{b} \in [1,N_{b,SW}]$ intervalles du domaine SW, et pour chacun des $i_{g} \in [1,N_{g}(i_{b})]$ points de quadrature:
+\begin{itemize}
+\item le coefficient d'absorption {\bf nominal} du mélange de gaz, pour chaque maille ($N_{lay}$ réels) [m$^{-1}$]
+\item le coefficient d'absorption du mélange de gaz {\bf pour chaque point de tabulation} $i_{w}$, pour chaque maille ($N_{w}xN_{lay}$ réels) [m$^{-1}$]
+\end{itemize}
+\item Pour chacun des $i_{b} \in [1,N_{b,SW}]$ intervalles du domaine SW, et pour chacun des $i_{g} \in [1,N_{g}(i_{b})]$ points de quadrature:
+\begin{itemize}
+\item le coefficient de diffusion {\bf nominal} du mélange de gaz, pour chaque maille ($N_{lay}$ réels) [m$^{-1}$]
+\item le coefficient de diffusion du mélange de gaz {\bf pour chaque point de tabulation} $i_{w}$, pour chaque maille ($N_{w}xN_{lay}$ réels) [m$^{-1}$]
+\end{itemize}
+
+\end{itemize}
+
+Un exemple de routine (fortran) permettant de lire ce fichier est donné ci-dessous (fichier ``input.for''):
+
+\lstinputlisting[language=fortran]{./source_files/input.for}
+
+%\bibliographystyle{unsrt}
+%\bibliography{biblio}
+
+\end{document}
diff --git a/gas_opt_prop_en.tex b/gas_opt_prop_en.tex
@@ -0,0 +1,185 @@
+\documentclass[epsf,psfig,fancyheadings,12pt]{article}
+%\usepackage[latin1]{inputenc}
+\usepackage[T1]{fontenc}
+%\usepackage[francais]{babel}
+\usepackage[utf8]{inputenc}
+\usepackage{fancyhdr}
+\usepackage{amsmath}
+\usepackage{graphics}
+\usepackage{subfigure}
+\usepackage[final]{epsfig}
+\usepackage{mathrsfs}
+%\usepackage{auto-pst-pdf}
+%\usepackage{pstricks,pst-node,pst-text,pst-3d}
+\usepackage{amssymb}
+\usepackage{multirow}
+\usepackage{rotating}
+\usepackage{hyperref}
+\usepackage{graphicx}
+\usepackage{animate}
+\usepackage{listings}
+\makeatletter
+% double spacing lines
+\renewcommand{\baselinestretch}{1}
+\newcommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\spacefactor1000}
+%pour faire reference toujours avec la meme norme
+%lyx !
+\newcommand{\eq}[1]{Eq.~\ref{eq:#1}}
+\newcommand{\fig}[1]{Fig.~\ref{fig:#1}}
+\newcommand{\tab}[1]{Tab.~\ref{tab:#1}}
+\newcommand{\para}[1]{Sec.~\ref{para:#1}}
+\newcommand{\ap}[1]{Appendix~\ref{ap:#1}}
+\newcommand{\ul}{\underline}
+%
+\makeatother
+
+%\fancyhf{}%
+% Utiliser \fancyhead[L] pour mettre du texte dans la partie de gauche
+% du header
+%\fancyhead[L]{}%
+%\fancyhead[R]{\thepage}%
+%\renewcommand{\headrulewidth}{0pt} % ça c'est pour faire une ligne horizontale
+%\headsep=25pt % ça c'est pour laisser de la place entre le header et le texte
+%\pagestyle{fancy}%
+
+% margins
+\setlength{\topmargin}{-0.75in}
+\setlength{\textheight}{9in}
+\setlength{\oddsidemargin}{-.50in}
+\setlength{\textwidth}{7.5in}
+
+
+
+\begin{document}
+
+
+\title{High-Tune: gas optical properties file format}
+
+\maketitle
+\begin{center}
+\author{\bf|Méso|Star>}\\
+ (\url{https://www.meso-star.com}) \\
+\end{center}
+\vspace{1cm}
+
+\tableofcontents
+
+\newpage
+\section{Context}
+This document describes the format of the file that provides all required optical properties (absorption and scattering coefficients, both in the LW and SW regions) of the {\bf gas mixture} only.
+This data file uses the ASCII format, and the following convention: each data array is first described by a comment, then the numeric data is provided. A single numeric value is given for each line. A array of size $N$ is therefore provided over $N$ lines.
+
+\section{Description of the model and data usage}
+
+Data is provided for a stratified plane-parallel atmosphere: the atmosphere is described using $N_{lev}$ (pressure, or altitude) levels that define $N_{lay}=N_{lev}-1$ layers. Some data is defined at each level, some is defined for layers (using the hypothesis of homogeneous layers). Finally, two spectral domains are described: the longwave (LW) and the shortwave (SW) domains. For each one of these domains, a number of spectral intervals are defined, and a number of quadrature points is given in each interval (variable).
+
+\begin{figure}[!h]
+\centering
+\includegraphics[width=0.80\textwidth,angle=0]{./figures/ka_lw.pdf}
+\caption[]{Evolution of the absorption coefficient for the 10 quadrature points of the first LW spectral interval, for the first atmospheric layer (MLS profile) as a function of water vapor molar fraction.}
+\label{fig:ka_lw}
+\end{figure}
+
+Optical properties of the gas mixture (absorption and scattering coefficients) can be computed from the data provided in this file, and from the local water vapor content (provided in the LES data file). The atmospheric data file contains the values of the absorption and scattering coefficients of the gas mixture, tabulated as a function of the water vapor molar fraction $x_{H_{2}O}$. Figure \ref{fig:ka_lw} shows that the logarithm of the absorption coefficient evolves linearly with the logarithm of $x_{H_{2}O}$ over a wide range of water vapor molar fraction, for each quadrature point. Interpolating the optical properties of the gas mixture for any given value of $x_{H_{2}O}(local)$ is therefore very simple using the data of the atmospheric file.
+
+\begin{figure}[htbp]
+% \hspace*{-2.2cm}
+ \centering
+ \mbox{
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/si_flux_nominal_lw.pdf}
+ }
+ \quad
+ \hspace{-0.5cm}
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/dsi_flux_lw.pdf}
+ }
+ }
+ \caption{(a) Spectrally integrated LW flux profile obtained using the nominal absorption optical depth of ECRAD over a standard MLS profile; (b) Difference over spectrally integrated LW fluxes computed using nominal absorption optical thicknesses and the absorption optical thicknesses that have been obtained from tabulated data and nominal values of $x_{H_{2}O}$}.
+ \label{fig:si_flux_lw}
+\end{figure}
+
+\begin{figure}[htbp]
+% \hspace*{-2.2cm}
+ \centering
+ \mbox{
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/si_flux_nominal_sw.pdf}
+ }
+ \quad
+ \hspace{-0.5cm}
+ \subfigure[]{
+ \includegraphics[width=0.50\textwidth]{./figures/dsi_flux_sw.pdf}
+ }
+ }
+ \caption{(a) Spectrally integrated SW flux profile obtained using the nominal absorption optical depth of ECRAD over a standard MLS profile; (b) Difference over spectrally integrated SW fluxes computed using nominal absorption optical thicknesses and the absorption optical thicknesses that have been obtained from tabulated data and nominal values of $x_{H_{2}O}$}
+ \label{fig:si_flux_sw}
+\end{figure}
+
+The linearity of optical properties with water vapor molar fraction has been validated on the following basis: a radiative transfer code (LW and SW) based on anaytic radiative transfer solutions obtained in a clear-sky situation (without scattering) has been adapted in order to use k-distribution spectral data with a variable quadrature order (such as ECRAD spectral data). Two LW radiative transfer computations have been performed with a modified MLS atmospheric profile: the column containing the highest specific humidity has been identified. The vertical profile of $x_{H_{2}O}$ in the original MLS profile has then been replaced with the data of this specific atmospheric column for all columns of the LES zone (for z < 4 km) and has not the modified out of this zone. The two radiative transfer computations have then used:
+\begin{itemize}
+\item absorption coefficients obtained from ECRAD for the modified MLS atmospheric profile. Results are presented in figure \ref{fig:si_flux_lw}(a) for the LW and figure \ref{fig:si_flux_sw}(a) for the SW.
+\item absorption coefficients that have been interpolated from the local values of $x_{H_{2}O}$ using the tabulation of optical properties established on the basis of 20 values of $x_{H_{2}O}$ uniformly spaced (on a logarithmic scale) between 10$^{-6}$ and 1. Figure \ref{fig:si_flux_lw}(b) displays differences between LW radiative flux obtained using this method and previous (reference) results. Figure \ref{fig:si_flux_sw}(b) displays the same differences in the SW domain.
+\end{itemize}
+
+Results being extremely close, the possibility to obtain optical properties of the gas mixture from the tabulated values and the local value of $x_{H_{2}O}$ is considered as validated.
+
+\newpage
+\section{File format}
+
+The atmospheric file contains the following data, separated by comments:
+
+\begin{itemize}
+\item The number of atmospheric levels $N_{lev}$ (1 integer)
+\item The number of atmospheric layers $N_{lay}$ (1 integer)
+\item Ground temperature (1 real) [K]
+\item Pressure at each level ($N_{lev}$ reals) [Pa]
+\item Temperature at each level ($N_{lev}$ reals) [K]
+\item Altitude at each level ($N_{lev}$ reals) [m]
+\item The nominal water vapor molar fration in the mixture $x_{H_{2}O}(nominal)$, for each layer ($N_{lay}$ reals) [mol of $H_{2}O$ per mol of mixture]
+\item The number of water vapor molar fraction vertical profiles $x_{H_{2}O}$ for the tabulation ($N_{w}$).
+\item For each one of the $N_{w}$ vertical profiles of $x_{H_{2}O}$ in the table: the value of $x_{H_{2}O}$ for each one of the $N_{lay}$ atmospheric layers. ($N_{w}$x$N_{lay} reals$) [mol of $H_{2}O$ per mol of mixture]
+\item The emissivity of the ground in the LW domain (1 real)
+\item The emissivity if the ground for the SW domain (1 real)
+\item The number of spectral intervals $N_{b,LW}$ for the LW domain (1 integer)
+\item The number of spectral intervals $N_{b,SW}$ for the SW domain (1 integer)
+\item For each $i_{b} \in [1,N_{b,LW}]$ LW interval:
+\begin{itemize}
+\item the lower wavenumber of the interval (1 real) [cm$^{-1}$]
+\item the higher wavenumber of the interval (1 real) [cm$^{-1}$]
+\item the number of quadrature points $N_{g}(i_{b})$ (1 integer)
+\item the $N_{g}(i_{b})$ values of the quadrature weight for the interval ($N_{g}(i_{b})$ reals)
+\end{itemize}
+\item For each $i_{b} \in [1,N_{b,SW}]$ SW interval:
+\begin{itemize}
+\item the lower wavenumber of the interval (1 real) [cm$^{-1}$]
+\item the higher wavenumber of the interval (1 real) [cm$^{-1}$]
+\item the number of quadrature points $N_{g}(i_{b})$ (1 integer)
+\item the $N_{g}(i_{b})$ values of the quadrature weight for the interval ($N_{g}(i_{b})$ reals)
+\end{itemize}
+\item For each $i_{b} \in [1,N_{b,LW}]$ LW interval, and for each $i_{g} \in [1,N_{g}(i_{b})]$ quadrature points:
+\begin{itemize}
+\item the {\bf nominal} absorption coefficient of the gas mixture, for each layer ($N_{lay}$ reals) [m$^{-1}$]
+\item the absorption coefficient of the gas mixture {\bf for each tabulation point} $i_{w}$, for each layer ($N_{w}$x$N_{lay}$ reals) [m$^{-1}$]
+\end{itemize}
+\item For each $i_{b} \in [1,N_{b,SW}]$ SW interval, and for each $i_{g} \in [1,N_{g}(i_{b})]$ quadrature point:
+\begin{itemize}
+\item the {\bf nominal} absorption coefficient of the gas mixture, for each layer ($N_{lay}$ reals) [m$^{-1}$]
+\item the absorption coefficient of the gas mixture {\bf for each tabulation point} $i_{w}$, for each layer ($N_{w}$x$N_{lay}$ reals) [m$^{-1}$]
+\end{itemize}
+\item For each $i_{b} \in [1,N_{b,SW}]$ SW interval, and for each $i_{g} \in [1,N_{g}(i_{b})]$ quadrature point:
+\begin{itemize}
+\item the {\bf nominal} scattering coefficient of the gas mixture, for each layer ($N_{lay}$ reals) [m$^{-1}$]
+\item the scattering coefficient of the gas mixture {\bf for each tabulation point} $i_{w}$, for each layer ($N_{w}$x$N_{lay}$ reals) [m$^{-1}$]
+\end{itemize}
+
+\end{itemize}
+
+A example of (fortran) routine used to read this file is provided below (``input.for'' file):
+
+\lstinputlisting[language=fortran]{./source_files/input.for}
+
+%\bibliographystyle{unsrt}
+%\bibliography{biblio}
+
+\end{document}
diff --git a/source_files/input.for b/source_files/input.for
@@ -0,0 +1,218 @@
+ subroutine read_opt_prop_file(infile,Nw,Nlev,Nlay,
+ & Tsurf,Tspace,pressure,
+ & temperature,height,x_h2o_nominal,x_h2o_tab,
+ & lw_emissivity,sw_emissivity,
+ & Nb_lw,nu_lo_lw,nu_hi_lw,Ng_lw,w_lw,
+ & Nb_sw,nu_lo_sw,nu_hi_sw,Ng_sw,w_sw,
+ & ka_lw_nominal,ka_lw_tab,
+ & ka_sw_nominal,ka_sw_tab,
+ & ks_sw_nominal,ks_sw_tab)
+ implicit none
+ include 'max.inc'
+ include 'formats.inc'
+c
+c Purpose: to read the optical properties file for the atmosphere
+c
+c Input:
+c + infile: file to read
+c
+c Output:
+c + Nw: number of tabulation points of water vapor concentration
+c + Nlev: number of atmospheric levels
+c + Nlay: number of atmospheric layers
+c + Tsurf: temperature of the ground [K]
+c + Tspace: temperature of the ground [K]
+c + pressure: pressure at each level [Pa]
+c + temperature: temperature at each level [K]
+c + height: altitude at each level [m]
+c + x_h2o_nominal: molar fraction of H2O at each level for the nominal profile
+c + x_h2o_tab: molar fraction of H2O at each level for each tabulation point
+c + lw_emissivity: LW emissivity
+c + sw_emissivity: SW emissivity
+c + Nb_lw: number of LW spectral intervals
+c + nu_lo_lw: lower wavenumber limit of each LW interval [cm^-1]
+c + nu_hi_lw: upper wavenumber limit of each LW interval [cm^-1]
+c + Ng_lw: number of quadrature points in each LW interval
+c + w_lw: quadrature weights for each LW interval
+c + Nb_sw: number of SW spectral intervals
+c + nu_lo_sw: lower wavenumber limit of each SW interval [cm^-1]
+c + nu_hi_sw: upper wavenumber limit of each SW interval [cm^-1]
+c + Ng_sw: number of quadrature points in each SW interval
+c + w_sw: quadrature weights for each SW interval
+c + ka_lw_nominal: LW absorption coefficient [m^-1] for the nominal profile
+c + ka_lw_tab: LW absorption coefficient [m^-1] for each tabulation point
+c + ka_sw_nominal: SW absorption coefficient [m^-1] for the nominal profile
+c + ka_sw_tab: SW absorption coefficient [m^-1] for each tabulation point
+c + ks_sw_nominal: SW scattering coefficient [m^-1] for the nominal profile
+c + ks_sw_tab: SW scattering coefficient [m^-1] for each tabulation point
+c
+c I/O
+ character*(Nchar_mx) infile
+ integer Nw,Nlev,Nlay
+ double precision pressure(1:Nlev_mx)
+ double precision Tsurf,Tspace
+ double precision temperature(1:Nlev_mx)
+ double precision height(1:Nlev_mx)
+ double precision x_h2o_nominal(1:Nlay_mx)
+ double precision x_h2o_tab(1:Nlay_mx,1:Nw_mx)
+ double precision lw_emissivity,sw_emissivity
+ double precision ka_lw_nominal(1:Ngpoints_lw_mx,1:Nlev_mx)
+ double precision ka_lw_tab(1:Ngpoints_lw_mx,1:Nlev_mx,1:Nw_mx)
+ double precision ka_sw_nominal(1:Ngpoints_sw_mx,1:Nlev_mx)
+ double precision ka_sw_tab(1:Ngpoints_sw_mx,1:Nlev_mx,1:Nw_mx)
+ double precision ks_sw_nominal(1:Ngpoints_sw_mx,1:Nlev_mx)
+ double precision ks_sw_tab(1:Ngpoints_sw_mx,1:Nlev_mx,1:Nw_mx)
+ integer Nb_lw
+ double precision nu_lo_lw(1:16)
+ double precision nu_hi_lw(1:16)
+ integer Ng_lw(1:16)
+ double precision w_lw(1:16,1:20)
+ integer Nb_sw
+ double precision nu_lo_sw(1:14)
+ double precision nu_hi_sw(1:14)
+ integer Ng_sw(1:14)
+ double precision w_sw(1:14,1:20)
+c temp
+ logical file_ex
+ integer ilay,ilev,ib,ig,i,iw
+c label
+ character*(Nchar_mx) label
+ label='subroutine read_opt_prop_file'
+
+ inquire(file=trim(infile), exist=file_ex)
+ if (file_ex) then
+ write(*,*) 'Reading file: ',trim(infile)
+ else
+ call error(label)
+ write(*,*) 'File not found:'
+ write(*,*) trim(infile)
+ stop
+ endif
+
+ open(11,file=trim(infile))
+ read(11,*)
+ read(11,*) Nlev
+ read(11,*)
+ read(11,*) Nlay
+ read(11,*)
+ read(11,*) Tsurf
+ Tspace=3.0D+0 ! K
+ read(11,*)
+ do ilev=1,Nlev
+ read(11,*) pressure(ilev)
+ enddo ! ilev
+ read(11,*)
+ do ilev=1,Nlev
+ read(11,*) temperature(ilev)
+ enddo ! ilev
+ read(11,*)
+ do ilev=1,Nlev
+ read(11,*) height(ilev)
+ enddo ! ilev
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) x_h2o_nominal(ilay)
+ enddo ! ilay
+ read(11,*)
+ read(11,*) Nw
+ do iw=1,Nw
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) x_h2o_tab(ilay,iw)
+ enddo ! ilay
+ enddo ! iw
+ read(11,*)
+ read(11,*) lw_emissivity
+ read(11,*)
+ read(11,*) sw_emissivity
+ read(11,*)
+ read(11,*) Nb_lw
+ read(11,*)
+ read(11,*) Nb_sw
+ do ib=1,Nb_lw
+ read(11,*)
+ read(11,*)
+ read(11,*) nu_lo_lw(ib)
+ read(11,*)
+ read(11,*) nu_hi_lw(ib)
+ read(11,*)
+ read(11,*) Ng_lw(ib)
+ read(11,*)
+ do ig=1,Ng_lw(ib)
+ read(11,*) w_lw(ib,ig)
+ enddo ! ig
+ enddo ! ib
+c SW: per interval
+ do ib=1,Nb_sw
+ read(11,*)
+ read(11,*)
+ read(11,*) nu_lo_sw(ib)
+ read(11,*)
+ read(11,*) nu_hi_sw(ib)
+ read(11,*)
+ read(11,*) Ng_sw(ib)
+ read(11,*)
+ do ig=1,Ng_sw(ib)
+ read(11,*) w_sw(ib,ig)
+ enddo ! ig
+ enddo ! ib
+c
+c LW: per interval, per g-point
+ i=0
+ do ib=1,Nb_lw
+ do ig=1,Ng_lw(ib)
+ i=i+1
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ka_lw_nominal(i,ilay)
+ enddo ! ilay
+ do iw=1,Nw
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ka_lw_tab(i,ilay,iw)
+ enddo ! ilay
+ enddo ! iw
+ enddo ! ig
+ enddo ! ib
+c
+c SW: per interval, per g-point
+c absorption coefficient
+ i=0
+ do ib=1,Nb_sw
+ do ig=1,Ng_sw(ib)
+ i=i+1
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ka_sw_nominal(i,ilay)
+ enddo ! ilay
+ do iw=1,Nw
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ka_sw_tab(i,ilay,iw)
+ enddo ! ilay
+ enddo ! iw
+ enddo ! ig
+ enddo ! ib
+c
+c scattering coefficient
+ i=0
+ do ib=1,Nb_sw
+ do ig=1,Ng_sw(ib)
+ i=i+1
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ks_sw_nominal(i,ilay)
+ enddo ! ilay
+ do iw=1,Nw
+ read(11,*)
+ do ilay=1,Nlay
+ read(11,*) ks_sw_tab(i,ilay,iw)
+ enddo ! ilay
+ enddo ! iw
+ enddo ! ig
+ enddo ! ib
+ close(11)
+
+ return
+ end
+