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 | |
---|
20 | CONTAINS |
---|
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 |
---|