/[MITgcm]/MITgcm/pkg/exf/exf_wind.F
ViewVC logotype

Diff of /MITgcm/pkg/exf/exf_wind.F

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

revision 1.4 by jmc, Wed Jan 10 21:44:38 2007 UTC revision 1.5 by mlosch, Thu Mar 8 08:42:24 2007 UTC
# Line 45  c     == local variables == Line 45  c     == local variables ==
45        integer i,j        integer i,j
46    
47        _RL     ustmp        _RL     ustmp
48  c     _RL     ustar        _RL     ustar
49  c     _RL       tmp1, tmp2, tmp3, tmp4, tmp5        _RL     tmp1, tmp2, tmp3, tmp4, tmp5
50    
51  c     == external functions ==  c     == external functions ==
52    
# Line 92  c             cdn(umps); ustar can be di Line 92  c             cdn(umps); ustar can be di
92  C-   no need for wind-stress inversion since everything  C-   no need for wind-stress inversion since everything
93  C    (ustar, ... etc ...) is derived directly from wind-stress  C    (ustar, ... etc ...) is derived directly from wind-stress
94    
95  c         ustmp = ustress(i,j,bi,bj)*ustress(i,j,bi,bj) +            ustmp = ustress(i,j,bi,bj)*ustress(i,j,bi,bj) +
96  c    &         vstress(i,j,bi,bj)*vstress(i,j,bi,bj)       &         vstress(i,j,bi,bj)*vstress(i,j,bi,bj)
97  c         if ( ustmp .ne. 0. _d 0 ) then            if ( ustmp .ne. 0. _d 0 ) then
98  c            ustar = sqrt(ustmp/atmrho)               ustar = sqrt(ustmp/atmrho)
99  c            cw(i,j,bi,bj) = ustress(i,j,bi,bj)/sqrt(ustmp)               cw(i,j,bi,bj) = ustress(i,j,bi,bj)/sqrt(ustmp)
100  c            sw(i,j,bi,bj) = vstress(i,j,bi,bj)/sqrt(ustmp)               sw(i,j,bi,bj) = vstress(i,j,bi,bj)/sqrt(ustmp)
101  c         else            else
102  c            ustar            = 0. _d 0               ustar            = 0. _d 0
103  c            cw(i,j,bi,bj)    = 0. _d 0               cw(i,j,bi,bj)    = 0. _d 0
104  c            sw(i,j,bi,bj)    = 0. _d 0               sw(i,j,bi,bj)    = 0. _d 0
105  c         endif            endif
106  c  
107  c         if ( ustar .eq. 0. _d 0 ) then            if ( ustar .eq. 0. _d 0 ) then
108  c            us(i,j,bi,bj) = 0. _d 0               us(i,j,bi,bj) = 0. _d 0
109  c         else if ( ustar .lt. ustofu11 ) then            else if ( ustar .lt. ustofu11 ) then
110  c            tmp1 = -cquadrag_2/cquadrag_1/2               tmp1 = -cquadrag_2/cquadrag_1/2
111  c            tmp2 = sqrt(tmp1*tmp1 + ustar*ustar/cquadrag_1)               tmp2 = sqrt(tmp1*tmp1 + ustar*ustar/cquadrag_1)
112  c            us(i,j,bi,bj) = sqrt(tmp1 + tmp2)               us(i,j,bi,bj) = sqrt(tmp1 + tmp2)
113  c         else            else
114  c            tmp3 = clindrag_2/clindrag_1/3               tmp3 = clindrag_2/clindrag_1/3
115  c            tmp4 = ustar*ustar/clindrag_1/2 - tmp3**3               tmp4 = ustar*ustar/clindrag_1/2 - tmp3**3
116  c            tmp5 = sqrt(ustar*ustar/clindrag_1*               tmp5 = sqrt(ustar*ustar/clindrag_1*
117  c    &            (ustar*ustar/clindrag_1/4 - tmp3**3))       &            (ustar*ustar/clindrag_1/4 - tmp3**3))
118  c            us(i,j,bi,bj)   = (tmp4 + tmp5)**(1/3) +               us(i,j,bi,bj)   = (tmp4 + tmp5)**(1/3) +
119  c    &            tmp3**2 * (tmp4 + tmp5)**(-1/3) - tmp3       &            tmp3**2 * (tmp4 + tmp5)**(-1/3) - tmp3
120  c         endif            endif
121              uwind(i,j,bi,bj) = us(i,j,bi,bj)*cw(i,j,bi,bj)
122              vwind(i,j,bi,bj) = us(i,j,bi,bj)*sw(i,j,bi,bj)
123  #endif /* ifndef ALLOW_ATM_WIND */  #endif /* ifndef ALLOW_ATM_WIND */
124    
125  c--   set lower limit  c--   set lower limit

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22