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

Last change on this file since 719 was 719, checked in by ctlod, 17 years ago

get back to the nemo_v2_3 version for trunk

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