| 1 | molod | 1.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 that are on both grids. | 
| 12 |  |  | c   2) For a Restart, read the plumes pickup file | 
| 13 |  |  | c | 
| 14 |  |  | c Calls: dyn2plumes (x4) | 
| 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 |  |  | jdimout = Nyplumes | 
| 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 dyn2plumes(udyntemp,idim1,idim2,jdim1,jdim2,Nr,Nsx,Nsy, | 
| 52 |  |  | .    1,sNx,1,sNy,bi,bj,idimout,jdimout,Nr,Nsx,Nsy,uplume) | 
| 53 |  |  | call dyn2plumes(vdyntemp,idim1,idim2,jdim1,jdim2,Nr,Nsx,Nsy, | 
| 54 |  |  | .    1,sNx,1,sNy,bi,bj,idimout,jdimout,Nr,Nsx,Nsy,vplume) | 
| 55 |  |  | call dyn2plumes(theta,idim1,idim2,jdim1,jdim2,Nr,Nsx,Nsy, | 
| 56 |  |  | .    1,sNx,1,sNy,bi,bj,idimout,jdimout,Nr,Nsx,Nsy,thplume) | 
| 57 |  |  | call dyn2plumes(salt,idim1,idim2,jdim1,jdim2,Nr,Nsx,Nsy, | 
| 58 |  |  | .    1,sNx,1,sNy,bi,bj,idimout,jdimout,Nr,Nsx,Nsy,splume) | 
| 59 |  |  |  | 
| 60 |  |  | enddo | 
| 61 |  |  | enddo | 
| 62 |  |  |  | 
| 63 |  |  | ELSE | 
| 64 |  |  | print *,' In plumes_init_vars: Read from restart ' | 
| 65 |  |  |  | 
| 66 |  |  | C--   Read plumes package state variables from pickup file | 
| 67 |  |  | call plumes_read_pickup( nIter0, myThid ) | 
| 68 |  |  |  | 
| 69 |  |  | ENDIF | 
| 70 |  |  |  | 
| 71 |  |  | return | 
| 72 |  |  | end |