24 real(kind=kind_real),
allocatable :: x(:,:,:)
25 real(kind=kind_real),
allocatable :: xn(:)
26 real(kind=kind_real),
allocatable :: xs(:)
27 real(kind=kind_real),
allocatable :: qn(:,:)
28 real(kind=kind_real),
allocatable :: qs(:,:)
31 #define LISTED_TYPE qg_trajectory 34 #include "oops/util/linkedList_i.f" 43 #include "oops/util/linkedList_c.f" 47 subroutine set_traj(self,kx,ky,px,pxn,pxs,pqn,pqs)
50 integer,
intent(in) :: kx,ky
51 real(kind=kind_real),
intent(in) :: px(kx,ky,2)
52 real(kind=kind_real),
intent(in) :: pxn(2),pxs(2)
53 real(kind=kind_real),
intent(in) :: pqn(kx,2),pqs(kx,2)
55 allocate(self%x(kx,ky,2))
56 allocate(self%xn(2),self%xs(2))
57 allocate(self%qn(kx,2),self%qs(kx,2))
59 self%x(:,:,:)=px(:,:,:)
62 self%qn(:,:) =pqn(:,:)
63 self%qs(:,:) =pqs(:,:)
70 subroutine get_traj(self,kx,ky,px,pxn,pxs,pqn,pqs)
73 integer,
intent(in) :: kx,ky
74 real(kind=kind_real),
intent(inout) :: px(kx,ky,2)
75 real(kind=kind_real),
intent(inout) :: pxn(2),pxs(2)
76 real(kind=kind_real),
intent(inout) :: pqn(kx,2),pqs(kx,2)
78 px(:,:,:)=self%x(:,:,:)
81 pqn(:,:) =self%qn(:,:)
82 pqs(:,:) =self%qs(:,:)
104 subroutine c_minmax_traj(c_key_self, pminmax) bind(c,name='qg_traj_minmaxrms_f90')
107 integer(c_int),
intent(in) :: c_key_self
108 real(c_double),
intent(inout) :: pminmax(3,5)
109 type(qg_trajectory),
pointer :: self
110 real(kind=kind_real) :: zz
114 zz=
real(size(self%x),kind_real)
115 pminmax(1,1)=minval(self%x(:,:,:))
116 pminmax(2,1)=maxval(self%x(:,:,:))
117 pminmax(3,1)=sqrt(sum(self%x(:,:,:)**2)/zz)
120 pminmax(1,2)=minval(self%xn(:))
121 pminmax(2,2)=maxval(self%xn(:))
122 pminmax(3,2)=sqrt(sum(self%xn(:)**2)/zz)
124 pminmax(1,3)=minval(self%xs(:))
125 pminmax(2,3)=maxval(self%xs(:))
126 pminmax(3,3)=sqrt(sum(self%xs(:)**2)/zz)
128 zz=
real(size(self%qn),kind_real)
129 pminmax(1,4)=minval(self%qn(:,:))
130 pminmax(2,4)=maxval(self%qn(:,:))
131 pminmax(3,4)=sqrt(sum(self%qn(:,:)**2)/zz)
133 pminmax(1,5)=minval(self%qs(:,:))
134 pminmax(2,5)=maxval(self%qs(:,:))
135 pminmax(3,5)=sqrt(sum(self%qs(:,:)**2)/zz)
Handle the trajectory for the QG model.
subroutine, public set_traj(self, kx, ky, px, pxn, pxs, pqn, pqs)
Linked list implementation.
subroutine, public get_traj(self, kx, ky, px, pxn, pxs, pqn, pqs)
type(registry_t), public qg_traj_registry
Linked list interface - defines registry_t type.
Fortran derived type to hold the QG model trajectory.
subroutine c_minmax_traj(c_key_self, pminmax)
subroutine, public delete_traj(self)