- Timestamp:
- 2015-12-16T10:25:22+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90
r5836 r6060 12 12 USE par_kind, ONLY: wp 13 13 USE par_oce ! For parameter jpi,jpj,jphgr_msh 14 USE dom_oce ! For parameters in par_oce (jperio, lk_vvl)14 USE dom_oce ! For parameters in par_oce 15 15 USE crs ! Coarse grid domain 16 16 USE phycst, ONLY: omega, rad ! physical constants … … 30 30 PUBLIC crs_init ! called by nemogcm.F90 module 31 31 32 !! * Substitutions 33 # include "domzgr_substitute.h90" 34 !!---------------------------------------------------------------------- 32 !!---------------------------------------------------------------------- 33 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 35 34 !! $Id$ 35 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- 37 37 CONTAINS … … 64 64 !! output C*dA or C*dV as summation not mran, then do mean (division) at moment of output. 65 65 !! As is, crsfun takes into account vvl. 66 !! Talked about pre-setting the surface array to avoid IF/ENDIF Sand division.66 !! Talked about pre-setting the surface array to avoid IF/ENDIF and division. 67 67 !! But have then to make that preset array here and elsewhere. 68 68 !! that is called every timestep... … … 73 73 INTEGER :: ierr ! allocation error status 74 74 INTEGER :: ios ! Local integer output status for namelist read 75 REAL(wp), DIMENSION(:,:,:), POINTER :: z fse3t, zfse3u, zfse3v, zfse3w75 REAL(wp), DIMENSION(:,:,:), POINTER :: ze3t, ze3u, ze3v, ze3w 76 76 77 77 NAMELIST/namcrs/ nn_factx, nn_facty, nn_binref, nn_msh_crs, nn_crs_kz, ln_crs_wn … … 187 187 188 188 ! 189 CALL wrk_alloc( jpi,jpj,jpk, z fse3t, zfse3u, zfse3v, zfse3w )190 ! 191 z fse3t(:,:,:) = fse3t(:,:,:)192 z fse3u(:,:,:) = fse3u(:,:,:)193 z fse3v(:,:,:) = fse3v(:,:,:)194 z fse3w(:,:,:) = fse3w(:,:,:)189 CALL wrk_alloc( jpi,jpj,jpk, ze3t, ze3u, ze3v, ze3w ) 190 ! 191 ze3t(:,:,:) = e3t_n(:,:,:) 192 ze3u(:,:,:) = e3u_n(:,:,:) 193 ze3v(:,:,:) = e3v_n(:,:,:) 194 ze3w(:,:,:) = e3w_n(:,:,:) 195 195 196 196 ! 3.d.2 Surfaces 197 CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=e1t, p_e2=e2t 198 CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=z fse3u )199 CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=z fse3v )197 CALL crs_dom_sfc( tmask, 'W', e1e2w_crs, e1e2w_msk, p_e1=e1t, p_e2=e2t ) 198 CALL crs_dom_sfc( umask, 'U', e2e3u_crs, e2e3u_msk, p_e2=e2u, p_e3=ze3u ) 199 CALL crs_dom_sfc( vmask, 'V', e1e3v_crs, e1e3v_msk, p_e1=e1v, p_e3=ze3v ) 200 200 201 201 facsurfu(:,:,:) = umask_crs(:,:,:) * e2e3u_msk(:,:,:) / e2e3u_crs(:,:,:) … … 204 204 ! 3.d.3 Vertical scale factors 205 205 ! 206 CALL crs_dom_e3( e1t, e2t, z fse3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs)207 CALL crs_dom_e3( e1u, e2u, z fse3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs)208 CALL crs_dom_e3( e1v, e2v, z fse3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs)209 CALL crs_dom_e3( e1t, e2t, z fse3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs)206 CALL crs_dom_e3( e1t, e2t, ze3t, e1e2w_crs, 'T', tmask, e3t_crs, e3t_max_crs) 207 CALL crs_dom_e3( e1u, e2u, ze3u, e2e3u_crs, 'U', umask, e3u_crs, e3u_max_crs) 208 CALL crs_dom_e3( e1v, e2v, ze3v, e1e3v_crs, 'V', vmask, e3v_crs, e3v_max_crs) 209 CALL crs_dom_e3( e1t, e2t, ze3w, e1e2w_crs, 'W', tmask, e3w_crs, e3w_max_crs) 210 210 211 211 ! Replace 0 by e3t_0 or e3w_0 … … 222 222 223 223 ! 3.d.3 Vertical depth (meters) 224 CALL crs_dom_ope( gdept_0, 'MAX', 'T', tmask, gdept_crs, p_e3=z fse3t, psgn=1.0 )225 CALL crs_dom_ope( gdepw_0, 'MAX', 'W', tmask, gdepw_crs, p_e3=z fse3w, psgn=1.0 )224 CALL crs_dom_ope( gdept_0, 'MAX', 'T', tmask, gdept_crs, p_e3=ze3t, psgn=1.0 ) 225 CALL crs_dom_ope( gdepw_0, 'MAX', 'W', tmask, gdepw_crs, p_e3=ze3w, psgn=1.0 ) 226 226 227 227 … … 230 230 !--------------------------------------------------------- 231 231 ! 4.a. Ocean volume or area unmasked and masked 232 CALL crs_dom_facvol( tmask, 'T', e1t, e2t, z fse3t, ocean_volume_crs_t, facvol_t )232 CALL crs_dom_facvol( tmask, 'T', e1t, e2t, ze3t, ocean_volume_crs_t, facvol_t ) 233 233 ! 234 234 bt_crs(:,:,:) = ocean_volume_crs_t(:,:,:) * facvol_t(:,:,:) … … 237 237 WHERE( bt_crs /= 0._wp ) r1_bt_crs(:,:,:) = 1._wp / bt_crs(:,:,:) 238 238 239 CALL crs_dom_facvol( tmask, 'W', e1t, e2t, z fse3w, ocean_volume_crs_w, facvol_w )239 CALL crs_dom_facvol( tmask, 'W', e1t, e2t, ze3w, ocean_volume_crs_w, facvol_w ) 240 240 ! 241 241 !--------------------------------------------------------- … … 252 252 ! 7. Finish and clean-up 253 253 !--------------------------------------------------------- 254 CALL wrk_dealloc( jpi,jpj,jpk, z fse3t, zfse3u, zfse3v, zfse3w )254 CALL wrk_dealloc( jpi,jpj,jpk, ze3t, ze3u, ze3v, ze3w ) 255 255 ! 256 256 END SUBROUTINE crs_init
Note: See TracChangeset
for help on using the changeset viewer.