/[MITgcm]/MITgcm_contrib/gael/pkg/smooth/smooth_correl2Dw.F
ViewVC logotype

Contents of /MITgcm_contrib/gael/pkg/smooth/smooth_correl2Dw.F

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


Revision 1.2 - (show annotations) (download)
Fri Oct 16 03:36:33 2009 UTC (15 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
bring pkg/smooth up to date

1 #include "CPP_OPTIONS.h"
2
3 subroutine smooth_correl2Dw (
4 U fld_in,mask_in,xx_gen_file,mythid)
5
6
7 IMPLICIT NONE
8 #include "SIZE.h"
9 #include "EEPARAMS.h"
10 #include "GRID.h"
11 #include "PARAMS.h"
12 c#include "tamc.h"
13 #include "smooth.h"
14 #include "ctrl.h"
15 #include "ecco_cost.h"
16
17 _RL mask_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy)
18 _RL fld_in(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
19 _RL tmpW
20 character*(MAX_LEN_FNAM) xx_gen_file
21
22 integer i,j,bi,bj
23 integer itlo,ithi
24 integer jtlo,jthi
25 integer myThid
26
27
28 jtlo = mybylo(mythid)
29 jthi = mybyhi(mythid)
30 itlo = mybxlo(mythid)
31 ithi = mybxhi(mythid)
32
33
34 DO bj = jtlo,jthi
35 DO bi = itlo,ithi
36 DO j = 1,sNy
37 DO i = 1,sNx
38 if ( xx_gen_file .EQ. xx_hflux_file ) then
39 tmpW=whflux(i,j,bi,bj)
40 elseif ( xx_gen_file .EQ. xx_sflux_file ) then
41 tmpW=wsflux(i,j,bi,bj)
42 elseif ( xx_gen_file .EQ. xx_tauu_file ) then
43 tmpW=wtauu(i,j,bi,bj)
44 elseif ( xx_gen_file .EQ. xx_tauv_file ) then
45 tmpW=wtauv(i,j,bi,bj)
46
47 elseif ( xx_gen_file .EQ. xx_atemp_file ) then
48 tmpW=watemp(i,j,bi,bj)
49 elseif ( xx_gen_file .EQ. xx_aqh_file ) then
50 tmpW=waqh(i,j,bi,bj)
51 elseif ( xx_gen_file .EQ. xx_precip_file ) then
52 tmpW=wprecip(i,j,bi,bj)
53 elseif ( xx_gen_file .EQ. xx_snowprecip_file ) then
54 tmpW=wsnowprecip(i,j,bi,bj)
55
56 elseif ( xx_gen_file .EQ. xx_swflux_file ) then
57 tmpW=wswflux(i,j,bi,bj)
58 elseif ( xx_gen_file .EQ. xx_swdown_file ) then
59 tmpW=wswdown(i,j,bi,bj)
60 elseif ( xx_gen_file .EQ. xx_lwflux_file ) then
61 tmpW=wlwflux(i,j,bi,bj)
62 elseif ( xx_gen_file .EQ. xx_lwdown_file ) then
63 tmpW=wlwdown(i,j,bi,bj)
64
65 elseif ( xx_gen_file .EQ. xx_evap_file ) then
66 tmpW=wevap(i,j,bi,bj)
67 elseif ( xx_gen_file .EQ. xx_apressure_file ) then
68 tmpW=wapressure(i,j,bi,bj)
69 elseif ( xx_gen_file .EQ. xx_uwind_file ) then
70 tmpW=wuwind(i,j,bi,bj)
71 elseif ( xx_gen_file .EQ. xx_vwind_file ) then
72 tmpW=wvwind(i,j,bi,bj)
73
74 else
75 tmpW=0.
76 WRITE(errorMessageUnit,'(2A)' )
77 & 'no weights implemented here for ',xx_gen_file
78 STOP 'ABNORMAL END: S/R smooth_correl2Dw'
79 endif
80
81 if ((mask_in(i,j,1,bi,bj).NE.0.).AND.(tmpW.NE.0.)) then
82 fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)/sqrt(tmpW)
83 else
84 fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)*0.
85 endif
86
87 ENDDO
88 ENDDO
89 ENDDO
90 ENDDO
91
92
93 _EXCH_XY_RL ( fld_in , myThid )
94
95 end

  ViewVC Help
Powered by ViewVC 1.1.22