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

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

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


Revision 1.7 - (hide annotations) (download)
Sun Jun 26 16:51:49 2005 UTC (18 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint57m_post, checkpoint57v_post, checkpoint57s_post, checkpoint57j_post, checkpoint57k_post, checkpoint57y_post, checkpoint57x_post, checkpoint57y_pre, checkpoint57r_post, checkpoint58, checkpoint57n_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, checkpoint57z_post, checkpoint57l_post
Changes since 1.6: +2 -2 lines
change pointers so that 1 diag. can be used several times (with # freq.)

1 jmc 1.7 C $Header: /u/gcmpack/MITgcm/pkg/diagnostics/diagnostics_setunits.F,v 1.6 2004/12/13 21:55:48 jmc Exp $
2 edhill 1.3 C $Name: $
3    
4 edhill 1.4 #include "DIAG_OPTIONS.h"
5    
6 edhill 1.5 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 molod 1.1 implicit none
21     #include "SIZE.h"
22 jmc 1.6 #include "DIAGNOSTICS_SIZE.h"
23     #include "DIAGNOSTICS.h"
24 molod 1.1
25 edhill 1.5 C !INPUT PARAMETERS:
26 molod 1.1 integer myThid
27 edhill 1.5 character*8 chardiag
28     character*16 diagunits
29     CEOP
30 molod 1.1
31 edhill 1.5 C Local variables
32 molod 1.1 integer n, ndiagnum, ipointer
33    
34 edhill 1.5 C Run through list of active diagnostics to make sure
35     C we are trying to fill a valid diagnostic
36    
37 molod 1.1 ndiagnum = 0
38     ipointer = 0
39     do n = 1,ndiagt
40 edhill 1.5 if(chardiag.eq.cdiag(n)) then
41     ndiagnum = n
42 jmc 1.7 c ipointer = idiag(n)
43 edhill 1.5 endif
44 molod 1.1 enddo
45     if( ndiagnum.ne.0 .and. ipointer.ne.0 ) then
46 edhill 1.5 udiag(ndiagnum)=diagunits
47 molod 1.1 else
48 edhill 1.5 write(6,1000)chardiag
49 molod 1.1 endif
50 edhill 1.5
51     1000 format(' ',' Warning: Trying to set units of diagnostic ',a8,
52     & ' But it is not a valid (or active) name ')
53 molod 1.1
54     return
55     end

  ViewVC Help
Powered by ViewVC 1.1.22