/[MITgcm]/MITgcm/pkg/diagnostics/diagnostics_setunits.F
ViewVC logotype

Contents of /MITgcm/pkg/diagnostics/diagnostics_setunits.F

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


Revision 1.6 - (show annotations) (download)
Mon Dec 13 21:55:48 2004 UTC (19 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57f_post, checkpoint57b_post, checkpoint57f_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57c_pre, checkpoint57i_post, checkpoint57g_pre, checkpoint57e_post, checkpoint57h_post, checkpoint57h_done, eckpoint57e_pre, checkpoint57h_pre, checkpoint57c_post
Changes since 1.5: +3 -3 lines
new S/R diagnostics_fill (replace fill_diagnostics):
 * look through the short list of active diag. (instead of through the long
   list of all available diagnostics) ;
 * create function DIAGNOSTICS_IS_ON to tell if a diagnostics is active

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_setunits.F,v 1.5 2004/07/07 03:10:15 edhill Exp $
2 C $Name: $
3
4 #include "DIAG_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: DIAGNOSTICS_SETUNITS
9
10 C !INTERFACE:
11 SUBROUTINE DIAGNOSTICS_SETUNITS (
12 I myThid,
13 I chardiag,
14 I diagunits )
15
16 C !DESCRIPTION:
17 C Wrapper routine to set the units of an active diagnostic
18
19 C !USES:
20 implicit none
21 #include "SIZE.h"
22 #include "DIAGNOSTICS_SIZE.h"
23 #include "DIAGNOSTICS.h"
24
25 C !INPUT PARAMETERS:
26 integer myThid
27 character*8 chardiag
28 character*16 diagunits
29 CEOP
30
31 C Local variables
32 integer n, ndiagnum, ipointer
33
34 C Run through list of active diagnostics to make sure
35 C we are trying to fill a valid diagnostic
36
37 ndiagnum = 0
38 ipointer = 0
39 do n = 1,ndiagt
40 if(chardiag.eq.cdiag(n)) then
41 ndiagnum = n
42 ipointer = idiag(n)
43 endif
44 enddo
45 if( ndiagnum.ne.0 .and. ipointer.ne.0 ) then
46 udiag(ndiagnum)=diagunits
47 else
48 write(6,1000)chardiag
49 endif
50
51 1000 format(' ',' Warning: Trying to set units of diagnostic ',a8,
52 & ' But it is not a valid (or active) name ')
53
54 return
55 end

  ViewVC Help
Powered by ViewVC 1.1.22