Changeset 508 for trunk/NEMO/LIM_SRC/limwri.F90
- Timestamp:
- 2006-10-03T17:58:55+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/LIM_SRC/limwri.F90
r352 r508 4 4 !! Ice diagnostics : write ice output files 5 5 !!====================================================================== 6 !!---------------------------------------------------------------------- 7 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 8 !! $Header$ 9 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 10 !!---------------------------------------------------------------------- 6 !! history : 2.0 ! 03-08 (C. Ethe) original code 7 !! 2.0 ! 04-10 (C. Ethe ) 1D configuration 8 !!------------------------------------------------------------------- 11 9 #if defined key_ice_lim 12 10 !!---------------------------------------------------------------------- 13 11 !! 'key_ice_lim' LIM sea-ice model 12 !!---------------------------------------------------------------------- 14 13 !!---------------------------------------------------------------------- 15 14 !! lim_wri : write of the diagnostics variables in ouput file 16 15 !! lim_wri_init : initialization and namelist read 17 16 !!---------------------------------------------------------------------- 18 !! * Modules used19 17 USE ioipsl 20 18 USE dianam ! build name of file (routine) … … 27 25 USE dom_ice 28 26 USE ice 29 USE iceini30 27 USE lbclnk 31 28 … … 33 30 PRIVATE 34 31 35 !! * Accessibility 36 PUBLIC lim_wri ! routine called by lim_step.F90 37 38 !! * Module variables 39 INTEGER, PARAMETER :: & !: 40 jpnoumax = 40 !: maximum number of variable for ice output 41 INTEGER :: & 42 noumef ! number of fields 43 REAL(wp) , DIMENSION(jpnoumax) :: & 44 cmulti , & ! multiplicative constant 45 cadd ! additive constant 46 CHARACTER(len = 35), DIMENSION(jpnoumax) :: & 47 titn ! title of the field 48 CHARACTER(len = 8 ), DIMENSION(jpnoumax) :: & 49 nam ! name of the field 50 CHARACTER(len = 8 ), DIMENSION(jpnoumax) :: & 51 uni ! unit of the field 52 INTEGER , DIMENSION(jpnoumax) :: & 53 nc ! switch for saving field ( = 1 ) or not ( = 0 ) 32 PUBLIC lim_wri ! routine called by lim_step.F90 33 34 INTEGER, PARAMETER :: jpnoumax = 40 ! maximum number of variable for ice output 35 INTEGER :: noumef ! number of fields 36 REAL(wp) , DIMENSION(jpnoumax) :: cmulti , & ! multiplicative constant 37 & cadd ! additive constant 38 CHARACTER(len = 35), DIMENSION(jpnoumax) :: titn ! title of the field 39 CHARACTER(len = 8 ), DIMENSION(jpnoumax) :: nam ! name of the field 40 CHARACTER(len = 8 ), DIMENSION(jpnoumax) :: uni ! unit of the field 41 INTEGER , DIMENSION(jpnoumax) :: nc ! switch for saving field ( = 1 ) or not ( = 0 ) 42 43 INTEGER :: nice, nhorid, ndim, niter, ndepid ! ???? 44 INTEGER , DIMENSION( jpij ) :: ndex51 ! ???? 54 45 55 46 REAL(wp) :: & ! constant values … … 57 48 zzero = 0.e0 , & 58 49 zone = 1.e0 59 !!------------------------------------------------------------------- 50 51 !!---------------------------------------------------------------------- 52 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 53 !! $Header$ 54 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 !!---------------------------------------------------------------------- 60 56 61 57 CONTAINS 58 62 59 #if defined key_dimgout 63 60 !!---------------------------------------------------------------------- 61 !! 'key_dimgout' Direct Access file 62 !!---------------------------------------------------------------------- 64 63 # include "limwri_dimg.h90" 65 66 64 #else 67 68 SUBROUTINE lim_wri 69 !!------------------------------------------------------------------- 70 !! This routine computes the average of some variables and write it 71 !! on the ouput files. 72 !! ATTENTION cette routine n'est valable que si le pas de temps est 73 !! egale a une fraction entiere de 1 jours. 74 !! Diff 1-D 3-D : suppress common also included in etat 75 !! suppress cmoymo 11-18 76 !! modif : 03/06/98 77 !!------------------------------------------------------------------- 78 !! * Local variables 79 REAL(wp),DIMENSION(1) :: zdept 80 81 REAL(wp) :: & 82 zsto, zsec, zjulian,zout, & 83 zindh,zinda,zindb, & 84 ztmu 85 REAL(wp), DIMENSION(jpi,jpj,jpnoumax) :: & 86 zcmo 87 REAL(wp), DIMENSION(jpi,jpj) :: & 88 zfield 89 INTEGER :: ji, jj, jf ! dummy loop indices 90 91 CHARACTER(len = 40) :: & 92 clhstnam, clop 93 94 INTEGER , SAVE :: & 95 nice, nhorid, ndim, niter, ndepid 96 INTEGER , DIMENSION( jpij ) , SAVE :: & 97 ndex51 98 !!------------------------------------------------------------------- 99 100 IF ( numit == nstart ) THEN 101 65 !!---------------------------------------------------------------------- 66 !! Default option NetCDF file 67 !!---------------------------------------------------------------------- 68 69 SUBROUTINE lim_wri( kt ) 70 !!------------------------------------------------------------------- 71 !! *** ROUTINE lim_wri *** 72 !! 73 !! ** Purpose : write the sea-ice output file in NetCDF 74 !! 75 !! ** Method : computes the average of some variables and write 76 !! it in the NetCDF ouput files 77 !! CAUTION: the sea-ice time-step must be an integer fraction 78 !! of a day 79 !!------------------------------------------------------------------- 80 INTEGER, INTENT(in) :: kt ! number of iteration 81 82 INTEGER :: ji, jj, jf ! dummy loop indices 83 CHARACTER(len = 40) :: clhstnam, clop 84 REAL(wp) :: zsto, zsec, zjulian, zout, & ! temporary scalars 85 & zindh, zinda, zindb, ztmu 86 REAL(wp), DIMENSION(1) :: zdept 87 REAL(wp), DIMENSION(jpi,jpj) :: zfield 88 REAL(wp), DIMENSION(jpi,jpj,jpnoumax) :: zcmo 89 !!------------------------------------------------------------------- 90 91 ! !--------------------! 92 IF ( kt == nit000 ) THEN ! Initialisation ! 93 ! !--------------------! 102 94 CALL lim_wri_init 103 104 !---5----|----5----|----5----|----5----|----5----|----5----|----5----|72 105 ! 1) INITIALIZATIONS. | 106 !----------------------------------------------------------------------- 107 108 !-- essai NetCDF 109 95 110 96 zsto = rdt_ice 111 97 !!Chris clop = "ave(only(x))" !ibug namelist parameter a ajouter … … 118 104 CALL ymds2ju ( nyear, nmonth, nday, zsec, zjulian ) 119 105 CALL dia_nam ( clhstnam, nwrite, 'icemod' ) 120 CALL histbeg ( clhstnam, jpi, glamt, jpj, gphit, 1, jpi, 1, jpj, 0, zjulian, rdt_ice, nhorid, nice , domain_id=nidom) 106 CALL histbeg ( clhstnam, jpi, glamt, jpj, gphit, & 107 & 1, jpi, 1, jpj, 0, zjulian, rdt_ice, nhorid, nice , domain_id=nidom) 121 108 CALL histvert( nice, "deptht", "Vertical T levels", "m", 1, zdept, ndepid) 122 109 CALL wheneq ( jpij , tmask(:,:,1), 1, 1., ndex51, ndim) 123 110 124 111 DO jf = 1, noumef 125 IF ( nc(jf) == 1 ) THEN 126 CALL histdef( nice, nam(jf), titn(jf), uni(jf), jpi, jpj & 127 , nhorid, 1, 1, 1, -99, 32, clop, zsto, zout ) 128 ENDIF 129 END DO 130 CALL histend(nice) 131 132 ENDIF 133 134 !---5----|----5----|----5----|----5----|----5----|----5----|----5----|72 135 !--2. Computation of instantaneous values | 136 !----------------------------------------------------------------------- 137 112 IF ( nc(jf) == 1 ) CALL histdef( nice, nam(jf), titn(jf), uni(jf), jpi, jpj & 113 & , nhorid, 1, 1, 1, -99, 32, clop, zsto, zout ) 114 END DO 115 CALL histend( nice ) 116 117 ENDIF 118 ! !--------------------! 119 ! ! Cumulate at kt ! 120 ! !--------------------! 121 122 !!gm change the print below to have it only at output time step or when nitend =< 100 138 123 IF(lwp) THEN 139 124 WRITE(numout,*) 140 WRITE(numout,*) 'lim_wri : write ice outputs in NetCDF files at time : ', nyear, nmonth, nday, numit125 WRITE(numout,*) 'lim_wri : write ice outputs in NetCDF files at time : ', nyear, nmonth, nday, kt + nfice - 1 141 126 WRITE(numout,*) '~~~~~~~ ' 142 127 ENDIF … … 179 164 END DO 180 165 END DO 181 182 166 ! 183 ! ecriture d'un fichier netcdf167 ! Write the netcdf file 184 168 ! 185 169 niter = niter + 1 … … 205 189 CALL histclo( nice ) 206 190 ENDIF 207 191 ! 208 192 END SUBROUTINE lim_wri 193 209 194 #endif 210 195 … … 213 198 !! *** ROUTINE lim_wri_init *** 214 199 !! 215 !! ** Purpose : ???200 !! ** Purpose : intialisation of LIM sea-ice output 216 201 !! 217 202 !! ** Method : Read the namicewri namelist and check the parameter … … 219 204 !! 220 205 !! ** input : Namelist namicewri 221 !! 222 !! history : 223 !! 8.5 ! 03-08 (C. Ethe) original code 224 !!------------------------------------------------------------------- 225 !! * Local declarations 206 !!------------------------------------------------------------------- 226 207 INTEGER :: nf ! ??? 227 228 208 TYPE FIELD 229 209 CHARACTER(len = 35) :: ztitle … … 234 214 REAL :: zcadd 235 215 END TYPE FIELD 236 237 216 TYPE(FIELD) :: & 238 217 field_1 , field_2 , field_3 , field_4 , field_5 , field_6 , & … … 240 219 field_13, field_14, field_15, field_16, field_17, field_18, & 241 220 field_19 242 243 221 TYPE(FIELD) , DIMENSION(jpnoumax) :: zfield 244 222 … … 248 226 field_13, field_14, field_15, field_16, field_17, field_18, & 249 227 field_19 250 !!------------------------------------------------------------------- 251 228 !!gm NAMELIST/namiceout/ noumef, & 229 !! zfield( 1), zfield( 2), zfield( 3), zfield( 4), zfield( 5), & 230 !! zfield( 6), zfield( 7), zfield( 8), zfield( 9), zfield(10), & 231 !! zfield(11), zfield(12), zfield(13), zfield(14), zfield(15), & 232 !!gm zfield(16), zfield(17), zfield(18), zfield(19) 233 !!------------------------------------------------------------------- 252 234 253 235 ! Read Namelist namicewri 254 236 REWIND ( numnam_ice ) 255 237 READ ( numnam_ice , namiceout ) 238 256 239 zfield(1) = field_1 257 240 zfield(2) = field_2 … … 295 278 END DO 296 279 ENDIF 297 280 ! 298 281 END SUBROUTINE lim_wri_init 299 282
Note: See TracChangeset
for help on using the changeset viewer.