Back to home page

darwin3

 
 

    


Warning, /doc/phys_pkgs/radtrans.rst is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit faa67d17 on 2022-01-31 17:00:48 UTC
1d947889e4 Oliv*0001 .. include:: ../defs.hrst
                0002 
                0003 .. _sub_phys_pkg_radtrans:
                0004 
                0005 RADTRANS package
                0006 ----------------
                0007 
                0008 Introduction
                0009 ~~~~~~~~~~~~
                0010 
faa67d1773 Oliv*0011 The :filelink:`radtrans package <pkg/radtrans>` models spectral light
                0012 throughout the water column.  Incoming irradiances below the sea surface, split
                0013 into several wavebands and between direct (beam) and diffuse components, are
                0014 read in or provided by another package.  The irradiances are optionally
                0015 reduced based on ice cover.  The radtrans package then solves for these two
                0016 downwelling components and a diffuse upwelling component to obtain a solution
                0017 to the radiative transfer equations, based on intrinsic optical properties
                0018 provided by another package (for instance the :ref:`sub_phys_pkg_darwin`).
                0019 Spectral radiances at the vertical layer boundaries are returned to the calling
                0020 package.
1d947889e4 Oliv*0021 
                0022 
                0023 Compiling and Running
                0024 ~~~~~~~~~~~~~~~~~~~~~
                0025 
                0026 Compiling
                0027 ^^^^^^^^^
                0028 
                0029 Include the word ``radtrans`` in ``packages.conf`` in your code directory.
faa67d1773 Oliv*0030 This will automatically include the exf package.  Unless you are using the
                0031 :varlink:`RT_useMeanCosSolz` runtime option, you will also neet to include
                0032 the :ref:`sub_phys_pkg_sun`.
1d947889e4 Oliv*0033 
                0034 Set compile-time options for radtrans in file
                0035 :filelink:`~pkg/radtrans/RADTRANS_OPTIONS.h` (see table below).
                0036 
                0037 Adjust the number of wavebands in :filelink:`~pkg/radtrans/RADTRANS_SIZE.h`.
                0038 
                0039 In :filelink:`~pkg/exf/EXF_OPTIONS.h` you may want to undef
                0040 :varlink:`ALLOW_CLIMSST_RELAXATION` and :varlink:`ALLOW_CLIMSSS_RELAXATION`.
                0041 
                0042 .. tabularcolumns:: |l|L|
                0043 
                0044 .. csv-table:: CPP options for the radtrans package
                0045    :delim: &
                0046    :widths: auto
                0047    :header: CPP option, description
                0048 
                0049    :varlink:`RADTRANS_DIAG_SOLUTION` & make diagnostics for the parameters of the light field solution available
                0050 
                0051 
                0052 Running
                0053 ^^^^^^^
                0054 
                0055 You will need to set :varlink:`useRADTRANS` = .TRUE. in ``data.pkg``.
                0056 
                0057 Runtime Parameters
                0058 ''''''''''''''''''
                0059 
                0060 Runtime parameters are set in ``data.radtrans`` in these namelists:
                0061 
                0062 .. csv-table::
                0063    :delim: &
                0064    :widths: auto
                0065    :header: Namelist, Description
                0066 
                0067    :varlink:`RADTRANS_FORCING_PARAMS`  & parameters related to forcing and initialization
                0068    :varlink:`RADTRANS_INTERP_PARAMS`   & parameters for interpolation of forcing fields (only used if :varlink:`USE_EXF_INTERPOLATION` is defined)
                0069    :varlink:`RADTRANS_PARAMS`          & general parameters
                0070 
                0071 Forcing fields are read in using the exf package.  How is controled by the
faa67d1773 Oliv*0072 namelist RADTRANS_FORCING_PARAMS.  The forcing fields are:
1d947889e4 Oliv*0073 
                0074 .. csv-table:: Darwin forcing fields
                0075    :delim: &
faa67d1773 Oliv*0076    :widths: 10,12,78
1d947889e4 Oliv*0077    :header: Name, Units, Description
                0078 
                0079    Ed(*l*) & W m\ :sup:`--2`           & Downward direct (beam) irradiance below the sea surface for waveband *l* (waveband total)
                0080    Es(*l*) & W m\ :sup:`--2`           & Downward diffuce irradiance below the sea surface for waveband *l* (waveband total)
                0081    ice     & m\ :sup:`2`\ /m\ :sup:`2` & fraction of sea surface covered by ice; used to reduce the irradiance entering the ocean
                0082 
                0083 Each forcing field has a set of parameters.
                0084 These work as in the exf package, see :numref:`tab_phys_pkg_exf_runtime_attributes`,
                0085 except timing parameters for Ed and Es are set together:
                0086 
                0087 .. csv-table:: Namelist RADTRANS_FORCING_PARAMS
                0088    :delim: &
                0089    :widths: auto
                0090    :header:  Name, Default, Description
                0091 
                0092    :varlink:`RT_Edfile`\ (l)               & ' '                    & filename for direct irradiance; if left empty no file will be read; RT_Ed_const will be used instead
                0093    :varlink:`RT_Esfile`\ (l)               & ' '                    & filename for direct irradiance; if left empty no file will be read; RT_Es_const will be used instead
                0094    :varlink:`RT_Ed_const`\ (l)             & 0.0                    & constant that will be used if no file is read
                0095    :varlink:`RT_Es_const`\ (l)             & 0.0                    & constant that will be used if no file is read
                0096    :varlink:`RT_E_period`                  & 0.0                    & interval in seconds between two records
faa67d1773 Oliv*0097    :varlink:`RT_E_RepCycle`                & :varlink:`repeatCycle` & repeat cycle in seconds; only available if :varlink:`useOasimYearlyFields` is .FALSE.
1d947889e4 Oliv*0098    :varlink:`RT_E_StartTime`               & UNSET_RL               & time in seconds of first record from the beginning of the model integration or, if useRTYearlyFields, from the beginning of year
                0099    :varlink:`RT_E_startdate1`              & 0                      & date/time of first record when using the cal package; format: YYYYMMDD; start year (YYYY), month (MM), day (YY)
                0100    :varlink:`RT_E_startdate2`              & 0                      & format: HHMMSS; start hour (HH), minute (MM), second(SS)
                0101    :varlink:`RT_E_mask`                    & 'c'                    & grid point for masking: ' ' = no masking; 'c' = centered mask; 'w' = western mask; 's' = southern
                0102    :varlink:`RT_Ed_exfremo_intercept`\ (l) & 0.0                    & can be used to remove global mean
                0103    :varlink:`RT_Es_exfremo_intercept`\ (l) & 0.0                    & can be used to remove global mean
                0104    :varlink:`RT_Ed_exfremo_slope`\ (l)     & 0.0                    & can be used to remove global trend
                0105    :varlink:`RT_Es_exfremo_slope`\ (l)     & 0.0                    & can be used to remove global trend
                0106    :varlink:`RT_inscal_Ed`\ (l)            & 1.0                    & optional rescaling of input fields to adjust units
                0107    :varlink:`RT_inscal_Es`\ (l)            & 1.0                    & optional rescaling of input fields to adjust units
                0108 
                0109 Interpolation parameters are set in namelist RADTRANS_INTERP_PARAMS.
                0110 See the exf package on how to set them.
                0111 
                0112 
                0113 General parameters are set in namelist RADTRANS_PARAMS:
                0114 
                0115 .. csv-table:: Namelist RADTRANS_PARAMS
                0116    :delim: &
                0117    :widths: auto
                0118    :header: Name, Default, Units, Description
                0119 
                0120    :varlink:`RT_refract_water`  & 1.341   &                 & refractive index of water
                0121    :varlink:`RT_rmud_max`       & 1.5     &                 & cutoff for inverse cosine of solar zenith angle
                0122    :varlink:`RT_wbEdges`        &         & nm              & waveband edges
                0123    :varlink:`RT_wbRefWLs`       &         & nm              & reference wavelengths for wavebands
                0124    :varlink:`RT_kmax`           & Nr      &                 & maximum depth index for radtrans computations
                0125    :varlink:`RT_useMeanCosSolz` & .FALSE. &                 & flag for using mean daytime cosine of solar zenith angle; if false use noon zenith angle
                0126    :varlink:`RT_sfcIrrThresh`   & 1E-4    & W m\ :sup:`--2` & minimum irradiance for radiative transfer computations
                0127 
                0128 
                0129 
                0130 Diagnostics
                0131 ~~~~~~~~~~~
                0132 
faa67d1773 Oliv*0133 .. table::
                0134    :widths: 16,18,12,54
                0135 
                0136    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0137    | **Name**    | **Code**         | **Units**               | **Description**                                         |
                0138    +=============+==================+=========================+=========================================================+
                0139    | rmud        | ``SM_P____L1``   | 1                       | inverse cosine of solar zenith angle                    |
                0140    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0141    | Rirr###     | ``SM_P____L1``   | 1                       | irradiance reflectance for waveband ###                 |
                0142    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0143    | Ed###       | ``SMRP____LR``   | W/m\ :sup:`2`           | direct irradiance for waveband ###                      |
                0144    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0145    | Es###       | ``SMRP____LR``   | W/m\ :sup:`2`           | diffuse downwelling irradiance for waveband ###         |
                0146    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0147    | Eu###       | ``SMRP____LR``   | W/m\ :sup:`2`           | diffuse upwelling irradiance for waveband ###           |
                0148    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0149    | E###        | ``SMRP____MR``   | W/m\ :sup:`2`           | vector irradiance waveband ###                          |
                0150    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0151    | E0F###      | ``SMRP____LR``   | W/m\ :sup:`2`           | scalar irradiance at W point waveband ###               |
                0152    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0153    | Estop###    | ``SMRP____LR``   | W/m\ :sup:`2`           | diffuse downwelling irradiance for waveband ###         |
                0154    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0155    | Eubot###    | ``SMRP____LR``   | W/m\ :sup:`2`           | diffuse upwelling irradiance for waveband ###           |
                0156    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0157    | amp1_###    | ``SMR_____MR``   | W/m\ :sup:`2`           | amplitude of d-w increasing mode for waveband ###       |
                0158    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0159    | amp2_###    | ``SMR_____MR``   | W/m\ :sup:`2`           | amplitude of d-w decreasing mode for waveband ###       |
                0160    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0161    | x_###       | ``SMR_____MR``   | W/m\ :sup:`2`           | amplitude of direct in diffuse for waveband ###         |
                0162    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0163    | y_###       | ``SMR_____MR``   | W/m\ :sup:`2`           | amplitude of direct in upward for waveband ###          |
                0164    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0165    | r1_###      | ``SMRP____MR``   | 1                       | R coefficient of d-w increasing mode for waveband ###   |
                0166    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0167    | r2_###      | ``SMRP____MR``   | 1                       | R coefficient of d-w decreasing mode for waveband ###   |
                0168    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0169    | att1_###    | ``SMRP____MR``   | 1/m                     | attenuation of d-w increasing mode for waveband ###     |
                0170    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0171    | att2_###    | ``SMRP____MR``   | 1/m                     | attenuation of d-w decreasing mode for waveband ###     |
                0172    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0173    | RTice       | ``SM_P____MR``   | m\ :sup:`2`/m\ :sup:`2` | ice area fraction in radtrans package                   |
                0174    +-------------+------------------+-------------------------+---------------------------------------------------------+
                0175 
                0176 
                0177 Call tree
                0178 ~~~~~~~~~
                0179 
                0180 ::
                0181 
                0182    the_model_main
                0183    initialise_fixed
                0184      packages_readparms
                0185        radtrans_readparms
                0186      packages_init_fixed
                0187        radtrans_init_fixed
                0188          radtrans_diagnostics_init
                0189    the_main_loop
                0190      initialise_varia
                0191        packages_init_variables
                0192          radtrans_init_varia
                0193          gchem_init_vari
                0194            darwin_init_varia
                0195              darwin_init_chl
                0196                darwin_light_radtrans
                0197                  radtrans_calc...
                0198      main_do_loop
                0199        forward_step
                0200          load_fields_driver
                0201            radtrans_fields_load
                0202              radtrans_monitor
                0203          gchem_forcing_sep
                0204            darwin_forcing
                0205              darwin_light_radtrans
                0206                radtrans_calc
                0207                  radtrans_declination_spencer
                0208                  radtrans_solz_daytime
                0209                  radtrans_rmud_below
                0210                  radtrans_solve
                0211                    radtrans_solve_tridiag