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.
tau_forced_daily.h90 in trunk/NEMO/OPA_SRC/SBC – NEMO

source: trunk/NEMO/OPA_SRC/SBC/tau_forced_daily.h90 @ 473

Last change on this file since 473 was 473, checked in by opalod, 18 years ago

nemo_v1_update_060: SM: IOM + 301 levels + CORE + begining of ctl_stop

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1   !!----------------------------------------------------------------------
2   !!                   ***  tau_forced_daily.h90  ***
3   !!----------------------------------------------------------------------
4
5   !!----------------------------------------------------------------------
6   !!   tau     :   update the surface stress - daily fields in NetCDF file
7   !!----------------------------------------------------------------------
8   !! * local modules variables
9   INTEGER ::   &
10      numtau,         &  ! logical unit for the i-component of the wind data
11      numtav,         &  ! logical unit for the j-component of the wind data
12      ndaytau            ! new day for ers/ncep tau forcing
13
14   !!----------------------------------------------------------------------
15   !!   OPA 9.0 , LOCEAN-IPSL (2005)
16   !! $Header$
17   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
18   !!----------------------------------------------------------------------
19
20CONTAINS
21
22   SUBROUTINE tau( kt )
23      !!---------------------------------------------------------------------
24      !!                    ***  ROUTINE tau  ***
25      !!     
26      !! ** Purpose :   provide to the ocean the stress at each time step
27      !!
28      !! ** Method  :   Read the daily surface stress components in NetCDF
29      !!      file. They are given in the (i,j) referential
30      !!        The i-component is given at U-point (INTERP package)
31      !!        The j-component is given at V-point (INTERP package)
32      !!
33      !!    CAUTION: never mask the surface stress field !
34      !!
35      !! ** Action  :   update at each time-step the two components of the
36      !!      surface stress in both (i,j) and geographical referencial
37      !!
38      !! History :
39      !!   4.0  !  91-03  (G. Madec)  Original code
40      !!   6.0  !  92-07  (M. Imbard)
41      !!   8.1  !  00-08  (D. Ludicone) adapted to ERS-NCEP
42      !!   8.5  !  02-11  (G. Madec)  F90: Free form and module
43      !!        !  03-07  (C. Ethe, G. Madec)  daily generic forcing
44      !!----------------------------------------------------------------------
45      USE iom       ! NetCDF library
46
47      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
48     
49      !!---------------------------------------------------------------------
50
51      ! -------------------- !
52      ! First call kt=nit000 !
53      ! -------------------- !
54
55      IF( kt == nit000 ) THEN
56         
57         ndaytau = 0   ! initialization
58         IF(lwp) THEN
59            WRITE(numout,*) ' '
60            WRITE(numout,*) ' tau    : DAILY wind stress in NetCDF files'
61         ENDIF
62         ! open the files
63         CALL iom_open ( 'taux_1d.nc', numtau )
64         CALL iom_open ( 'tauy_1d.nc', numtav )
65         
66      ENDIF
67
68      ! ----------------- !
69      ! Read daily file   !
70      ! ----------------- !
71
72      IF ( ndaytau /= nday ) THEN
73           
74         ndaytau = nday
75           
76         ! Read daily wind stress data
77
78         CALL iom_get ( numtau, jpdom_data, 'taux', taux, nday_year )
79         CALL iom_get ( numtav, jpdom_data, 'tauy', tauy, nday_year )
80           
81         IF (lwp .AND. nitend-nit000 <= 100 ) THEN
82            WRITE(numout,*)
83            WRITE(numout,*) ' read daily wind stress ok'
84            WRITE(numout,*)
85            WRITE(numout,*) ' day: ', ndastp , '  taux: 1 multiply by ', 1.
86            CALL prihre( taux, jpi, jpj, 1, jpi, 20, 1, jpj, 10, 1., numout )
87            WRITE(numout,*)
88            WRITE(numout,*) ' day: ', ndastp , '  tauy: 1 multiply by ', 1.
89            CALL prihre( tauy, jpi, jpj, 1, jpi, 20, 1, jpj, 10, 1., numout )
90            WRITE(numout,*) ' '
91         ENDIF
92           
93         CALL FLUSH(numout)
94      ENDIF
95         
96      ! Save components in geographical ref on U grid
97      tauxg(:,:) = taux(:,:)
98      tauyg(:,:) = tauy(:,:)
99         
100      ! ------------------- !
101      ! Last call kt=nitend !
102      ! ------------------- !
103
104      ! Closing of the 2 files
105      IF( kt == nitend ) THEN
106          CALL iom_close( numtau )
107          CALL iom_close( numtav )
108      ENDIF
109         
110   END SUBROUTINE tau
Note: See TracBrowser for help on using the repository browser.