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

Annotation of /MITgcm/pkg/exf/exf_getclim.F

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


Revision 1.11 - (hide annotations) (download)
Sat Jun 23 14:48:08 2007 UTC (16 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59g, checkpoint59f, checkpoint59m, checkpoint59l, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j
Changes since 1.10: +34 -1 lines
Modifs to enable running exf and seaice as stand-alone
(monitor output tricked so testreport can probe results)

1 heimbach 1.11 C $Header: /u/gcmpack/MITgcm/pkg/exf/exf_getclim.F,v 1.10 2007/04/18 19:55:34 heimbach Exp $
2 jmc 1.6 C $Name: $
3 heimbach 1.1
4 edhill 1.3 #include "EXF_OPTIONS.h"
5 heimbach 1.1
6    
7     subroutine exf_getclim(
8     I mytime,
9     I myiter,
10     I mythid
11     & )
12    
13     c ==================================================================
14     c SUBROUTINE exf_getclim
15     c ==================================================================
16     c
17     c o Get the climatogy fields for the current time step. The switches
18     c for the inclusion of the individual forcing components have to
19 edhill 1.3 c be set in EXF_OPTIONS.h .
20 heimbach 1.1 c
21     c A note on surface fluxes:
22     c
23     c The MITgcmUV's vertical coordinate z is positive upward.
24     c This implies that a positive flux is out of the ocean
25     c model. However, the wind stress forcing is not treated
26     c this way. A positive zonal wind stress accelerates the
27     c model ocean towards the east.
28     c
29     c started: Ralf.Giering@FastOpt.de 25-Mai-2000
30     c
31     c ==================================================================
32     c SUBROUTINE exf_getclim
33     c ==================================================================
34    
35     implicit none
36    
37     c == global variables ==
38     #include "EEPARAMS.h"
39     #include "SIZE.h"
40 heimbach 1.8 #include "GRID.h"
41 heimbach 1.11 #ifdef ALLOW_BULK_OFFLINE
42     # include "PARAMS.h"
43     # include "DYNVARS.h"
44     #endif
45 heimbach 1.7 #include "EXF_PARAM.h"
46     #include "EXF_CONSTANTS.h"
47 jmc 1.6 #include "EXF_FIELDS.h"
48 heimbach 1.11 #ifdef ALLOW_AUTODIFF
49     # include "ctrl.h"
50     # include "ctrl_dummy.h"
51     #endif
52 heimbach 1.1
53     c == routine arguments ==
54    
55     c mythid - thread number for this instance of the routine.
56    
57     integer mythid
58     integer myiter
59     _RL mytime
60    
61     c == local variables ==
62    
63 heimbach 1.8 integer interp_method
64 heimbach 1.9 integer bi, bj, i, j
65 heimbach 1.8
66 heimbach 1.1 c == end of interface ==
67    
68 heimbach 1.8 interp_method=2
69    
70 heimbach 1.1 #ifdef ALLOW_CLIMSST_RELAXATION
71     c Get values of climatological sst fields.
72 heimbach 1.9 call exf_set_gen (
73     & climsstfile, climsststartdate, climsstperiod,
74     & climsststartdate1, climsststartdate2,
75     & exf_inscal_climsst,
76     & climsst_exfremo_intercept, climsst_exfremo_slope,
77     & climsst, climsst0, climsst1, climsstmask,
78 heimbach 1.7 #ifdef USE_EXF_INTERPOLATION
79 heimbach 1.9 & climsst_lon0, climsst_lon_inc, climsst_lat0, climsst_lat_inc,
80     & climsst_nlon, climsst_nlat, xC, yC, interp_method,
81 heimbach 1.7 #endif
82 heimbach 1.9 & mytime, myiter, mythid )
83 heimbach 1.7 c
84 heimbach 1.9 do bj = mybylo(mythid),mybyhi(mythid)
85     do bi = mybxlo(mythid),mybxhi(mythid)
86     do j = 1,sny
87     do i = 1,snx
88     if (climsst(i,j,bi,bj) .lt. climtempfreeze) then
89     climsst(i,j,bi,bj) = climtempfreeze
90     endif
91     enddo
92     enddo
93     enddo
94     enddo
95 heimbach 1.8
96 heimbach 1.1 c-- Update the tile edges.
97     _EXCH_XY_R8(climsst, mythid)
98     #endif
99    
100     #ifdef ALLOW_CLIMSSS_RELAXATION
101 heimbach 1.7 c Get values of climatological sss fields.
102 heimbach 1.9 call exf_set_gen (
103     & climsssfile, climsssstartdate, climsssperiod,
104     & climsssstartdate1, climsssstartdate2,
105     & exf_inscal_climsss,
106     & climsss_exfremo_intercept, climsss_exfremo_slope,
107     & climsss, climsss0, climsss1, climsssmask,
108 heimbach 1.7 #ifdef USE_EXF_INTERPOLATION
109 heimbach 1.9 & climsss_lon0, climsss_lon_inc, climsss_lat0, climsss_lat_inc,
110     & climsss_nlon, climsss_nlat, xC, yC, interp_method,
111 heimbach 1.7 #endif
112 heimbach 1.9 & mytime, myiter, mythid )
113 heimbach 1.7 c
114 heimbach 1.8
115 heimbach 1.1 c-- Update the tile edges.
116     _EXCH_XY_R8(climsss, mythid)
117     #endif
118 heimbach 1.11 #ifdef ALLOW_SST_CONTROL
119     call ctrl_get_gen (
120     & xx_sst_file, xx_sststartdate, xx_sstperiod,
121     & maskc, climsst, xx_sst0, xx_sst1, xx_sst_dummy,
122     & mytime, myiter, mythid )
123     #endif
124    
125     #ifdef ALLOW_BULK_OFFLINE
126     DO bj=myByLo(myThid),myByHi(myThid)
127     DO bi=myBxLo(myThid),myBxHi(myThid)
128     DO j=1-oLy,sNy+oLy
129     DO i=1-oLx,sNx+oLx
130     theta(i,j,1,bi,bj) = climsst(i,j,bi,bj)
131     if ( myiter .EQ. niter0 ) then
132     if ( maskC(i,j,1,bi,bj) .NE. 0. .AND.
133     & theta(i,j,1,bi,bj) .EQ. 0. ) then
134     print *, 'ph-warn-exf-clim ', i, j, theta(i,j,1,bi,bj)
135     cph STOP 'in exf_getclim'
136     endif
137     endif
138     ENDDO
139     ENDDO
140     ENDDO
141     ENDDO
142     #endif /* ALLOW_BULK_OFFLINE */
143 heimbach 1.1
144     end

  ViewVC Help
Powered by ViewVC 1.1.22