\(\newcommand{\p}[1]{\frac{\partial }{\partial #1}}\) \(\newcommand{\pp}[2]{\frac{\partial #1}{\partial #2}}\) \(\newcommand{\dd}[2]{\frac{d #1}{d #2}}\) \(\newcommand{\h}{\frac{1}{2}}\) \(\newcommand{\op}[1]{\operatorname{#1}}\)

8.7.5. SUN package

8.7.5.1. Introduction

The sun package computes the solar zenith angle above the sea surface for all grid center locations. The computation follows Patt and Gregg (1994) [PG94]. The code has been adapted from the Ocean-Atmosphere Spectral Irradiance Model (OASIM).

8.7.5.2. Compiling and Running

Include the word sun in packages.conf in your code directory. This will automatically include the cal package.

This is a utility package that does not have compile or runtime configuration options. It needs to be called by another package in order to do anything useful.

8.7.5.3. Subroutines

sun_init_varia

creates arrays of up, north, and east vectors

sun_sfcsolz

computes solar zenith angle above the sea surface

sun_jd

converts calendar date to Julian day

sun_ephparms

computes ephemeris parameters

sun_nutate

computes the nutation in longitude and the obliquity

sun_sun2000

computes the sun vector in geocentric inertial coordinates

sun_gha2000

computes the Greenwich hour angle in degrees

8.7.5.4. Call tree

the_model_main
  the_main_loop
    initialise_varia
      packages_init_variables
        sun_init_varia
    main_do_loop
      forward_step
        gchem_forcing_sep
          darwin_forcing
            darwin_light_radtrans
              radtrans_calc
                sun_sfcsolz
                  sun_ephparms
                  sun_nutate
                  sun_sun2000
                  sun_gha2000
                  sun_jd