Changeset 2715 for trunk/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
- Timestamp:
- 2011-03-30T17:58:35+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
r2528 r2715 26 26 USE ice_2 27 27 28 USE dianam ! build name of file (routine) 28 29 USE lbclnk 29 USE dianam ! build name of file (routine)30 30 USE in_out_manager 31 USE lib_mpp ! MPP library 31 32 USE iom 32 33 USE ioipsl … … 39 40 #endif 40 41 PUBLIC lim_wri_state_2 ! called by dia_wri_state 42 PUBLIC lim_wri_alloc_2 ! called by nemogcm.F90 41 43 42 44 INTEGER, PARAMETER :: jpnoumax = 40 ! maximum number of variable for ice output … … 50 52 51 53 INTEGER :: nice, nhorid, ndim, niter, ndepid ! ???? 52 INTEGER , DIMENSION( jpij ) :: ndex51 ! ???? 53 54 REAL(wp) :: & ! constant values 55 epsi16 = 1.e-16 , & 56 zzero = 0.e0 , & 57 zone = 1.e0 54 INTEGER, ALLOCATABLE, SAVE, DIMENSION(:) :: ndex51 ! ???? 55 56 REAL(wp) :: epsi16 = 1.e-16_wp ! constant values 57 REAL(wp) :: zzero = 0._wp ! - - 58 REAL(wp) :: zone = 1._wp ! - - 59 60 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: zcmo ! Workspace array for netcdf writer. 61 58 62 59 63 !! * Substitutions … … 64 68 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 65 69 !!---------------------------------------------------------------------- 66 67 70 CONTAINS 71 72 INTEGER FUNCTION lim_wri_alloc_2() 73 !!------------------------------------------------------------------- 74 !! *** ROUTINE lim_wri_alloc_2 *** 75 !!------------------------------------------------------------------- 76 ALLOCATE( ndex51(jpij), zcmo(jpi,jpj,jpnoumax), STAT=lim_wri_alloc_2) 77 ! 78 IF( lk_mpp ) CALL mpp_sum ( lim_wri_alloc_2 ) 79 IF( lim_wri_alloc_2 /= 0 ) CALL ctl_warn('lim_wri_alloc_2: failed to allocate array ndex51') 80 ! 81 END FUNCTION lim_wri_alloc_2 82 68 83 69 84 #if ! defined key_iomput … … 85 100 !! of a day 86 101 !!------------------------------------------------------------------- 102 USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released 103 USE wrk_nemo, ONLY: zfield => wrk_2d_1 104 !! 87 105 INTEGER, INTENT(in) :: kt ! number of iteration 88 106 !! … … 92 110 & zindh, zinda, zindb, ztmu 93 111 REAL(wp), DIMENSION(1) :: zdept 94 REAL(wp), DIMENSION(jpi,jpj) :: zfield 95 REAL(wp), DIMENSION(jpi,jpj,jpnoumax) :: zcmo 96 !!------------------------------------------------------------------- 112 !!------------------------------------------------------------------- 113 114 IF( wrk_in_use(2, 1) ) THEN 115 CALL ctl_stop('lim_wri_2 : requested workspace array unavailable') ; RETURN 116 ENDIF 97 117 !--------------------! 98 118 IF( kt == nit000 ) THEN ! Initialisation ! 99 119 ! !--------------------! 120 100 121 CALL lim_wri_init_2 101 122 … … 186 207 IF( ( nn_fsbc * niter ) >= nitend ) CALL histclo( nice ) 187 208 209 IF( wrk_not_released(2, 1) ) CALL ctl_stop('lim_wri_2 : failed to release workspace array.') 210 ! 188 211 END SUBROUTINE lim_wri_2 189 212 … … 222 245 field_19 223 246 !!------------------------------------------------------------------- 247 ! 248 IF( lim_wri_alloc_2() /= 0 ) THEN ! allocate lim_wri arrrays 249 CALL ctl_stop( 'STOP', 'lim_wri_init_2 : unable to allocate standard arrays' ) ; RETURN 250 ENDIF 224 251 225 252 REWIND ( numnam_ice ) ! Read Namelist namicewri
Note: See TracChangeset
for help on using the changeset viewer.