/[MITgcm]/MITgcm/pkg/bulk_force/bulkf_formula.F
ViewVC logotype

Contents of /MITgcm/pkg/bulk_force/bulkf_formula.F

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


Revision 1.1 - (show annotations) (download)
Thu Nov 21 19:11:42 2002 UTC (21 years, 6 months ago) by cheisey
Branch: MAIN
CVS Tags: checkpoint47b_post, checkpoint51f_post, checkpoint48i_post, checkpoint47a_post, checkpoint48d_post, checkpoint50b_post, checkpoint47i_post, checkpoint48g_post, branchpoint-genmake2, checkpoint50c_pre, checkpoint50, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint50f_post, checkpoint50a_post, checkpoint48e_post, checkpoint47c_post, checkpoint50f_pre, checkpoint48b_post, checkpoint47j_post, checkpoint47d_pre, checkpoint50d_pre, checkpoint47h_post, checkpoint51d_post, checkpoint51, checkpoint48c_pre, checkpoint48c_post, checkpoint50d_post, checkpoint47f_post, checkpoint51b_pre, checkpoint50e_post, checkpoint47g_post, checkpoint50h_post, checkpoint50c_post, checkpoint51a_post, checkpoint47d_post, checkpoint50e_pre, checkpoint50b_pre, checkpoint48d_pre, checkpoint50i_post, checkpoint51e_post, checkpoint51b_post, checkpoint48a_post, checkpoint51h_pre, checkpoint48f_post, checkpoint51i_pre, checkpoint50g_post, checkpoint51c_post, checkpoint51g_post, checkpoint48, checkpoint49, checkpoint51f_pre, checkpoint48h_post
Branch point for: branch-genmake2, branch-exfmods-curt
Two packages:  bulk_force (Bulk forcing)
and therm_seaice (thermodynamic_seaice) - adopted from LANL CICE.v2.0.2
Earlier integration from Stephaine Dutkiewicz
and Patrick Heimbach.

Two ifdef statements for compile time,
ALLOW_THERM_SEAICE and ALLOW_BULK_FORCE

Two switches in data.pkg to turn on at run-time:

cat data.pkg
# Packages
 &PACKAGES
 useBulkForce=.TRUE.,
 useThermSeaIce=.TRUE.,
 &

WARNING:  useSEAICE and useThermSEAICE are mutually exclusive.

The bulk package requires an additional parameter file
with two namelists, data.ice and data.blk.

c ADAPTED FROM:
c LANL CICE.v2.0.2
c-----------------------------------------------------------------------
c.. thermodynamics (vertical physics) based on M. Winton 3-layer model
c.. See Bitz, C. M. and W. H. Lipscomb, 1999:  "An energy-conserving
c..       thermodynamic sea ice model for climate study."  J. Geophys.
c..       Res., 104, 15669 - 15677.
c..     Winton, M., 1999:  "A reformulated three-layer sea ice model."
c..       Submitted to J. Atmos. Ocean. Technol.

c.. authors Elizabeth C. Hunke and William Lipscomb
c..         Fluid Dynamics Group, Los Alamos National Laboratory
c-----------------------------------------------------------------------

1 c swd -- bulkf formula used in bulkf and ice pkgs
2
3 #include "CPP_OPTIONS.h"
4 subroutine bulkf_formula(
5 I uw, vw, us, Ta, Qa, nc, tsf_in,
6 I flwup, flha, fsha, df0dT,
7 I ust, vst, evp, ssq, iceornot, windread
8 & )
9
10 IMPLICIT NONE
11 c
12 #include "EEPARAMS.h"
13 #include "SIZE.h"
14 #include "PARAMS.h"
15 #include "DYNVARS.h"
16 #include "GRID.h"
17 #include "FFIELDS.h"
18 #ifdef ALLOW_BULKFORMULA
19 #include "BULKF_ICE_CONSTANTS.h"
20 #include "BULKF.h"
21 #endif
22
23 c
24 c calculate bulk formula fluxes over open ocean or seaice
25 c
26 c input
27 _RL us ! wind speed
28 _RL uw ! zonal wind speed (at grid center)
29 _RL vw ! meridional wind speed (at grid center)
30 _RL Ta ! air temperature at ht
31 _RL Qa ! specific humidity at ht
32 _RL tsf_in ! surface temperature (either ice or open water)
33 _RL nc ! fraction cloud cover
34 integer iceornot ! 0=open water, 1=ice cover
35 logical windread !
36 c output
37 _RL flwup ! upward long wave radiation
38 _RL flha ! latent heat flux
39 _RL fsha ! sensible heat flux
40 _RL df0dT ! derivative of heat flux with respect to Tsf
41 _RL ust ! zonal wind stress (at grid center)
42 _RL vst ! meridional wind stress (at grid center)
43 _RL evp ! evaporation rate (over open water)
44 _RL ssq ! surface specific humidity (kg/kg)
45 c
46 c local variables
47 _RL tsf ! surface temperature in K
48 _RL ht ! reference height (m)
49 _RL usm ! wind speed limited
50 _RL t0 ! virtual temperature (K)
51 _RL deltap ! potential temperature diff (K)
52 _RL delq ! specific humidity difference
53 _RL stable
54 _RL lhcoef
55 _RL shcoef
56 _RL dflhdT ! derivative of latent heat with respect to T
57 _RL dfshdT ! derivative of sensible heat with respect to T
58 _RL dflwupdT ! derivative of long wave with respect to T
59 _RL mixratio
60 _RL ea
61
62 #ifdef ALLOW_BULKFORMULA
63
64 c --- external functions ---
65 _RL exf_BulkCdn
66 external exf_BulkCdn
67
68 Qa=max(Qa,1e-7)
69 Tsf=Tsf_in+Tf0kel
70 ht=10
71 c Wind speed
72 if (us.eq.0) then
73 us = sqrt(uw*uw + vw*vw)
74 endif
75 usm = max(us,1.d-5)
76 cQQQ try to limit drag
77 usm = min(usm,5.d0)
78 c
79 t0 = Ta*(1.d0 + humid_fac*Qa)
80 ssq = qcoef*exp(22.47*(1.d0-Tf0kel/tsf))
81 cBB debugging
82 cBB print*,'ice, ssq', qcoef, ssq
83 c
84 deltap = ta - tsf + gamma_blk*ht
85 delq = Qa - ssq
86 stable = 5.d-1 + sign(5.d-1, deltap)
87 cQQ -- check all of this
88 c latent heat coeff. following Gill 2.4.6 and 2.6.2 formula
89 lhcoef =Lvap*rhoa*usm*1.5e-3 !QQ name coeff.
90 flha = lhcoef*delq
91 evp= lhcoef*delq/Lvap/rhosw
92 c sensible heat coeff. following Gill 2.4.5 formula
93 if (stable.gt.0) then
94 shcoef = 0.83e-3*rhoa*usm*cpair
95 else
96 shcoef = 1.10e-3*rhoa*usm*cpair
97 endif
98 fsha = shcoef*deltap
99 c up long wave radiation
100 mixratio=Qa/(1-Qa)
101 ea=p0*mixratio/(0.62197+mixratio)
102 flwup=-0.985*stefan*tsf**4
103 & *(0.39-0.05*sqrt(ea))
104 & *(1-0.6*nc**2)
105 #ifdef ALLOW_TSEAICE
106 if (iceornot.eq.1) then
107 c derivatives with respect to Tsf
108 dflhdT = -lhcoef*Tf0kel*ssq*22.47/(tsf**2)
109 dfshdT = -shcoef
110 dflwupdT=-4.*0.985*stefan*tsf**3
111 & *(0.39-0.05*sqrt(ea))
112 c total derivative with respect to surface temperature
113 df0dT=dflwupdT+dfshdT+dflhdT
114 cBB
115 cBB print*,'derivatives:',df0dT,dflwupdT,dfshdT,dflhdT
116 endif
117 #endif /*ALLOW_TSEAICE*/
118 c
119 c wind stress at center points
120 if (.NOT.windread) then
121 ust = rhoa*exf_BulkCdn(usm)*us*uw
122 vst = rhoa*exf_BulkCdn(usm)*us*vw
123 endif
124 #endif /*ALLOW_BULKFORMULA*/
125
126 return
127 end

  ViewVC Help
Powered by ViewVC 1.1.22