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.
p4zday.F in trunk/NEMO/TOP_SRC/SMS – NEMO

source: trunk/NEMO/TOP_SRC/SMS/p4zday.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:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 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 ---------------------------------------------------------------------------
6CDIR$ LIST
7      SUBROUTINE p4zday
8#if defined key_passivetrc && defined key_trc_pisces
9CCC---------------------------------------------------------------------
10CCC
11CCC          ROUTINE p4zday : PISCES MODEL
12CCC          *****************************
13CCC
14CCC  PURPOSE :
15CCC  ---------
16CCC        PISCES : compute the day length depending on latitude
17CCC                 and the day
18CCC
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   EXTERNAL :
31CC   --------
32CC            None
33CC
34CC   MODIFICATIONS:
35CC   --------------
36CC      original  : E. Maier-Reimer (GBC 1993)
37CC      additions : C. Le Quere (1999)
38CC      modifications : O. Aumont (2004)
39CC----------------------------------------------------------------------
40CC parameters and commons
41CC ======================
42      USE oce_trc
43      USE trp_trc
44      USE sms
45      IMPLICIT NONE
46CC----------------------------------------------------------------------
47CC local declarations
48CC ==================
49      INTEGER ji, jj, iyy
50      REAL rum, delta, codel, phi, argu
51C
52C Get year
53C --------
54C
55      iyy = ndastp/10000
56
57       write(numout,*)
58       write(numout,*) 'p4zday - Julian day ', nday_year
59       write(numout,*)
60
61
62      IF (nleapy.EQ.1 .AND. MOD(iyy,4).EQ.0) THEN
63          rum = FLOAT(nday_year-80)/366.
64      ELSE
65          rum = FLOAT(nday_year-80)/365.
66      ENDIF
67
68C
69      delta = SIN(rum*rpi*2.)*sin(rpi*23.5/180.)
70      codel = asin(delta)
71
72      DO jj = 1,jpj
73        DO ji = 1,jpi
74          phi = gphit(ji,jj)*rpi/180.
75          argu = tan(codel)*tan(phi)
76          strn(ji,jj) = 0.
77          argu=min(1.,argu)
78          argu=max(-1.,argu)
79          strn(ji,jj)=24.-2.*acos(argu)*180./rpi/15.
80          strn(ji,jj)=max(strn(ji,jj),0.)
81        END DO
82      END DO
83C
84#endif
85      RETURN
86      END
87
Note: See TracBrowser for help on using the repository browser.