/[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.3 - (show annotations) (download)
Wed May 5 00:39:21 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint53f_post, checkpoint54a_pre, checkpoint53b_pre, checkpoint52n_post, checkpoint53c_post, checkpoint53d_post, checkpoint54a_post, checkpoint53a_post, checkpoint54, checkpoint53, checkpoint53g_post, checkpoint53b_post, checkpoint53d_pre
Changes since 1.2: +3 -0 lines
 o adding cvs 'Header:' and 'Name:' strings

1 C $Header: $
2 C $Name: $
3
4 subroutine diagnostics_setunits (myThid, chardiag, diagunits)
5 C***********************************************************************
6 C Purpose
7 C -------
8 C Wrapper routine to set the units of an active diagnostic
9 C
10 C Arguments Description
11 C ----------------------
12 C myThid ..... Current Process(or)
13 C chardiag ... Character *8 expression for diag to fill
14 C diagunits .. Character *16 expression for diag units
15 C***********************************************************************
16 implicit none
17 #include "CPP_OPTIONS.h"
18 #include "SIZE.h"
19 #include "diagnostics_SIZE.h"
20 #include "diagnostics.h"
21
22 integer myThid
23 character *8 chardiag
24 character *16 diagunits
25
26 c Local variables
27 c ===============
28 integer n, ndiagnum, ipointer
29
30 C Run through list of active diagnostics to make sure
31 C we are trying to fill a valid diagnostic
32
33 ndiagnum = 0
34 ipointer = 0
35 do n = 1,ndiagt
36 if(chardiag.eq.cdiag(n)) then
37 ndiagnum = n
38 ipointer = idiag(n)
39 endif
40 enddo
41 if( ndiagnum.ne.0 .and. ipointer.ne.0 ) then
42 udiag(ndiagnum)=diagunits
43 else
44 write(6,1000)chardiag
45 endif
46
47 1000 format(' ',' Warning: Trying to set units of diagnostic ',a8,
48 . ' But it is not a valid (or active) name ')
49 return
50 end

  ViewVC Help
Powered by ViewVC 1.1.22