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

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

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

revision 1.4 by dimitri, Sat Dec 28 10:11:11 2002 UTC revision 1.5 by dimitri, Tue Feb 18 05:33:54 2003 UTC
# Line 9  c     ================================== Line 9  c     ==================================
9  c     SUBROUTINE exf_mapfields  c     SUBROUTINE exf_mapfields
10  c     ==================================================================  c     ==================================================================
11  c  c
12  c     o Map the external forcing fields on the ocean model arrays. This  c     o Map external forcing fields (ustress, vstress, hflux, sflux,
13  c       routine is included to separate the ocean state estimation tool  c       swflux, apressure, climsss, climsst, etc.) onto ocean model
14  c       as much as possible from the ocean model. Unit conversion factors  c       arrays (fu, fv, Qnet, EmPmR, Qsw, pload, sss, sst, etc.).
15  c       are to be set by the user.  c       This routine is included to separate the ocean state estimation
16  c  c       tool as much as possible from the ocean model.  Unit and sign
17  c       The units have to be such that the individual forcing record has  c       conventions can be customized using variables exf_outscal_*,
18  c       units equal to [quantity/s]. See the header file *FFIELDS.h* of  c       which are set in exf_readparms.F.  See the header files
19  c       the MITgcmuv.  c       exf_fields.h and FFIELDS.h for definitions of the various input
20  c  c       and output fields and for default unit and sign convetions.
 c       Required units such that no scaling has to be applied:  
 c  
 c       heat flux:          input file W/m^2  
 c       salt flux:          input file m/s  
 c       zonal wind stress:  input file N/m^2  
 c       merid. wind stress: input file N/m^2  
 c  
 c       To allow for such unit conversions this routine contains scaling  
 c       factors scal_quantity.  
21  c  c
22  c     started: Christian Eckert eckert@mit.edu  09-Aug-1999  c     started: Christian Eckert eckert@mit.edu  09-Aug-1999
23  c  c
24  c     changed: Christian Eckert eckert@mit.edu  11-Jan-2000  c     changed: Christian Eckert eckert@mit.edu  11-Jan-2000
 c  
25  c              - Restructured the code in order to create a package  c              - Restructured the code in order to create a package
26  c                for the MITgcmUV.  c                for the MITgcmUV.
27  c  c
28  c              Christian Eckert eckert@mit.edu  12-Feb-2000  c              Christian Eckert eckert@mit.edu  12-Feb-2000
 c  
29  c              - Changed Routine names (package prefix: exf_)  c              - Changed Routine names (package prefix: exf_)
30  c  c
31  c              Patrick Heimbach, heimbach@mit.edu  06-May-2000  c              Patrick Heimbach, heimbach@mit.edu  06-May-2000
 c  
32  c              - added and changed CPP flag structure for  c              - added and changed CPP flag structure for
33  c                ALLOW_BULKFORMULAE, ALLOW_ATM_TEMP  c                ALLOW_BULKFORMULAE, ALLOW_ATM_TEMP
34  c  c
35  c              Patrick Heimbach, heimbach@mit.edu  23-May-2000  c              Patrick Heimbach, heimbach@mit.edu  23-May-2000
 c  
36  c              - sign change of ustress/vstress incorporated into  c              - sign change of ustress/vstress incorporated into
37  c                scaling factors scal_ust, scal_vst  c                scaling factors exf_outscal_ust, exf_outscal_vst
 c  
 c              Dimitris Menemenlis, menemenlis@jpl.nasa.gov 20-Dec-2002  
38  c  c
39  c              - removed: empmr(i,j,bi,bj) = scal_prc*precip(i,j,bi,bj)  c     mods for pkg/seaice: menemenlis@jpl.nasa.gov 20-Dec-2002
40  c  c
41  c     ==================================================================  c     ==================================================================
42  c     SUBROUTINE exf_mapfields  c     SUBROUTINE exf_mapfields
# Line 120  c     == end of interface == Line 105  c     == end of interface ==
105    
106            do j = jmin,jmax            do j = jmin,jmax
107              do i = imin,imax              do i = imin,imax
108  c             Heat flux.  c            Heat flux.
109                qnet(i,j,bi,bj)  = scal_hfl*hflux(i,j,bi,bj)               qnet(i,j,bi,bj) = exf_outscal_hfl*hflux(i,j,bi,bj)
110              enddo              enddo
111            enddo            enddo
112    
113    
114            do j = jmin,jmax            do j = jmin,jmax
115              do i = imin,imax              do i = imin,imax
116  c             Salt flux.  c            Salt flux.
117                empmr(i,j,bi,bj) = scal_sfl*sflux(i,j,bi,bj)               empmr(i,j,bi,bj)= exf_outscal_sfl*sflux(i,j,bi,bj)
118              enddo              enddo
119            enddo            enddo
120    
# Line 156  CADJ STORE ustress(:,:,bi,bj) = comlev1_ Line 141  CADJ STORE ustress(:,:,bi,bj) = comlev1_
141            enddo            enddo
142            do j = jmin,jmax            do j = jmin,jmax
143              do i = imin,imax              do i = imin,imax
144                fu(i,j,bi,bj)    = scal_ust*ustress(i,j,bi,bj)               fu(i,j,bi,bj)   = exf_outscal_ust*ustress(i,j,bi,bj)
145              enddo              enddo
146            enddo            enddo
147    
# Line 183  CADJ STORE vstress(:,:,bi,bj) = comlev1_ Line 168  CADJ STORE vstress(:,:,bi,bj) = comlev1_
168            enddo            enddo
169            do j = jmin,jmax            do j = jmin,jmax
170              do i = imin,imax              do i = imin,imax
171                fv(i,j,bi,bj)    = scal_vst*vstress(i,j,bi,bj)               fv(i,j,bi,bj)   = exf_outscal_vst*vstress(i,j,bi,bj)
172              enddo              enddo
173            enddo            enddo
174    
175  #ifdef ALLOW_KPP || \  #ifdef SHORTWAVE_HEATING
  (defined (ALLOW_BULKFORMULAE) && defined (ALLOW_ATM_TEMP)))  
176  c             Short wave radiative flux.  c             Short wave radiative flux.
177            do j = jmin,jmax            do j = jmin,jmax
178              do i = imin,imax              do i = imin,imax
179                qsw(i,j,bi,bj)   = scal_swf*swflux(i,j,bi,bj)               qsw(i,j,bi,bj)  = exf_outscal_swf*swflux(i,j,bi,bj)
180              enddo              enddo
181            enddo            enddo
182  #endif  #endif
# Line 200  c             Short wave radiative flux. Line 184  c             Short wave radiative flux.
184  #ifdef ALLOW_CLIMSST_RELAXATION  #ifdef ALLOW_CLIMSST_RELAXATION
185            do j = jmin,jmax            do j = jmin,jmax
186              do i = imin,imax              do i = imin,imax
187                sst(i,j,bi,bj)   = scal_sst*climsst(i,j,bi,bj)               sst(i,j,bi,bj)  = exf_outscal_sst*climsst(i,j,bi,bj)
188              enddo              enddo
189            enddo            enddo
190  #endif  #endif
# Line 208  c             Short wave radiative flux. Line 192  c             Short wave radiative flux.
192  #ifdef ALLOW_CLIMSSS_RELAXATION  #ifdef ALLOW_CLIMSSS_RELAXATION
193            do j = jmin,jmax            do j = jmin,jmax
194              do i = imin,imax              do i = imin,imax
195                sss(i,j,bi,bj)   = scal_sss*climsss(i,j,bi,bj)               sss(i,j,bi,bj)  = exf_outscal_sss*climsss(i,j,bi,bj)
196              enddo              enddo
197            enddo            enddo
198  #endif  #endif
# Line 216  c             Short wave radiative flux. Line 200  c             Short wave radiative flux.
200  #ifdef ATMOSPHERIC_LOADING  #ifdef ATMOSPHERIC_LOADING
201            do j = jmin,jmax            do j = jmin,jmax
202              do i = imin,imax              do i = imin,imax
203                pload(i,j,bi,bj) = scal_apressure*apressure(i,j,bi,bj)               pload(i,j,bi,bj)=exf_outscal_apressure*apressure(i,j,bi,bj)
204              enddo              enddo
205            enddo            enddo
206  #endif  #endif
207    
   
208          enddo          enddo
209        enddo        enddo
210    
# Line 232  c     Update the tile edges. Line 215  c     Update the tile edges.
215  c      _EXCH_XY_R4(    fu, mythid )  c      _EXCH_XY_R4(    fu, mythid )
216  c      _EXCH_XY_R4(    fv, mythid )  c      _EXCH_XY_R4(    fv, mythid )
217         CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)         CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid)
218  #ifdef ALLOW_KPP  #ifdef SHORTWAVE_HEATING
219        _EXCH_XY_R4(   qsw, mythid )        _EXCH_XY_R4(   qsw, mythid )
220  #endif  #endif
221  #ifdef ALLOW_CLIMSST_RELAXATION  #ifdef ALLOW_CLIMSST_RELAXATION

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

  ViewVC Help
Powered by ViewVC 1.1.22