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 @ 247

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

CL : Add CVS Header and CeCILL licence information

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