/[MITgcm]/MITgcm/pkg/fizhi/fizhi_alarms.F
ViewVC logotype

Annotation of /MITgcm/pkg/fizhi/fizhi_alarms.F

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


Revision 1.7 - (hide annotations) (download)
Wed Jul 28 01:25:07 2004 UTC (19 years, 10 months ago) by molod
Branch: MAIN
Changes since 1.6: +2 -1 lines
debugging

1 molod 1.7 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_alarms.F,v 1.6 2004/07/26 18:45:17 molod Exp $
2 molod 1.2 C $Name: $
3    
4 molod 1.6 #include "FIZHI_OPTIONS.h"
5 molod 1.1 subroutine fizhi_alarms (nymdb,nhmsb,ndt)
6    
7     C***********************************************************************
8     C Purpose
9     C -------
10     C Driver to Set Internal Model Alarms
11     C
12     C Argument Description
13     C --------------------
14     C nymdb ..... Begining Date to Start Alarm Clock
15     C nhmsb ..... Begining Time to Start Alarm Clock
16     C ndt ....... Model Timestep
17     C
18     C Note: For ndt = 0, all Intermal Model Alarms are set to 1 second
19     C
20     C***********************************************************************
21     implicit none
22    
23     c Input Parameters
24     c ----------------
25     integer nymdb,nhmsb,ndt
26    
27     c MPI Utilities
28     c -------------
29     #ifdef ALLOW_USE_MPI
30 molod 1.5 #include "mpif.h"
31     integer ierror
32 molod 1.1 #endif
33 molod 1.5 integer myid
34 molod 1.1
35     c Physics Frequencies
36     c -------------------
37     integer nhmsf, m,n, nd
38     integer ndlw, ndsw, ndturb, ndmoist
39    
40     #ifdef ALLOW_USE_MPI
41     call mpi_comm_rank ( mpi_comm_world,myid,ierror )
42     #else
43 molod 1.3 myid = 1
44 molod 1.1 #endif
45     if( ndt.ne.0 ) then
46    
47 molod 1.4 C Longwave Radiation Frequency
48     ndlw = 030000
49     C Shortwave Radiation Frequency
50     ndsw = 010000
51 molod 1.1
52     c Turbulence
53     c ----------
54     ndturb = 2*int( max(1.0,(300./iabs(ndt)+0.5)/2) ) * iabs(ndt)
55    
56     n = 1
57     m = -1
58     nd = ndturb
59     do while ( mod(3*3600,nd).ne.0 )
60     nd = ndturb + 2*n*m*ndt
61     m = -m
62     n = n+1
63     if( nd.lt.ndt ) then
64 molod 1.3 if( myid.eq.1 ) then
65 molod 1.1 print *
66     print *, 'Turbulence cannot occur with Model Timestep = ',ndt
67     print *
68     endif
69     call my_finalize
70     call my_exit (101)
71     endif
72     enddo
73     ndturb = nhmsf( nd )
74    
75     c Moist Processes
76     c ---------------
77     ndmoist = int( 600./iabs(ndt) + 0.5 ) * iabs(ndt)
78    
79     n = 1
80     m = -1
81     nd = ndmoist
82     do while ( mod(3*3600,nd).ne.0 )
83     nd = ndmoist + n*m*ndt
84     m = -m
85     n = n+1
86     if( nd.lt.ndt ) then
87 molod 1.3 if( myid.eq.1 ) then
88 molod 1.1 print *
89     print *, 'Convection cannot occur with Model Timestep = ',ndt
90     print *
91     endif
92     call my_finalize
93     call my_exit (101)
94     endif
95     enddo
96     ndmoist = nhmsf( nd )
97    
98     else
99    
100     c For NDT = 0, all Alarms set to 1 second
101     c ---------------------------------------
102 molod 1.4 C Longwave Radiation Frequency
103     ndlw = 000001
104     C Shortwave Radiation Frequency
105     ndsw = 000001
106     C Turbulence Frequency
107     ndturb = 000001
108     C Moist Processes Frequency
109     ndmoist = 000001
110 molod 1.1
111     endif
112    
113     c Set Alarm Clocks
114     c ----------------
115     call set_alarm ( 'radsw',nymdb,nhmsb,ndsw )
116     call set_alarm ( 'radlw',nymdb,nhmsb,ndlw )
117     call set_alarm ( 'turb' ,nymdb,nhmsb,ndturb )
118     call set_alarm ( 'moist',nymdb,nhmsb,ndmoist )
119 molod 1.7 call set_alarm ( 'pnt',nymdb,nhmsb,0 )
120 molod 1.1
121     return
122     end

  ViewVC Help
Powered by ViewVC 1.1.22