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

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

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

revision 1.3 by heimbach, Tue Nov 12 20:34:41 2002 UTC revision 1.4 by dimitri, Tue Feb 18 05:33:54 2003 UTC
# Line 10  c     o set external forcing lwflux Line 10  c     o set external forcing lwflux
10  c  c
11  c     started: Ralf.Giering@FastOpt.de 25-Mai-2000  c     started: Ralf.Giering@FastOpt.de 25-Mai-2000
12  c     changed: heimbach@mit.edu 10-Jan-2002  c     changed: heimbach@mit.edu 10-Jan-2002
13    c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
14    
15  c     ==================================================================  c     ==================================================================
16  c     SUBROUTINE exf_set_lwflux  c     SUBROUTINE exf_set_lwflux
# Line 45  c     == local variables == Line 46  c     == local variables ==
46    
47  c     == end of interface ==  c     == end of interface ==
48    
49  c     get record numbers and interpolation factor for lwflux        if ( lwfluxfile .NE. ' ' ) then
       call exf_GetFFieldRec(  
      I                       lwfluxstartdate, lwfluxperiod  
      O                     , fac, first, changed  
      O                     , count0, count1  
      I                     , mycurrenttime, mycurrentiter, mythid  
      &                     )  
   
       if ( first ) then  
         if ( lwfluxfile .NE. ' ' )  
      &        call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1  
      &                   , lwflux1, count0, mythid  
      &                   )  
         if (exf_yftype .eq. 'RL') then  
            call exf_filter_rl( lwflux1, lwfluxmask, mythid )  
         else  
            call exf_filter_rs( lwflux1, lwfluxmask, mythid )  
         end if  
       endif  
50    
51        if (( first ) .or. ( changed )) then  c     get record numbers and interpolation factor for lwflux
52          call exf_SwapFFields( lwflux0, lwflux1, mythid )           call exf_GetFFieldRec(
53         I        lwfluxstartdate, lwfluxperiod
54          if ( lwfluxfile .NE. ' ' )       O        , fac, first, changed
55       &       call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1       O        , count0, count1
56       &                   , lwflux1, count1, mythid       I        , mycurrenttime, mycurrentiter, mythid
57       &                   )       &        )
58          if (exf_yftype .eq. 'RL') then  
59             call exf_filter_rl( lwflux1, lwfluxmask, mythid )           if ( first ) then
60          else              call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1
61             call exf_filter_rs( lwflux1, lwfluxmask, mythid )       &           , lwflux1, count0, mythid
62          end if       &           )
63        endif              if (exf_yftype .eq. 'RL') then
64                   call exf_filter_rl( lwflux1, lwfluxmask, mythid )
65                else
66                   call exf_filter_rs( lwflux1, lwfluxmask, mythid )
67                end if
68             endif
69    
70             if (( first ) .or. ( changed )) then
71                call exf_SwapFFields( lwflux0, lwflux1, mythid )
72    
73                call mdsreadfield( lwfluxfile, exf_iprec, exf_yftype, 1
74         &           , lwflux1, count1, mythid
75         &           )
76                if (exf_yftype .eq. 'RL') then
77                   call exf_filter_rl( lwflux1, lwfluxmask, mythid )
78                else
79                   call exf_filter_rs( lwflux1, lwfluxmask, mythid )
80                end if
81             endif
82    
83  c     Loop over tiles.  c     Loop over tiles.
84        do bj = mybylo(mythid),mybyhi(mythid)           do bj = mybylo(mythid),mybyhi(mythid)
85          do bi = mybxlo(mythid),mybxhi(mythid)              do bi = mybxlo(mythid),mybxhi(mythid)
86            do j = 1,sny                 do j = 1,sny
87              do i = 1,snx                    do i = 1,snx
88    
89  c             Interpolate linearly onto the current time.  c     Interpolate linearly onto the current time.
90    
91                lwflux(i,j,bi,bj) = fac          *lwflux0(i,j,bi,bj)+                       lwflux(i,j,bi,bj) = fac * lwflux0(i,j,bi,bj) +
92       &                          (exf_one - fac) *lwflux1(i,j,bi,bj)       &                    (exf_one - fac) *lwflux1(i,j,bi,bj)
93    
94                      enddo
95                   enddo
96              enddo              enddo
97            enddo           enddo
98          enddo  
99        enddo        endif
100    
101  #endif  #endif
102    

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

  ViewVC Help
Powered by ViewVC 1.1.22