1 |
subroutine plumes_init_vars (myThid) |
2 |
c----------------------------------------------------------------------- |
3 |
c Routine to initialise the plumes state. |
4 |
c |
5 |
c Input: myThid - Process number calling this routine |
6 |
c |
7 |
c Notes: |
8 |
c 1) For a Cold Start - |
9 |
c This routine takes the initial condition on the dynamics grid |
10 |
c and interpolates to the plumes grid to initialize the state |
11 |
c variables. |
12 |
c 2) For a Restart, read the plumes pickup file |
13 |
c |
14 |
c Calls: dyn2plume (x2) |
15 |
c----------------------------------------------------------------------- |
16 |
implicit none |
17 |
#include "CPP_OPTIONS.h" |
18 |
#include "SIZE.h" |
19 |
#include "plumes_SIZE.h" |
20 |
#include "DYNVARS.h" |
21 |
#include "plumes_coms.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
|
25 |
integer myThid |
26 |
|
27 |
_RL udyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
28 |
_RL vdyntemp(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) |
29 |
|
30 |
integer bi, bj |
31 |
integer idim1, idim2, jdim1, jdim2, idimout, jdimout |
32 |
|
33 |
idim1 = 1-OLx |
34 |
idim2 = sNx+OLx |
35 |
jdim1 = 1-OLy |
36 |
jdim2 = sNy+OLy |
37 |
idimout = Nxplumes |
38 |
Ldimout = Nrplumes |
39 |
|
40 |
IF ( startTime.EQ.0. .AND. nIter0.EQ.0 ) THEN |
41 |
print *,' In plumes_init_vars: Cold start ' |
42 |
|
43 |
c Create initial fields on phys. grid - Move Dynamics u and v to A-Grid |
44 |
call CtoA(myThid,uvel,vvel,maskW,maskS,im1,im2,jm1,jm2,Nr, |
45 |
. Nsx,Nsy,1,sNx,1,sNy,udyntemp,vdyntemp) |
46 |
|
47 |
do bj = myByLo(myThid), myByHi(myThid) |
48 |
do bi = myBxLo(myThid), myBxHi(myThid) |
49 |
|
50 |
c Create initial fields on plumes grid - interpolate from dyn. grid |
51 |
call dyn2plume(udyntemp,vdyntemp,idim1,idim2,jdim1,jdim2, |
52 |
. 1,sNx,1,sNy,Nr,Nsx,Nsy,bi,bj,1,idimout,Ldimout,uplume) |
53 |
call dyn2plume(theta,theta,idim1,idim2,jdim1,jdim2, |
54 |
. 1,sNx,1,sNy,Nr,Nsx,Nsy,bi,bj,1,idimout,Ldimout,thplume) |
55 |
|
56 |
enddo |
57 |
enddo |
58 |
|
59 |
ELSE |
60 |
print *,' In plumes_init_vars: Read from restart ' |
61 |
|
62 |
C-- Read plumes package state variables from pickup file |
63 |
call plumes_read_pickup( nIter0, myThid ) |
64 |
|
65 |
ENDIF |
66 |
|
67 |
return |
68 |
end |