/[MITgcm]/MITgcm/pkg/profiles/profiles_inloop.F
ViewVC logotype

Contents of /MITgcm/pkg/profiles/profiles_inloop.F

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


Revision 1.16 - (show annotations) (download)
Thu Aug 6 15:48:20 2015 UTC (8 years, 10 months ago) by gforget
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65o, HEAD
Changes since 1.15: +2 -1 lines
- PROFILES_SIZE.h (new): array size settings (previously in profiles.h).
- profiles.h: remove array size setings (now in PROFILES_SIZE.h)
- add includes of PROFILES_SIZE.h

1 C $Header: /u/gcmpack/MITgcm/pkg/profiles/profiles_inloop.F,v 1.15 2015/07/28 01:00:39 gforget Exp $
2 C $Name: $
3
4 #include "PROFILES_OPTIONS.h"
5 #ifdef ALLOW_CTRL
6 # include "CTRL_OPTIONS.h"
7 #endif
8
9 C o==========================================================o
10 C | subroutine profiles_inloop |
11 C | o computes and writes model counterparts |
12 C | for netcdf profiles data |
13 C | started: Gael Forget 15-March-2006 |
14 C o==========================================================o
15
16 SUBROUTINE profiles_inloop(mytime,myThid )
17
18 implicit none
19
20
21 C ==================== Global Variables ===========================
22 #include "EEPARAMS.h"
23 #include "SIZE.h"
24 #include "GRID.h"
25 #include "DYNVARS.h"
26 #include "PARAMS.h"
27 #ifdef ALLOW_CAL
28 #include "cal.h"
29 #endif
30 #ifdef ALLOW_CTRL
31 #include "optim.h"
32 #endif
33 #ifdef ALLOW_PROFILES
34 # include "PROFILES_SIZE.h"
35 # include "profiles.h"
36 # include "netcdf.inc"
37 #endif
38 C ==================== Routine Variables ==========================
39
40 _RL mytime
41 integer myThid
42
43 #ifdef ALLOW_PROFILES
44
45 C ==================== Local Variables ==========================
46 integer k,bi,bj,prof_num, num_file, num_var
47 _RL prof_traj1D(NLEVELMAX),prof_mask1D(NLEVELMAX)
48 integer prof_i1D(NUM_INTERP_POINTS),prof_j1D(NUM_INTERP_POINTS)
49 _RL prof_w1D(NUM_INTERP_POINTS)
50 #ifndef ALLOW_CTRL
51 integer optimcycle
52 #endif
53
54 c == end of interface ==
55
56 #ifndef ALLOW_CTRL
57 optimcycle = 0
58 #endif
59
60 _BEGIN_MASTER( mythid )
61
62 DO bj=1,nSy
63 DO bi=1,nSx
64
65 do num_file=1,NFILESPROFMAX
66 do prof_num=1,NOBSGLOB
67 if (prof_num.LE.ProfNo(num_file,bi,bj)) then
68 if ((prof_time(num_file,prof_num,bi,bj).GE.mytime).AND.
69 & (prof_time(num_file,prof_num,bi,bj).LT.(mytime+deltaTclock)))
70 & then
71
72 do k=1,NUM_INTERP_POINTS
73 prof_i1D(k)= prof_interp_i(num_file,prof_num,k,bi,bj)
74 prof_j1D(k)= prof_interp_j(num_file,prof_num,k,bi,bj)
75 prof_w1D(k)= prof_interp_weights(num_file,prof_num,k,bi,bj)
76 enddo
77
78 do num_var=1,NVARMAX
79 do k=1,NLEVELMAX
80 prof_traj1D(k)=0
81 prof_mask1D(k)=0
82 enddo
83 if (vec_quantities(num_file,num_var,bi,bj).EQV..TRUE.) then
84 call profiles_interp(prof_traj1D,
85 & prof_i1D,prof_j1D,prof_w1D,
86 & prof_namesmod(num_file,num_var),
87 & prof_itracer(num_file,num_var),
88 & num_file,mytime,bi,bj,myThid)
89 do k=1,NLEVELMAX
90 prof_traj1D(k)=prof_traj1D(k)*
91 & prof_facmod(num_file,num_var)
92 enddo
93 call active_write_profile(num_file,
94 & ProfDepthNo(num_file,bi,bj),prof_traj1D,num_var,
95 & prof_num,optimcycle,bi,bj,mythid,
96 & profiles_dummy(num_file,num_var,bi,bj))
97 endif
98 enddo
99
100 endif !if ((prof_time...
101 endif !if (ProfNo(num_file,bi,bj).NE.0) then
102 enddo !do prof_num...
103 enddo !do num_file=1,NFILESPROFMAX
104 ENDDO
105 ENDDO
106
107 _END_MASTER( mythid )
108
109 #endif
110
111 END
112

  ViewVC Help
Powered by ViewVC 1.1.22