/[MITgcm]/MITgcm/model/src/calc_buoyancy.F
ViewVC logotype

Contents of /MITgcm/model/src/calc_buoyancy.F

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


Revision 1.8 - (show annotations) (download)
Wed Sep 25 19:36:50 2002 UTC (21 years, 7 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47e_post, checkpoint57m_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint46l_post, checkpoint57g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint57s_post, checkpoint58b_post, checkpoint57b_post, checkpoint52d_pre, checkpoint57g_post, checkpoint48e_post, checkpoint56b_post, checkpoint50g_post, checkpoint57y_post, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint48c_post, checkpoint54e_post, checkpoint62c, checkpoint51l_post, checkpoint48i_post, checkpoint57r_post, checkpoint46l_pre, checkpoint57d_post, checkpoint57i_post, checkpoint50d_pre, checkpoint52k_post, checkpoint59, checkpoint58, checkpoint55, checkpoint54, checkpoint57, checkpoint56, checkpoint51, checkpoint53, checkpoint52, checkpoint50d_post, checkpoint58f_post, checkpoint52f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58a_post, checkpoint50b_pre, checkpoint57z_post, checkpoint54f_post, checkpoint51f_post, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint48b_post, checkpoint62i, checkpoint62h, checkpoint58y_post, checkpoint51d_post, checkpoint48c_pre, checkpoint55a_post, checkpoint51t_post, checkpoint58t_post, checkpoint51n_post, checkpoint55i_post, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, checkpoint57h_post, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint57t_post, checkpoint55c_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, checkpoint52e_pre, checkpoint57v_post, checkpoint57f_post, checkpoint52e_post, checkpoint51n_pre, checkpoint47d_post, checkpoint53d_post, checkpoint60, checkpoint61, checkpoint62, checkpoint57a_post, checkpoint48d_post, checkpoint57h_pre, checkpoint57x_post, checkpoint48f_post, checkpoint52b_pre, checkpoint54b_post, checkpoint46j_pre, checkpoint58w_post, checkpoint51l_pre, checkpoint52m_post, checkpoint57y_pre, checkpoint55g_post, checkpoint48h_post, checkpoint51q_post, checkpoint51b_pre, checkpoint47g_post, checkpoint52b_post, checkpoint52c_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint58o_post, checkpoint52h_pre, checkpoint57c_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, hrcube_1, checkpoint58p_post, checkpoint58q_post, checkpoint52f_pre, checkpoint55d_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint47a_post, checkpoint53c_post, checkpoint55d_pre, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, branchpoint-genmake2, checkpoint54a_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint51i_post, checkpoint57e_post, checkpoint55b_post, checkpoint51b_post, checkpoint53a_post, checkpoint47b_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint52d_post, checkpoint53g_post, checkpoint46m_post, checkpoint57p_post, checkpint57u_post, checkpoint50c_pre, checkpoint57q_post, eckpoint57e_pre, checkpoint51c_post, checkpoint58k_post, checkpoint52a_pre, checkpoint62b, checkpoint58v_post, checkpoint50h_post, checkpoint52i_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint48a_post, checkpoint56a_post, checkpoint58l_post, checkpoint53f_post, checkpoint47j_post, checkpoint54a_pre, checkpoint53b_pre, branch-exfmods-tag, checkpoint57h_done, checkpoint52j_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint57j_post, checkpoint57f_pre, checkpoint62d, checkpoint61f, checkpoint58g_post, branch-netcdf, checkpoint52l_post, checkpoint58x_post, checkpoint61n, checkpoint52n_post, checkpoint59j, checkpoint58h_post, checkpoint56c_post, checkpoint58j_post, checkpoint51e_post, checkpoint57a_pre, checkpoint47d_pre, checkpoint47, checkpoint48, checkpoint49, checkpoint57o_post, checkpoint46h_post, checkpoint51o_post, checkpoint61q, checkpoint50, checkpoint57k_post, checkpoint51f_pre, checkpoint61z, checkpoint53b_post, checkpoint47h_post, checkpoint52a_post, checkpoint57w_post, checkpoint61e, checkpoint58i_post, checkpoint51g_post, ecco_c52_e35, checkpoint50b_post, checkpoint58c_post, checkpoint58u_post, checkpoint51m_post, checkpoint53d_pre, checkpoint58s_post, checkpoint55e_post, checkpoint61g, checkpoint61d, checkpoint54c_post, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint51a_post, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint51p_post, checkpoint48g_post, checkpoint61x, checkpoint61y, checkpoint51u_post
Branch point for: branch-exfmods-curt, branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.7: +13 -2 lines
o cleaned up the use of rhoNil and rhoConst.
  - rhoNil should only appear in the LINEAR equation of state, everywhere
    else rhoNil is replaced by rhoConst, e.g. find_rho computes rho-rhoConst
    and the dynamical equations are all divided by rhoConst
o introduced new parameter rhoConstFresh, a reference density of fresh
  water, to remove the fresh water flux's dependence on rhoNil. The default
  value is 999.8 kg/m^3
o cleanup up external_forcing.F and external_forcing_surf.F
  - can now be used by both OCEANIC and OCEANICP

1 C $Header: /u/gcmpack/MITgcm/model/src/calc_buoyancy.F,v 1.7 2001/02/04 14:38:45 cnh Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE CALC_BUOYANCY(
7 I bi, bj, iMin, iMax, jMin, jMax, k, rhoLoc,
8 O buoy,
9 I myThid )
10
11 C /==========================================================\
12 C | o SUBROUTINE BUOYANCY |
13 C | Calculates buoyancy for an XY slice of a tile. |
14 C |==========================================================|
15 C | |
16 C | k - is the density level |
17 C | |
18 C \==========================================================/
19 IMPLICIT NONE
20
21 C-- == Global data ==
22 #include "SIZE.h"
23 #include "DYNVARS.h"
24 #include "EEPARAMS.h"
25 #include "PARAMS.h"
26
27 C-- == Routine arguments ==
28 INTEGER bi,bj,iMin,iMax,jMin,jMax
29 INTEGER k
30 _RL rhoLoc(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
31 _RL buoy (1-Olx:sNx+Olx,1-Oly:sNy+Oly)
32 INTEGER myThid
33
34 C-- == Local variables ==
35 INTEGER i,j
36
37 IF ( buoyancyRelation .eq. 'ATMOSPHERIC' ) THEN
38
39 DO j=jMin,jMax
40 DO i=iMin,iMax
41 buoy(i,j)=(theta(i,j,k,bi,bj)-tRef(K))/tRef(K)
42 ENDDO
43 ENDDO
44
45 ELSEIF ( buoyancyRelation .eq. 'OCEANIC' ) THEN
46
47 DO j=jMin,jMax
48 DO i=iMin,iMax
49 buoy(i,j)=-Gravity*recip_rhoConst*rholoc(i,j)
50 ENDDO
51 ENDDO
52
53 ELSEIF ( buoyancyRelation .eq. 'OCEANICP' ) THEN
54
55 DO j=jMin,jMax
56 DO i=iMin,iMax
57 if ( rholoc(i,j) .ne. 0. ) then
58 rholoc(i,j) = 1./rholoc(i,j)
59 buoy(i,j)=rholoc(i,j)
60 endif
61 ENDDO
62 ENDDO
63
64 ELSE
65
66 STOP
67 &'CALC_BUOANCY: variable "buoyancyRelation" has an illegal value'
68
69 ENDIF
70
71
72 RETURN
73 END

  ViewVC Help
Powered by ViewVC 1.1.22