/[MITgcm]/MITgcm_contrib/ocean_inversion_project/code_ecco1x1/ptracers_init.F_gasflux
ViewVC logotype

Contents of /MITgcm_contrib/ocean_inversion_project/code_ecco1x1/ptracers_init.F_gasflux

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Fri Mar 17 15:39:02 2006 UTC (18 years, 2 months ago) by dimitri
Branch: MAIN
CVS Tags: HEAD
Set-up computation of tracer Green functions with constant surface
forcing for Nir Krakauer's paper.

1 C $Header: /u/gcmpack/MITgcm_contrib/ocean_inversion_project/code_ecco1x1/ptracers_init.F,v 1.1 2004/10/06 20:26:55 dimitri Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_INIT
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_INIT( myThid )
11
12 C !DESCRIPTION:
13 C Initialize PTRACERS data structures
14 C This file is customized to compute CO2 perturbations from
15 C 30 ocean regions for Gruber's ocean inversion project.
16
17 C !USES: ===============================================================
18 IMPLICIT NONE
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "EESUPPORT.h"
22 #include "PARAMS.h"
23 #include "GRID.h"
24 #include "PTRACERS.h"
25
26
27 C !INPUT PARAMETERS: ===================================================
28 C myThid :: thread number
29 INTEGER myThid
30
31 C !OUTPUT PARAMETERS: ==================================================
32 C none
33
34 #ifdef ALLOW_PTRACERS
35
36 C !LOCAL VARIABLES: ====================================================
37 C i,j,k,bi,bj,iTracer :: loop indices
38 INTEGER i,j,k,bi,bj,iTracer,iMonth,iUnit,iRec
39 CHARACTER*(10) suff
40 _RL SumPtracer
41
42 #ifdef OCEAN_INVERSION_NETCDF
43 Real*8 global(Nx,Ny)
44 _RL local(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
45 Real lon(Nx,Ny),bounds_lon(Nx,Ny,2,2)
46 Real lat(Nx,Ny),bounds_lat(Nx,Ny,2,2)
47 Real depth(Nr),bounds_depth(Nr,2)
48 Real MASK(Nx,Ny,Nr)
49 Real AREA(Nx,Ny)
50 Real BATHY(Nx,Ny)
51 Real REGION_MASK(Nx,Ny,PTRACERS_num)
52 Real REGION_AREA(PTRACERS_num)
53 #endif /* OCEAN_INVERSION_NETCDF */
54
55 CEOP
56
57 C Loop over tracers
58 DO iTracer = 1, PTRACERS_num
59
60 C Loop over tiles
61 DO bj = myByLo(myThid), myByHi(myThid)
62 DO bi = myBxLo(myThid), myBxHi(myThid)
63
64 C Initialize arrays in common blocks :
65 DO k=1,Nr
66 DO j=1-Oly,sNy+OLy
67 DO i=1-Olx,sNx+Olx
68 pTracer(i,j,k,bi,bj,iTracer) = 0. _d 0
69 gPtr(i,j,k,bi,bj,iTracer) = 0. _d 0
70 gPtrNM1(i,j,k,bi,bj,iTracer) = 0. _d 0
71 ENDDO
72 ENDDO
73 ENDDO
74 DO j=1-Oly,sNy+OLy
75 DO i=1-Olx,sNx+Olx
76 surfaceTendencyPtr(i,j,bi,bj,iTracer) = 0. _d 0
77 ENDDO
78 ENDDO
79
80 C end bi,bj loops
81 ENDDO
82 ENDDO
83
84 C end of Tracer loop
85 ENDDO
86
87 C Read from a pickup file if nIter0 is not zero
88 IF (nIter0.NE.0) THEN
89 C-- Suffix for pickup files
90 IF (pickupSuff.EQ.' ') THEN
91 WRITE(suff,'(I10.10)') nIter0
92 ELSE
93 WRITE(suff,'(A10)') pickupSuff
94 ENDIF
95 CALL PTRACERS_READ_CHECKPOINT( nIter0,myThid )
96 ENDIF
97
98 C Initialize pTracerMasks
99 CALL PTRACERS_READ_MASK ( mythid )
100
101 #endif /* ALLOW_PTRACERS */
102
103 RETURN
104 END

  ViewVC Help
Powered by ViewVC 1.1.22