New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
h3copt.F in trunk/NEMO/TOP_SRC/SMS – NEMO

source: trunk/NEMO/TOP_SRC/SMS/h3copt.F @ 186

Last change on this file since 186 was 186, checked in by opalod, 19 years ago

CL + CE : NEMO TRC_SRC start

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1C $Id$
2CDIR$ LIST
3      SUBROUTINE h3copt
4#if defined key_passivetrc && defined key_trc_hamocc3
5CCC---------------------------------------------------------------------
6CCC
7CCC                       ROUTINE h3copt
8CCC                     *****************
9CCC
10CCC  PURPOSE :
11CCC  ---------
12CCC         Compute regional deviation from optimal productivity
13CCC            depending on the latitude and the month
14CCC
15CC   METHOD :
16CC   -------
17CC     
18CC
19CC   INPUT :
20CC   -----
21CC      argument
22CC              ktask           : task identificator
23CC      common
24CC              all the common defined in opa
25CC
26CC
27CC   OUTPUT :                   : no
28CC   ------
29CC
30CC   WORKSPACE :
31CC   ---------
32CC
33CC   EXTERNAL :
34CC   --------
35CC
36CC   MODIFICATIONS:
37CC   --------------
38CC      original  : E. Maier-Reimer (GBC 1993)
39CC      additions : C. Le Quere (1999)
40CC----------------------------------------------------------------------
41CC parameters and commons
42CC ======================
43CDIR$ NOLIST
44      USE oce_trc
45      USE trp_trc
46      USE sms
47      IMPLICIT NONE
48CDIR$ LIST
49CC----------------------------------------------------------------------
50CC local declarations
51CC ==================
52      INTEGER ji, jj
53      INTEGER iyy, in
54      REAL rum, delta, codel, sidel, phi, argu, t1
55C
56C Get year
57C --------
58C
59      iyy = ndastp/10000
60C
61#     if defined key_off_tra
62      IF (nleapy.EQ.1 .AND. MOD(iyy,4).EQ.0) THEN
63          rum = FLOAT(ijulian)/366.
64      ELSE
65          rum = FLOAT(ijulian)/365.
66      ENDIF
67#     else
68      IF (nleapy.EQ.1 .AND. MOD(iyy,4).EQ.0) THEN
69          rum = FLOAT(nday_year)/366.
70      ELSE
71          rum = FLOAT(nday_year)/365.
72      ENDIF
73#     endif
74C
75      delta = -COS(rum*rpi*2.)*rpi*23.5/180.
76      codel = COS(delta)
77      sidel = SIN(delta)
78
79      DO jj = 1,jpj
80        DO ji = 1,jpi
81          phi = gphit(ji,jj)*rpi/180.
82          argu = -SIN(phi)*sidel/(COS(phi)*codel+1.e-10)
83          strn(ji,jj) = 0.
84          IF (argu.LE.-1.) THEN
85              str = rpi*SIN(phi)*sidel
86          ENDIF
87          IF (argu.GE.1.) str=0.
88          IF (ABS(argu).LT.1.) THEN
89              t1 = ACOS(argu)
90              str = t1*sin(phi)*sidel + sin(t1)*COS(phi)*codel
91          ENDIF
92             strn(ji,jj) = str/(30.5*24.*3600.)
93        END DO
94      END DO
95C
96#endif
97      RETURN
98      END
99
Note: See TracBrowser for help on using the repository browser.