1 | !----------------------------------------- |
---|
2 | ! II.1 Define frequency of output and means |
---|
3 | ! ----------------------------------------- |
---|
4 | #if defined key_diainstant |
---|
5 | zsto = nwrite*rdt |
---|
6 | clop ="inst(only(x))" |
---|
7 | #else |
---|
8 | zsto = rdt |
---|
9 | clop ="ave(x)" |
---|
10 | #endif |
---|
11 | zout = ntrd*rdt |
---|
12 | |
---|
13 | IF( kt == nit000 ) THEN |
---|
14 | IF(lwp) WRITE (numout,*) ' Diavor: netCDF initialization' |
---|
15 | |
---|
16 | ! II.2 Compute julian date from starting date of the run |
---|
17 | ! ------------------------ |
---|
18 | CALL ymds2ju( nyear, nmonth, nday, 0.e0, zjulian ) |
---|
19 | IF (lwp) WRITE(numout,*)' ' |
---|
20 | IF (lwp) WRITE(numout,*)' Date 0 used :',nit000 & |
---|
21 | ,' YEAR ', nyear,' MONTH ', nmonth,' DAY ', nday & |
---|
22 | ,'Julian day : ', zjulian |
---|
23 | |
---|
24 | ! II.3 Define the T grid trend file (nidvor) |
---|
25 | ! --------------------------------- |
---|
26 | CALL dia_nam( clhstnam, ntrd, 'vort' ) ! filename |
---|
27 | IF(lwp) WRITE(numout,*) ' Name of NETCDF file ', clhstnam |
---|
28 | CALL histbeg( clhstnam, jpi, glamf, jpj, gphif,1, jpi, & ! Horizontal grid : glamt and gphit |
---|
29 | & 1, jpj, 0, zjulian, rdt, nh_t, nidvor) |
---|
30 | CALL wheneq( jpi*jpj, fmask, 1, 1., ndexvor1, ndimvor1 ) ! surface |
---|
31 | |
---|
32 | ! Declare output fields as netCDF variables |
---|
33 | CALL histdef( nidvor, "sovortPh", cvort//"grad Ph" , "s-2", & ! grad Ph |
---|
34 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
35 | CALL histdef( nidvor, "sovortEk", cvort//"Energy", "s-2", & ! Energy |
---|
36 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
37 | CALL histdef( nidvor, "sovozeta", cvort//"rel vorticity", "s-2", & ! rel vorticity |
---|
38 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
39 | CALL histdef( nidvor, "sovortif", cvort//"coriolis", "s-2", & ! coriolis |
---|
40 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
41 | CALL histdef( nidvor, "sovodifl", cvort//"lat diff ", "s-2", & ! lat diff |
---|
42 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
43 | CALL histdef( nidvor, "sovoadvv", cvort//"vert adv", "s-2", & ! vert adv |
---|
44 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
45 | CALL histdef( nidvor, "sovodifv", cvort//"vert diff" , "s-2", & ! vert diff |
---|
46 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
47 | CALL histdef( nidvor, "sovortPs", cvort//"grad Ps", "s-2", & ! grad Ps |
---|
48 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
49 | CALL histdef( nidvor, "sovortbv", cvort//"Beta V", "s-2", & ! beta.V |
---|
50 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
51 | CALL histdef( nidvor, "sovowind", cvort//"wind stress", "s-2", & ! wind stress |
---|
52 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
53 | CALL histdef( nidvor, "sovobfri", cvort//"bottom friction", "s-2", & ! bottom friction |
---|
54 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
55 | CALL histdef( nidvor, "1st_mbre", cvort//"1st mbre", "s-2", & ! First membre |
---|
56 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
57 | CALL histdef( nidvor, "sovorgap", cvort//"gap", "s-2", & ! gap between 1st and 2 nd mbre |
---|
58 | & jpi,jpj,nh_t,1,1,1,-99,32,clop,zsto,zout) |
---|
59 | CALL histend( nidvor ) |
---|
60 | |
---|
61 | ENDIF |
---|