/[MITgcm]/MITgcm_contrib/ocean_inversion_project/code/ptracers_read_mask.F
ViewVC logotype

Annotation of /MITgcm_contrib/ocean_inversion_project/code/ptracers_read_mask.F

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


Revision 1.1 - (hide annotations) (download)
Thu Sep 18 02:33:38 2003 UTC (21 years, 10 months ago) by dimitri
Branch: MAIN
Modifications and input files needed to compute tracer
Green's functions for Gruber's ocean inversion project.

1 dimitri 1.1 C $Header: $
2     C $Name: $
3    
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: PTRACERS_READ_MASK
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE PTRACERS_READ_MASK( myThid )
11    
12     C !DESCRIPTION:
13     C Initialize pTracerMasks
14     cdm This file is customized to compute CO2 perturbations from 30 ocean
15     cdm regions for Gruber's ocean inversion project.
16    
17     C !USES: ===============================================================
18     IMPLICIT NONE
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "GRID.h"
23     #include "PTRACERS.h"
24    
25     C !INPUT PARAMETERS: ===================================================
26     C myThid :: thread number
27     INTEGER myThid
28    
29     C !OUTPUT PARAMETERS: ==================================================
30     C none
31    
32     #ifdef ALLOW_PTRACERS
33    
34     C !LOCAL VARIABLES: ====================================================
35     character*(80) infile
36     INTEGER i, j, bi, bj, icount
37     INTEGER iTracer, filePrec, interp_method
38     INTEGER ndyetrac , imt , jmt
39     PARAMETER (ndyetrac=30, imt= 96, jmt=40)
40     REAL*4 lon(imt), lat(jmt)
41     _RL arrayout(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nsx,nsy)
42     _RL lon0 , lon_inc , lat0
43     PARAMETER (lon0=1.875, lon_inc=3.75, lat0=-87.275)
44     _RL lat_inc(jmt-1)
45     DATA lat_inc /
46     & 4.9720,4.4770,4.4590,4.4520,4.4490,4.4490,4.4470,4.4460,
47     & 4.4470,4.4460,4.4450,4.4460,4.4460,4.4450,4.4450,4.4460,
48     & 4.4450,4.4452,4.4452,4.4452,4.4452,4.4452,4.4450,4.4460,
49     & 4.4450,4.4450,4.4460,4.4460,4.4450,4.4460,4.4470,4.4460,
50     & 4.4470,4.4490,4.4490,4.4520,4.4590,4.4770,4.9720 /
51     CEOP
52    
53     C==== Use exf_interp to read-in mask
54     infile = '30reg_regionmask.bin'
55     filePrec = 32
56     interp_method = 1
57     do iTracer=1,ndyetrac
58     call exf_interp( infile, filePrec
59     & , arrayout, iTracer, xC, yC
60     & , lon0, lon_inc, lat0, lat_inc
61     & , imt, jmt, interp_method, mythid
62     & )
63     _EXCH_XY_R4( arrayout, myThid )
64     do bj = mybylo(mythid), mybyhi(mythid)
65     do bi = mybxlo(mythid), mybxhi(mythid)
66     do j=1-OLy,sny+OLy
67     do i=1-OLx,snx+OLx
68     if (arrayout(i,j,bi,bj) .gt. 0.5) then
69     pTracerMasks(i,j,iTracer,bi,bj) = 1
70     else
71     pTracerMasks(i,j,iTracer,bi,bj) = 0
72     endif
73     cdb write(10,*),iTracer,i,j,pTracerMasks(i,j,iTracer,bi,bj)
74     enddo
75     enddo
76     enddo
77     enddo
78     enddo
79    
80     C==== Check that a region is not included in two separate masks
81     do bj = mybylo(mythid), mybyhi(mythid)
82     do bi = mybxlo(mythid), mybxhi(mythid)
83     do j=1-OLy,sny+OLy
84     do i=1-OLx,snx+OLx
85     icount = 0
86     do iTracer=1,ndyetrac
87     icount = icount + pTracerMasks(i,j,iTracer,bi,bj)
88     enddo
89     if ( icount .gt. 1 )
90     & stop 'stop in ptracers_read_mask: problem with pTracerMasks'
91     enddo
92     enddo
93     enddo
94     enddo
95    
96     #endif /* ALLOW_PTRACERS */
97    
98     RETURN
99     END

  ViewVC Help
Powered by ViewVC 1.1.22