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

source: trunk/NEMO/OPA_SRC/TRD/trdmld_ncinit.h90 @ 3

Last change on this file since 3 was 3, checked in by opalod, 20 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.2 KB
Line 
1      !-----------------------------------------
2      ! II.1 Define frequency of output and means
3      ! -----------------------------------------
4
5#if defined key_diainstant
6      zsto = nwrite*rdt
7      clop ="inst(only(x))"
8#else
9      zsto = rdt
10      clop ="ave(only(x))"
11#endif
12      zout = nwrite*rdt
13
14      IF( kt == nit000 ) THEN
15
16         IF(lwp) WRITE (numout,*) ' Diamld: netCDF initialization'
17
18         ! II.2 Compute julian date from starting date of the run
19         ! ------------------------
20
21         CALL ymds2ju( nyear, nmonth, nday, 0.e0, zjulian )
22         IF (lwp) WRITE(numout,*)' ' 
23         IF (lwp) WRITE(numout,*)' Date 0 used :',nit000   &
24              ,' YEAR ', nyear,' MONTH ', nmonth,' DAY ', nday   &
25              ,'Julian day : ', zjulian
26
27
28         ! II.3 Define the T grid trend file (nidtrd)
29         ! ---------------------------------
30
31         CALL dia_nam( clhstnam, nwrite, 'trends' )                  ! filename
32         IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam
33         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,1, jpi,   &  ! Horizontal grid : glamt and gphit
34              1, jpj, 0, zjulian, rdt, nh_t, nidtrd)
35         IF( isum > 0 ) THEN                                         ! Index of ocean points (2D only)
36            WRITE(numout,*)' Number of invalid points nmld > jpktrd', isum
37            CALL wheneq( jpi*jpj, zvlmsk(:,:) , 1, 1., ndextrd1, ndimtrd1 )   ! volume
38         ELSE
39            CALL wheneq( jpi*jpj, tmask(:,:,1), 1, 1., ndextrd1, ndimtrd1 )    ! surface
40         ENDIF
41         
42
43         ! Declare output fields as netCDF variables
44
45         ! Mixed layer Depth
46         CALL histdef( nidtrd, "somlttml", clmxl//"Depth"              , "m"   ,   &  ! hmlp
47            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
48
49         ! Temperature
50         CALL histdef( nidtrd, "somltemp", clmxl//"Temperature"        , "C"   ,   &  ! ???
51            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
52         ! Temperature trends
53         CALL histdef( nidtrd, "somlttto", clmxl//"T Total"             , "C/s",   &  ! total
54            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
55         CALL histdef( nidtrd, "somlttax", clmxl//"T Zonal Advection", "C/s",       & ! i-adv.
56            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
57         CALL histdef( nidtrd, "somlttay", clmxl//"T Meridional Advection", "C/s",   & ! j-adv.
58            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
59         CALL histdef( nidtrd, "somlttaz", clmxl//"T Vertical Advection", "C/s",   & ! vert. adv.
60            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
61         CALL histdef( nidtrd, "somlttdh", clmxl//"T Horizontal Diffusion ", "C/s",   & ! hor. lateral diff.
62            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
63         CALL histdef( nidtrd, "somlttfo", clmxl//"T Forcing", "C/s",   & ! forcing
64            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
65         CALL histdef( nidtrd, "somlbtdz", clmxl//"T Vertical Diffusion", "C/s",   & ! vert. diff.
66            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
67         CALL histdef( nidtrd, "somlbtdt", clmxl//"T dh/dt Entrainment (Residual)", "C/s",   & ! T * dh/dt
68            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
69         IF( l_traldf_iso ) THEN
70         CALL histdef( nidtrd, "somlbtdv", clmxl//"T Vert. lateral Diffusion","C/s",   & ! vertical diffusion entrainment (ISO)
71            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
72         ENDIF
73#if defined key_traldf_eiv
74         CALL histdef( nidtrd, "somlgtax", clmxl//"T Zonal EIV Advection", "C/s",   & ! i-adv. (eiv)
75            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
76         CALL histdef( nidtrd, "somlgtay", clmxl//"T Meridional EIV Advection", "C/s",   & ! j-adv. (eiv)
77            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
78         CALL histdef( nidtrd, "somlgtaz", clmxl//"T Vertical EIV Advection", "C/s",   & ! vert. adv. (eiv)
79            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
80         CALL histdef( nidtrd, "somlgtat", clmxl//"T Total EIV Advection", "C/s",   & ! total advection (eiv)
81            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
82#endif
83         ! Salinity
84         CALL histdef( nidtrd, "somlsalt", clmxl//"Salinity", "PSU",   & ! Mixed-layer salinity
85            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
86         ! Salinity trends
87         CALL histdef( nidtrd, "somltsto", clmxl//"S Total", "PSU/s",   & ! total
88            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
89         CALL histdef( nidtrd, "somltsax", clmxl//"S Zonal Advection", "PSU/s",   & ! i-advection
90            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
91         CALL histdef( nidtrd, "somltsay", clmxl//"S Meridional Advection", "PSU/s",   & ! j-advection
92            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
93         CALL histdef( nidtrd, "somltsaz", clmxl//"S Vertical Advection", "PSU/s",   & ! vertical advection
94            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
95         CALL histdef( nidtrd, "somltsdh", clmxl//"S Horizontal Diffusion ", "PSU/s",   & ! hor. lat. diff.
96            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
97         CALL histdef( nidtrd, "somltsfo", clmxl//"S Forcing", "PSU/s",   & ! forcing
98            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
99
100         CALL histdef( nidtrd, "somlbsdz", clmxl//"S Vertical Diffusion", "PSU/s",   & ! vert. diff.
101            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
102         CALL histdef( nidtrd, "somlbsdt", clmxl//"S dh/dt Entrainment (Residual)", "PSU/s",   & ! S * dh/dt
103            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
104         IF( l_traldf_iso ) THEN
105         ! vertical diffusion entrainment (ISO)
106         CALL histdef( nidtrd, "somlbsdv", clmxl//"S Vertical lateral Diffusion", "PSU/s",   & ! vert. lat. diff.
107            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
108         ENDIF
109#if defined key_traldf_eiv
110         CALL histdef( nidtrd, "somlgsax", clmxl//"S Zonal EIV Advection", "PSU/s",   & ! i-advection (eiv)
111            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
112         CALL histdef( nidtrd, "somlgsay", clmxl//"S Meridional EIV Advection", "PSU/s",   & ! j-advection (eiv)
113            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
114         CALL histdef( nidtrd, "somlgsaz", clmxl//"S Vertical EIV Advection", "PSU/s",   & ! vert. adv. (eiv)
115            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
116         CALL histdef( nidtrd, "somlgsat", clmxl//"S Total EIV Advection", "PSU/s",   & ! total adv. (eiv)
117            &          jpi, jpj, nh_t, 1  , 1, 1  , -99 , 32, clop, zsto, zout )
118#endif
119         CALL histend( nidtrd )
120
121      ENDIF
Note: See TracBrowser for help on using the repository browser.