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