/[MITgcm]/MITgcm/pkg/ebm/ebm_wind_perturb.F
ViewVC logotype

Annotation of /MITgcm/pkg/ebm/ebm_wind_perturb.F

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


Revision 1.2 - (hide annotations) (download)
Fri May 21 21:45:35 2004 UTC (20 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_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, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61l, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +12 -6 lines
o Adjoint for EBM package (needs further testing)
o bug fix for parallel EBM in ebm_zonalmean.F

1 heimbach 1.2 C $Header: /u/gcmpack/MITgcm/pkg/ebm/ebm_wind_perturb.F,v 1.1 2004/05/14 21:10:34 heimbach Exp $
2 heimbach 1.1 C $Name: $
3    
4     #include "EBM_OPTIONS.h"
5    
6     CStartOfInterface
7 heimbach 1.2 SUBROUTINE EBM_WIND_PERTURB( myTime, myIter, myThid )
8 heimbach 1.1 C |==========================================================|
9     C | S/R EBM_WIND_PERTURB |
10     C | o Calculated random wind perturbations. |
11     C |==========================================================|
12     IMPLICIT NONE
13    
14     C == Global data ==
15     #include "SIZE.h"
16     #include "EEPARAMS.h"
17     #include "PARAMS.h"
18     #include "GRID.h"
19     #include "DYNVARS.h"
20     #include "FFIELDS.h"
21     #ifdef ALLOW_EBM
22     # include "EBM.h"
23     #endif
24    
25     C == Routine arguments ==
26 heimbach 1.2 _RL myTime
27     INTEGER myIter
28     INTEGER myThid
29 heimbach 1.1 CEndOfInterface
30    
31     #ifdef ALLOW_EBM
32     # ifdef EBM_WIND_PERT
33    
34     C == Local variables ==
35     C Loop counters
36 heimbach 1.2 INTEGER i, j, bi, bj
37 heimbach 1.1 _RS ya(1-OLy:sNy+OLy), ya2(1-OLy:sNy+OLy)
38     _RS xa(1-OLx:sNx+OLx), xa2(1-OLx:sNx+OLx)
39     _RS y(1-OLy:sNy+OLy), x(1-OLx:sNx+OLx)
40     _RS temp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
41     _RS temp2(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
42     _RS stdev(1-OLy:sNy+OLy)
43     _RS std(1:40)
44     data std /0.030, 0.035, 0.045, 0.053, 0.059, 0.060, 0.056,
45     & 0.048, 0.041, 0.038, 0.034, 0.029, 0.023, 0.018,
46     & 0.016, 0.015, 0.013, 0.011, 0.008, 0.005, 0.005,
47     & 0.005, 0.008, 0.011, 0.014, 0.014, 0.017, 0.019,
48     & 0.023, 0.029, 0.032, 0.038, 0.048, 0.058, 0.065,
49     & 0.067, 0.063, 0.060, 0.062, 0.064 /
50    
51    
52 heimbach 1.2 DO bj=myByLo(myThid),myByHi(myThid)
53     DO bi=myBxLo(myThid),myBxHi(myThid)
54    
55 heimbach 1.1 DO j = 1-OLy, sNy+OLy
56     y(j) = 0.0
57     ya(j) = 0.0
58     ya2(j) = 0.0
59     stdev(j) = 0.0
60     ENDDO
61     DO i = 1-OLx, sNx+OLx
62     x(i) = 0.0
63     xa(i) = 0.0
64     xa2(i) = 0.0
65     ENDDO
66     DO i = 1-OLx, sNx+OLx
67     DO j = 1-OLy, sNy+OLy
68     temp(i,j) = 0.0
69     temp2(i,j) = 0.0
70     ENDDO
71     ENDDO
72     DO j = 1, sNy
73     stdev(j) = std(j)
74     ENDDO
75    
76     cph Generate random numbers
77     cph Need to get this from somewhere!
78     call random_number (temp)
79    
80     C interpolation in first dimension
81     C scaling to get a process with a standard deviation of 1
82     DO j = jMin, jMax
83     DO i = iMin, iMax
84     temp(i,j) = 1.73*(2.0*temp(i,j) - 1.0)
85     ENDDO
86     ENDDO
87    
88     DO j = jMin, jMax
89     DO i = iMin, iMax
90     x(i) = i
91     xa(i) = x(i) - MOD(x(i),10.0)
92     xa2(i) = xa(i)+10.0
93     if ( xa2(i) .gt. sNx+Olx ) then
94     xa2(i) = 0.0
95     endif
96     temp2(i,j) = 0.1*( (x(i)-xa(i))*temp(INT(xa2(i)),j)+
97     & (10.0-x(i)+xa(i))*temp(INT(xa(i)),j) )
98     ENDDO
99     ENDDO
100    
101     C interpolation in second dimension
102     C multiplication with observation zonal wind stress standard deviation
103     C add AR1 process
104     DO i = iMin, iMax
105     DO j = jMin, jMax
106     y(j) = j
107     ya(j) = y(j) - MOD(y(j),6.0)
108     ya2(j) = ya(j)+6.0
109     if ( ya2(j) .gt. sNy+Oly ) then
110     ya2(j) = 0.0
111     endif
112     c time lag correlation coefficient, use 0.75 for temperature timescale,
113     c 0.98 for the momentum timescale.
114     winPert(i,j,bi,bj) = maskW(i,j,k,bi,bj)*
115     & (1.0/1.66)*(0.75*winPert(i,j,bi,bj) +
116     & stdev(j)*(1.0/6.0)*
117     & ((y(j)-ya(j))*temp2(i,INT(ya2(j)))+
118     & (6.0-y(j)+ya(j))*temp2(i,INT(ya(j)))))
119 heimbach 1.2 ENDDO
120     ENDDO
121    
122 heimbach 1.1 ENDDO
123     ENDDO
124    
125     C CALL PLOT_FIELD_XYRS( winPert, 'winPert',1,myThid)
126    
127     _EXCH_XY_R4(winPert , myThid )
128    
129     # endif /* EBM_WIND_PERT */
130     #endif /* ALLOW_EBM */
131    
132     end
133    
134    

  ViewVC Help
Powered by ViewVC 1.1.22