Module observations -- the 'real' world


INTERFACE:

   module observations
DESCRIPTION:

This module provides the necessary subroutines for communicating `observations' to GOTM. The module operates according to the general philosophy used in GOTM, i.e. it provides init_observations() to be called in the overall initialisation routine and get_all_obs() to be called in the time loop to actually obtain the `observations'. In addition to these subroutines the module also provides two routines for reading scalar-type observations and profile-type observations. Each observation has a date stamp with the format yyyy-mm-dd hh:dd:mm. The module uses the time module (see section 8.11) to convert the time string to the internal time representation of GOTM. Profiles are interpolated to the actual GOTM model grid. Free format is used for reading-in the actual data.


USES:

   IMPLICIT NONE
 
   default: all is private.
   private
PUBLIC MEMBER FUNCTIONS:
   public init_observations, get_all_obs, read_obs, read_profiles,&
          clean_observations
 ifdef _PRINTSTATE_
   public print_state_observations
 endif
PUBLIC DATA MEMBERS:
   logical, public                               :: init_saved_vars
   'observed' salinity profile
   REALTYPE, public, dimension(:), allocatable, target :: sprof
 
   'observed' temperature profile
   REALTYPE, public, dimension(:), allocatable   :: tprof
 
   'observed' oxygen profile
   REALTYPE, public, dimension(:), allocatable   :: o2_prof
 
   'observed' horizontal salinity  gradients
   REALTYPE, public, dimension(:), allocatable   :: dsdx,dsdy
 
   'observed' horizontal temperarure  gradients
   REALTYPE, public, dimension(:), allocatable   :: dtdx,dtdy
 
   internal horizontal pressure gradients
   REALTYPE, public, dimension(:), allocatable   :: idpdx,idpdy
 
   horizontal velocity profiles
   REALTYPE, public, dimension(:), allocatable   :: uprof,vprof
 
   observed profile of turbulent dissipation rates
   REALTYPE, public, dimension(:), allocatable   :: epsprof
 
   ralaxation times for salinity and temperature
   REALTYPE, public, dimension(:), allocatable, target :: SRelaxTau
   REALTYPE, public, dimension(:), allocatable         :: TRelaxTau
 
   sea surface elevation, sea surface gradients and height of velocity obs.
   REALTYPE, public          :: zeta,dpdx,dpdy,h_press
 
   vertical advection velocity
   REALTYPE, public          :: w_adv,w_height
 
   Parameters for water classification - default Jerlov type I
   REALTYPE, public, target  :: A,g1,g2
 
 ifdef BIO
   'observed' biological profiles
   REALTYPE, public, dimension(:,:), allocatable :: bioprofs
 endif
 
 ------------------------------------------------------------------------------
  the following data are not all public,
  but have been included for clarity here
 ------------------------------------------------------------------------------
 
   Salinity profile(s)
   integer, public           :: s_prof_method
   integer, public           :: s_analyt_method
   character(LEN=PATH_MAX)   :: s_prof_file
   REALTYPE                  :: z_s1,s_1,z_s2,s_2
   REALTYPE                  :: s_obs_NN
   REALTYPE                  :: SRelaxTauM
   REALTYPE                  :: SRelaxTauS
   REALTYPE                  :: SRelaxTauB
   REALTYPE                  :: SRelaxSurf
   REALTYPE                  :: SRelaxBott
 
   Temperature profile(s)
   integer, public           :: t_prof_method
   integer, public           :: t_analyt_method
   character(LEN=PATH_MAX)   :: t_prof_file
   REALTYPE                  :: z_t1,t_1,z_t2,t_2
   REALTYPE                  :: t_obs_NN
   REALTYPE                  :: TRelaxTauM
   REALTYPE                  :: TRelaxTauS
   REALTYPE                  :: TRelaxTauB
   REALTYPE                  :: TRelaxSurf
   REALTYPE                  :: TRelaxBott
 
   Oxygen profile(s)
   integer, public           :: o2_prof_method
   integer, public           :: o2_units
   character(LEN=PATH_MAX)   :: o2_prof_file
 
   External pressure - 'press' namelist
   integer, public           :: ext_press_method,ext_press_mode
   character(LEN=PATH_MAX)   :: ext_press_file
   REALTYPE, public          :: PressConstU
   REALTYPE, public          :: PressConstV
   REALTYPE, public          :: PressHeight
   REALTYPE, public          :: PeriodM
   REALTYPE, public          :: AmpMu
   REALTYPE, public          :: AmpMv
   REALTYPE, public          :: PhaseMu
   REALTYPE, public          :: PhaseMv
   REALTYPE, public          :: PeriodS
   REALTYPE, public          :: AmpSu
   REALTYPE, public          :: AmpSv
   REALTYPE, public          :: PhaseSu
   REALTYPE, public          :: PhaseSv
 
   Internal pressure - 'internal_pressure' namelist
   integer, public           :: int_press_method
   character(LEN=PATH_MAX)   :: int_press_file
   REALTYPE, public          :: const_dsdx
   REALTYPE, public          :: const_dsdy
   REALTYPE, public          :: const_dtdx
   REALTYPE, public          :: const_dtdy
   logical, public           :: s_adv
   logical, public           :: t_adv
 
   Light extinction - the 'extinct' namelist
   integer                   :: extinct_method
   character(LEN=PATH_MAX)   :: extinct_file
 
   Vertical advection velocity - 'w_advspec' namelist
   integer, public           :: w_adv_method
   REALTYPE, public          :: w_adv0
   REALTYPE, public          :: w_adv_height0
   character(LEN=PATH_MAX)   :: w_adv_file
   integer, public           :: w_adv_discr
 
   Sea surface elevations - 'zetaspec' namelist
   integer,public            :: zeta_method
   character(LEN=PATH_MAX)   :: zeta_file
   REALTYPE, public          :: zeta_0
   REALTYPE, public          :: period_1
   REALTYPE, public          :: amp_1
   REALTYPE, public          :: phase_1
   REALTYPE, public          :: period_2
   REALTYPE, public          :: amp_2
   REALTYPE, public          :: phase_2
 
   Wind waves - 'wave_nml' namelist
   integer,public            :: wave_method
   character(LEN=PATH_MAX)   :: wave_file
   REALTYPE, public          :: Hs
   REALTYPE, public          :: Tz
   REALTYPE, public          :: phiw
 
   Observed velocity profile profiles - typically from ADCP
   integer                   :: vel_prof_method
   CHARACTER(LEN=PATH_MAX)   :: vel_prof_file
   REALTYPE, public          :: vel_relax_tau
   REALTYPE, public          :: vel_relax_ramp
 
   Observed dissipation profiles
   integer                   :: e_prof_method
   REALTYPE                  :: e_obs_const
   CHARACTER(LEN=PATH_MAX)   :: e_prof_file
 
   Buoyancy - 'bprofile' namelist
   REALTYPE, public          :: b_obs_surf,b_obs_NN
   REALTYPE, public          :: b_obs_sbf
 
 ifdef BIO
   Observed biological profiles
   integer, public           :: bio_prof_method
   CHARACTER(LEN=PATH_MAX)   :: bio_prof_file
 endif
 
   REALTYPE,public, parameter:: pi=3.141592654d0
DEFINED PARAMETERS:
 
   Unit numbers for reading observations/data.
   integer, parameter        :: s_prof_unit=30
   integer, parameter        :: t_prof_unit=31
   integer, parameter        :: ext_press_unit=32
   integer, parameter        :: int_press_unit=33
   integer, parameter        :: extinct_unit=34
   integer, parameter        :: w_adv_unit=35
   integer, parameter        :: zeta_unit=36
   integer, parameter        :: wave_unit=37
   integer, parameter        :: vel_prof_unit=38
   integer, parameter        :: e_prof_unit=39
   integer, parameter        :: o2_prof_unit=40
 ifdef BIO
   integer, parameter        :: bio_prof_unit=41
 endif
 
   pre-defined parameters
   integer, parameter        :: READ_SUCCESS=1
   integer, parameter        :: END_OF_FILE=-1
   integer, parameter        :: READ_ERROR=-2
   integer, parameter        :: NOTHING=0
   integer, parameter        :: ANALYTICAL=1
   integer, parameter        :: CONSTANT=1
   integer, parameter        :: FROMFILE=2
   integer, parameter        :: CONST_PROF=1
   integer, parameter        :: TWO_LAYERS=2
   integer, parameter        :: CONST_NN=3
REVISION HISTORY:
   Original author(s): Karsten Bolding & Hans Burchard



Subsections

Karsten Bolding 2012-12-28