/[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.4 - (show annotations) (download)
Tue Jul 6 03:55:53 2004 UTC (19 years, 11 months ago) by edhill
Branch: MAIN
Changes since 1.3: +3 -2 lines
 o prepare diagnostics for MNC/NetCDF output
   - add Nrphys to MNC
   - encode KDIAG within GDIAG
   - add use_mdsio and use_mnc flags to data.diagnostics
   - start converting diagnostics to Protex format
   - mdsio-based output for hs94.cs-32x32x5 is *identical*

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

  ViewVC Help
Powered by ViewVC 1.1.22