1 |
C $Header: /u/gcmpack/MITgcm/pkg/offline/offline_fields_load.F,v 1.21 2011/06/07 22:25:09 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "OFFLINE_OPTIONS.h" |
5 |
#ifdef ALLOW_DIC |
6 |
#include "DIC_OPTIONS.h" |
7 |
#endif |
8 |
#ifdef ALLOW_DARWIN |
9 |
#include "DARWIN_OPTIONS.h" |
10 |
#endif |
11 |
|
12 |
CBOP |
13 |
C !ROUTINE: OFFLINE_GET_SURFFORCING |
14 |
C !INTERFACE: |
15 |
SUBROUTINE OFFLINE_GET_SURFFORCING( myTime, myIter, myThid ) |
16 |
|
17 |
C !DESCRIPTION: \bv |
18 |
C *==========================================================* |
19 |
C | SUBROUTINE OFFLINE_GET_SURFFORCING |
20 |
C | o Interpolate in time surface forcing fields that has |
21 |
C | been loaded from file |
22 |
C *==========================================================* |
23 |
C | Note: Only used for pkg/dic when ALLOW_OLD_VIRTUALFLUX |
24 |
C | is defined |
25 |
C *==========================================================* |
26 |
C \ev |
27 |
|
28 |
C !USES: |
29 |
IMPLICIT NONE |
30 |
C === Global variables === |
31 |
#include "SIZE.h" |
32 |
#include "EEPARAMS.h" |
33 |
#include "PARAMS.h" |
34 |
#include "FFIELDS.h" |
35 |
#include "OFFLINE.h" |
36 |
|
37 |
C !INPUT/OUTPUT PARAMETERS: |
38 |
C === Routine arguments === |
39 |
C myTime :: Simulation time |
40 |
C myIter :: Simulation timestep number |
41 |
C myThid :: Thread no. that called this routine. |
42 |
_RL myTime |
43 |
INTEGER myIter |
44 |
INTEGER myThid |
45 |
CEOP |
46 |
|
47 |
#ifdef ALLOW_OLD_VIRTUALFLUX |
48 |
#if ( (defined ALLOW_DIC) || (defined ALLOW_DARWIN) ) |
49 |
C !LOCAL VARIABLES: |
50 |
INTEGER bi,bj,i,j |
51 |
_RL aWght, bWght |
52 |
|
53 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
54 |
|
55 |
C-- Interpolate surface forcing |
56 |
DO bj = myByLo(myThid), myByHi(myThid) |
57 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
58 |
bWght = offline_Wght(1,bi,bj) |
59 |
aWght = offline_Wght(2,bi,bj) |
60 |
DO j=1-OLy,sNy+OLy |
61 |
DO i=1-OLx,sNx+OLx |
62 |
c surfaceForcingT(i,j,bi,bj) = bWght*hflx0(i,j,bi,bj) |
63 |
c & + aWght*hflx1(i,j,bi,bj) |
64 |
c surfaceForcingT(i,j,bi,bj) = surfaceForcingT(i,j,bi,bj) |
65 |
c & *recip_Cp*mass2rUnit |
66 |
surfaceForcingS(i,j,bi,bj) = bWght*sflx0(i,j,bi,bj) |
67 |
& + aWght*sflx1(i,j,bi,bj) |
68 |
surfaceForcingS(i,j,bi,bj) = surfaceForcingS(i,j,bi,bj) |
69 |
& *mass2rUnit |
70 |
c ICEM(i,j,bi,bj) = bWght*icem0(i,j,bi,bj) |
71 |
c & + aWght*icem1(i,j,bi,bj) |
72 |
ENDDO |
73 |
ENDDO |
74 |
C-- end bi,bj loops |
75 |
ENDDO |
76 |
ENDDO |
77 |
|
78 |
#endif /* ALLOW_DIC or ALLOW_DARWIN */ |
79 |
#endif /* ALLOW_OLD_VIRTUALFLUX */ |
80 |
|
81 |
RETURN |
82 |
END |