A Modular Arbitrary-Order Ocean-Atmosphere Model -- Stochastic implementation
Functions/Subroutines | Variables
params Module Reference

The model parameters module. More...

Functions/Subroutines

subroutine, private init_nml
 Read the basic parameters and mode selection from the namelist. More...
 
subroutine init_params
 Parameters initialisation routine. More...
 

Variables

real(kind=8) n
 \(n = 2 L_y / L_x\) - Aspect ratio More...
 
real(kind=8) phi0
 Latitude in radian. More...
 
real(kind=8) rra
 Earth radius. More...
 
real(kind=8) sig0
 \(\sigma_0\) - Non-dimensional static stability of the atmosphere. More...
 
real(kind=8) k
 Bottom atmospheric friction coefficient. More...
 
real(kind=8) kp
 \(k'\) - Internal atmospheric friction coefficient. More...
 
real(kind=8) r
 Frictional coefficient at the bottom of the ocean. More...
 
real(kind=8) d
 Merchanical coupling parameter between the ocean and the atmosphere. More...
 
real(kind=8) f0
 \(f_0\) - Coriolis parameter More...
 
real(kind=8) gp
 \(g'\)Reduced gravity More...
 
real(kind=8) h
 Depth of the active water layer of the ocean. More...
 
real(kind=8) phi0_npi
 Latitude exprimed in fraction of pi. More...
 
real(kind=8) lambda
 \(\lambda\) - Sensible + turbulent heat exchange between the ocean and the atmosphere. More...
 
real(kind=8) co
 \(C_a\) - Constant short-wave radiation of the ocean. More...
 
real(kind=8) go
 \(\gamma_o\) - Specific heat capacity of the ocean. More...
 
real(kind=8) ca
 \(C_a\) - Constant short-wave radiation of the atmosphere. More...
 
real(kind=8) to0
 \(T_o^0\) - Stationary solution for the 0-th order ocean temperature. More...
 
real(kind=8) ta0
 \(T_a^0\) - Stationary solution for the 0-th order atmospheric temperature. More...
 
real(kind=8) epsa
 \(\epsilon_a\) - Emissivity coefficient for the grey-body atmosphere. More...
 
real(kind=8) ga
 \(\gamma_a\) - Specific heat capacity of the atmosphere. More...
 
real(kind=8) rr
 \(R\) - Gas constant of dry air More...
 
real(kind=8) scale
 \(L_y = L \, \pi\) - The characteristic space scale. More...
 
real(kind=8) pi
 \(\pi\) More...
 
real(kind=8) lr
 \(L_R\) - Rossby deformation radius More...
 
real(kind=8) g
 \(\gamma\) More...
 
real(kind=8) rp
 \(r'\) - Frictional coefficient at the bottom of the ocean. More...
 
real(kind=8) dp
 \(d'\) - Non-dimensional mechanical coupling parameter between the ocean and the atmosphere. More...
 
real(kind=8) kd
 \(k_d\) - Non-dimensional bottom atmospheric friction coefficient. More...
 
real(kind=8) kdp
 \(k'_d\) - Non-dimensional internal atmospheric friction coefficient. More...
 
real(kind=8) cpo
 \(C'_a\) - Non-dimensional constant short-wave radiation of the ocean. More...
 
real(kind=8) lpo
 \(\lambda'_o\) - Non-dimensional sensible + turbulent heat exchange from ocean to atmosphere. More...
 
real(kind=8) cpa
 \(C'_a\) - Non-dimensional constant short-wave radiation of the atmosphere. More...
 
real(kind=8) lpa
 \(\lambda'_a\) - Non-dimensional sensible + turbulent heat exchange from atmosphere to ocean. More...
 
real(kind=8) sbpo
 \(\sigma'_{B,o}\) - Long wave radiation lost by ocean to atmosphere & space. More...
 
real(kind=8) sbpa
 \(\sigma'_{B,a}\) - Long wave radiation from atmosphere absorbed by ocean. More...
 
real(kind=8) lsbpo
 \(S'_{B,o}\) - Long wave radiation from ocean absorbed by atmosphere. More...
 
real(kind=8) lsbpa
 \(S'_{B,a}\) - Long wave radiation lost by atmosphere to space & ocean. More...
 
real(kind=8) l
 \(L\) - Domain length scale More...
 
real(kind=8) sc
 Ratio of surface to atmosphere temperature. More...
 
real(kind=8) sb
 Stefan–Boltzmann constant. More...
 
real(kind=8) betp
 \(\beta'\) - Non-dimensional beta parameter More...
 
real(kind=8) t_trans
 Transient time period. More...
 
real(kind=8) t_run
 Effective intergration time (length of the generated trajectory) More...
 
real(kind=8) dt
 Integration time step. More...
 
real(kind=8) tw
 Write all variables every tw time units. More...
 
logical writeout
 Write to file boolean. More...
 
integer nboc
 Number of atmospheric blocks. More...
 
integer nbatm
 Number of oceanic blocks. More...
 
integer natm =0
 Number of atmospheric basis functions. More...
 
integer noc =0
 Number of oceanic basis functions. More...
 
integer ndim
 Number of variables (dimension of the model) More...
 
integer, dimension(:,:), allocatable oms
 Ocean mode selection array. More...
 
integer, dimension(:,:), allocatable ams
 Atmospheric mode selection array. More...
 

Detailed Description

The model parameters module.

Remarks
Once the init_params() subroutine is called, the parameters are loaded globally in the main program and its subroutines and function

Function/Subroutine Documentation

subroutine, private params::init_nml ( )
private

Read the basic parameters and mode selection from the namelist.

Definition at line 91 of file params.f90.

91  INTEGER :: allocstat
92 
93  namelist /aoscale/ scale,f0,n,rra,phi0_npi
94  namelist /oparams/ gp,r,h,d
95  namelist /aparams/ k,kp,sig0
96  namelist /toparams/ go,co,to0
97  namelist /taparams/ ga,ca,epsa,ta0
98  namelist /otparams/ sc,lambda,rr,sb
99 
100  namelist /modeselection/ oms,ams
101  namelist /numblocs/ nboc,nbatm
102 
103  namelist /int_params/ t_trans,t_run,dt,tw,writeout
104 
105  OPEN(8, file="params.nml", status='OLD', recl=80, delim='APOSTROPHE')
106 
107  READ(8,nml=aoscale)
108  READ(8,nml=oparams)
109  READ(8,nml=aparams)
110  READ(8,nml=toparams)
111  READ(8,nml=taparams)
112  READ(8,nml=otparams)
113 
114  CLOSE(8)
115 
116  OPEN(8, file="modeselection.nml", status='OLD', recl=80, delim='APOSTROPHE')
117  READ(8,nml=numblocs)
118 
119  ALLOCATE(oms(nboc,2),ams(nbatm,2), stat=allocstat)
120  IF (allocstat /= 0) stop "*** Not enough memory ! ***"
121 
122  READ(8,nml=modeselection)
123  CLOSE(8)
124 
125  OPEN(8, file="int_params.nml", status='OLD', recl=80, delim='APOSTROPHE')
126  READ(8,nml=int_params)
127 
128 
Statistics accumulators.
Definition: stat.f90:14
subroutine params::init_params ( )

Parameters initialisation routine.

Definition at line 133 of file params.f90.

133  INTEGER, DIMENSION(2) :: s
134  INTEGER :: i
135  CALL init_nml
136 
137  !---------------------------------------------------------!
138  ! !
139  ! Computation of the dimension of the atmospheric !
140  ! and oceanic components !
141  ! !
142  !---------------------------------------------------------!
143 
144  natm=0
145  DO i=1,nbatm
146  IF (ams(i,1)==1) THEN
147  natm=natm+3
148  ELSE
149  natm=natm+2
150  ENDIF
151  ENDDO
152  s=shape(oms)
153  noc=s(1)
154 
155  ndim=2*natm+2*noc
156 
157  !---------------------------------------------------------!
158  ! !
159  ! Some general parameters (Domain, beta, gamma, coupling) !
160  ! !
161  !---------------------------------------------------------!
162 
163  pi=dacos(-1.d0)
164  l=scale/pi
165  phi0=phi0_npi*pi
166  lr=sqrt(gp*h)/f0
167  g=-l**2/lr**2
168  betp=l/rra*cos(phi0)/sin(phi0)
169  rp=r/f0
170  dp=d/f0
171  kd=k*2
172  kdp=kp
173 
174  !-----------------------------------------------------!
175  ! !
176  ! DERIVED QUANTITIES !
177  ! !
178  !-----------------------------------------------------!
179 
180  cpo=co/(go*f0) * rr/(f0**2*l**2)
181  lpo=lambda/(go*f0)
182  cpa=ca/(ga*f0) * rr/(f0**2*l**2)/2 ! Cpa acts on psi1-psi3, not on theta
183  lpa=lambda/(ga*f0)
184  sbpo=4*sb*to0**3/(go*f0) ! long wave radiation lost by ocean to atmosphere space
185  sbpa=8*epsa*sb*ta0**3/(go*f0) ! long wave radiation from atmosphere absorbed by ocean
186  lsbpo=2*epsa*sb*to0**3/(ga*f0) ! long wave radiation from ocean absorbed by atmosphere
187  lsbpa=8*epsa*sb*ta0**3/(ga*f0) ! long wave radiation lost by atmosphere to space & ocea
188 
189 
integer ndim
Number of variables (dimension of the model)
Definition: params.f90:79

Variable Documentation

integer, dimension(:,:), allocatable params::ams

Atmospheric mode selection array.

Definition at line 81 of file params.f90.

81  INTEGER, DIMENSION(:,:), ALLOCATABLE :: ams !< Atmospheric mode selection array
real(kind=8) params::betp

\(\beta'\) - Non-dimensional beta parameter

Definition at line 67 of file params.f90.

67  REAL(KIND=8) :: betp !< \f$\beta'\f$ - Non-dimensional beta parameter
real(kind=8) params::ca

\(C_a\) - Constant short-wave radiation of the atmosphere.

Definition at line 40 of file params.f90.

40  REAL(KIND=8) :: ca !< \f$C_a\f$ - Constant short-wave radiation of the atmosphere.
real(kind=8) params::co

\(C_a\) - Constant short-wave radiation of the ocean.

Definition at line 38 of file params.f90.

38  REAL(KIND=8) :: co !< \f$C_a\f$ - Constant short-wave radiation of the ocean.
real(kind=8) params::cpa

\(C'_a\) - Non-dimensional constant short-wave radiation of the atmosphere.

Remarks
Cpa acts on psi1-psi3, not on theta.

Definition at line 58 of file params.f90.

58  REAL(KIND=8) :: cpa !< \f$C'_a\f$ - Non-dimensional constant short-wave radiation of the atmosphere. @remark Cpa acts on psi1-psi3, not on theta.
real(kind=8) params::cpo

\(C'_a\) - Non-dimensional constant short-wave radiation of the ocean.

Definition at line 56 of file params.f90.

56  REAL(KIND=8) :: cpo !< \f$C'_a\f$ - Non-dimensional constant short-wave radiation of the ocean.
real(kind=8) params::d

Merchanical coupling parameter between the ocean and the atmosphere.

Definition at line 31 of file params.f90.

31  REAL(KIND=8) :: d !< Merchanical coupling parameter between the ocean and the atmosphere.
real(kind=8) params::dp

\(d'\) - Non-dimensional mechanical coupling parameter between the ocean and the atmosphere.

Definition at line 52 of file params.f90.

52  REAL(KIND=8) :: dp !< \f$d'\f$ - Non-dimensional mechanical coupling parameter between the ocean and the atmosphere.
real(kind=8) params::dt

Integration time step.

Definition at line 71 of file params.f90.

71  REAL(KIND=8) :: dt !< Integration time step
real(kind=8) params::epsa

\(\epsilon_a\) - Emissivity coefficient for the grey-body atmosphere.

Definition at line 43 of file params.f90.

43  REAL(KIND=8) :: epsa !< \f$\epsilon_a\f$ - Emissivity coefficient for the grey-body atmosphere.
real(kind=8) params::f0

\(f_0\) - Coriolis parameter

Definition at line 32 of file params.f90.

32  REAL(KIND=8) :: f0 !< \f$f_0\f$ - Coriolis parameter
real(kind=8) params::g

\(\gamma\)

Definition at line 50 of file params.f90.

50  REAL(KIND=8) :: g !< \f$\gamma\f$
real(kind=8) params::ga

\(\gamma_a\) - Specific heat capacity of the atmosphere.

Definition at line 44 of file params.f90.

44  REAL(KIND=8) :: ga !< \f$\gamma_a\f$ - Specific heat capacity of the atmosphere.
real(kind=8) params::go

\(\gamma_o\) - Specific heat capacity of the ocean.

Definition at line 39 of file params.f90.

39  REAL(KIND=8) :: go !< \f$\gamma_o\f$ - Specific heat capacity of the ocean.
real(kind=8) params::gp

\(g'\)Reduced gravity

Definition at line 33 of file params.f90.

33  REAL(KIND=8) :: gp !< \f$g'\f$Reduced gravity
real(kind=8) params::h

Depth of the active water layer of the ocean.

Definition at line 34 of file params.f90.

34  REAL(KIND=8) :: h !< Depth of the active water layer of the ocean.
real(kind=8) params::k

Bottom atmospheric friction coefficient.

Definition at line 28 of file params.f90.

28  REAL(KIND=8) :: k !< Bottom atmospheric friction coefficient.
real(kind=8) params::kd

\(k_d\) - Non-dimensional bottom atmospheric friction coefficient.

Definition at line 53 of file params.f90.

53  REAL(KIND=8) :: kd !< \f$k_d\f$ - Non-dimensional bottom atmospheric friction coefficient.
real(kind=8) params::kdp

\(k'_d\) - Non-dimensional internal atmospheric friction coefficient.

Definition at line 54 of file params.f90.

54  REAL(KIND=8) :: kdp !< \f$k'_d\f$ - Non-dimensional internal atmospheric friction coefficient.
real(kind=8) params::kp

\(k'\) - Internal atmospheric friction coefficient.

Definition at line 29 of file params.f90.

29  REAL(KIND=8) :: kp !< \f$k'\f$ - Internal atmospheric friction coefficient.
real(kind=8) params::l

\(L\) - Domain length scale

Definition at line 64 of file params.f90.

64  REAL(KIND=8) :: l !< \f$L\f$ - Domain length scale
real(kind=8) params::lambda

\(\lambda\) - Sensible + turbulent heat exchange between the ocean and the atmosphere.

Definition at line 37 of file params.f90.

37  REAL(KIND=8) :: lambda !< \f$\lambda\f$ - Sensible + turbulent heat exchange between the ocean and the atmosphere.
real(kind=8) params::lpa

\(\lambda'_a\) - Non-dimensional sensible + turbulent heat exchange from atmosphere to ocean.

Definition at line 59 of file params.f90.

59  REAL(KIND=8) :: lpa !< \f$\lambda'_a\f$ - Non-dimensional sensible + turbulent heat exchange from atmosphere to ocean.
real(kind=8) params::lpo

\(\lambda'_o\) - Non-dimensional sensible + turbulent heat exchange from ocean to atmosphere.

Definition at line 57 of file params.f90.

57  REAL(KIND=8) :: lpo !< \f$\lambda'_o\f$ - Non-dimensional sensible + turbulent heat exchange from ocean to atmosphere.
real(kind=8) params::lr

\(L_R\) - Rossby deformation radius

Definition at line 49 of file params.f90.

49  REAL(KIND=8) :: lr !< \f$L_R\f$ - Rossby deformation radius
real(kind=8) params::lsbpa

\(S'_{B,a}\) - Long wave radiation lost by atmosphere to space & ocean.

Definition at line 63 of file params.f90.

63  REAL(KIND=8) :: lsbpa !< \f$S'_{B,a}\f$ - Long wave radiation lost by atmosphere to space & ocean.
real(kind=8) params::lsbpo

\(S'_{B,o}\) - Long wave radiation from ocean absorbed by atmosphere.

Definition at line 62 of file params.f90.

62  REAL(KIND=8) :: lsbpo !< \f$S'_{B,o}\f$ - Long wave radiation from ocean absorbed by atmosphere.
real(kind=8) params::n

\(n = 2 L_y / L_x\) - Aspect ratio

Definition at line 24 of file params.f90.

24  REAL(KIND=8) :: n !< \f$n = 2 L_y / L_x\f$ - Aspect ratio
integer params::natm =0

Number of atmospheric basis functions.

Definition at line 77 of file params.f90.

77  INTEGER :: natm=0 !< Number of atmospheric basis functions
integer params::nbatm

Number of oceanic blocks.

Definition at line 76 of file params.f90.

76  INTEGER :: nbatm !< Number of oceanic blocks
integer params::nboc

Number of atmospheric blocks.

Definition at line 75 of file params.f90.

75  INTEGER :: nboc !< Number of atmospheric blocks
integer params::ndim

Number of variables (dimension of the model)

Definition at line 79 of file params.f90.

79  INTEGER :: ndim !< Number of variables (dimension of the model)
integer ndim
Number of variables (dimension of the model)
Definition: params.f90:79
integer params::noc =0

Number of oceanic basis functions.

Definition at line 78 of file params.f90.

78  INTEGER :: noc=0 !< Number of oceanic basis functions
integer, dimension(:,:), allocatable params::oms

Ocean mode selection array.

Definition at line 80 of file params.f90.

80  INTEGER, DIMENSION(:,:), ALLOCATABLE :: oms !< Ocean mode selection array
real(kind=8) params::phi0

Latitude in radian.

Definition at line 25 of file params.f90.

25  REAL(KIND=8) :: phi0 !< Latitude in radian
real(kind=8) params::phi0_npi

Latitude exprimed in fraction of pi.

Definition at line 35 of file params.f90.

35  REAL(KIND=8) :: phi0_npi !< Latitude exprimed in fraction of pi.
real(kind=8) params::pi

\(\pi\)

Definition at line 48 of file params.f90.

48  REAL(KIND=8) :: pi !< \f$\pi\f$
real(kind=8) params::r

Frictional coefficient at the bottom of the ocean.

Definition at line 30 of file params.f90.

30  REAL(KIND=8) :: r !< Frictional coefficient at the bottom of the ocean.
real(kind=8) params::rp

\(r'\) - Frictional coefficient at the bottom of the ocean.

Definition at line 51 of file params.f90.

51  REAL(KIND=8) :: rp !< \f$r'\f$ - Frictional coefficient at the bottom of the ocean.
real(kind=8) params::rr

\(R\) - Gas constant of dry air

Definition at line 45 of file params.f90.

45  REAL(KIND=8) :: rr !< \f$R\f$ - Gas constant of dry air
real(kind=8) params::rra

Earth radius.

Definition at line 26 of file params.f90.

26  REAL(KIND=8) :: rra !< Earth radius
real(kind=8) params::sb

Stefan–Boltzmann constant.

Definition at line 66 of file params.f90.

66  REAL(KIND=8) :: sb !< Stefan–Boltzmann constant
real(kind=8) params::sbpa

\(\sigma'_{B,a}\) - Long wave radiation from atmosphere absorbed by ocean.

Definition at line 61 of file params.f90.

61  REAL(KIND=8) :: sbpa !< \f$\sigma'_{B,a}\f$ - Long wave radiation from atmosphere absorbed by ocean.
real(kind=8) params::sbpo

\(\sigma'_{B,o}\) - Long wave radiation lost by ocean to atmosphere & space.

Definition at line 60 of file params.f90.

60  REAL(KIND=8) :: sbpo !< \f$\sigma'_{B,o}\f$ - Long wave radiation lost by ocean to atmosphere & space.
real(kind=8) params::sc

Ratio of surface to atmosphere temperature.

Definition at line 65 of file params.f90.

65  REAL(KIND=8) :: sc !< Ratio of surface to atmosphere temperature.
real(kind=8) params::scale

\(L_y = L \, \pi\) - The characteristic space scale.

Definition at line 47 of file params.f90.

47  REAL(KIND=8) :: scale !< \f$L_y = L \, \pi\f$ - The characteristic space scale.
real(kind=8) params::sig0

\(\sigma_0\) - Non-dimensional static stability of the atmosphere.

Definition at line 27 of file params.f90.

27  REAL(KIND=8) :: sig0 !< \f$\sigma_0\f$ - Non-dimensional static stability of the atmosphere.
real(kind=8) params::t_run

Effective intergration time (length of the generated trajectory)

Definition at line 70 of file params.f90.

70  REAL(KIND=8) :: t_run !< Effective intergration time (length of the generated trajectory)
real(kind=8) params::t_trans

Transient time period.

Definition at line 69 of file params.f90.

69  REAL(KIND=8) :: t_trans !< Transient time period
real(kind=8) params::ta0

\(T_a^0\) - Stationary solution for the 0-th order atmospheric temperature.

Definition at line 42 of file params.f90.

42  REAL(KIND=8) :: ta0 !< \f$T_a^0\f$ - Stationary solution for the 0-th order atmospheric temperature.
real(kind=8) params::to0

\(T_o^0\) - Stationary solution for the 0-th order ocean temperature.

Definition at line 41 of file params.f90.

41  REAL(KIND=8) :: to0 !< \f$T_o^0\f$ - Stationary solution for the 0-th order ocean temperature.
real(kind=8) params::tw

Write all variables every tw time units.

Definition at line 72 of file params.f90.

72  REAL(KIND=8) :: tw !< Write all variables every tw time units
logical params::writeout

Write to file boolean.

Definition at line 73 of file params.f90.

73  LOGICAL :: writeout !< Write to file boolean