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.
istate_mod.F90 in branches/TAM_V3_2_2/NEMOTAM/OPATAM_SRC – NEMO

source: branches/TAM_V3_2_2/NEMOTAM/OPATAM_SRC/istate_mod.F90 @ 3317

Last change on this file since 3317 was 2578, checked in by rblod, 13 years ago

first import of NEMOTAM 3.2.2

File size: 4.9 KB
Line 
1MODULE istate_mod
2   !!======================================================================
3   !!                     ***  MODULE  istate  ***
4   !! Ocean state   :  initial state setting
5   !!=====================================================================
6   !! History :   4.0  !  89-12  (P. Andrich)  Original code
7   !!             5.0  !  91-11  (G. Madec)  rewritting
8   !!             6.0  !  96-01  (G. Madec)  terrain following coordinates
9   !!             8.0  !  01-09  (M. Levy, M. Ben Jelloul)  istate_eel
10   !!             8.0  !  01-09  (M. Levy, M. Ben Jelloul)  istate_uvg
11   !!             9.0  !  03-08  (G. Madec)  F90: Free form, modules
12   !!             9.0  !  03-09  (G. Madec, C. Talandier)  add EEL R5
13   !!             9.0  !  04-05  (A. Koch-Larrouy)  istate_gyre
14   !!             9.0  !  06-07  (S. Masson)  distributed restart using iom
15   !!----------------------------------------------------------------------
16
17   !!----------------------------------------------------------------------
18   !!   istate_init   : initial state setting
19   !!   istate_tem    : analytical profile for initial Temperature
20   !!   istate_sal    : analytical profile for initial Salinity
21   !!   istate_eel    : initial state setting of EEL R5 configuration
22   !!   istate_gyre   : initial state setting of GYRE configuration
23   !!   istate_uvg    : initial velocity in geostropic balance
24   !!----------------------------------------------------------------------
25   USE oce             ! ocean dynamics and active tracers
26   USE dom_oce         ! ocean space and time domain
27   USE daymod          !
28   USE ldftra_oce      ! ocean active tracers: lateral physics
29   USE zdf_oce         ! ocean vertical physics
30   USE phycst          ! physical constants
31   USE dtatem          ! temperature data                 (dta_tem routine)
32   USE dtasal          ! salinity data                    (dta_sal routine)
33   USE restart         ! ocean restart                   (rst_read routine)
34   USE in_out_manager  ! I/O manager
35   USE iom
36   USE c1d             ! re-initialization of u-v mask for the 1D configuration
37   USE zpshde          ! partial step: hor. derivative (zps_hde routine)
38   USE eosbn2          ! equation of state            (eos bn2 routine)
39   USE domvvl          ! varying vertical mesh
40   USE dynspg_oce      ! pressure gradient schemes
41   USE dynspg_flt      ! pressure gradient schemes
42   USE dynspg_exp      ! pressure gradient schemes
43   USE dynspg_ts       ! pressure gradient schemes
44   
45   IMPLICIT NONE
46   PRIVATE
47
48   PUBLIC   istate_p   ! routine called by step_tam.F90
49
50   !! * Substitutions
51#  include "domzgr_substitute.h90"
52#  include "vectopt_loop_substitute.h90"
53   !!----------------------------------------------------------------------
54   !!   OPA 9.0 , LOCEAN-IPSL (2006)
55   !! $Id$
56   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
57   !!----------------------------------------------------------------------
58
59CONTAINS
60
61   SUBROUTINE istate_p
62      !!----------------------------------------------------------------------
63      !!                   ***  ROUTINE istate_init  ***
64      !!
65      !! ** Purpose :   Initialization of the dynamics and tracer fields.
66      !!----------------------------------------------------------------------
67      USE eosbn2          ! eq. of state, Brunt Vaisala frequency (eos     routine)
68
69      IF(lwp) WRITE(numout,*)
70      IF(lwp) WRITE(numout,*) 'istate_ini_tst : Initialization of the dynamics and tracers'
71      IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
72
73      rhd  (:,:,:) = 0.e0
74      rhop (:,:,:) = 0.e0
75      rn2  (:,:,:) = 0.e0 
76
77      IF( ln_rstart ) THEN                    ! Restart from a file
78         !                                    ! -------------------
79         neuler = 1                              ! Set time-step indicator at nit000 (leap-frog)
80         CALL rst_read                           ! Read the restart file
81         CALL day_init                           ! model calendar (using both namelist and restart infos)
82      ELSE
83            CALL ctl_stop( ' You should not have seen this error message ' )
84      ENDIF
85
86      IF( lk_vvl .OR. lk_agrif ) THEN
87            CALL ctl_stop( ' You should not have seen this error message ' )
88      ENDIF
89
90      IF( lk_vvl ) THEN
91            CALL ctl_stop( ' You should not have seen this error message ' )
92      ENDIF
93!!! Temporary fix to save emp
94         IF( ln_rstart ) THEN
95            IF( lk_dynspg_flt )   CALL flt_rst( nit000, 'READ' )      ! read or initialize the following fields
96         END IF
97
98      !                                       ! Vertical velocity
99      !                                       ! -----------------
100
101!      IF( .NOT. lk_vvl )    CALL wzv( nit000 )                         ! from horizontal divergence
102      !
103   END SUBROUTINE istate_p
104
105
106   !!=====================================================================
107END MODULE istate_mod
Note: See TracBrowser for help on using the repository browser.