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

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

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


Revision 1.12 - (show annotations) (download)
Tue Mar 8 19:54:26 2005 UTC (19 years, 4 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post
Changes since 1.11: +3 -8 lines
Let alarms be set based on model time step

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/fizhi_alarms.F,v 1.11 2004/10/26 01:03:10 molod Exp $
2 C $Name: $
3
4 #include "FIZHI_OPTIONS.h"
5 subroutine fizhi_alarms (nymdb,nhmsb,deltaT)
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
26 _RL deltaT
27
28 c MPI Utilities
29 c -------------
30 #ifdef ALLOW_USE_MPI
31 #include "mpif.h"
32 integer ierror
33 #endif
34 integer myid
35
36 c Physics Frequencies
37 c -------------------
38 integer ndt
39 integer nhmsf, m,n, nd
40 integer ndlw, ndsw, ndturb, ndmoist
41
42 #ifdef ALLOW_USE_MPI
43 call mpi_comm_rank ( mpi_comm_world,myid,ierror )
44 #else
45 myid = 1
46 #endif
47
48 ndt = deltaT
49
50 if( ndt.ne.0 ) then
51
52 C Longwave Radiation Frequency
53 ndlw = 003000
54 C Shortwave Radiation Frequency
55 ndsw = 003000
56
57 c Turbulence
58 c ----------
59 ndturb = 2*int( max(1.0,(300./iabs(ndt)+0.5)/2) ) * iabs(ndt)
60
61 n = 1
62 m = -1
63 nd = ndturb
64 do while ( mod(3*3600,nd).ne.0 )
65 nd = ndturb + 2*n*m*ndt
66 m = -m
67 n = n+1
68 if( nd.lt.ndt ) then
69 if( myid.eq.1 ) then
70 print *
71 print *, 'Turbulence cannot occur with Model Timestep = ',ndt
72 print *
73 endif
74 call my_finalize
75 call my_exit (101)
76 endif
77 enddo
78 ndturb = nhmsf( nd )
79
80 c Moist Processes
81 c ---------------
82 ndmoist = int( 600./iabs(ndt) + 0.5 ) * iabs(ndt)
83
84 n = 1
85 m = -1
86 nd = ndmoist
87 do while ( mod(3*3600,nd).ne.0 )
88 nd = ndmoist + n*m*ndt
89 m = -m
90 n = n+1
91 if( nd.lt.ndt ) then
92 if( myid.eq.1 ) then
93 print *
94 print *, 'Convection cannot occur with Model Timestep = ',ndt
95 print *
96 endif
97 call my_finalize
98 call my_exit (101)
99 endif
100 enddo
101 ndmoist = nhmsf( nd )
102
103 else
104
105 c For NDT = 0, all Alarms set to 1 second
106 c ---------------------------------------
107 C Longwave Radiation Frequency
108 ndlw = 000001
109 C Shortwave Radiation Frequency
110 ndsw = 000001
111 C Turbulence Frequency
112 ndturb = 000001
113 C Moist Processes Frequency
114 ndmoist = 000001
115
116 endif
117
118 c Set Alarm Clocks
119 c ----------------
120
121 call set_alarm ( 'radsw',nymdb,nhmsb,ndsw )
122 call set_alarm ( 'radlw',nymdb,nhmsb,ndlw )
123 call set_alarm ( 'turb' ,nymdb,nhmsb,ndturb )
124 call set_alarm ( 'moist',nymdb,nhmsb,ndmoist )
125 call set_alarm ( 'pnt',nymdb,nhmsb,0 )
126
127 return
128 end

  ViewVC Help
Powered by ViewVC 1.1.22