23 INTEGER,
DIMENSION(:),
ALLOCATABLE,
PUBLIC ::
sf 24 INTEGER,
DIMENSION(:),
ALLOCATABLE,
PUBLIC ::
ind,
rind 37 INTEGER :: i,AllocStat,n,ns
38 CHARACTER(len=20) :: fm
44 IF (
ndim == 0) stop
"*** Number of dimensions is 0! ***" 46 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 48 INQUIRE(file=
'./SF.nml',exist=
exists)
51 OPEN(8, file=
"SF.nml", status=
'OLD', recl=80, delim=
'APOSTROPHE')
58 IF (
n_unres==0) stop
"*** No unresolved variable specified! ***" 61 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 63 IF (allocstat /= 0) stop
"*** Not enough memory ! ***" 97 OPEN(8, file=
"SF.nml", status=
'NEW')
98 WRITE(8,
'(a)')
"!------------------------------------------------------------------------------!" 99 WRITE(8,
'(a)')
"! Namelist file : !" 100 WRITE(8,
'(a)')
"! Unresolved variables specification (1 -> unresolved, 0 -> resolved) !" 101 WRITE(8,
'(a)')
"!------------------------------------------------------------------------------!" 103 WRITE(8,
'(a)')
"&SFLIST" 104 WRITE(8,*)
" ! psi variables" 106 WRITE(8,*)
" SF("//trim(
str(i))//
") = 0"//
" ! typ= "&
110 WRITE(8,*)
" ! theta variables" 112 WRITE(8,*)
" SF("//trim(
str(i+
natm))//
") = 0"//
" ! typ= "&
117 WRITE(8,*)
" ! A variables" 119 WRITE(8,*)
" SF("//trim(
str(i+2*
natm))//
") = 0"//
" ! Nx& 123 WRITE(8,*)
" ! T variables" 125 WRITE(8,*)
" SF("//trim(
str(i+
noc+2*
natm))//
") = 0"//
" & 130 WRITE(8,
'(a)')
"&END" 133 stop
"*** SF.nml namelist written. Fill in the file and rerun !***" integer ndim
Number of variables (dimension of the model)
integer noc
Number of oceanic basis functions.
subroutine, public load_sf
Subroutine to load the unresolved variable defintion vector SF from SF.nml if it exists. If it does not, then write SF.nml with no unresolved variables specified (null vector).
Inner products between the truncated set of basis functions for the ocean and atmosphere streamfuncti...
character(len=40) function, public rstr(x, fm)
Convert a real to string with a given format.
integer, dimension(:), allocatable, public rind
Unresolved reduction indices.
integer, dimension(:,:), allocatable, public bau
integer, dimension(:,:), allocatable, public bar
character(len=20) function, public str(k)
Convert an integer to string.
type(ocean_wavenum), dimension(:), allocatable, public owavenum
Oceanic blocs specification.
integer, dimension(:), allocatable, public sf
Unresolved variable definition vector.
type(atm_wavenum), dimension(:), allocatable, public awavenum
Atmospheric blocs specification.
integer natm
Number of atmospheric basis functions.
integer, dimension(:,:), allocatable, public bou
Filter matrices.
integer, public n_unres
Number of unresolved variables.
integer, dimension(:), allocatable, public sl_rind
Resolved reduction indices.
logical exists
Boolean to test for file existence.
integer, dimension(:), allocatable, public ind
The model parameters module.
Module to select the resolved-unresolved components.
integer, public n_res
Number of resolved variables.
integer, dimension(:,:), allocatable, public bor
integer, dimension(:), allocatable, public sl_ind