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) nua =0.D0
 Dissipation in the atmosphere. More...
 
real(kind=8) nuo =0.D0
 Dissipation in the ocean. More...
 
real(kind=8) nuap
 Non-dimensional dissipation in the atmosphere. More...
 
real(kind=8) nuop
 Non-dimensional dissipation in the ocean. 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 97 of file params.f90.

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

Parameters initialisation routine.

Definition at line 138 of file params.f90.

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

Variable Documentation

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

Atmospheric mode selection array.

Definition at line 87 of file params.f90.

87  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 77 of file params.f90.

77  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 83 of file params.f90.

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

Number of oceanic blocks.

Definition at line 82 of file params.f90.

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

Number of atmospheric blocks.

Definition at line 81 of file params.f90.

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

Number of variables (dimension of the model)

Definition at line 85 of file params.f90.

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

Number of oceanic basis functions.

Definition at line 84 of file params.f90.

84  INTEGER :: noc=0 !< Number of oceanic basis functions
real(kind=8) params::nua =0.D0

Dissipation in the atmosphere.

Definition at line 69 of file params.f90.

69  REAL(KIND=8) :: nua=0.d0 !< Dissipation in the atmosphere
real(kind=8) params::nuap

Non-dimensional dissipation in the atmosphere.

Definition at line 72 of file params.f90.

72  REAL(KIND=8) :: nuap !< Non-dimensional dissipation in the atmosphere
real(kind=8) params::nuo =0.D0

Dissipation in the ocean.

Definition at line 70 of file params.f90.

70  REAL(KIND=8) :: nuo=0.d0 !< Dissipation in the ocean
real(kind=8) params::nuop

Non-dimensional dissipation in the ocean.

Definition at line 73 of file params.f90.

73  REAL(KIND=8) :: nuop !< Non-dimensional dissipation in the ocean
integer, dimension(:,:), allocatable params::oms

Ocean mode selection array.

Definition at line 86 of file params.f90.

86  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 76 of file params.f90.

76  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 75 of file params.f90.

75  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 78 of file params.f90.

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

Write to file boolean.

Definition at line 79 of file params.f90.

79  LOGICAL :: writeout !< Write to file boolean