- Timestamp:
- 2010-10-28T12:21:58+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r2287 r2329 4 4 !! Ocean diagnostics : write ocean output files 5 5 !!===================================================================== 6 7 !!---------------------------------------------------------------------- 8 !! * Modules used 6 !! History : OPA ! 1991-03 (M.-A. Foujols) Original code 7 !! 4.0 ! 1991-11 (G. Madec) 8 !! ! 1992-06 (M. Imbard) correction restart file 9 !! ! 1992-07 (M. Imbard) split into diawri and rstwri 10 !! ! 1993-03 (M. Imbard) suppress writibm 11 !! ! 1998-01 (C. Levy) NETCDF format using ioipsl INTERFACE 12 !! ! 1999-02 (E. Guilyardi) name of netCDF files + variables 13 !! 8.2 ! 2000-06 (M. Imbard) Original code (diabort.F) 14 !! NEMO 1.0 ! 2002-06 (A.Bozec, E. Durand) Original code (diainit.F) 15 !! - ! 2002-09 (G. Madec) F90: Free form and module 16 !! - ! 2002-12 (G. Madec) merge of diabort and diainit, F90 17 !! ! 2005-11 (V. Garnier) Surface pressure gradient organization 18 !! 3.2 ! 2008-11 (B. Lemaire) creation from old diawri 19 !!---------------------------------------------------------------------- 20 21 !!---------------------------------------------------------------------- 22 !! dia_wri : create the standart output files 23 !! dia_wri_state : create an output NetCDF file for a single instantaeous ocean state and forcing fields 24 !!---------------------------------------------------------------------- 9 25 USE oce ! ocean dynamics and tracers 10 26 USE dom_oce ! ocean space and time domain … … 36 52 PRIVATE 37 53 38 !! * Accessibility 39 PUBLIC dia_wri ! routines called by step.F90 40 PUBLIC dia_wri_state 41 42 !! * Module variables 43 INTEGER :: & 44 nid_T, nz_T, nh_T, ndim_T, ndim_hT, & ! grid_T file 45 nid_U, nz_U, nh_U, ndim_U, ndim_hU, & ! grid_U file 46 nid_V, nz_V, nh_V, ndim_V, ndim_hV, & ! grid_V file 47 nid_W, nz_W, nh_W, & ! grid_W file 48 ndex(1) ! ??? 49 INTEGER, DIMENSION(jpi*jpj) :: & 50 ndex_hT, ndex_hU, ndex_hV 51 INTEGER, DIMENSION(jpi*jpj*jpk) :: & 52 ndex_T, ndex_U, ndex_V 54 PUBLIC dia_wri ! routines called by step.F90 55 PUBLIC dia_wri_state 56 57 INTEGER :: nid_T, nz_T, nh_T, ndim_T, ndim_hT ! grid_T file 58 INTEGER :: nid_U, nz_U, nh_U, ndim_U, ndim_hU ! grid_U file 59 INTEGER :: nid_V, nz_V, nh_V, ndim_V, ndim_hV ! grid_V file 60 INTEGER :: nid_W, nz_W, nh_W ! grid_W file 61 INTEGER :: ndex(1) ! ??? 62 INTEGER, DIMENSION(jpi*jpj) :: ndex_hT, ndex_hU, ndex_hV 63 INTEGER, DIMENSION(jpi*jpj*jpk) :: ndex_T, ndex_U, ndex_V 53 64 54 65 !! * Substitutions … … 58 69 !!---------------------------------------------------------------------- 59 70 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 60 !! $Id$ 61 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 62 !!---------------------------------------------------------------------- 63 71 !! $Id $ 72 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 73 !!---------------------------------------------------------------------- 64 74 CONTAINS 65 75 66 76 #if defined key_dimgout 67 77 !!---------------------------------------------------------------------- 68 !! dia_wri : create the dimg direct access output file (mpp)78 !! 'key_dimgout' DIMG output file 69 79 !!---------------------------------------------------------------------- 70 80 # include "diawri_dimg.h90" … … 74 84 !! Default option NetCDF output file 75 85 !!---------------------------------------------------------------------- 76 !! dia_wri : create the standart NetCDF output files77 !! dia_wri_state : create an output NetCDF file for a single78 !! instantaeous ocean state and forcing fields79 !!----------------------------------------------------------------------80 86 # if defined key_iomput 87 !!---------------------------------------------------------------------- 88 !! 'key_iomput' use IOM library 89 !!---------------------------------------------------------------------- 81 90 SUBROUTINE dia_wri( kt ) 82 91 !!--------------------------------------------------------------------- … … 87 96 !! 88 97 !! ** Method : use iom_put 89 !!90 !! History :91 !! 3.2 ! 05-11 (B. Lemaire) creation from old diawri92 98 !!---------------------------------------------------------------------- 93 99 USE oce, ONLY : z3d => ta ! use ta as 3D workspace … … 168 174 CALL iom_put( "v_heattr", z2d ) ! heat transport in i-direction 169 175 ENDIF 170 176 ! 171 177 END SUBROUTINE dia_wri 172 178 173 179 #else 180 !!---------------------------------------------------------------------- 181 !! Default option use IOIPSL library 182 !!---------------------------------------------------------------------- 183 174 184 SUBROUTINE dia_wri( kt ) 175 185 !!--------------------------------------------------------------------- … … 183 193 !! At each time step call histdef to compute the mean if ncessary 184 194 !! Each nwrite time step, output the instantaneous or mean fields 195 !!---------------------------------------------------------------------- 196 INTEGER, INTENT( in ) :: kt ! ocean time-step index 185 197 !! 186 !! History : 187 !! ! 91-03 (M.-A. Foujols) Original code 188 !! ! 91-11 (G. Madec) 189 !! ! 92-06 (M. Imbard) correction restart file 190 !! ! 92-07 (M. Imbard) split into diawri and rstwri 191 !! ! 93-03 (M. Imbard) suppress writibm 192 !! ! 98-01 (C. Levy) NETCDF format using ioipsl INTERFACE 193 !! ! 99-02 (E. Guilyardi) name of netCDF files + variables 194 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module 195 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 196 !!---------------------------------------------------------------------- 197 !! * Arguments 198 INTEGER, INTENT( in ) :: kt ! ocean time-step index 199 200 !! * Local declarations 201 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout 202 CHARACTER (len=40) :: & 203 clhstnam, clop, clmx ! temporary names 204 INTEGER :: inum = 11 ! temporary logical unit 205 INTEGER :: & 206 iimi, iima, ipk, it, itmod, & ! temporary integers 207 ijmi, ijma ! " " 208 REAL(wp) :: & 209 zsto, zout, zmax, & ! temporary scalars 210 zjulian, zdt ! " " 211 REAL(wp), DIMENSION(jpi,jpj) :: & 212 zw2d ! temporary workspace 198 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout 199 CHARACTER (len=40) :: clhstnam, clop, clmx ! local names 200 INTEGER :: inum = 11 ! temporary logical unit 201 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 202 REAL(wp) :: zsto, zout, zmax, zjulian, zdt ! local scalars 203 REAL(wp), DIMENSION(jpi,jpj) :: zw2d ! 2D workspace 213 204 !!---------------------------------------------------------------------- 214 205 ! … … 386 377 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 387 378 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 388 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )389 #endif390 #if defined key_diaspr391 CALL histdef( nid_T, "sosurfps", "Surface Pressure" , "cm" , & ! sp392 379 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 393 380 #endif … … 524 511 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 525 512 #endif 526 #if defined key_diaspr 527 CALL histwrite( nid_T, "sosurfps", it, gps , ndim_hT, ndex_hT ) ! surface pressure 528 #endif 529 zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 513 zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 530 514 CALL histwrite( nid_T, "sobowlin", it, zw2d , ndim_hT, ndex_hT ) ! ??? 531 515 … … 586 570 CALL histclo( nid_W ) 587 571 ENDIF 588 572 ! 589 573 END SUBROUTINE dia_wri 590 574 # endif … … 604 588 !! File 'output.init.nc' is created if ninist = 1 (namelist) 605 589 !! File 'output.abort.nc' is created in case of abnormal job end 606 !!607 !! History :608 !! 8.2 ! 00-06 (M. Imbard) Original code (diabort.F)609 !! 8.5 ! 02-06 (A.Bozec, E. Durand) Original code (diainit.F)610 !! 9.0 ! 02-12 (G. Madec) merge of diabort and diainit, F90611 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization612 590 !!---------------------------------------------------------------------- 613 !! * Arguments614 591 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 615 592 INTEGER , INTENT( in ) :: kt ! ocean time-step index 616 617 !! * Local declarations 593 !! 618 594 CHARACTER (len=32) :: clname 619 595 CHARACTER (len=40) :: clop 620 INTEGER :: & 621 id_i , nz_i, nh_i 622 INTEGER, DIMENSION(1) :: & 623 idex ! temprary workspace 624 REAL(wp) :: & 625 zsto, zout, zmax, & 626 zjulian, zdt 596 INTEGER :: id_i , nz_i, nh_i 597 INTEGER, DIMENSION(1) :: idex ! local workspace 598 REAL(wp) :: zsto, zout, zmax, zjulian, zdt 627 599 !!---------------------------------------------------------------------- 628 600
Note: See TracChangeset
for help on using the changeset viewer.