/[MITgcm]/MITgcm/pkg/ptracers/ptracers_mnc_init.F
ViewVC logotype

Annotation of /MITgcm/pkg/ptracers/ptracers_mnc_init.F

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


Revision 1.3 - (hide annotations) (download)
Thu Sep 23 03:28:42 2004 UTC (19 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint55d_pre, checkpoint55e_post, checkpoint55d_post
Changes since 1.2: +40 -35 lines
 o finish MNC_CW_ADD_VATTR_* cleanup and add 'IF (useMNC) THEN' around
   all current sections of MNC code
   - the following tests compiled & ran with these fixes:
       exp0 global_ocean.90x40x15 aim.5l_cs dic_example hs94.cs-32x32x5

1 edhill 1.3 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_mnc_init.F,v 1.2 2004/09/04 03:08:03 edhill Exp $
2 edhill 1.1 C $Name: $
3    
4     #include "PTRACERS_OPTIONS.h"
5    
6     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7     CBOP
8     C !ROUTINE:
9    
10     C !INTERFACE:
11     SUBROUTINE PTRACERS_MNC_INIT( myThid )
12    
13     C !DESCRIPTION:
14     C Initialize PTRACERS parameters, read in data.ptracers
15    
16     C !USES:
17     IMPLICIT NONE
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PTRACERS_SIZE.h"
21     #include "PTRACERS.h"
22     #include "PARAMS.h"
23 edhill 1.3 #ifdef ALLOW_MNC
24     #include "MNC_PARAMS.h"
25     #endif
26 edhill 1.1
27     C !INPUT PARAMETERS:
28     INTEGER myThid
29     CEOP
30    
31     #ifdef ALLOW_PTRACERS
32     #ifdef ALLOW_MNC
33    
34     C !LOCAL VARIABLES:
35 edhill 1.2 INTEGER ii, jj, ilnb
36     character*(80) name
37 edhill 1.1 character*(MAX_LEN_MBUF) msgbuf
38    
39     C Functions
40     integer ILNBLNK
41    
42 edhill 1.3 IF (useMNC) THEN
43     DO ii = 1,PTRACERS_numInUse
44 edhill 1.2
45 edhill 1.3 DO jj = 1,80
46     name(jj:jj) = ' '
47     ENDDO
48    
49     C Create the tracer
50     ilnb = ILNBLNK(PTRACERS_names(ii))
51     IF (ilnb .LT. 1) THEN
52     write(msgbuf,'(2a,i3,2a)') 'PTRACERS_MNC_INIT ERROR: ',
53     & 'PTRACERS_names(',ii,') is blank--please name it in',
54     & ' ''data.ptracers'''
55     CALL print_error(msgbuf, mythid)
56     stop 'ABNORMAL END: S/R PTRACERS_MNC_INIT'
57     ENDIF
58     CALL MNC_CW_ADD_VNAME(
59     & PTRACERS_names(ii),'Cen_xy_Hn__C__t',4,5,myThid)
60     WRITE(name,'(a,a)') 'surf_',PTRACERS_names(ii)(1:ilnb)
61     CALL MNC_CW_ADD_VNAME(name,'Cen_xy_Hn__-__t',3,4,myThid)
62    
63     C Add the long_name attribute if its defined
64     ilnb = ILNBLNK(PTRACERS_long_names(ii))
65     IF (ilnb .GT. 0) THEN
66     CALL MNC_CW_ADD_VATTR_TEXT(PTRACERS_names(ii),
67     & 'long_name',PTRACERS_long_names(ii),myThid)
68     ENDIF
69    
70     C Add the units attribute if its defined
71     ilnb = ILNBLNK(PTRACERS_units(ii))
72     IF (ilnb .GT. 0) THEN
73     CALL MNC_CW_ADD_VATTR_TEXT(PTRACERS_names(ii),'units',
74     & PTRACERS_units(ii),myThid)
75     ENDIF
76    
77 edhill 1.2 ENDDO
78 edhill 1.3
79     ENDIF
80 edhill 1.1 #endif /* ALLOW_MNC */
81     #endif /* ALLOW_PTRACERS */
82    
83     RETURN
84     END
85    

  ViewVC Help
Powered by ViewVC 1.1.22