1 |
edhill |
1.1 |
C $Header: $ |
2 |
|
|
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 |
|
|
|
24 |
|
|
C !INPUT PARAMETERS: |
25 |
|
|
INTEGER myThid |
26 |
|
|
CEOP |
27 |
|
|
|
28 |
|
|
#ifdef ALLOW_PTRACERS |
29 |
|
|
#ifdef ALLOW_MNC |
30 |
|
|
|
31 |
|
|
C !LOCAL VARIABLES: |
32 |
|
|
INTEGER ii, ilnb |
33 |
|
|
character*(MAX_LEN_MBUF) msgbuf |
34 |
|
|
|
35 |
|
|
C Functions |
36 |
|
|
integer ILNBLNK |
37 |
|
|
|
38 |
|
|
DO ii=1,PTRACERS_numInUse |
39 |
|
|
|
40 |
|
|
C Create the tracer |
41 |
|
|
ilnb = ILNBLNK(PTRACERS_names(ii)) |
42 |
|
|
IF (ilnb .LT. 1) THEN |
43 |
|
|
write(msgbuf,'(2a,i3,2a)') 'PTRACERS_MNC_INIT ERROR: ', |
44 |
|
|
& 'PTRACERS_names(',ii,') is blank--please name it in', |
45 |
|
|
& ' ''data.ptracers''' |
46 |
|
|
CALL print_error(msgbuf, mythid) |
47 |
|
|
stop 'ABNORMAL END: S/R PTRACERS_MNC_INIT' |
48 |
|
|
ENDIF |
49 |
|
|
CALL MNC_CW_ADD_VNAME( |
50 |
|
|
& PTRACERS_names(ii),'Cen_xy_Hn__C__t',4,5,myThid) |
51 |
|
|
|
52 |
|
|
C Add the long_name attribute if its defined |
53 |
|
|
ilnb = ILNBLNK(PTRACERS_long_names(ii)) |
54 |
|
|
IF (ilnb .GT. 0) THEN |
55 |
|
|
CALL MNC_CW_ADD_VATTR_TEXT(PTRACERS_names(ii),1,'long_name', |
56 |
|
|
& PTRACERS_long_names(ii),myThid) |
57 |
|
|
ENDIF |
58 |
|
|
|
59 |
|
|
C Add the units attribute if its defined |
60 |
|
|
ilnb = ILNBLNK(PTRACERS_units(ii)) |
61 |
|
|
IF (ilnb .GT. 0) THEN |
62 |
|
|
CALL MNC_CW_ADD_VATTR_TEXT(PTRACERS_names(ii),1,'units', |
63 |
|
|
& PTRACERS_units(ii),myThid) |
64 |
|
|
ENDIF |
65 |
|
|
|
66 |
|
|
ENDDO |
67 |
|
|
|
68 |
|
|
#endif /* ALLOW_MNC */ |
69 |
|
|
#endif /* ALLOW_PTRACERS */ |
70 |
|
|
|
71 |
|
|
RETURN |
72 |
|
|
END |
73 |
|
|
|