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

Contents of /MITgcm/pkg/ebm/ebm_forcing_surf.F

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


Revision 1.5 - (show annotations) (download)
Sat Apr 9 21:22:44 2005 UTC (19 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint58l_post, checkpoint57o_post, checkpoint57m_post, checkpoint58e_post, checkpoint57v_post, checkpoint57s_post, checkpoint57j_post, checkpoint58b_post, checkpoint58m_post, checkpoint57k_post, checkpoint57g_post, checkpoint58u_post, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint58g_post, checkpoint57x_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint58h_post, checkpoint58w_post, checkpoint58j_post, checkpoint57h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint59e, checkpoint59d, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57h_done, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58t_post, checkpoint57h_pre, checkpoint57l_post
Changes since 1.4: +3 -3 lines
fix lambdaSaltClimRelax (became a 2D array)

1 C $Header: /u/gcmpack/MITgcm/pkg/ebm/ebm_forcing_surf.F,v 1.4 2004/07/18 01:06:31 jmc Exp $
2 C $Name: $
3
4 #include "EBM_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: EBM_FORCING_SURF
8 C !INTERFACE:
9 SUBROUTINE EBM_FORCING_SURF(
10 I bi, bj, iMin, iMax, jMin, jMax,
11 I myTime, myIter, myThid )
12 C !DESCRIPTION: \bv
13 C *==========================================================*
14 C | SUBROUTINE EBM_FORCING_SURF
15 C | o Determines forcing terms based on external fields
16 C | relaxation terms etc.
17 C *==========================================================*
18 C \ev
19
20 C !USES:
21 IMPLICIT NONE
22 C === Global variables ===
23 #include "SIZE.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26 #include "FFIELDS.h"
27 #include "DYNVARS.h"
28 #include "GRID.h"
29 #include "SURFACE.h"
30 #ifdef ALLOW_EBM
31 #include "EBM.h"
32 #endif
33
34 C !INPUT/OUTPUT PARAMETERS:
35 C === Routine arguments ===
36 C myTime - Current time in simulation
37 C myIter - Current iteration number in simulation
38 C myThid :: Thread no. that called this routine.
39 _RL myTime
40 INTEGER myIter
41 INTEGER myThid
42 INTEGER bi,bj
43 INTEGER iMin, iMax
44 INTEGER jMin, jMax
45
46 #ifdef ALLOW_EBM
47
48 C !LOCAL VARIABLES:
49 C === Local variables ===
50 INTEGER i,j
51 C number of surface interface layer
52 INTEGER kSurface
53 CEOP
54
55 if ( buoyancyRelation .eq. 'OCEANICP' ) then
56 kSurface = Nr
57 else
58 kSurface = 1
59 endif
60
61 C-- Surface Fluxes :
62
63 DO j = jMin, jMax
64 DO i = iMin, iMax
65
66 c Zonal wind stress fu:
67 surfaceForcingU(i,j,bi,bj) =
68 & fu(i,j,bi,bj)*horiVertRatio*recip_rhoConst
69 & + winPert(i,j,bi,bj)
70 & *drF(kSurface)*hFacW(i,j,kSurface,bi,bj)
71 c Meridional wind stress fv:
72 surfaceForcingV(i,j,bi,bj) =
73 & fv(i,j,bi,bj)*horiVertRatio*recip_rhoConst
74 c Net heat flux Qnet:
75 surfaceForcingT(i,j,bi,bj) =
76 & -Qnet(i,j,bi,bj)*recip_Cp*horiVertRatio*recip_rhoConst
77 & -lambdaThetaZonRelax*maskC(i,j,kSurface,bi,bj)*
78 & (theta(i,j,kSurface,bi,bj)-ZonalMeanSST(j,bj))
79 & *drF(kSurface)*hFacC(i,j,kSurface,bi,bj)
80
81 C Net Salt Flux :
82 surfaceForcingS(i,j,bi,bj) =
83 & EmPmR(i,j,bi,bj)*convertFW2Salt*convertEmP2rUnit
84 & +Run(i,j,bi,bj)*scale_runoff
85 & *convertFW2Salt*convertEmP2rUnit
86 & -lambdaSaltClimRelax(i,j,bi,bj)*maskC(i,j,kSurface,bi,bj)
87 & *(salt(i,j,kSurface,bi,bj)-SSS(i,j,bi,bj))
88 & *drF(kSurface)*hFacC(i,j,kSurface,bi,bj)
89
90 ENDDO
91 ENDDO
92
93 #endif /* ALLOW_EBM */
94
95
96 RETURN
97 END

  ViewVC Help
Powered by ViewVC 1.1.22