Changeset 2594 for branches/dev_r2586_dynamic_mem/NEMOGCM
- Timestamp:
- 2011-02-18T18:31:18+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90
r2590 r2594 31 31 PRIVATE 32 32 33 PUBLIC tra_ldf_iso_grif ! routine called by traldf.F90 34 35 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: psix_eiv 36 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: psiy_eiv 37 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: ah_wslp2 33 PUBLIC tra_ldf_iso_grif ! routine called by traldf.F90 34 PUBLIC tra_ldf_iso_grif_alloc ! routine called by nemogcm.F90 35 36 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: psix_eiv 37 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: psiy_eiv 38 REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE :: ah_wslp2 39 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: zdkt ! 2D+1 workspace 38 40 39 41 !! * Substitutions … … 48 50 !!---------------------------------------------------------------------- 49 51 CONTAINS 52 53 FUNCTION tra_ldf_iso_grif_alloc() 54 !!---------------------------------------------------------------------- 55 !! *** ROUTINE tra_ldf_iso_grif_alloc *** 56 !!---------------------------------------------------------------------- 57 INTEGER :: tra_ldf_iso_grif_alloc 58 !!---------------------------------------------------------------------- 59 60 ALLOCATE(zdkt(jpi,jpj,0:1), Stat=tra_ldf_iso_grif_alloc) 61 62 IF(tra_ldf_iso_grif_alloc /= 0)THEN 63 CALL ctl_warn('tra_ldf_iso_grif_alloc : allocation of arrays failed.') 64 END IF 65 66 END FUNCTION tra_ldf_iso_grif_alloc 67 50 68 51 69 SUBROUTINE tra_ldf_iso_grif( kt, cdtype, pgu, pgv, & … … 94 112 USE wrk_nemo, ONLY: wrk_use, wrk_release 95 113 USE wrk_nemo, ONLY: zdit => wrk_3d_1, zdjt => wrk_3d_2, ztfw => wrk_3d_3 96 USE wrk_nemo, ONLY: wrk_3d_4 ! For 2D+1 workspace114 !USE wrk_nemo, ONLY: wrk_3d_4 ! For 2D+1 workspace 97 115 USE wrk_nemo, ONLY: z2d => wrk_2d_1 ! Only used if key_diaar5 defined 98 116 !! … … 111 129 REAL(wp) :: zmskv, zabe2, zcof2, zcoef4 ! - - 112 130 REAL(wp) :: zcoef0, zbtr ! - - 113 REAL(wp), POINTER, DIMENSION(:,:,:) :: zdkt ! 2D+1 workspace131 !REAL(wp), POINTER, DIMENSION(:,:,:) :: zdkt ! 2D+1 workspace 114 132 ! 115 133 REAL(wp) :: zslope_skew, zslope_iso, zslope2, zbu, zbv … … 121 139 !!---------------------------------------------------------------------- 122 140 123 ! Check that workspace arrays are free for use and set-up pointer into 124 ! sub-array of a 3D workspace 125 IF( (.NOT. wrk_use(3, 1,2,3,4)) .OR. (.NOT. wrk_use(2, 1)))THEN 141 ! Check that workspace arrays are free for use 142 IF( (.NOT. wrk_use(3, 1,2,3)) .OR. (.NOT. wrk_use(2, 1)))THEN 126 143 CALL ctl_stop('tra_ldf_iso_grif : requested workspace arrays unavailable.') 127 144 RETURN 128 145 END IF 129 zdkt(1:jpi,1:jpj,0:1) => wrk_3d_4(:,:,1:2) 146 ! ARP - line below uses 'bounds re-mapping' which is only defined in 147 ! Fortran 2003 and up. We would be OK if code was written to use 148 ! zdkt(:,:,1:2) instead as then wouldn't need to re-map bounds. 149 ! As it is, we make zdkt a module array and allocate it in _alloc(). 150 !zdkt(1:jpi,1:jpj,0:1) => wrk_3d_4(:,:,1:2) 130 151 131 152 IF( kt == nit000 ) THEN
Note: See TracChangeset
for help on using the changeset viewer.