/[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.5 - (show annotations) (download)
Wed Jul 7 03:10:15 2004 UTC (19 years, 11 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint55d_pre, checkpoint55j_post, checkpoint56b_post, checkpoint55h_post, checkpoint54b_post, checkpoint54d_post, checkpoint56c_post, checkpoint54e_post, checkpoint55b_post, checkpoint55, checkpoint55a_post, checkpoint57a_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint54f_post, checkpoint55e_post, checkpoint54c_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.4: +32 -28 lines
 o more protex-ing
 o numerous formatting cleanups

1 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_setunits.F,v 1.4 2004/07/06 03:55:53 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