Changeset 888
- Timestamp:
- 2008-04-11T19:05:03+02:00 (16 years ago)
- Location:
- trunk/NEMO
- Files:
-
- 21 added
- 28 deleted
- 91 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/C1D_SRC/diawri1d.F90
r833 r888 13 13 USE dom_oce ! ocean space and time domain 14 14 USE zdf_oce ! ocean vertical physics 15 USE sbc_oce ! surface boundary condition: ocean 16 USE sbc_ice ! surface boundary condition: ice 15 17 USE zdftke ! TKE vertical mixing 16 18 USE zdfkpp ! KPP vertical mixing … … 19 21 USE phycst ! physical constants 20 22 USE ocfzpt ! ??? 21 USE ocesbc ! surface thermohaline fluxes22 USE taumod ! surface stress23 USE flxrnf ! ???24 23 USE zdfmxl ! mixed layer 25 24 USE daymod ! calendar … … 49 48 !!---------------------------------------------------------------------- 50 49 !! OPA 9.0 , LOCEAN-IPSL (2005) 51 !! $ Header$50 !! $Id$ 52 51 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 53 52 !!---------------------------------------------------------------------- … … 194 193 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 195 194 196 #if ! defined key_dynspg_rl && defined key_lim3 197 ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to198 ! internal damping to Levitus that can be diagnosed from others199 ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup200 CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater" , "kg/m2/s", & ! fsalt201 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )202 CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater" , "kg/m2/s", & ! fmass203 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )204 #endif195 !!$#if ! defined key_dynspg_rl && ( defined key_lim2 || defined key_lim2 ) 196 !!$ ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 197 !!$ ! internal damping to Levitus that can be diagnosed from others 198 !!$ ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 199 !!$ CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater" , "kg/m2/s", & ! fsalt 200 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 201 !!$ CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater" , "kg/m2/s", & ! fmass 202 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 203 !!$#endif 205 204 CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux" , "Kg/m2/s", & ! emp 206 205 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 211 210 CALL histdef( nid_T, "sosalflx", "Surface Salt Flux" , "Kg/m2/s", & ! emps * sn 212 211 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 213 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! q t212 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qsr + qns 214 213 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 215 214 CALL histdef( nid_T, "soshfldo", "Shortwave Radiation" , "W/m2" , & ! qsr … … 238 237 #endif 239 238 240 #if ( defined key_coupled && ! defined key_lim3)239 #if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) ) 241 240 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 242 241 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 260 259 #endif 261 260 262 #if defined key_lim3&& defined key_coupled261 #if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled 263 262 CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature" , "K" , & ! tn_ice 264 263 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 275 274 #endif 276 275 ! !!! nid_U : 2D 277 CALL histdef( nid_T, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! taux276 CALL histdef( nid_T, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! utau 278 277 & jpi, jpj, nh_T, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 279 278 … … 286 285 #endif 287 286 ! !!! nid_V : 2D 288 CALL histdef( nid_T, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! tauy287 CALL histdef( nid_T, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! vtau 289 288 & jpi, jpj, nh_T, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 290 289 #if defined key_zdftke … … 365 364 CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface temperature 366 365 CALL histwrite( nid_T, "sosaline", it, sn(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity 367 #if ! defined key_dynspg_rl && defined key_lim3366 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 368 367 CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux 369 368 CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux … … 374 373 zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 375 374 CALL histwrite( nid_T, "sosalflx", it, zw2d , ndim_hT, ndex_hT ) ! c/d salt flux 376 CALL histwrite( nid_T, "sohefldo", it, q t, ndim_hT, ndex_hT ) ! total heat flux375 CALL histwrite( nid_T, "sohefldo", it, qsr + qns , ndim_hT, ndex_hT ) ! total heat flux 377 376 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux 378 377 CALL histwrite( nid_T, "somxl010", it, hmlp , ndim_hT, ndex_hT ) ! mixed layer depth … … 397 396 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 398 397 #endif 399 #if ( defined key_coupled && ! defined key_lim3)398 #if ( defined key_coupled && ! ( defined key_lim3 || defined key_lim2 ) ) 400 399 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 401 400 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping … … 412 411 CALL histwrite( nid_T, "sohtc300", it, htc3 , ndim_hT, ndex_hT ) ! first 300m heaat content 413 412 #endif 414 #if defined key_lim3&& defined key_coupled413 #if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled 415 414 CALL histwrite( nid_T, "soicetem", it, tn_ice , ndim_hT, ndex_hT ) ! surf. ice temperature 416 415 CALL histwrite( nid_T, "soicealb", it, alb_ice , ndim_hT, ndex_hT ) ! ice albedo … … 418 417 419 418 CALL histwrite( nid_T, "vozocrtx", it, un , ndim_T , ndex_T ) ! i-current 420 CALL histwrite( nid_T, "sozotaux", it, taux, ndim_hT, ndex_hT ) ! i-wind stress419 CALL histwrite( nid_T, "sozotaux", it, utau , ndim_hT, ndex_hT ) ! i-wind stress 421 420 CALL histwrite( nid_T, "vomecrty", it, vn , ndim_T , ndex_T ) ! j-current 422 CALL histwrite( nid_T, "sometauy", it, tauy, ndim_hT, ndex_hT ) ! j-wind stress421 CALL histwrite( nid_T, "sometauy", it, vtau , ndim_hT, ndex_hT ) ! j-wind stress 423 422 #if defined key_zdftke 424 423 CALL histwrite( nid_T, "votlsdis", it, e_dis , ndim_T , ndex_T ) ! Diss. Turb. lenght scale -
trunk/NEMO/C1D_SRC/icestp1d.F90
r833 r888 6 6 !! History : 9.0 ! 04-10 (C. Ethe) from icestp, 1D configuration 7 7 !!---------------------------------------------------------------------- 8 #if defined key_cfg_1d && defined key_lim38 #if defined key_cfg_1d && ( defined key_lim3 || defined key_lim2 ) 9 9 !!---------------------------------------------------------------------- 10 10 !! 'key_cfg_1d' .AND. 1D Configuration 11 !! 'key_lim 3' Limsea-ice model11 !! 'key_lim2' OR 'key_lim3' : LIM 2.0 or 3.0 sea-ice model 12 12 !!---------------------------------------------------------------------- 13 13 !!---------------------------------------------------------------------- … … 18 18 USE in_out_manager ! I/O manager 19 19 USE ice_oce ! ice variables 20 USE flx_oce ! forcings variables 21 USE dom_ice ! LIM sea-ice domain 22 USE cpl_oce ! coupled ocean-atmosphere variables 23 USE blk_oce ! bulk variables 20 USE dom_ice_2 ! LIM sea-ice domain 21 USE sbc_oce ! surface boundary condition: ocean 22 USE sbc_ice ! surface boundary condition: ice 24 23 USE daymod ! calendar 25 24 USE phycst ! Define parameters for the routines 26 USE taumod ! surface stress forcing 27 USE ice ! ice variables 25 USE ice_2 ! ice variables 28 26 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 29 USE limthd 30 USE limflx 31 USE limwri 32 USE limrst 33 34 USE ocesbc ! thermohaline fluxes 35 USE flxmod ! thermohaline forcing 36 USE flxrnf ! runoffs forcing 27 USE limthd_2 28 USE limwri_2 29 USE limrst_2 30 37 31 USE tradmp ! damping salinity trend 38 32 USE dtatem ! ocean temperature data … … 52 46 !!---------------------------------------------------------------------- 53 47 !! LIM 2.0 , UCL-LOCEAN-IPSL (2006) 54 !! $ Header$48 !! $Id$ 55 49 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 56 50 !!---------------------------------------------------------------------- … … 109 103 u_io (:,:) = u_io (:,:) / FLOAT( nfice ) 110 104 v_io (:,:) = v_io (:,:) / FLOAT( nfice ) 111 gtaux (:,:) = taux(:,:)112 gtauy (:,:) = tauy(:,:)105 gtaux (:,:) = utau (:,:) 106 gtauy (:,:) = vtau (:,:) 113 107 114 108 zsss_io (:,:) = SQRT( sss_io(:,:) ) … … 220 214 IF( kt == nit000 ) THEN 221 215 qsr (:,:) = 0.e0 222 q t(:,:) = 0.e0216 qns (:,:) = 0.e0 223 217 qrp (:,:) = 0.e0 224 218 emp (:,:) = 0.e0 … … 238 232 ! ----------------- 239 233 240 q t (:,:) = fnsolar(:,:) + fsolar(:,:) ! non solar heat flux + solarflux234 qns (:,:) = fnsolar(:,:) ! non solar heat flux 241 235 qsr (:,:) = fsolar(:,:) ! solar flux 242 236 … … 261 255 DO ji = 1, fs_jpim1 ! vertor opt. 262 256 ztxy = freezn(ji,jj) ! ice/ocean indicator at T-points 263 taux(ji,jj) = (1.-ztxy) * taux(ji,jj) + ztxy * ftaux(ji,jj) ! stress at the ocean surface264 tauy(ji,jj) = (1.-ztxy) * tauy(ji,jj) + ztxy * ftauy(ji,jj)265 END DO 266 END DO 267 268 ! boundary condition on the stress ( taux,tauy)269 CALL lbc_lnk( taux, 'U', -1. )270 CALL lbc_lnk( tauy, 'V', -1. )257 utau(ji,jj) = (1.-ztxy) * utau(ji,jj) + ztxy * ftaux(ji,jj) ! stress at the ocean surface 258 vtau(ji,jj) = (1.-ztxy) * vtau(ji,jj) + ztxy * ftauy(ji,jj) 259 END DO 260 END DO 261 262 ! boundary condition on the stress (utau,vtau) 263 CALL lbc_lnk( utau, 'U', -1. ) 264 CALL lbc_lnk( vtau, 'V', -1. ) 271 265 272 266 ! Re-initialization of fluxes -
trunk/NEMO/C1D_SRC/step1d.F90
r719 r888 15 15 USE dom_oce ! ocean space and time domain variables 16 16 USE zdf_oce ! ocean vertical physics variables 17 USE sbc_oce ! surface boundary condition: ocean 17 18 USE ldftra_oce 18 19 USE ldfdyn_oce … … 24 25 USE dtatem ! ocean temperature data (dta_tem routine) 25 26 USE dtasal ! ocean salinity data (dta_sal routine) 26 USE dtasst ! ocean sea surface temerature (dta_sst routine)27 USE taumod ! surface stress (tau routine)28 USE flxmod ! thermohaline fluxes (flx routine)29 USE ocesbc ! thermohaline fluxes (oce_sbc routine)30 USE flxrnf ! runoffs (flx_rnf routine)31 USE flxfwb ! freshwater budget correction (flx_fwb routine)32 27 USE ocfzpt ! surface ocean freezing point (oc_fz_pt routine) 33 28 … … 75 70 !!---------------------------------------------------------------------- 76 71 !! OPA 9.0 , LOCEAN-IPSL (2005) 77 !! $ Header$72 !! $Id$ 78 73 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 79 74 !!---------------------------------------------------------------------- … … 157 152 CALL prt_ctl(tab2d_1=emp , clinfo1=' emp - : ', mask1=tmask, ovlap=1) 158 153 CALL prt_ctl(tab2d_1=emps , clinfo1=' emps - : ', mask1=tmask, ovlap=1) 159 CALL prt_ctl(tab2d_1=q t , clinfo1=' qt- : ', mask1=tmask, ovlap=1)154 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask, ovlap=1) 160 155 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1) 161 CALL prt_ctl(tab2d_1=runoff , clinfo1=' runoff : ', mask1=tmask, ovlap=1)162 156 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask : ', mask1=tmask, ovlap=1, kdim=jpk) 163 157 CALL prt_ctl(tab3d_1=tn , clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1) 164 158 CALL prt_ctl(tab3d_1=sn , clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1) 165 CALL prt_ctl(tab2d_1= taux , clinfo1=' tau - x: ', mask1=umask, &166 & tab2d_2= tauy , clinfo2=' - y: ', mask2=vmask, ovlap=1)159 CALL prt_ctl(tab2d_1=utau , clinfo1=' tau - u : ', mask1=umask, & 160 & tab2d_2=vtau , clinfo2=' - v : ', mask2=vmask, ovlap=1) 167 161 ENDIF 168 162 -
trunk/NEMO/LIM_SRC_2/dom_ice_2.F90
r823 r888 1 1 MODULE dom_ice_2 2 #if defined key_lim23 2 !!====================================================================== 4 3 !! *** MODULE dom_ice *** … … 7 6 !! History : 2.0 ! 03-08 (C. Ethe) Free form and module 8 7 !!---------------------------------------------------------------------- 9 8 #if defined key_lim2 10 9 !!---------------------------------------------------------------------- 11 10 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 12 !! $ Header$11 !! $ Id: $ 13 12 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 14 13 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/ice_2.F90
r823 r888 4 4 !! Sea Ice physics: diagnostics variables of ice defined in memory 5 5 !!===================================================================== 6 !! History : 2.0 ! 03-08 (C. Ethe) F90: Free form and module 7 !!---------------------------------------------------------------------- 6 8 #if defined key_lim2 7 9 !!---------------------------------------------------------------------- 8 10 !! 'key_lim2' : LIM 2.0 sea-ice model 9 11 !!---------------------------------------------------------------------- 10 !! History : 11 !! 2.0 ! 03-08 (C. Ethe) F90: Free form and module 12 !!---------------------------------------------------------------------- 13 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 14 !! $Header$ 15 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 12 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 13 !! $ Id: $ 14 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 16 15 !!---------------------------------------------------------------------- 17 16 !! * Modules used … … 21 20 PRIVATE 22 21 23 !! * Share Module variables 24 INTEGER , PUBLIC :: & !!: ** ice-dynamic namelist (namicedyn) ** 25 nbiter = 1 , & !: number of sub-time steps for relaxation 26 nbitdr = 250 !: maximum number of iterations for relaxation 22 !!* ice-dynamic namelist (namicedyn) * 23 INTEGER , PUBLIC :: nbiter = 1 !: number of sub-time steps for relaxation 24 INTEGER , PUBLIC :: nbitdr = 250 !: maximum number of iterations for relaxation 25 REAL(wp), PUBLIC :: epsd = 1.0e-20 !: tolerance parameter for dynamic 26 REAL(wp), PUBLIC :: alpha = 0.5 !: coefficient for semi-implicit coriolis 27 REAL(wp), PUBLIC :: dm = 0.6e+03 !: diffusion constant for dynamics 28 REAL(wp), PUBLIC :: om = 0.5 !: relaxation constant 29 REAL(wp), PUBLIC :: resl = 5.0e-05 !: maximum value for the residual of relaxation 30 REAL(wp), PUBLIC :: cw = 5.0e-03 !: drag coefficient for oceanic stress 31 REAL(wp), PUBLIC :: angvg = 0.e0 !: turning angle for oceanic stress 32 REAL(wp), PUBLIC :: pstar = 1.0e+04 !: first bulk-rheology parameter 33 REAL(wp), PUBLIC :: c_rhg = 20.e0 !: second bulk-rhelogy parameter 34 REAL(wp), PUBLIC :: etamn = 0.e+07 !: minimun value for viscosity 35 REAL(wp), PUBLIC :: creepl = 2.e-08 !: creep limit 36 REAL(wp), PUBLIC :: ecc = 2.e0 !: eccentricity of the elliptical yield curve 37 REAL(wp), PUBLIC :: ahi0 = 350.e0 !: sea-ice hor. eddy diffusivity coeff. (m2/s) 27 38 28 REAL(wp), PUBLIC :: & !!: ** ice-dynamic namelist (namicedyn) ** 29 epsd = 1.0e-20, & !: tolerance parameter for dynamic 30 alpha = 0.5 , & !: coefficient for semi-implicit coriolis 31 dm = 0.6e+03, & !: diffusion constant for dynamics 32 om = 0.5 , & !: relaxation constant 33 resl = 5.0e-05, & !: maximum value for the residual of relaxation 34 cw = 5.0e-03, & !: drag coefficient for oceanic stress 35 angvg = 0.e0 , & !: turning angle for oceanic stress 36 pstar = 1.0e+04, & !: first bulk-rheology parameter 37 c_rhg = 20.e0 , & !: second bulk-rhelogy parameter 38 etamn = 0.e+07, & !: minimun value for viscosity 39 creepl = 2.e-08, & !: creep limit 40 ecc = 2.e0 , & !: eccentricity of the elliptical yield curve 41 ahi0 = 350.e0 !: sea-ice hor. eddy diffusivity coeff. (m2/s) 39 REAL(wp), PUBLIC :: usecc2 !: = 1.0 / ( ecc * ecc ) 40 REAL(wp), PUBLIC :: rhoco !: = rau0 * cw 41 REAL(wp), PUBLIC :: sangvg, cangvg !: sin and cos of the turning angle for ocean stress 42 REAL(wp), PUBLIC :: pstarh !: pstar / 2.0 42 43 43 REAL(wp), PUBLIC :: & !: 44 usecc2 , & !: = 1.0 / ( ecc * ecc ) 45 rhoco , & !: = rau0 * cw 46 sangvg, cangvg , & !: sin and cos of the turning angle for ocean stress 47 pstarh !: pstar / 2.0 44 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ahiu , ahiv !: hor. diffusivity coeff. at ocean U- and V-points (m2/s) 45 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: pahu , pahv !: ice hor. eddy diffusivity coef. at ocean U- and V-points 46 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hsnm , hicm !: mean snow and ice thicknesses 47 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ust2s !: friction velocity 48 48 49 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 50 u_oce, v_oce, & !: surface ocean velocity used in ice dynamics 51 ahiu , ahiv , & !: hor. diffusivity coeff. at ocean U- and V-points (m2/s) 52 pahu , pahv , & !: ice hor. eddy diffusivity coef. at ocean U- and V-points 53 hsnm , hicm , & !: mean snow and ice thicknesses 54 ust2s !: friction velocity 49 !!* diagnostic quantities 50 !! REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: firic !: IR flux over the ice (only used for outputs) 51 !! REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fcsic !: Sensible heat flux over the ice (only used for outputs) 52 !! REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fleic !: Latent heat flux over the ice (only used for outputs) 53 !! REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qlatic !: latent flux (only used for outputs) 54 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdvosif !: Variation of volume at surface (only used for outputs) 55 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdvobif !: Variation of ice volume at the bottom ice (only used for outputs) 56 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fdvolif !: Total variation of ice volume (only used for outputs) 57 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdvonif !: Lateral Variation of ice volume (only used for outputs) 55 58 56 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 57 sst_ini, & !: sst read from a file for ice model initialization 58 sss_ini !: sss read from a file for ice model initialization 59 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sist !: Sea-Ice Surface Temperature (Kelvin ??? degree ??? I don't know) 60 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: tfu !: Freezing/Melting point temperature of sea water at SSS 61 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hicif !: Ice thickness 62 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hsnif !: Snow thickness 63 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: hicifp !: Ice production/melting 64 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: frld !: Leads fraction = 1-a/totalarea 65 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: phicif !: ice thickness at previous time 66 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: pfrld !: Leads fraction at previous time 67 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qstoif !: Energy stored in the brine pockets 68 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fbif !: Heat flux at the ice base 69 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdmsnif !: Variation of snow mass 70 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: rdmicif !: Variation of ice mass 71 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qldif !: heat balance of the lead (or of the open ocean) 72 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qcmif !: Energy needed to bring the ocean surface layer until its freezing 73 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fdtcn !: net downward heat flux from the ice to the ocean 74 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qdtcn !: energy from the ice to the ocean point (at a factor 2) 75 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: thcm !: part of the solar energy used in the lead heat budget 76 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fstric !: Solar flux transmitted trough the ice 77 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ffltbif !: Array linked with the max heat contained in brine pockets (?) 78 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fscmbq !: Linked with the solar flux below the ice (?) 79 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: fsbbq !: Also linked with the solar flux below the ice (?) 80 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: qfvbq !: Array used to store energy in case of toral lateral ablation (?) 81 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: dmgwi !: Variation of the mass of snow ice 59 82 60 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 61 firic , & !: IR flux over the ice (only used for outputs) 62 fcsic , & !: Sensible heat flux over the ice (only used for outputs) 63 fleic , & !: Latent heat flux over the ice (only used for outputs) 64 qlatic , & !: latent flux 65 rdvosif, & !: Variation of volume at surface (only used for outputs) 66 rdvobif, & !: Variation of ice volume at the bottom ice (only used for outputs) 67 fdvolif, & !: Total variation of ice volume (only used for outputs) 68 rdvonif, & !: Lateral Variation of ice volume (only used for outputs) 69 sist , & !: Sea-Ice Surface Temperature (Kelvin ??? degree ??? I don't know) 70 tfu , & !: Melting point temperature of sea water 71 hsnif , & !: Snow thickness 72 hicif , & !: Ice thickness 73 hicifp , & !: Ice production/melting 74 frld , & !: Leads fraction = 1-a/totalarea 75 phicif , & !: ice thickness at previous time 76 pfrld , & !: Leads fraction at previous time 77 qstoif , & !: Energy stored in the brine pockets 78 fbif , & !: Heat flux at the ice base 79 rdmsnif, & !: Variation of snow mass 80 rdmicif, & !: Variation of ice mass 81 qldif , & !: heat balance of the lead (or of the open ocean) 82 qcmif , & !: Energy needed to bring the ocean surface layer until its freezing 83 fdtcn , & !: net downward heat flux from the ice to the ocean 84 qdtcn , & !: energy from the ice to the ocean 85 ! ! point (at a factor 2) 86 thcm , & !: part of the solar energy used in the lead heat budget 87 fstric , & !: Solar flux transmitted trough the ice 88 ffltbif, & !: Array linked with the max heat contained in brine pockets (?) 89 fscmbq , & !: Linked with the solar flux below the ice (?) 90 fsbbq , & !: Also linked with the solar flux below the ice (?) 91 qfvbq , & !: Array used to store energy in case of toral lateral ablation (?) 92 dmgwi !: Variation of the mass of snow ice 83 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: albege !: Albedo of the snow or ice (only for outputs) 84 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: albecn !: Albedo of the ocean (only for outputs) 85 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: tauc !: Cloud optical depth 93 86 94 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 95 albege , & !: Albedo of the snow or ice (only for outputs) 96 albecn , & !: Albedo of the ocean (only for outputs) 97 tauc , & !: Cloud optical depth 98 sdvt !: u*^2/(Stress/density) 87 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ui_ice, vi_ice !: two components of the ice velocity at I-point (m/s) 88 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ui_oce, vi_oce !: two components of the ocean velocity at I-point (m/s) 99 89 90 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpsmax) :: scal0 !: ??? 91 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jplayersp1) :: tbif !: Temperature inside the ice/snow layer 100 92 101 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 102 u_ice, v_ice, & !: two components of the ice velocity (m/s) 103 tio_u, tio_v !: two components of the ice-ocean stress (N/m2) 93 !! REAL(wp), DIMENSION(jpi,jpj,0:jpkmax+1) :: reslum !: Relative absorption of solar radiation in each ocean level 104 94 105 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpsmax) :: & !: 106 scal0 !: ??? 107 108 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jplayersp1) :: & !: 109 tbif !: Temperature inside the ice/snow layer 110 111 REAL(wp), DIMENSION(jpi,jpj,0:jpkmax+1) :: & !: 112 reslum !: Relative absorption of solar radiation in each ocean level 113 114 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 115 sxice, syice, sxxice, syyice, sxyice, & !: moments for advection 116 sxsn, sysn, sxxsn, syysn, sxysn, & !: 117 sxa, sya, sxxa, syya, sxya, & !: 118 sxc0, syc0, sxxc0, syyc0, sxyc0, & !: 119 sxc1, syc1, sxxc1, syyc1, sxyc1, & !: 120 sxc2, syc2, sxxc2, syyc2, sxyc2, & !: 121 sxst, syst, sxxst, syyst, sxyst !: 95 !!* moment used in the advection scheme 96 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxice, syice, sxxice, syyice, sxyice !: for ice volume 97 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxsn, sysn, sxxsn, syysn, sxysn !: for snow volume 98 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxa, sya, sxxa, syya, sxya !: for ice cover area 99 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxc0, syc0, sxxc0, syyc0, sxyc0 !: for heat content of snow 100 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxc1, syc1, sxxc1, syyc1, sxyc1 !: for heat content of 1st ice layer 101 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxc2, syc2, sxxc2, syyc2, sxyc2 !: for heat content of 2nd ice layer 102 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: sxst, syst, sxxst, syyst, sxyst !: for heat content of brine pockets 122 103 123 104 #else -
trunk/NEMO/LIM_SRC_2/iceini_2.F90
r823 r888 17 17 USE dom_oce 18 18 USE dom_ice_2 19 USE in_out_manager20 19 USE ice_oce ! ice variables 21 USE flx_oce 20 USE sbc_oce ! surface boundary condition: ocean 21 USE sbc_ice ! surface boundary condition: ice 22 22 USE phycst ! Define parameters for the routines 23 23 USE ocfzpt … … 27 27 USE limrst_2 28 28 USE ini1d ! initialization of the 1D configuration 29 USE in_out_manager 29 30 30 31 IMPLICIT NONE … … 40 41 !!---------------------------------------------------------------------- 41 42 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 42 !! $ Header$43 !! $ Id: $ 43 44 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 44 45 !!---------------------------------------------------------------------- … … 62 63 63 64 ! Louvain la Neuve Ice model 64 IF( nacc == 1 ) THEN 65 dtsd2 = nfice * rdtmin * 0.5 66 rdt_ice = nfice * rdtmin 67 ELSE 68 dtsd2 = nfice * rdt * 0.5 69 rdt_ice = nfice * rdt 70 ENDIF 65 dtsd2 = nn_fsbc * rdttra(1) * 0.5 66 rdt_ice = nn_fsbc * rdttra(1) 71 67 72 68 CALL lim_msh_2 ! ice mesh initialization -
trunk/NEMO/LIM_SRC_2/limadv_2.F90
r823 r888 33 33 !!---------------------------------------------------------------------- 34 34 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 35 !! $ Header$35 !! $ Id: $ 36 36 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 37 37 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/limdia_2.F90
r823 r888 19 19 USE par_ice_2 ! ice parameters 20 20 USE ice_oce ! ice variables 21 USE sbc_oce ! surface boundary condition variables 21 22 USE daymod ! 22 23 USE dom_ice_2 ! … … 28 29 PRIVATE 29 30 30 PUBLIC lim_dia_2 ! called by ice_step31 PUBLIC lim_dia_2 ! called by sbc_ice_lim_2 31 32 INTEGER, PUBLIC :: ntmoy = 1 , & !: instantaneous values of ice evolution or averaging ntmoy 32 33 & ninfo = 1 !: frequency of ouputs on file ice_evolu in case of averaging … … 58 59 !!---------------------------------------------------------------------- 59 60 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 60 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limdia.F90,v 1.9 2007/06/29 17:03:12 opalod Exp $61 !! $ Id: $ 61 62 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 62 63 !!---------------------------------------------------------------------- … … 87 88 88 89 nv = 1 89 vinfor(nv) = REAL( kt + n fice- 1 )90 vinfor(nv) = REAL( kt + nn_fsbc - 1 ) 90 91 nv = nv + 1 91 92 vinfor(nv) = nyear … … 107 108 zicevol = zarea * hicif(ji,jj) 108 109 zsnwvol = zarea * hsnif(ji,jj) 109 zicespd = zicevol * ( u _ice(ji,jj) * u_ice(ji,jj) &110 & + v _ice(ji,jj) * v_ice(ji,jj) )110 zicespd = zicevol * ( ui_ice(ji,jj) * ui_ice(ji,jj) & 111 & + vi_ice(ji,jj) * vi_ice(ji,jj) ) 111 112 vinfor(nv+ 1) = vinfor(nv+ 1) + zarea 112 113 vinfor(nv+ 3) = vinfor(nv+ 3) + zextent15 … … 133 134 zicevol = zarea * hicif(ji,jj) 134 135 zsnwvol = zarea * hsnif(ji,jj) 135 zicespd = zicevol * ( u _ice(ji,jj) * u_ice(ji,jj) &136 & + v _ice(ji,jj) * v_ice(ji,jj) )136 zicespd = zicevol * ( ui_ice(ji,jj) * ui_ice(ji,jj) & 137 & + vi_ice(ji,jj) * vi_ice(ji,jj) ) 137 138 vinfor(nv+ 1) = vinfor(nv+ 1) + zarea 138 139 vinfor(nv+ 3) = vinfor(nv+ 3) + zextent15 … … 154 155 155 156 ! oututs on file ice_evolu 156 IF( MOD( kt + n fice- 1, ninfo ) == 0 ) THEN157 IF( MOD( kt + nn_fsbc - 1, ninfo ) == 0 ) THEN 157 158 WRITE(numevo_ice,fmtw) ( titvar(jv), vinfom(jv)/naveg, jv = 1, nvinfo ) 158 159 naveg = 0 … … 227 228 228 229 ! Definition et Ecriture de l'entete : nombre d'enregistrements 229 ndeb = ( nit000 - 1 + n fice- 1 ) / ninfo230 IF( nit000 - 1 + n fice== 1 ) ndeb = -1231 232 nferme = ( nitend + n fice - 1 ) / ninfo ! nit000 - 1 + nfice- 1 + nitend - nit000 + 1230 ndeb = ( nit000 - 1 + nn_fsbc - 1 ) / ninfo 231 IF( nit000 - 1 + nn_fsbc == 1 ) ndeb = -1 232 233 nferme = ( nitend + nn_fsbc - 1 ) / ninfo ! nit000 - 1 + nn_fsbc - 1 + nitend - nit000 + 1 233 234 ntot = nferme - ndeb 234 235 ndeb = ninfo * ( 1 + ndeb ) -
trunk/NEMO/LIM_SRC_2/limdmp_2.F90
r823 r888 40 40 !!---------------------------------------------------------------------- 41 41 !! LIM 2.0 , UCL-LOCEAN-IPSL (2006) 42 !! $ Header$42 !! $ Id: $ 43 43 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 44 44 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/limdyn_2.F90
r823 r888 4 4 !! Sea-Ice dynamics : 5 5 !!====================================================================== 6 !! History : 1.0 ! 01-04 (LIM) Original code 7 !! 2.0 ! 02-08 (C. Ethe, G. Madec) F90, mpp 8 !! 2.0 ! 03-08 (C. Ethe) add lim_dyn_init 9 !! 2.0 ! 06-07 (G. Madec) Surface module 10 !!--------------------------------------------------------------------- 6 11 #if defined key_lim2 7 12 !!---------------------------------------------------------------------- … … 11 16 !! lim_dyn_init_2 : initialization and namelist read 12 17 !!---------------------------------------------------------------------- 13 !! * Modules used 14 USE phycst 15 USE in_out_manager ! I/O manager 16 USE dom_ice_2 17 USE dom_oce ! ocean space and time domain 18 USE ice_2 19 USE ice_oce 20 USE iceini_2 21 USE limistate_2 22 USE limrhg_2 ! ice rheology 23 USE lbclnk 24 USE lib_mpp 25 USE prtctl ! Print control 18 USE dom_oce ! ocean space and time domain 19 USE sbc_oce ! 20 USE phycst ! 21 USE ice_2 ! 22 USE ice_oce ! 23 USE dom_ice_2 ! 24 USE iceini_2 ! 25 USE limistate_2 ! 26 USE limrhg_2 ! ice rheology 27 28 USE lbclnk ! 29 USE lib_mpp ! 30 USE in_out_manager ! I/O manager 31 USE prtctl ! Print control 26 32 27 33 IMPLICIT NONE 28 34 PRIVATE 29 35 30 !! * Accessibility 31 PUBLIC lim_dyn_2 ! routine called by ice_step 36 PUBLIC lim_dyn_2 ! routine called by sbc_ice_lim 32 37 33 38 !! * Module variables 34 39 REAL(wp) :: rone = 1.e0 ! constant value 35 40 36 !!---------------------------------------------------------------------- 37 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 38 !! $Header$ 39 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 41 # include "vectopt_loop_substitute.h90" 42 !!---------------------------------------------------------------------- 43 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 44 !! $ Id: $ 45 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 40 46 !!---------------------------------------------------------------------- 41 47 … … 46 52 !! *** ROUTINE lim_dyn_2 *** 47 53 !! 48 !! ** Purpose : compute ice velocity and ocean-ice stress54 !! ** Purpose : compute ice velocity and ocean-ice friction velocity 49 55 !! 50 56 !! ** Method : … … 52 58 !! ** Action : - Initialisation 53 59 !! - Call of the dynamic routine for each hemisphere 54 !! - computation of the stress at the ocean surface60 !! - computation of the friction velocity at the sea-ice base 55 61 !! - treatment of the case if no ice dynamic 56 !! History :57 !! 1.0 ! 01-04 (LIM) Original code58 !! 2.0 ! 02-08 (C. Ethe, G. Madec) F90, mpp59 62 !!--------------------------------------------------------------------- 60 63 INTEGER, INTENT(in) :: kt ! number of iteration 61 62 INTEGER :: ji, jj ! dummy loop indices 63 INTEGER :: i_j1, i_jpj ! Starting/ending j-indices for rheology 64 REAL(wp) :: & 65 ztairx, ztairy, & ! tempory scalars 66 zsang , zmod, & 67 ztglx , ztgly , & 68 zt11, zt12, zt21, zt22 , & 69 zustm, zsfrld, zsfrldm4, & 70 zu_ice, zv_ice, ztair2 71 REAL(wp),DIMENSION(jpj) :: & 72 zind, & ! i-averaged indicator of sea-ice 73 zmsk ! i-averaged of tmask 64 !! 65 INTEGER :: ji, jj ! dummy loop indices 66 INTEGER :: i_j1, i_jpj ! Starting/ending j-indices for rheology 67 REAL(wp) :: zcoef ! temporary scalar 68 REAL(wp), DIMENSION(jpj) :: zind ! i-averaged indicator of sea-ice 69 REAL(wp), DIMENSION(jpj) :: zmsk ! i-averaged of tmask 70 REAL(wp), DIMENSION(jpi,jpj) :: zu_io, zv_io ! ice-ocean velocity 74 71 !!--------------------------------------------------------------------- 75 72 76 IF( kt == nit000 73 IF( kt == nit000 ) CALL lim_dyn_init_2 ! Initialization (first time-step only) 77 74 78 IF 79 75 IF( ln_limdyn ) THEN 76 ! 80 77 ! Mean ice and snow thicknesses. 81 78 hsnm(:,:) = ( 1.0 - frld(:,:) ) * hsnif(:,:) 82 79 hicm(:,:) = ( 1.0 - frld(:,:) ) * hicif(:,:) 83 84 u_oce(:,:) = u_io(:,:) * tmu(:,:) 85 v_oce(:,:) = v_io(:,:) * tmu(:,:) 86 87 ! ! Rheology (ice dynamics) 88 ! ! ======== 80 ! 81 ! ! Rheology (ice dynamics) 82 ! ! ======== 89 83 90 84 ! Define the j-limits where ice rheology is computed … … 94 88 i_j1 = 1 95 89 i_jpj = jpj 96 IF(ln_ctl) THEN 97 CALL prt_ctl_info('lim_dyn : i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj) 98 ENDIF 90 IF(ln_ctl) CALL prt_ctl_info( 'lim_dyn : i_j1 = ', ivar1=i_j1, clinfo2=' ij_jpj = ', ivar2=i_jpj ) 99 91 CALL lim_rhg_2( i_j1, i_jpj ) 100 92 ! 101 93 ELSE ! optimization of the computational area 102 94 ! 103 95 DO jj = 1, jpj 104 96 zind(jj) = SUM( frld (:,jj ) ) ! = FLOAT(jpj) if ocean everywhere on a j-line 105 97 zmsk(jj) = SUM( tmask(:,jj,1) ) ! = 0 if land everywhere on a j-line 106 !!i write(numout,*) narea, 'limdyn' , jj, zind(jj), zmsk(jj) 107 END DO 108 98 END DO 99 ! 109 100 IF( l_jeq ) THEN ! local domain include both hemisphere 110 101 ! ! Rheology is computed in each hemisphere … … 118 109 i_j1 = MAX( 1, i_j1-1 ) 119 110 IF(ln_ctl) WRITE(numout,*) 'lim_dyn : NH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj 120 111 ! 121 112 CALL lim_rhg_2( i_j1, i_jpj ) 122 113 ! 123 114 ! Southern hemisphere 124 115 i_j1 = 1 … … 129 120 i_jpj = MIN( jpj, i_jpj+2 ) 130 121 IF(ln_ctl) WRITE(numout,*) 'lim_dyn : SH i_j1 = ', i_j1, ' ij_jpj = ', i_jpj 131 122 ! 132 123 CALL lim_rhg_2( i_j1, i_jpj ) 133 124 ! 134 125 ELSE ! local domain extends over one hemisphere only 135 126 ! ! Rheology is computed only over the ice cover … … 148 139 149 140 IF(ln_ctl) WRITE(numout,*) 'lim_dyn : one hemisphere: i_j1 = ', i_j1, ' ij_jpj = ', i_jpj 150 141 ! 151 142 CALL lim_rhg_2( i_j1, i_jpj ) 152 143 ! 153 144 ENDIF 154 145 ! 155 146 ENDIF 156 147 157 IF(ln_ctl) THEN 158 CALL prt_ctl(tab2d_1=u_oce , clinfo1=' lim_dyn : u_oce :', tab2d_2=v_oce , clinfo2=' v_oce :') 159 CALL prt_ctl(tab2d_1=u_ice , clinfo1=' lim_dyn : u_ice :', tab2d_2=v_ice , clinfo2=' v_ice :') 160 ENDIF 161 162 ! ! Ice-Ocean stress 163 ! ! ================ 148 IF(ln_ctl) CALL prt_ctl(tab2d_1=ui_ice , clinfo1=' lim_dyn : ui_ice :', tab2d_2=vi_ice , clinfo2=' vi_ice :') 149 150 ! computation of friction velocity 151 ! -------------------------------- 152 ! ice-ocean velocity at U & V-points (ui_ice vi_ice at I-point ; ssu_m, ssv_m at U- & V-points) 153 154 DO jj = 1, jpjm1 155 DO ji = 1, fs_jpim1 ! vector opt. 156 zu_io(ji,jj) = 0.5 * ( ui_ice(ji+1,jj+1) + ui_ice(ji+1,jj ) ) - ssu_m(ji,jj) 157 zv_io(ji,jj) = 0.5 * ( vi_ice(ji+1,jj+1) + vi_ice(ji ,jj+1) ) - ssv_m(ji,jj) 158 END DO 159 END DO 160 ! frictional velocity at T-point 164 161 DO jj = 2, jpjm1 165 zsang = SIGN(1.e0, gphif(1,jj-1) ) * sangvg 166 DO ji = 2, jpim1 167 ! computation of wind stress over ocean in X and Y direction 168 #if defined key_coupled && defined key_lim_cp1 169 ztairx = frld(ji-1,jj ) * gtaux(ji-1,jj ) + frld(ji,jj ) * gtaux(ji,jj ) & 170 & + frld(ji-1,jj-1) * gtaux(ji-1,jj-1) + frld(ji,jj-1) * gtaux(ji,jj-1) 171 172 ztairy = frld(ji-1,jj ) * gtauy(ji-1,jj ) + frld(ji,jj ) * gtauy(ji,jj ) & 173 & + frld(ji-1,jj-1) * gtauy(ji-1,jj-1) + frld(ji,jj-1) * gtauy(ji,jj-1) 174 #else 175 zsfrld = frld(ji,jj) + frld(ji-1,jj) + frld(ji-1,jj-1) + frld(ji,jj-1) 176 ztairx = zsfrld * gtaux(ji,jj) 177 ztairy = zsfrld * gtauy(ji,jj) 178 #endif 179 zsfrldm4 = 4 - frld(ji,jj) - frld(ji-1,jj) - frld(ji-1,jj-1) - frld(ji,jj-1) 180 zu_ice = u_ice(ji,jj) - u_oce(ji,jj) 181 zv_ice = v_ice(ji,jj) - v_oce(ji,jj) 182 zmod = SQRT( zu_ice * zu_ice + zv_ice * zv_ice ) 183 ztglx = zsfrldm4 * rhoco * zmod * ( cangvg * zu_ice - zsang * zv_ice ) 184 ztgly = zsfrldm4 * rhoco * zmod * ( cangvg * zv_ice + zsang * zu_ice ) 185 186 tio_u(ji,jj) = - ( ztairx + 1.0 * ztglx ) / ( 4 * rau0 ) 187 tio_v(ji,jj) = - ( ztairy + 1.0 * ztgly ) / ( 4 * rau0 ) 162 DO ji = fs_2, fs_jpim1 ! vector opt. 163 ust2s(ji,jj) = 0.5 * cw & 164 & * ( zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj) & 165 & + zv_io(ji,jj) * zv_io(ji,jj) + zv_io(ji,jj-1) * zv_io(ji,jj-1) ) * tms(ji,jj) 188 166 END DO 189 167 END DO 190 191 ! computation of friction velocity 168 ! 169 ELSE ! no ice dynamics : transmit directly the atmospheric stress to the ocean 170 ! 171 zcoef = SQRT( 0.5 ) / rau0 192 172 DO jj = 2, jpjm1 193 DO ji = 2, jpim1 194 195 zu_ice = u_ice(ji-1,jj-1) - u_oce(ji-1,jj-1) 196 zv_ice = v_ice(ji-1,jj-1) - v_oce(ji-1,jj-1) 197 zt11 = rhoco * ( zu_ice * zu_ice + zv_ice * zv_ice ) 198 199 zu_ice = u_ice(ji-1,jj) - u_oce(ji-1,jj) 200 zv_ice = v_ice(ji-1,jj) - v_oce(ji-1,jj) 201 zt12 = rhoco * ( zu_ice * zu_ice + zv_ice * zv_ice ) 202 203 zu_ice = u_ice(ji,jj-1) - u_oce(ji,jj-1) 204 zv_ice = v_ice(ji,jj-1) - v_oce(ji,jj-1) 205 zt21 = rhoco * ( zu_ice * zu_ice + zv_ice * zv_ice ) 206 207 zu_ice = u_ice(ji,jj) - u_oce(ji,jj) 208 zv_ice = v_ice(ji,jj) - v_oce(ji,jj) 209 zt22 = rhoco * ( zu_ice * zu_ice + zv_ice * zv_ice ) 210 211 ztair2 = gtaux(ji,jj) * gtaux(ji,jj) + gtauy(ji,jj) * gtauy(ji,jj) 212 213 zustm = ( 1 - frld(ji,jj) ) * 0.25 * ( zt11 + zt12 + zt21 + zt22 ) & 214 & + frld(ji,jj) * SQRT( ztair2 ) 215 216 ust2s(ji,jj) = ( zustm / rau0 ) * ( rone + sdvt(ji,jj) ) * tms(ji,jj) 173 DO ji = fs_2, fs_jpim1 ! vector opt. 174 ust2s(ji,jj) = zcoef * tms(ji,jj) * SQRT( utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj) & 175 & + vtau(ji,jj) * vtau(ji,jj) + vtau(ji,jj-1) * vtau(ji,jj-1) ) 217 176 END DO 218 177 END DO 219 220 ELSE ! no ice dynamics : transmit directly the atmospheric stress to the ocean 221 222 DO jj = 2, jpjm1 223 DO ji = 2, jpim1 224 #if defined key_coupled && defined key_lim_cp1 225 tio_u(ji,jj) = - ( gtaux(ji ,jj ) + gtaux(ji-1,jj ) & 226 & + gtaux(ji-1,jj-1) + gtaux(ji ,jj-1) ) / ( 4 * rau0 ) 227 228 tio_v(ji,jj) = - ( gtauy(ji ,jj ) + gtauy(ji-1,jj ) & 229 & + gtauy(ji-1,jj-1) + gtauy(ji ,jj-1) ) / ( 4 * rau0 ) 230 #else 231 tio_u(ji,jj) = - gtaux(ji,jj) / rau0 232 tio_v(ji,jj) = - gtauy(ji,jj) / rau0 233 #endif 234 ztair2 = gtaux(ji,jj) * gtaux(ji,jj) + gtauy(ji,jj) * gtauy(ji,jj) 235 zustm = SQRT( ztair2 ) 236 237 ust2s(ji,jj) = ( zustm / rau0 ) * ( rone + sdvt(ji,jj) ) * tms(ji,jj) 238 END DO 239 END DO 240 178 ! 241 179 ENDIF 242 180 ! 243 181 CALL lbc_lnk( ust2s, 'T', 1. ) ! T-point 244 CALL lbc_lnk( tio_u, 'I', -1. ) ! I-point (i.e. ice U-V point) 245 CALL lbc_lnk( tio_v, 'I', -1. ) ! I-point (i.e. ice U-V point) 246 247 IF(ln_ctl) THEN 248 CALL prt_ctl(tab2d_1=tio_u , clinfo1=' lim_dyn : tio_u :', tab2d_2=tio_v , clinfo2=' tio_v :') 249 CALL prt_ctl(tab2d_1=ust2s , clinfo1=' lim_dyn : ust2s :') 250 ENDIF 182 ! 183 IF(ln_ctl) CALL prt_ctl(tab2d_1=ust2s , clinfo1=' lim_dyn : ust2s :') 251 184 252 185 END SUBROUTINE lim_dyn_2 … … 257 190 !! *** ROUTINE lim_dyn_init_2 *** 258 191 !! 259 !! ** Purpose : Physical constants and parameters linked to the ice260 !! dynamics261 !! 262 !! ** Method : Read the namicedyn namelist and check the ice-dynamic263 !! parameter values called at the first timestep (nit000)192 !! ** Purpose : Physical constants and parameters linked to the ice 193 !! dynamics 194 !! 195 !! ** Method : Read the namicedyn namelist and check the ice-dynamic 196 !! parameter values 264 197 !! 265 198 !! ** input : Namelist namicedyn 266 !!267 !! history :268 !! 8.5 ! 03-08 (C. Ethe) original code269 199 !!------------------------------------------------------------------- 270 200 NAMELIST/namicedyn/ epsd, alpha, & … … 273 203 !!------------------------------------------------------------------- 274 204 275 ! Define the initial parameters 276 ! ------------------------- 277 278 ! Read Namelist namicedyn 279 REWIND ( numnam_ice ) 205 REWIND ( numnam_ice ) ! Read Namelist namicedyn 280 206 READ ( numnam_ice , namicedyn ) 281 IF(lwp) THEN 207 208 IF(lwp) THEN ! Control print 282 209 WRITE(numout,*) 283 210 WRITE(numout,*) 'lim_dyn_init_2: ice parameters for ice dynamics ' … … 291 218 WRITE(numout,*) ' maximum value for the residual of relaxation resl = ', resl 292 219 WRITE(numout,*) ' drag coefficient for oceanic stress cw = ', cw 293 WRITE(numout,*) ' turning angle for oceanic stress angvg = ', angvg 220 WRITE(numout,*) ' turning angle for oceanic stress angvg = ', angvg, ' degrees' 294 221 WRITE(numout,*) ' first bulk-rheology parameter pstar = ', pstar 295 222 WRITE(numout,*) ' second bulk-rhelogy parameter c_rhg = ', c_rhg … … 303 230 usecc2 = 1.0 / ( ecc * ecc ) 304 231 rhoco = rau0 * cw 305 angvg = angvg * rad 232 angvg = angvg * rad ! convert angvg from degree to radian 306 233 sangvg = SIN( angvg ) 307 234 cangvg = COS( angvg ) 308 235 pstarh = pstar / 2.0 309 sdvt(:,:) = 0.e0 310 311 ! Diffusion coefficients. 312 ahiu(:,:) = ahi0 * umask(:,:,1) 236 ! 237 ahiu(:,:) = ahi0 * umask(:,:,1) ! Ice eddy Diffusivity coefficients. 313 238 ahiv(:,:) = ahi0 * vmask(:,:,1) 314 239 ! 315 240 END SUBROUTINE lim_dyn_init_2 316 241 -
trunk/NEMO/LIM_SRC_2/limhdf_2.F90
r823 r888 6 6 #if defined key_lim2 7 7 !!---------------------------------------------------------------------- 8 !! 'key_lim2' iLIM 2.0 sea-ice model8 !! 'key_lim2' LIM 2.0 sea-ice model 9 9 !!---------------------------------------------------------------------- 10 10 !! lim_hdf_2 : diffusion trend on sea-ice variable … … 34 34 !!---------------------------------------------------------------------- 35 35 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 36 !! $ Header$36 !! $ Id: $ 37 37 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 38 38 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/limistate_2.F90
r823 r888 4 4 !! Initialisation of diagnostics ice variables 5 5 !!====================================================================== 6 !! History : 2.0 ! 01-04 (C. Ethe, G. Madec) Original code 6 !! History : 1.0 ! 01-04 (C. Ethe, G. Madec) Original code 7 !! 2.0 ! 03-08 (G. Madec) add lim_istate_init 7 8 !! ! 04-04 (S. Theetten) initialization from a file 8 9 !! ! 06-07 (S. Masson) IOM to read the restart 10 !! ! 07-10 (G. Madec) surface module 9 11 !!-------------------------------------------------------------------- 10 12 #if defined key_lim2 … … 18 20 USE phycst 19 21 USE ocfzpt 20 USE oce ! dynamics and tracers variables !!gm used???21 USE dom_oce !!gm used???22 22 USE par_ice_2 ! ice parameters 23 23 USE ice_oce ! ice variables 24 24 USE dom_ice_2 25 25 USE lbclnk 26 USE oce 26 27 USE ice_2 27 28 USE iom … … 47 48 !!---------------------------------------------------------------------- 48 49 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 49 !! $ Header$50 !! $ Id: $ 50 51 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 52 !!---------------------------------------------------------------------- … … 66 67 REAL(wp), DIMENSION(jpi,jpj) :: ztn ! workspace 67 68 !-------------------------------------------------------------------- 68 69 CALL lim_istate_init_2 ! reading the initials parameters of the ice 70 71 !-- Initialisation of sst,sss,u,v do i=1,jpi 72 u_io(:,:) = 0.e0 ! ice velocity in x direction 73 v_io(:,:) = 0.e0 ! ice velocity in y direction 74 75 IF( ln_limini ) THEN ! 76 77 ! Initialisation at tn if no ice or sst_ini if ice 78 ! Idem for salinity 79 80 !--- Criterion for presence (zidto=1.) or absence (zidto=0.) of ice 81 DO jj = 1 , jpj 82 DO ji = 1 , jpi 83 84 zidto = MAX(zzero, - SIGN(1.,frld(ji,jj) - 1.)) 85 86 sst_io(ji,jj) = ( nfice - 1 ) * (zidto * sst_ini(ji,jj) + & ! use the ocean initial values 87 & (1.0 - zidto ) * ( tn(ji,jj,1) + rt0 )) ! tricky trick *(nfice-1) ! 88 sss_io(ji,jj) = ( nfice - 1 ) * (zidto * sss_ini(ji,jj) + & 89 & (1.0 - zidto ) * sn(ji,jj,1) ) 90 91 ! to avoid the the melting of ice, several layers (mixed layer) should be 92 ! set to sst_ini (sss_ini) if there is ice 93 ! example for one layer 94 ! tn(ji,jj,1) = zidto * ( sst_ini(ji,jj) - rt0 ) + (1.0 - zidto ) * tn(ji,jj,1) 95 ! sn(ji,jj,1) = zidto * sss_ini(ji,jj) + (1.0 - zidto ) * sn(ji,jj,1) 96 ! tb(ji,jj,1) = tn(ji,jj,1) 97 ! sb(ji,jj,1) = sn(ji,jj,1) 98 END DO 99 END DO 100 101 102 ! tfu: Melting point of sea water 103 tfu(:,:) = ztf 104 105 tfu(:,:) = ABS ( rt0 - 0.0575 * sss_ini(:,:) & 106 & + 1.710523e-03 * sss_ini(:,:) * SQRT( sss_ini(:,:) ) & 107 & - 2.154996e-04 * sss_ini(:,:) * sss_ini(:,:) ) 108 ELSE ! 109 69 70 CALL lim_istate_init_2 ! reading the initials parameters of the ice 71 72 IF( .NOT. ln_limini ) THEN 110 73 111 74 ! Initialisation at tn or -2 if ice … … 116 79 END DO 117 80 END DO 118 119 u_io (:,:) = 0.e0 120 v_io (:,:) = 0.e0 121 sst_io(:,:) = ( nfice - 1 ) * ( tn(:,:,1) + rt0 ) ! use the ocean initial values 122 sss_io(:,:) = ( nfice - 1 ) * sn(:,:,1) ! tricky trick *(nfice-1) ! 123 124 ! reference salinity 34psu 81 82 ! tfu: Melting point of sea water [Kelvin] 125 83 zs0 = 34.e0 126 ztf = ABS ( rt0 - 0.0575 * zs0 & 127 & + 1.710523e-03 * zs0 * SQRT( zs0 ) & 128 & - 2.154996e-04 * zs0 *zs0 ) 129 130 ! tfu: Melting point of sea water 131 tfu(:,:) = ztf 84 ztf = rt0 + ( - 0.0575 + 1.710523e-3 * SQRT( zs0 ) - 2.154996e-4 * zs0 ) * zs0 85 tfu(:,:) = ztf 132 86 133 87 DO jj = 1, jpj … … 152 106 tbif (:,:,2) = tfu(:,:) 153 107 tbif (:,:,3) = tfu(:,:) 154 108 155 109 ENDIF 110 156 111 fsbbq (:,:) = 0.e0 157 112 qstoif(:,:) = 0.e0 158 u _ice(:,:) = 0.e0159 v _ice(:,:) = 0.e0113 ui_ice(:,:) = 0.e0 114 vi_ice(:,:) = 0.e0 160 115 # if defined key_coupled 161 116 albege(:,:) = 0.8 * tms(:,:) … … 191 146 192 147 CALL lbc_lnk( hsnif, 'T', 1. ) 193 CALL lbc_lnk( sist , 'T', 1. )148 CALL lbc_lnk( sist , 'T', 1. , pval = rt0 ) ! set rt0 on closed boundary (required by bulk formulation) 194 149 DO jk = 1, jplayersp1 195 150 CALL lbc_lnk(tbif(:,:,jk), 'T', 1. ) … … 197 152 CALL lbc_lnk( fsbbq , 'T', 1. ) 198 153 CALL lbc_lnk( qstoif , 'T', 1. ) 199 CALL lbc_lnk( sss_io , 'T', 1. ) 200 ! 154 201 155 END SUBROUTINE lim_istate_2 202 156 … … 209 163 !! 210 164 !! ** Method : Read the namiceini namelist and check the parameter 211 !! values called at the first timestep (nit000) 212 !! or 213 !! Read 7 variables from a previous restart file 214 !! sst, sst, hicif, hsnif, frld, ts & tbif 165 !! values called at the first timestep (nit000) 215 166 !! 216 167 !! ** input : Namelist namiceini … … 222 173 & hnins, hgins, alins 223 174 !!------------------------------------------------------------------- 224 225 ! Read Namelist namiceini 226 REWIND ( numnam_ice ) 175 ! 176 REWIND ( numnam_ice ) ! Read Namelist namiceini 227 177 READ ( numnam_ice , namiceini ) 228 229 IF(.NOT. ln_limini) THEN 230 IF(lwp) THEN 231 WRITE(numout,*) 232 WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' 233 WRITE(numout,*) '~~~~~~~~~~~~~~~' 234 WRITE(numout,*) ' threshold water temp. for initial sea-ice ttest = ', ttest 235 WRITE(numout,*) ' initial snow thickness in the north hninn = ', hninn 236 WRITE(numout,*) ' initial ice thickness in the north hginn = ', hginn 237 WRITE(numout,*) ' initial leads area in the north alinn = ', alinn 238 WRITE(numout,*) ' initial snow thickness in the south hnins = ', hnins 239 WRITE(numout,*) ' initial ice thickness in the south hgins = ', hgins 240 WRITE(numout,*) ' initial leads area in the south alins = ', alins 241 ENDIF 178 ! 179 IF(lwp) THEN 180 WRITE(numout,*) 181 WRITE(numout,*) 'lim_istate_init_2 : ice parameters inititialisation ' 182 WRITE(numout,*) '~~~~~~~~~~~~~~~~~' 183 WRITE(numout,*) ' threshold water temp. for initial sea-ice ttest = ', ttest 184 WRITE(numout,*) ' initial snow thickness in the north hninn = ', hninn 185 WRITE(numout,*) ' initial ice thickness in the north hginn = ', hginn 186 WRITE(numout,*) ' initial leads area in the north alinn = ', alinn 187 WRITE(numout,*) ' initial snow thickness in the south hnins = ', hnins 188 WRITE(numout,*) ' initial ice thickness in the south hgins = ', hgins 189 WRITE(numout,*) ' initial leads area in the south alins = ', alins 190 WRITE(numout,*) ' Ice state initialization using input file ln_limini = ', ln_limini 242 191 ENDIF 243 192 244 193 IF( ln_limini ) THEN ! Ice initialization using input file 245 194 ! 246 195 CALL iom_open( 'Ice_initialization.nc', inum_ice ) 247 196 ! 248 197 IF( inum_ice > 0 ) THEN 249 IF(lwp) THEN 250 WRITE(numout,*) ' ' 251 WRITE(numout,*) 'lim_istate_init : ice state initialization with : Ice_initialization.nc' 252 WRITE(numout,*) '~~~~~~~~~~~~~~~' 253 WRITE(numout,*) ' Ice state initialization using input file ln_limini = ', ln_limini 254 WRITE(numout,*) ' ' 255 ENDIF 198 IF(lwp) WRITE(numout,*) 199 IF(lwp) WRITE(numout,*) ' ice state initialization with : Ice_initialization.nc' 256 200 257 CALL iom_get( inum_ice, jpdom_data, 'sst' , sst_ini(:,:) ) 258 CALL iom_get( inum_ice, jpdom_data, 'sss' , sss_ini(:,:) ) 259 CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif (:,:) ) 260 CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif (:,:) ) 261 CALL iom_get( inum_ice, jpdom_data, 'frld' , frld (:,:) ) 262 CALL iom_get( inum_ice, jpdom_data, 'ts' , sist (:,:) ) 201 CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif ) 202 CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif ) 203 CALL iom_get( inum_ice, jpdom_data, 'frld' , frld ) 204 CALL iom_get( inum_ice, jpdom_data, 'ts' , sist ) 263 205 CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:), & 264 206 & kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) ) … … 268 210 269 211 CALL iom_close( inum_ice) 270 212 ! 271 213 ENDIF 272 214 ENDIF 273 ! 215 ! 274 216 END SUBROUTINE lim_istate_init_2 275 217 -
trunk/NEMO/LIM_SRC_2/limmsh_2.F90
r823 r888 25 25 !!---------------------------------------------------------------------- 26 26 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 27 !! $ Header$27 !! $ Id: $ 28 28 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 29 29 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/limrhg_2.F90
r823 r888 4 4 !! Ice rheology : performs sea ice rheology 5 5 !!====================================================================== 6 !! History : 0.0 ! 93-12 (M.A. Morales Maqueda.) Original code 7 !! 1.0 ! 94-12 (H. Goosse) 8 !! 2.0 ! 03-12 (C. Ethe, G. Madec) F90, mpp 9 !! " " ! 06-08 (G. Madec) surface module, ice-stress at I-point 10 !! " " ! 09-09 (G. Madec) Huge verctor optimisation 11 !!---------------------------------------------------------------------- 6 12 #if defined key_lim2 7 13 !!---------------------------------------------------------------------- 8 14 !! 'key_lim2' LIM 2.0 sea-ice model 9 15 !!---------------------------------------------------------------------- 16 !!---------------------------------------------------------------------- 10 17 !! lim_rhg_2 : computes ice velocities 11 18 !!---------------------------------------------------------------------- 12 !! * Modules used13 USE phycst14 USE par_oce15 USE ice_oce !ice variables16 USE dom_ice_217 USE ice_2 18 USE lbclnk 19 USE lib_mpp 20 USE in_out_manager 21 USE prtctl 19 USE par_oce ! ocean parameter 20 USE ice_oce ! ice variables 21 USE sbc_ice ! surface boundary condition: ice variables 22 USE dom_ice_2 ! domaine: ice variables 23 USE phycst ! physical constant 24 USE ice_2 ! ice variables 25 USE lbclnk ! lateral boundary condition 26 USE lib_mpp ! MPP library 27 USE in_out_manager ! I/O manager 28 USE prtctl ! Print control 22 29 23 30 IMPLICIT NONE 24 31 PRIVATE 25 32 26 !! * Routine accessibility27 PUBLIC lim_rhg_2 ! routine called by lim_dyn_2 28 29 !! * Module variables30 REAL(wp) :: & ! constant values 31 rzero = 0.e0 , &32 rone = 1.e0 33 !!---------------------------------------------------------------------- 34 !! LIM 2.0, UCL-LOCEAN-IPSL (200 5)35 !! $ Header$36 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt33 PUBLIC lim_rhg_2 ! routine called by lim_dyn 34 35 REAL(wp) :: rzero = 0.e0 ! constant value: zero 36 REAL(wp) :: rone = 1.e0 ! and one 37 38 !! * Substitutions 39 # include "vectopt_loop_substitute.h90" 40 !!---------------------------------------------------------------------- 41 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 42 !! $ Id: $ 43 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 37 44 !!---------------------------------------------------------------------- 38 45 … … 48 55 !! viscous-plastic law including shear strength and a bulk rheology. 49 56 !! 50 !! ** Action : - compute u_ice, v_ice the sea-ice velocity 57 !! ** Action : - compute ui_ice, vi_ice the sea-ice velocity defined 58 !! at I-point 59 !!------------------------------------------------------------------- 60 INTEGER, INTENT(in) :: k_j1 ! southern j-index for ice computation 61 INTEGER, INTENT(in) :: k_jpj ! northern j-index for ice computation 51 62 !! 52 !! History : 53 !! 0.0 ! 93-12 (M.A. Morales Maqueda.) Original code 54 !! 1.0 ! 94-12 (H. Goosse) 55 !! 2.0 ! 03-12 (C. Ethe, G. Madec) F90, mpp 63 INTEGER :: ji, jj ! dummy loop indices 64 INTEGER :: iter, jter ! temporary integers 65 CHARACTER (len=50) :: charout 66 REAL(wp) :: ze11 , ze12 , ze22 , ze21 ! temporary scalars 67 REAL(wp) :: zt11 , zt12 , zt21 , zt22 ! " " 68 REAL(wp) :: zvis11, zvis21, zvis12, zvis22 ! " " 69 REAL(wp) :: zgphsx, ztagnx, zunw, zur, zusw ! " " 70 REAL(wp) :: zgphsy, ztagny, zvnw, zvr ! " " 71 REAL(wp) :: zresm, za, zac, zmod 72 REAL(wp) :: zmpzas, zstms, zindu, zusdtp, zmassdt, zcorlal 73 REAL(wp) :: ztrace2, zdeter, zdelta, zmask, zdgp, zdgi, zdiag 74 REAL(wp) :: za1, zb1, zc1, zd1 75 REAL(wp) :: za2, zb2, zc2, zd2, zden 76 REAL(wp) :: zs11_11, zs11_12, zs11_21, zs11_22 77 REAL(wp) :: zs12_11, zs12_12, zs12_21, zs12_22 78 REAL(wp) :: zs21_11, zs21_12, zs21_21, zs21_22 79 REAL(wp) :: zs22_11, zs22_12, zs22_21, zs22_22 80 REAL(wp), DIMENSION(jpi, jpj ) :: zfrld, zmass, zcorl 81 REAL(wp), DIMENSION(jpi, jpj ) :: za1ct, za2ct, zresr 82 REAL(wp), DIMENSION(jpi, jpj ) :: zc1u, zc1v, zc2u, zc2v 83 REAL(wp), DIMENSION(jpi, jpj ) :: zsang 84 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zu0, zv0 85 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zu_n, zv_n 86 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zu_a, zv_a 87 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zviszeta, zviseta 88 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zzfrld, zztms 89 REAL(wp), DIMENSION(jpi,0:jpj+1) :: zi1, zi2, zmasst, zpresh 90 56 91 !!------------------------------------------------------------------- 57 ! * Arguments 58 INTEGER, INTENT(in) :: k_j1 , & ! southern j-index for ice computation 59 & k_jpj ! northern j-index for ice computation 60 61 ! * Local variables 62 INTEGER :: ji, jj ! dummy loop indices 63 64 INTEGER :: & 65 iim1, ijm1, iip1 , ijp1 , & ! temporary integers 66 iter, jter ! " " 67 68 CHARACTER (len=50) :: charout 69 70 REAL(wp) :: & 71 ze11 , ze12 , ze22 , ze21 , & ! temporary scalars 72 zt11 , zt12 , zt21 , zt22 , & ! " " 73 zvis11, zvis21, zvis12, zvis22, & ! " " 74 zgphsx, ztagnx, zusw , & ! " " 75 zgphsy, ztagny ! " " 76 REAL(wp) :: & 77 zresm, zunw, zvnw, zur, zvr, zmod, za, zac, & 78 zmpzas, zstms, zindu, zindu1, zusdtp, zmassdt, zcorlal, & 79 ztrace2, zdeter, zdelta, zsang, zmask, zdgp, zdgi, zdiag 80 REAL(wp),DIMENSION(jpi,jpj) :: & 81 zpresh, zfrld, zmass, zcorl, & 82 zu0, zv0, zviszeta, zviseta, & 83 zc1u, zc1v, zc2u, zc2v, za1ct, za2ct, za1, za2, zb1, zb2, & 84 zc1, zc2, zd1, zd2, zden, zu_ice, zv_ice, zresr 85 REAL(wp),DIMENSION(jpi,jpj,2,2) :: & 86 zs11, zs12, zs22, zs21 87 !!------------------------------------------------------------------- 92 93 !!bug 94 !! ui_oce(:,:) = 0.e0 95 !! vi_oce(:,:) = 0.e0 96 !! write(*,*) 'rhg min, max u & v', maxval(ui_oce), minval(ui_oce), maxval(vi_oce), minval(vi_oce) 97 !!bug 88 98 89 99 ! Store initial velocities 90 ! ------------------------ 91 zu0(:,:) = u_ice(:,:) 92 zv0(:,:) = v_ice(:,:) 100 ! ---------------- 101 zztms(:,0 ) = 0.e0 ; zzfrld(:,0 ) = 0.e0 102 zztms(:,jpj+1) = 0.e0 ; zzfrld(:,jpj+1) = 0.e0 103 zu0(:,0 ) = 0.e0 ; zv0(:,0 ) = 0.e0 104 zu0(:,jpj+1) = 0.e0 ; zv0(:,jpj+1) = 0.e0 105 zztms(:,1:jpj) = tms(:,:) ; zzfrld(:,1:jpj) = frld(:,:) 106 zu0(:,1:jpj) = ui_ice(:,:) ; zv0(:,1:jpj) = vi_ice(:,:) 107 108 zu_a(:,:) = zu0(:,:) ; zv_a(:,:) = zv0(:,:) 109 zu_n(:,:) = zu0(:,:) ; zv_n(:,:) = zv0(:,:) 110 111 !i 112 zi1 (:,:) = 0.e0 113 zi2 (:,:) = 0.e0 114 zpresh(:,:) = 0.e0 115 zmasst(:,:) = 0.e0 116 !i 117 !!gm violant 118 zfrld(:,:) =0.e0 119 zcorl(:,:) =0.e0 120 zmass(:,:) =0.e0 121 za1ct(:,:) =0.e0 122 za2ct(:,:) =0.e0 123 !!gm end 124 125 zviszeta(:,:) = 0.e0 126 zviseta (:,:) = 0.e0 127 128 !i zviszeta(:,0 ) = 0.e0 ; zviseta(:,0 ) = 0.e0 129 !i zviszeta(:,jpj ) = 0.e0 ; zviseta(:,jpj ) = 0.e0 130 !i zviszeta(:,jpj+1) = 0.e0 ; zviseta(:,jpj+1) = 0.e0 131 93 132 94 133 ! Ice mass, ice strength, and wind stress at the center | … … 96 135 !------------------------------------------------------------------- 97 136 137 !CDIR NOVERRCHK 98 138 DO jj = k_j1 , k_jpj-1 139 !CDIR NOVERRCHK 99 140 DO ji = 1 , jpi 100 za1(ji,jj) = tms(ji,jj) * ( rhosn * hsnm(ji,jj) + rhoic * hicm(ji,jj) ) 141 ! only the sinus changes its sign with the hemisphere 142 zsang(ji,jj) = SIGN( 1.e0, fcor(ji,jj) ) * sangvg ! only the sinus changes its sign with the hemisphere 143 ! 144 zmasst(ji,jj) = tms(ji,jj) * ( rhosn * hsnm(ji,jj) + rhoic * hicm(ji,jj) ) 101 145 zpresh(ji,jj) = tms(ji,jj) * pstarh * hicm(ji,jj) * EXP( -c_rhg * frld(ji,jj) ) 102 #if defined key_lim_cp1 && defined key_coupled 103 zb1(ji,jj) = tms(ji,jj) * gtaux(ji,jj) * ( 1.0 - frld(ji,jj) ) 104 zb2(ji,jj) = tms(ji,jj) * gtauy(ji,jj) * ( 1.0 - frld(ji,jj) ) 105 #else 106 zb1(ji,jj) = tms(ji,jj) * ( 1.0 - frld(ji,jj) ) 107 zb2(ji,jj) = tms(ji,jj) * ( 1.0 - frld(ji,jj) ) 108 #endif 146 !!gm :: stress given at I-point (F-point for the ocean) only compute the ponderation with the ice fraction (1-frld) 147 zi1(ji,jj) = tms(ji,jj) * ( 1.0 - frld(ji,jj) ) 148 zi2(ji,jj) = tms(ji,jj) * ( 1.0 - frld(ji,jj) ) 109 149 END DO 110 150 END DO … … 117 157 118 158 DO jj = k_j1+1, k_jpj-1 119 DO ji = 2, jpi120 zstms = tms(ji,jj ) * wght(ji,jj,2,2) +tms(ji-1,jj ) * wght(ji,jj,1,2) &121 & + tms(ji,jj-1) * wght(ji,jj,2,1) +tms(ji-1,jj-1) * wght(ji,jj,1,1)159 DO ji = fs_2, jpi 160 zstms = zztms(ji,jj ) * wght(ji,jj,2,2) + zztms(ji-1,jj ) * wght(ji,jj,1,2) & 161 & + zztms(ji,jj-1) * wght(ji,jj,2,1) + zztms(ji-1,jj-1) * wght(ji,jj,1,1) 122 162 zusw = 1.0 / MAX( zstms, epsd ) 123 163 124 zt11 = tms(ji ,jj ) *frld(ji ,jj )125 zt12 = tms(ji-1,jj ) *frld(ji-1,jj )126 zt21 = tms(ji ,jj-1) *frld(ji ,jj-1)127 zt22 = tms(ji-1,jj-1) *frld(ji-1,jj-1)164 zt11 = zztms(ji ,jj ) * zzfrld(ji ,jj ) 165 zt12 = zztms(ji-1,jj ) * zzfrld(ji-1,jj ) 166 zt21 = zztms(ji ,jj-1) * zzfrld(ji ,jj-1) 167 zt22 = zztms(ji-1,jj-1) * zzfrld(ji-1,jj-1) 128 168 129 169 ! Leads area. … … 131 171 & + zt21 * wght(ji,jj,2,1) + zt22 * wght(ji,jj,1,1) ) * zusw 132 172 133 ! Mass and coriolis coeff. 134 zmass(ji,jj) = ( z a1(ji,jj ) * wght(ji,jj,2,2) + za1(ji-1,jj ) * wght(ji,jj,1,2) &135 & + z a1(ji,jj-1) * wght(ji,jj,2,1) + za1(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw173 ! Mass and coriolis coeff. at I-point 174 zmass(ji,jj) = ( zmasst(ji,jj ) * wght(ji,jj,2,2) + zmasst(ji-1,jj ) * wght(ji,jj,1,2) & 175 & + zmasst(ji,jj-1) * wght(ji,jj,2,1) + zmasst(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw 136 176 zcorl(ji,jj) = zmass(ji,jj) * fcor(ji,jj) 137 177 138 178 ! Wind stress. 139 #if defined key_lim_cp1 && defined key_coupled 140 ztagnx = ( zb1(ji,jj ) * wght(ji,jj,2,2) + zb1(ji-1,jj ) * wght(ji,jj,1,2) & 141 & + zb1(ji,jj-1) * wght(ji,jj,2,1) + zb1(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw 142 ztagny = ( zb2(ji,jj ) * wght(ji,jj,2,2) + zb2(ji-1,jj ) * wght(ji,jj,1,2) & 143 & + zb2(ji,jj-1) * wght(ji,jj,2,1) + zb2(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw 144 #else 145 ztagnx = ( zb1(ji,jj ) * wght(ji,jj,2,2) + zb1(ji-1,jj ) * wght(ji,jj,1,2) & 146 & + zb1(ji,jj-1) * wght(ji,jj,2,1) + zb1(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw * gtaux(ji,jj) 147 ztagny = ( zb2(ji,jj ) * wght(ji,jj,2,2) + zb2(ji-1,jj ) * wght(ji,jj,1,2) & 148 & + zb2(ji,jj-1) * wght(ji,jj,2,1) + zb2(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw * gtauy(ji,jj) 149 #endif 179 ! always provide stress at I-point (ocean F-point) 180 ztagnx = ( zi1(ji,jj ) * wght(ji,jj,2,2) + zi1(ji-1,jj ) * wght(ji,jj,1,2) & 181 & + zi1(ji,jj-1) * wght(ji,jj,2,1) + zi1(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw * utaui_ice(ji,jj) 182 ztagny = ( zi2(ji,jj ) * wght(ji,jj,2,2) + zi2(ji-1,jj ) * wght(ji,jj,1,2) & 183 & + zi2(ji,jj-1) * wght(ji,jj,2,1) + zi2(ji-1,jj-1) * wght(ji,jj,1,1) ) * zusw * vtaui_ice(ji,jj) 150 184 151 185 ! Gradient of ice strength … … 161 195 162 196 ! Computation of the velocity field taking into account the ice-ice interaction. 163 ! Terms that are independent of the velocity field.164 za1ct(ji,jj) = ztagnx - zcorl(ji,jj) * v _oce(ji,jj) - zgphsx165 za2ct(ji,jj) = ztagny + zcorl(ji,jj) * u _oce(ji,jj) - zgphsy197 ! Terms that are independent of the ice velocity field. 198 za1ct(ji,jj) = ztagnx - zcorl(ji,jj) * vi_oce(ji,jj) - zgphsx 199 za2ct(ji,jj) = ztagny + zcorl(ji,jj) * ui_oce(ji,jj) - zgphsy 166 200 END DO 167 201 END DO 168 169 !! inutile!!170 !!?? CALL lbc_lnk( za1ct, 'I', -1. )171 !!?? CALL lbc_lnk( za2ct, 'I', -1. )172 202 173 203 … … 182 212 ! Computation of free drift field for free slip boundary conditions. 183 213 184 DO jj = k_j1, k_jpj-1 185 DO ji = 1, jpim1 186 !- Rate of strain tensor. 187 zt11 = akappa(ji,jj,1,1) * ( u_ice(ji+1,jj) + u_ice(ji+1,jj+1) - u_ice(ji,jj ) - u_ice(ji ,jj+1) ) & 188 & + akappa(ji,jj,1,2) * ( v_ice(ji+1,jj) + v_ice(ji+1,jj+1) + v_ice(ji,jj ) + v_ice(ji ,jj+1) ) 189 zt12 = - akappa(ji,jj,2,2) * ( u_ice(ji ,jj) + u_ice(ji+1,jj ) - u_ice(ji,jj+1) - u_ice(ji+1,jj+1) ) & 190 & - akappa(ji,jj,2,1) * ( v_ice(ji ,jj) + v_ice(ji+1,jj ) + v_ice(ji,jj+1) + v_ice(ji+1,jj+1) ) 191 zt22 = - akappa(ji,jj,2,2) * ( v_ice(ji ,jj) + v_ice(ji+1,jj ) - v_ice(ji,jj+1) - v_ice(ji+1,jj+1) ) & 192 & + akappa(ji,jj,2,1) * ( u_ice(ji ,jj) + u_ice(ji+1,jj ) + u_ice(ji,jj+1) + u_ice(ji+1,jj+1) ) 193 zt21 = akappa(ji,jj,1,1) * ( v_ice(ji+1,jj) + v_ice(ji+1,jj+1) - v_ice(ji,jj ) - v_ice(ji ,jj+1) ) & 194 & - akappa(ji,jj,1,2) * ( u_ice(ji+1,jj) + u_ice(ji+1,jj+1) + u_ice(ji,jj ) + u_ice(ji ,jj+1) ) 195 196 !- Rate of strain tensor. 197 zdgp = zt11 + zt22 198 zdgi = zt12 + zt21 199 ztrace2 = zdgp * zdgp 200 zdeter = zt11 * zt22 - 0.25 * zdgi * zdgi 201 202 ! Creep limit depends on the size of the grid. 203 zdelta = MAX( SQRT( ztrace2 + ( ztrace2 - 4.0 * zdeter ) * usecc2), creepl) 204 205 !- Computation of viscosities. 206 zviszeta(ji,jj) = MAX( zpresh(ji,jj) / zdelta, etamn ) 207 zviseta (ji,jj) = zviszeta(ji,jj) * usecc2 208 END DO 209 END DO 210 !!?? CALL lbc_lnk( zviszeta, 'I', -1. ) ! or T point??? semble reellement inutile 211 !!?? CALL lbc_lnk( zviseta , 'I', -1. ) 212 213 214 !- Determination of zc1u, zc2u, zc1v and zc2v. 215 DO jj = k_j1+1, k_jpj-1 216 DO ji = 2, jpim1 217 ze11 = akappa(ji-1,jj-1,1,1) 218 ze12 = +akappa(ji-1,jj-1,2,2) 219 ze22 = akappa(ji-1,jj-1,2,1) 220 ze21 = -akappa(ji-1,jj-1,1,2) 221 zvis11 = 2.0 * zviseta (ji-1,jj-1) + dm 222 zvis22 = zviszeta(ji-1,jj-1) - zviseta(ji-1,jj-1) 223 zvis12 = zviseta (ji-1,jj-1) + dm 224 zvis21 = zviseta (ji-1,jj-1) 225 226 zdiag = zvis22 * ( ze11 + ze22 ) 227 zs11(ji,jj,1,1) = zvis11 * ze11 + zdiag 228 zs12(ji,jj,1,1) = zvis12 * ze12 + zvis21 * ze21 229 zs22(ji,jj,1,1) = zvis11 * ze22 + zdiag 230 zs21(ji,jj,1,1) = zvis12 * ze21 + zvis21 * ze12 231 232 ze11 = -akappa(ji,jj-1,1,1) 233 ze12 = +akappa(ji,jj-1,2,2) 234 ze22 = akappa(ji,jj-1,2,1) 235 ze21 = -akappa(ji,jj-1,1,2) 236 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 237 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 238 zvis12 = zviseta (ji,jj-1) + dm 239 zvis21 = zviseta (ji,jj-1) 240 241 zdiag = zvis22 * ( ze11 + ze22 ) 242 zs11(ji,jj,2,1) = zvis11 * ze11 + zdiag 243 zs12(ji,jj,2,1) = zvis12 * ze12 + zvis21 * ze21 244 zs22(ji,jj,2,1) = zvis11 * ze22 + zdiag 245 zs21(ji,jj,2,1) = zvis12 * ze21 + zvis21 * ze12 246 247 ze11 = akappa(ji-1,jj,1,1) 248 ze12 = -akappa(ji-1,jj,2,2) 249 ze22 = akappa(ji-1,jj,2,1) 250 ze21 = -akappa(ji-1,jj,1,2) 251 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 252 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 253 zvis12 = zviseta (ji-1,jj) + dm 254 zvis21 = zviseta (ji-1,jj) 255 256 zdiag = zvis22 * ( ze11 + ze22 ) 257 zs11(ji,jj,1,2) = zvis11 * ze11 + zdiag 258 zs12(ji,jj,1,2) = zvis12 * ze12 + zvis21 * ze21 259 zs22(ji,jj,1,2) = zvis11 * ze22 + zdiag 260 zs21(ji,jj,1,2) = zvis12 * ze21 + zvis21 * ze12 261 262 ze11 = -akappa(ji,jj,1,1) 263 ze12 = -akappa(ji,jj,2,2) 264 ze22 = akappa(ji,jj,2,1) 265 ze21 = -akappa(ji,jj,1,2) 266 zvis11 = 2.0 * zviseta (ji,jj) + dm 267 zvis22 = zviszeta(ji,jj) - zviseta(ji,jj) 268 zvis12 = zviseta (ji,jj) + dm 269 zvis21 = zviseta (ji,jj) 270 271 zdiag = zvis22 * ( ze11 + ze22 ) 272 zs11(ji,jj,2,2) = zvis11 * ze11 + zdiag 273 zs12(ji,jj,2,2) = zvis12 * ze12 + zvis21 * ze21 274 zs22(ji,jj,2,2) = zvis11 * ze22 + zdiag 275 zs21(ji,jj,2,2) = zvis12 * ze21 + zvis21 * ze12 276 END DO 277 END DO 278 279 DO jj = k_j1+1, k_jpj-1 280 DO ji = 2, jpim1 281 zc1u(ji,jj) = & 282 + alambd(ji,jj,2,2,2,1) * zs11(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs11(ji,jj,2,2) & 283 - alambd(ji,jj,2,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs11(ji,jj,1,2) & 284 - alambd(ji,jj,1,1,2,1) * zs12(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs12(ji,jj,1,1) & 285 + alambd(ji,jj,1,1,2,2) * zs12(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs12(ji,jj,1,2) & 286 + alambd(ji,jj,1,2,1,1) * zs21(ji,jj,1,1) + alambd(ji,jj,1,2,2,1) * zs21(ji,jj,2,1) & 287 + alambd(ji,jj,1,2,1,2) * zs21(ji,jj,1,2) + alambd(ji,jj,1,2,2,2) * zs21(ji,jj,2,2) & 288 - alambd(ji,jj,2,1,1,1) * zs22(ji,jj,1,1) - alambd(ji,jj,2,1,2,1) * zs22(ji,jj,2,1) & 289 - alambd(ji,jj,2,1,1,2) * zs22(ji,jj,1,2) - alambd(ji,jj,2,1,2,2) * zs22(ji,jj,2,2) 290 291 zc2u(ji,jj) = & 292 + alambd(ji,jj,2,2,2,1) * zs21(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs21(ji,jj,2,2) & 293 - alambd(ji,jj,2,2,1,1) * zs21(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs21(ji,jj,1,2) & 294 - alambd(ji,jj,1,1,2,1) * zs22(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs22(ji,jj,1,1) & 295 + alambd(ji,jj,1,1,2,2) * zs22(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs22(ji,jj,1,2) & 296 - alambd(ji,jj,1,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,1,2,2,1) * zs11(ji,jj,2,1) & 297 - alambd(ji,jj,1,2,1,2) * zs11(ji,jj,1,2) - alambd(ji,jj,1,2,2,2) * zs11(ji,jj,2,2) & 298 + alambd(ji,jj,2,1,1,1) * zs12(ji,jj,1,1) + alambd(ji,jj,2,1,2,1) * zs12(ji,jj,2,1) & 299 + alambd(ji,jj,2,1,1,2) * zs12(ji,jj,1,2) + alambd(ji,jj,2,1,2,2) * zs12(ji,jj,2,2) 300 END DO 301 END DO 302 303 DO jj = k_j1+1, k_jpj-1 304 DO ji = 2, jpim1 305 ! zc1v , zc2v. 306 ze11 = akappa(ji-1,jj-1,1,2) 307 ze12 = -akappa(ji-1,jj-1,2,1) 308 ze22 = +akappa(ji-1,jj-1,2,2) 309 ze21 = akappa(ji-1,jj-1,1,1) 310 zvis11 = 2.0 * zviseta (ji-1,jj-1) + dm 311 zvis22 = zviszeta(ji-1,jj-1) - zviseta(ji-1,jj-1) 312 zvis12 = zviseta (ji-1,jj-1) + dm 313 zvis21 = zviseta (ji-1,jj-1) 314 315 zdiag = zvis22 * ( ze11 + ze22 ) 316 zs11(ji,jj,1,1) = zvis11 * ze11 + zdiag 317 zs12(ji,jj,1,1) = zvis12 * ze12 + zvis21 * ze21 318 zs22(ji,jj,1,1) = zvis11 * ze22 + zdiag 319 zs21(ji,jj,1,1) = zvis12 * ze21 + zvis21 * ze12 214 !CDIR NOVERRCHK 215 DO jj = k_j1, k_jpj-1 216 !CDIR NOVERRCHK 217 DO ji = 1, fs_jpim1 218 !- Rate of strain tensor. 219 zt11 = akappa(ji,jj,1,1) * ( zu_a(ji+1,jj) + zu_a(ji+1,jj+1) - zu_a(ji,jj ) - zu_a(ji ,jj+1) ) & 220 & + akappa(ji,jj,1,2) * ( zv_a(ji+1,jj) + zv_a(ji+1,jj+1) + zv_a(ji,jj ) + zv_a(ji ,jj+1) ) 221 zt12 = - akappa(ji,jj,2,2) * ( zu_a(ji ,jj) + zu_a(ji+1,jj ) - zu_a(ji,jj+1) - zu_a(ji+1,jj+1) ) & 222 & - akappa(ji,jj,2,1) * ( zv_a(ji ,jj) + zv_a(ji+1,jj ) + zv_a(ji,jj+1) + zv_a(ji+1,jj+1) ) 223 zt22 = - akappa(ji,jj,2,2) * ( zv_a(ji ,jj) + zv_a(ji+1,jj ) - zv_a(ji,jj+1) - zv_a(ji+1,jj+1) ) & 224 & + akappa(ji,jj,2,1) * ( zu_a(ji ,jj) + zu_a(ji+1,jj ) + zu_a(ji,jj+1) + zu_a(ji+1,jj+1) ) 225 zt21 = akappa(ji,jj,1,1) * ( zv_a(ji+1,jj) + zv_a(ji+1,jj+1) - zv_a(ji,jj ) - zv_a(ji ,jj+1) ) & 226 & - akappa(ji,jj,1,2) * ( zu_a(ji+1,jj) + zu_a(ji+1,jj+1) + zu_a(ji,jj ) + zu_a(ji ,jj+1) ) 227 228 !- Rate of strain tensor. 229 zdgp = zt11 + zt22 230 zdgi = zt12 + zt21 231 ztrace2 = zdgp * zdgp 232 zdeter = zt11 * zt22 - 0.25 * zdgi * zdgi 233 234 ! Creep limit depends on the size of the grid. 235 zdelta = MAX( SQRT( ztrace2 + ( ztrace2 - 4.0 * zdeter ) * usecc2 ), creepl) 236 237 !- Computation of viscosities. 238 zviszeta(ji,jj) = MAX( zpresh(ji,jj) / zdelta, etamn ) 239 zviseta (ji,jj) = zviszeta(ji,jj) * usecc2 240 END DO 241 END DO 242 243 !- Determination of zc1u, zc2u, zc1v and zc2v. 244 DO jj = k_j1+1, k_jpj-1 245 DO ji = fs_2, fs_jpim1 246 !* zc1u , zc2v 247 zvis11 = 2.0 * zviseta (ji-1,jj-1) + dm 248 zvis12 = zviseta (ji-1,jj-1) + dm 249 zvis21 = zviseta (ji-1,jj-1) 250 zvis22 = zviszeta(ji-1,jj-1) - zviseta(ji-1,jj-1) 251 zdiag = zvis22 * ( akappa(ji-1,jj-1,1,1) + akappa(ji-1,jj-1,2,1) ) 252 zs11_11 = zvis11 * akappa(ji-1,jj-1,1,1) + zdiag 253 zs12_11 = zvis12 * akappa(ji-1,jj-1,2,2) - zvis21 * akappa(ji-1,jj-1,1,2) 254 zs21_11 = -zvis12 * akappa(ji-1,jj-1,1,2) + zvis21 * akappa(ji-1,jj-1,2,2) 255 zs22_11 = zvis11 * akappa(ji-1,jj-1,2,1) + zdiag 256 257 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 258 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 259 zvis12 = zviseta (ji,jj-1) + dm 260 zvis21 = zviseta (ji,jj-1) 261 zdiag = zvis22 * ( -akappa(ji,jj-1,1,1) + akappa(ji,jj-1,2,1) ) 262 zs11_21 = -zvis11 * akappa(ji,jj-1,1,1) + zdiag 263 zs12_21 = zvis12 * akappa(ji,jj-1,2,2) - zvis21 * akappa(ji,jj-1,1,2) 264 zs22_21 = zvis11 * akappa(ji,jj-1,2,1) + zdiag 265 zs21_21 = -zvis12 * akappa(ji,jj-1,1,2) + zvis21 * akappa(ji,jj-1,2,2) 266 267 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 268 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 269 zvis12 = zviseta (ji-1,jj) + dm 270 zvis21 = zviseta (ji-1,jj) 271 zdiag = zvis22 * ( akappa(ji-1,jj,1,1) + akappa(ji-1,jj,2,1) ) 272 zs11_12 = zvis11 * akappa(ji-1,jj,1,1) + zdiag 273 zs12_12 = -zvis12 * akappa(ji-1,jj,2,2) - zvis21 * akappa(ji-1,jj,1,2) 274 zs22_12 = zvis11 * akappa(ji-1,jj,2,1) + zdiag 275 zs21_12 = -zvis12 * akappa(ji-1,jj,1,2) - zvis21 * akappa(ji-1,jj,2,2) 276 277 zvis11 = 2.0 * zviseta (ji,jj) + dm 278 zvis22 = zviszeta(ji,jj) - zviseta(ji,jj) 279 zvis12 = zviseta (ji,jj) + dm 280 zvis21 = zviseta (ji,jj) 281 zdiag = zvis22 * ( -akappa(ji,jj,1,1) + akappa(ji,jj,2,1) ) 282 zs11_22 = -zvis11 * akappa(ji,jj,1,1) + zdiag 283 zs12_22 = -zvis12 * akappa(ji,jj,2,2) - zvis21 * akappa(ji,jj,1,2) 284 zs22_22 = zvis11 * akappa(ji,jj,2,1) + zdiag 285 zs21_22 = -zvis12 * akappa(ji,jj,1,2) - zvis21 * akappa(ji,jj,2,2) 286 287 zc1u(ji,jj) = + alambd(ji,jj,2,2,2,1) * zs11_21 + alambd(ji,jj,2,2,2,2) * zs11_22 & 288 & - alambd(ji,jj,2,2,1,1) * zs11_11 - alambd(ji,jj,2,2,1,2) * zs11_12 & 289 & - alambd(ji,jj,1,1,2,1) * zs12_21 - alambd(ji,jj,1,1,1,1) * zs12_11 & 290 & + alambd(ji,jj,1,1,2,2) * zs12_22 + alambd(ji,jj,1,1,1,2) * zs12_12 & 291 & + alambd(ji,jj,1,2,1,1) * zs21_11 + alambd(ji,jj,1,2,2,1) * zs21_21 & 292 & + alambd(ji,jj,1,2,1,2) * zs21_12 + alambd(ji,jj,1,2,2,2) * zs21_22 & 293 & - alambd(ji,jj,2,1,1,1) * zs22_11 - alambd(ji,jj,2,1,2,1) * zs22_21 & 294 & - alambd(ji,jj,2,1,1,2) * zs22_12 - alambd(ji,jj,2,1,2,2) * zs22_22 295 296 zc2u(ji,jj) = + alambd(ji,jj,2,2,2,1) * zs21_21 + alambd(ji,jj,2,2,2,2) * zs21_22 & 297 & - alambd(ji,jj,2,2,1,1) * zs21_11 - alambd(ji,jj,2,2,1,2) * zs21_12 & 298 & - alambd(ji,jj,1,1,2,1) * zs22_21 - alambd(ji,jj,1,1,1,1) * zs22_11 & 299 & + alambd(ji,jj,1,1,2,2) * zs22_22 + alambd(ji,jj,1,1,1,2) * zs22_12 & 300 & - alambd(ji,jj,1,2,1,1) * zs11_11 - alambd(ji,jj,1,2,2,1) * zs11_21 & 301 & - alambd(ji,jj,1,2,1,2) * zs11_12 - alambd(ji,jj,1,2,2,2) * zs11_22 & 302 & + alambd(ji,jj,2,1,1,1) * zs12_11 + alambd(ji,jj,2,1,2,1) * zs12_21 & 303 & + alambd(ji,jj,2,1,1,2) * zs12_12 + alambd(ji,jj,2,1,2,2) * zs12_22 304 305 !* zc1v , zc2v. 306 zvis11 = 2.0 * zviseta (ji-1,jj-1) + dm 307 zvis22 = zviszeta(ji-1,jj-1) - zviseta(ji-1,jj-1) 308 zvis12 = zviseta (ji-1,jj-1) + dm 309 zvis21 = zviseta (ji-1,jj-1) 310 zdiag = zvis22 * ( akappa(ji-1,jj-1,1,2) + akappa(ji-1,jj-1,2,2) ) 311 zs11_11 = zvis11 * akappa(ji-1,jj-1,1,2) + zdiag 312 zs12_11 = -zvis12 * akappa(ji-1,jj-1,2,1) + zvis21 * akappa(ji-1,jj-1,1,1) 313 zs22_11 = zvis11 * akappa(ji-1,jj-1,2,2) + zdiag 314 zs21_11 = zvis12 * akappa(ji-1,jj-1,1,1) - zvis21 * akappa(ji-1,jj-1,2,1) 320 315 321 ze11 = akappa(ji,jj-1,1,2) 322 ze12 = -akappa(ji,jj-1,2,1) 323 ze22 = +akappa(ji,jj-1,2,2) 324 ze21 = -akappa(ji,jj-1,1,1) 325 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 326 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 327 zvis12 = zviseta (ji,jj-1) + dm 328 zvis21 = zviseta (ji,jj-1) 329 330 zdiag = zvis22 * ( ze11 + ze22 ) 331 zs11(ji,jj,2,1) = zvis11 * ze11 + zdiag 332 zs12(ji,jj,2,1) = zvis12 * ze12 + zvis21 * ze21 333 zs22(ji,jj,2,1) = zvis11 * ze22 + zdiag 334 zs21(ji,jj,2,1) = zvis12 * ze21 + zvis21 * ze12 335 336 ze11 = akappa(ji-1,jj,1,2) 337 ze12 = -akappa(ji-1,jj,2,1) 338 ze22 = -akappa(ji-1,jj,2,2) 339 ze21 = akappa(ji-1,jj,1,1) 340 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 341 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 342 zvis12 = zviseta (ji-1,jj) + dm 343 zvis21 = zviseta (ji-1,jj) 344 345 zdiag = zvis22 * ( ze11 + ze22 ) 346 zs11(ji,jj,1,2) = zvis11 * ze11 + zdiag 347 zs12(ji,jj,1,2) = zvis12 * ze12 + zvis21 * ze21 348 zs22(ji,jj,1,2) = zvis11 * ze22 + zdiag 349 zs21(ji,jj,1,2) = zvis12 * ze21 + zvis21 * ze12 350 351 ze11 = akappa(ji,jj,1,2) 352 ze12 = -akappa(ji,jj,2,1) 353 ze22 = -akappa(ji,jj,2,2) 354 ze21 = -akappa(ji,jj,1,1) 355 zvis11 = 2.0 * zviseta (ji,jj) + dm 356 zvis22 = zviszeta(ji,jj) - zviseta(ji,jj) 357 zvis12 = zviseta (ji,jj) + dm 358 zvis21 = zviseta (ji,jj) 359 360 zdiag = zvis22 * ( ze11 + ze22 ) 361 zs11(ji,jj,2,2) = zvis11 * ze11 + zdiag 362 zs12(ji,jj,2,2) = zvis12 * ze12 + zvis21 * ze21 363 zs22(ji,jj,2,2) = zvis11 * ze22 + zdiag 364 zs21(ji,jj,2,2) = zvis12 * ze21 + zvis21 * ze12 365 366 END DO 367 END DO 368 369 DO jj = k_j1+1, k_jpj-1 370 DO ji = 2, jpim1 371 zc1v(ji,jj) = & 372 + alambd(ji,jj,2,2,2,1) * zs11(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs11(ji,jj,2,2) & 373 - alambd(ji,jj,2,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs11(ji,jj,1,2) & 374 - alambd(ji,jj,1,1,2,1) * zs12(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs12(ji,jj,1,1) & 375 + alambd(ji,jj,1,1,2,2) * zs12(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs12(ji,jj,1,2) & 376 + alambd(ji,jj,1,2,1,1) * zs21(ji,jj,1,1) + alambd(ji,jj,1,2,2,1) * zs21(ji,jj,2,1) & 377 + alambd(ji,jj,1,2,1,2) * zs21(ji,jj,1,2) + alambd(ji,jj,1,2,2,2) * zs21(ji,jj,2,2) & 378 - alambd(ji,jj,2,1,1,1) * zs22(ji,jj,1,1) - alambd(ji,jj,2,1,2,1) * zs22(ji,jj,2,1) & 379 - alambd(ji,jj,2,1,1,2) * zs22(ji,jj,1,2) - alambd(ji,jj,2,1,2,2) * zs22(ji,jj,2,2) 380 zc2v(ji,jj) = & 381 + alambd(ji,jj,2,2,2,1) * zs21(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs21(ji,jj,2,2) & 382 - alambd(ji,jj,2,2,1,1) * zs21(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs21(ji,jj,1,2) & 383 - alambd(ji,jj,1,1,2,1) * zs22(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs22(ji,jj,1,1) & 384 + alambd(ji,jj,1,1,2,2) * zs22(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs22(ji,jj,1,2) & 385 - alambd(ji,jj,1,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,1,2,2,1) * zs11(ji,jj,2,1) & 386 - alambd(ji,jj,1,2,1,2) * zs11(ji,jj,1,2) - alambd(ji,jj,1,2,2,2) * zs11(ji,jj,2,2) & 387 + alambd(ji,jj,2,1,1,1) * zs12(ji,jj,1,1) + alambd(ji,jj,2,1,2,1) * zs12(ji,jj,2,1) & 388 + alambd(ji,jj,2,1,1,2) * zs12(ji,jj,1,2) + alambd(ji,jj,2,1,2,2) * zs12(ji,jj,2,2) 389 END DO 390 END DO 391 392 ! Relaxation. 393 394 iflag: DO jter = 1 , nbitdr 395 396 ! Store previous drift field. 397 DO jj = k_j1, k_jpj-1 398 zu_ice(:,jj) = u_ice(:,jj) 399 zv_ice(:,jj) = v_ice(:,jj) 316 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 317 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 318 zvis12 = zviseta (ji,jj-1) + dm 319 zvis21 = zviseta (ji,jj-1) 320 zdiag = zvis22 * ( akappa(ji,jj-1,1,2) + akappa(ji,jj-1,2,2) ) 321 zs11_21 = zvis11 * akappa(ji,jj-1,1,2) + zdiag 322 zs12_21 = -zvis12 * akappa(ji,jj-1,2,1) - zvis21 * akappa(ji,jj-1,1,1) 323 zs22_21 = zvis11 * akappa(ji,jj-1,2,2) + zdiag 324 zs21_21 = -zvis12 * akappa(ji,jj-1,1,1) - zvis21 * akappa(ji,jj-1,2,1) 325 326 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 327 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 328 zvis12 = zviseta (ji-1,jj) + dm 329 zvis21 = zviseta (ji-1,jj) 330 zdiag = zvis22 * ( akappa(ji-1,jj,1,2) - akappa(ji-1,jj,2,2) ) 331 zs11_12 = zvis11 * akappa(ji-1,jj,1,2) + zdiag 332 zs12_12 = -zvis12 * akappa(ji-1,jj,2,1) + zvis21 * akappa(ji-1,jj,1,1) 333 zs22_12 = -zvis11 * akappa(ji-1,jj,2,2) + zdiag 334 zs21_12 = zvis12 * akappa(ji-1,jj,1,1) - zvis21 * akappa(ji-1,jj,2,1) 335 336 zvis11 = 2.0 * zviseta (ji,jj) + dm 337 zvis22 = zviszeta(ji,jj) - zviseta(ji,jj) 338 zvis12 = zviseta (ji,jj) + dm 339 zvis21 = zviseta (ji,jj) 340 zdiag = zvis22 * ( akappa(ji,jj,1,2) - akappa(ji,jj,2,2) ) 341 zs11_22 = zvis11 * akappa(ji,jj,1,2) + zdiag 342 zs12_22 = -zvis12 * akappa(ji,jj,2,1) - zvis21 * akappa(ji,jj,1,1) 343 zs22_22 = -zvis11 * akappa(ji,jj,2,2) + zdiag 344 zs21_22 = -zvis12 * akappa(ji,jj,1,1) - zvis21 * akappa(ji,jj,2,1) 345 346 zc1v(ji,jj) = + alambd(ji,jj,2,2,2,1) * zs11_21 + alambd(ji,jj,2,2,2,2) * zs11_22 & 347 & - alambd(ji,jj,2,2,1,1) * zs11_11 - alambd(ji,jj,2,2,1,2) * zs11_12 & 348 & - alambd(ji,jj,1,1,2,1) * zs12_21 - alambd(ji,jj,1,1,1,1) * zs12_11 & 349 & + alambd(ji,jj,1,1,2,2) * zs12_22 + alambd(ji,jj,1,1,1,2) * zs12_12 & 350 & + alambd(ji,jj,1,2,1,1) * zs21_11 + alambd(ji,jj,1,2,2,1) * zs21_21 & 351 & + alambd(ji,jj,1,2,1,2) * zs21_12 + alambd(ji,jj,1,2,2,2) * zs21_22 & 352 & - alambd(ji,jj,2,1,1,1) * zs22_11 - alambd(ji,jj,2,1,2,1) * zs22_21 & 353 & - alambd(ji,jj,2,1,1,2) * zs22_12 - alambd(ji,jj,2,1,2,2) * zs22_22 354 355 zc2v(ji,jj) = + alambd(ji,jj,2,2,2,1) * zs21_21 + alambd(ji,jj,2,2,2,2) * zs21_22 & 356 & - alambd(ji,jj,2,2,1,1) * zs21_11 - alambd(ji,jj,2,2,1,2) * zs21_12 & 357 & - alambd(ji,jj,1,1,2,1) * zs22_21 - alambd(ji,jj,1,1,1,1) * zs22_11 & 358 & + alambd(ji,jj,1,1,2,2) * zs22_22 + alambd(ji,jj,1,1,1,2) * zs22_12 & 359 & - alambd(ji,jj,1,2,1,1) * zs11_11 - alambd(ji,jj,1,2,2,1) * zs11_21 & 360 & - alambd(ji,jj,1,2,1,2) * zs11_12 - alambd(ji,jj,1,2,2,2) * zs11_22 & 361 & + alambd(ji,jj,2,1,1,1) * zs12_11 + alambd(ji,jj,2,1,2,1) * zs12_21 & 362 & + alambd(ji,jj,2,1,1,2) * zs12_12 + alambd(ji,jj,2,1,2,2) * zs12_22 400 363 END DO 401 364 END DO 365 366 ! GAUSS-SEIDEL method 367 ! ! ================ ! 368 iflag: DO jter = 1 , nbitdr ! Relaxation ! 369 ! ! ================ ! 370 !CDIR NOVERRCHK 402 371 DO jj = k_j1+1, k_jpj-1 403 zsang = SIGN( 1.e0, fcor(1,jj) ) * sangvg ! only the sinus changes its sign with the hemisphere 404 DO ji = 2, jpim1 405 zur = u_ice(ji,jj) - u_oce(ji,jj) 406 zvr = v_ice(ji,jj) - v_oce(ji,jj) 407 zmod = SQRT( zur * zur + zvr * zvr) * ( 1.0 - zfrld(ji,jj) ) 408 za = rhoco * zmod 409 zac = za * cangvg 410 zmpzas = alpha * zcorl(ji,jj) + za * zsang 372 !CDIR NOVERRCHK 373 DO ji = fs_2, fs_jpim1 374 ! 375 ze11 = akappa(ji,jj-1,1,1) * zu_a(ji+1,jj) + akappa(ji,jj-1,1,2) * zv_a(ji+1,jj) 376 ze12 = + akappa(ji,jj-1,2,2) * zu_a(ji+1,jj) - akappa(ji,jj-1,2,1) * zv_a(ji+1,jj) 377 ze22 = + akappa(ji,jj-1,2,2) * zv_a(ji+1,jj) + akappa(ji,jj-1,2,1) * zu_a(ji+1,jj) 378 ze21 = akappa(ji,jj-1,1,1) * zv_a(ji+1,jj) - akappa(ji,jj-1,1,2) * zu_a(ji+1,jj) 379 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 380 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 381 zvis12 = zviseta (ji,jj-1) + dm 382 zvis21 = zviseta (ji,jj-1) 383 zdiag = zvis22 * ( ze11 + ze22 ) 384 zs11_21 = zvis11 * ze11 + zdiag 385 zs12_21 = zvis12 * ze12 + zvis21 * ze21 386 zs22_21 = zvis11 * ze22 + zdiag 387 zs21_21 = zvis12 * ze21 + zvis21 * ze12 388 389 ze11 = akappa(ji-1,jj,1,1) * ( zu_a(ji ,jj+1) - zu_a(ji-1,jj+1) ) & 390 & + akappa(ji-1,jj,1,2) * ( zv_a(ji ,jj+1) + zv_a(ji-1,jj+1) ) 391 ze12 = + akappa(ji-1,jj,2,2) * ( zu_a(ji-1,jj+1) + zu_a(ji ,jj+1) ) & 392 & - akappa(ji-1,jj,2,1) * ( zv_a(ji-1,jj+1) + zv_a(ji ,jj+1) ) 393 ze22 = + akappa(ji-1,jj,2,2) * ( zv_a(ji-1,jj+1) + zv_a(ji ,jj+1) ) & 394 & + akappa(ji-1,jj,2,1) * ( zu_a(ji-1,jj+1) + zu_a(ji ,jj+1) ) 395 ze21 = akappa(ji-1,jj,1,1) * ( zv_a(ji ,jj+1) - zv_a(ji-1,jj+1) ) & 396 & - akappa(ji-1,jj,1,2) * ( zu_a(ji ,jj+1) + zu_a(ji-1,jj+1) ) 397 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 398 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 399 zvis12 = zviseta (ji-1,jj) + dm 400 zvis21 = zviseta (ji-1,jj) 401 zdiag = zvis22 * ( ze11 + ze22 ) 402 zs11_12 = zvis11 * ze11 + zdiag 403 zs12_12 = zvis12 * ze12 + zvis21 * ze21 404 zs22_12 = zvis11 * ze22 + zdiag 405 zs21_12 = zvis12 * ze21 + zvis21 * ze12 406 407 ze11 = akappa(ji,jj,1,1) * ( zu_a(ji+1,jj) + zu_a(ji+1,jj+1) - zu_a(ji ,jj+1) ) & 408 & + akappa(ji,jj,1,2) * ( zv_a(ji+1,jj) + zv_a(ji+1,jj+1) + zv_a(ji ,jj+1) ) 409 ze12 = - akappa(ji,jj,2,2) * ( zu_a(ji+1,jj) - zu_a(ji ,jj+1) - zu_a(ji+1,jj+1) ) & 410 & - akappa(ji,jj,2,1) * ( zv_a(ji+1,jj) + zv_a(ji ,jj+1) + zv_a(ji+1,jj+1) ) 411 ze22 = - akappa(ji,jj,2,2) * ( zv_a(ji+1,jj) - zv_a(ji ,jj+1) - zv_a(ji+1,jj+1) ) & 412 & + akappa(ji,jj,2,1) * ( zu_a(ji+1,jj) + zu_a(ji ,jj+1) + zu_a(ji+1,jj+1) ) 413 ze21 = akappa(ji,jj,1,1) * ( zv_a(ji+1,jj) + zv_a(ji+1,jj+1) - zv_a(ji ,jj+1) ) & 414 & - akappa(ji,jj,1,2) * ( zu_a(ji+1,jj) + zu_a(ji+1,jj+1) + zu_a(ji ,jj+1) ) 415 zvis11 = 2.0 * zviseta (ji,jj) + dm 416 zvis22 = zviszeta(ji,jj) - zviseta(ji,jj) 417 zvis12 = zviseta (ji,jj) + dm 418 zvis21 = zviseta (ji,jj) 419 zdiag = zvis22 * ( ze11 + ze22 ) 420 zs11_22 = zvis11 * ze11 + zdiag 421 zs12_22 = zvis12 * ze12 + zvis21 * ze21 422 zs22_22 = zvis11 * ze22 + zdiag 423 zs21_22 = zvis12 * ze21 + zvis21 * ze12 424 425 ! 2nd part 426 ze11 = akappa(ji-1,jj-1,1,1) * ( zu_a(ji ,jj-1) - zu_a(ji-1,jj-1) - zu_a(ji-1,jj) ) & 427 & + akappa(ji-1,jj-1,1,2) * ( zv_a(ji ,jj-1) + zv_a(ji-1,jj-1) + zv_a(ji-1,jj) ) 428 ze12 = - akappa(ji-1,jj-1,2,2) * ( zu_a(ji-1,jj-1) + zu_a(ji ,jj-1) - zu_a(ji-1,jj) ) & 429 & - akappa(ji-1,jj-1,2,1) * ( zv_a(ji-1,jj-1) + zv_a(ji ,jj-1) + zv_a(ji-1,jj) ) 430 ze22 = - akappa(ji-1,jj-1,2,2) * ( zv_a(ji-1,jj-1) + zv_a(ji ,jj-1) - zv_a(ji-1,jj) ) & 431 & + akappa(ji-1,jj-1,2,1) * ( zu_a(ji-1,jj-1) + zu_a(ji ,jj-1) + zu_a(ji-1,jj) ) 432 ze21 = akappa(ji-1,jj-1,1,1) * ( zv_a(ji ,jj-1) - zv_a(ji-1,jj-1) - zv_a(ji-1,jj) ) & 433 & - akappa(ji-1,jj-1,1,2) * ( zu_a(ji ,jj-1) + zu_a(ji-1,jj-1) + zu_a(ji-1,jj) ) 434 zvis11 = 2.0 * zviseta (ji-1,jj-1) + dm 435 zvis22 = zviszeta(ji-1,jj-1) - zviseta(ji-1,jj-1) 436 zvis12 = zviseta (ji-1,jj-1) + dm 437 zvis21 = zviseta (ji-1,jj-1) 438 zdiag = zvis22 * ( ze11 + ze22 ) 439 zs11_11 = zvis11 * ze11 + zdiag 440 zs12_11 = zvis12 * ze12 + zvis21 * ze21 441 zs22_11 = zvis11 * ze22 + zdiag 442 zs21_11 = zvis12 * ze21 + zvis21 * ze12 443 444 ze11 = akappa(ji,jj-1,1,1) * ( zu_a(ji+1,jj-1) - zu_a(ji ,jj-1) ) & 445 & + akappa(ji,jj-1,1,2) * ( zv_a(ji+1,jj-1) + zv_a(ji ,jj-1) ) 446 ze12 = - akappa(ji,jj-1,2,2) * ( zu_a(ji ,jj-1) + zu_a(ji+1,jj-1) ) & 447 & - akappa(ji,jj-1,2,1) * ( zv_a(ji ,jj-1) + zv_a(ji+1,jj-1) ) 448 ze22 = - akappa(ji,jj-1,2,2) * ( zv_a(ji ,jj-1) + zv_a(ji+1,jj-1) ) & 449 & + akappa(ji,jj-1,2,1) * ( zu_a(ji ,jj-1) + zu_a(ji+1,jj-1) ) 450 ze21 = akappa(ji,jj-1,1,1) * ( zv_a(ji+1,jj-1) - zv_a(ji ,jj-1) ) & 451 & - akappa(ji,jj-1,1,2) * ( zu_a(ji+1,jj-1) + zu_a(ji ,jj-1) ) 452 zvis11 = 2.0 * zviseta (ji,jj-1) + dm 453 zvis22 = zviszeta(ji,jj-1) - zviseta(ji,jj-1) 454 zvis12 = zviseta (ji,jj-1) + dm 455 zvis21 = zviseta (ji,jj-1) 456 zdiag = zvis22 * ( ze11 + ze22 ) 457 zs11_21 = zs11_21 + zvis11 * ze11 + zdiag 458 zs12_21 = zs12_21 + zvis12 * ze12 + zvis21 * ze21 459 zs22_21 = zs22_21 + zvis11 * ze22 + zdiag 460 zs21_21 = zs21_21 + zvis12 * ze21 + zvis21 * ze12 461 462 ze11 = - akappa(ji-1,jj,1,1) * zu_a(ji-1,jj) + akappa(ji-1,jj,1,2) * zv_a(ji-1,jj) 463 ze12 = - akappa(ji-1,jj,2,2) * zu_a(ji-1,jj) - akappa(ji-1,jj,2,1) * zv_a(ji-1,jj) 464 ze22 = - akappa(ji-1,jj,2,2) * zv_a(ji-1,jj) + akappa(ji-1,jj,2,1) * zu_a(ji-1,jj) 465 ze21 = - akappa(ji-1,jj,1,1) * zv_a(ji-1,jj) - akappa(ji-1,jj,1,2) * zu_a(ji-1,jj) 466 zvis11 = 2.0 * zviseta (ji-1,jj) + dm 467 zvis22 = zviszeta(ji-1,jj) - zviseta(ji-1,jj) 468 zvis12 = zviseta (ji-1,jj) + dm 469 zvis21 = zviseta (ji-1,jj) 470 zdiag = zvis22 * ( ze11 + ze22 ) 471 zs11_12 = zs11_12 + zvis11 * ze11 + zdiag 472 zs12_12 = zs12_12 + zvis12 * ze12 + zvis21 * ze21 473 zs22_12 = zs22_12 + zvis11 * ze22 + zdiag 474 zs21_12 = zs21_12 + zvis12 * ze21 + zvis21 * ze12 475 476 zd1 = + alambd(ji,jj,2,2,2,1) * zs11_21 + alambd(ji,jj,2,2,2,2) * zs11_22 & 477 & - alambd(ji,jj,2,2,1,1) * zs11_11 - alambd(ji,jj,2,2,1,2) * zs11_12 & 478 & - alambd(ji,jj,1,1,2,1) * zs12_21 - alambd(ji,jj,1,1,1,1) * zs12_11 & 479 & + alambd(ji,jj,1,1,2,2) * zs12_22 + alambd(ji,jj,1,1,1,2) * zs12_12 & 480 & + alambd(ji,jj,1,2,1,1) * zs21_11 + alambd(ji,jj,1,2,2,1) * zs21_21 & 481 & + alambd(ji,jj,1,2,1,2) * zs21_12 + alambd(ji,jj,1,2,2,2) * zs21_22 & 482 & - alambd(ji,jj,2,1,1,1) * zs22_11 - alambd(ji,jj,2,1,2,1) * zs22_21 & 483 & - alambd(ji,jj,2,1,1,2) * zs22_12 - alambd(ji,jj,2,1,2,2) * zs22_22 484 485 zd2 = + alambd(ji,jj,2,2,2,1) * zs21_21 + alambd(ji,jj,2,2,2,2) * zs21_22 & 486 & - alambd(ji,jj,2,2,1,1) * zs21_11 - alambd(ji,jj,2,2,1,2) * zs21_12 & 487 & - alambd(ji,jj,1,1,2,1) * zs22_21 - alambd(ji,jj,1,1,1,1) * zs22_11 & 488 & + alambd(ji,jj,1,1,2,2) * zs22_22 + alambd(ji,jj,1,1,1,2) * zs22_12 & 489 & - alambd(ji,jj,1,2,1,1) * zs11_11 - alambd(ji,jj,1,2,2,1) * zs11_21 & 490 & - alambd(ji,jj,1,2,1,2) * zs11_12 - alambd(ji,jj,1,2,2,2) * zs11_22 & 491 & + alambd(ji,jj,2,1,1,1) * zs12_11 + alambd(ji,jj,2,1,2,1) * zs12_21 & 492 & + alambd(ji,jj,2,1,1,2) * zs12_12 + alambd(ji,jj,2,1,2,2) * zs12_22 493 494 zur = zu_a(ji,jj) - ui_oce(ji,jj) 495 zvr = zv_a(ji,jj) - vi_oce(ji,jj) 496 !!!! 497 zmod = SQRT( zur*zur + zvr*zvr ) * ( 1.0 - zfrld(ji,jj) ) 498 za = rhoco * zmod 499 !!!! 500 !!gm chg resul za = rhoco * SQRT( zur*zur + zvr*zvr ) * ( 1.0 - zfrld(ji,jj) ) 501 zac = za * cangvg 502 zmpzas = alpha * zcorl(ji,jj) + za * zsang(ji,jj) 411 503 zmassdt = zusdtp * zmass(ji,jj) 412 504 zcorlal = ( 1.0 - alpha ) * zcorl(ji,jj) 413 505 414 za1(ji,jj) = zmassdt * zu0(ji,jj) + zcorlal * zv0(ji,jj) + za1ct(ji,jj) & 415 & + za * ( cangvg * u_oce(ji,jj) - zsang * v_oce(ji,jj) ) 416 417 za2(ji,jj) = zmassdt * zv0(ji,jj) - zcorlal * zu0(ji,jj) + za2ct(ji,jj) & 418 & + za * ( cangvg * v_oce(ji,jj) + zsang * u_oce(ji,jj) ) 419 420 zb1(ji,jj) = zmassdt + zac - zc1u(ji,jj) 421 zb2(ji,jj) = zmpzas - zc2u(ji,jj) 422 zc1(ji,jj) = zmpzas + zc1v(ji,jj) 423 zc2(ji,jj) = zmassdt + zac - zc2v(ji,jj) 424 zdeter = zc1(ji,jj) * zb2(ji,jj) + zc2(ji,jj) * zb1(ji,jj) 425 zden(ji,jj) = SIGN( rone, zdeter) / MAX( epsd , ABS( zdeter ) ) 506 za1 = zmassdt * zu0(ji,jj) + zcorlal * zv0(ji,jj) + za1ct(ji,jj) & 507 & + za * ( cangvg * ui_oce(ji,jj) - zsang(ji,jj) * vi_oce(ji,jj) ) 508 za2 = zmassdt * zv0(ji,jj) - zcorlal * zu0(ji,jj) + za2ct(ji,jj) & 509 & + za * ( cangvg * vi_oce(ji,jj) + zsang(ji,jj) * ui_oce(ji,jj) ) 510 zb1 = zmassdt + zac - zc1u(ji,jj) 511 zb2 = zmpzas - zc2u(ji,jj) 512 zc1 = zmpzas + zc1v(ji,jj) 513 zc2 = zmassdt + zac - zc2v(ji,jj) 514 zdeter = zc1 * zb2 + zc2 * zb1 515 zden = SIGN( rone, zdeter) / MAX( epsd , ABS( zdeter ) ) 516 zunw = ( ( za1 + zd1 ) * zc2 + ( za2 + zd2 ) * zc1 ) * zden 517 zvnw = ( ( za2 + zd2 ) * zb1 - ( za1 + zd1 ) * zb2 ) * zden 518 zmask = ( 1.0 - MAX( rzero, SIGN( rone , 1.0 - zmass(ji,jj) ) ) ) * tmu(ji,jj) 519 520 zu_n(ji,jj) = ( zu_a(ji,jj) + om * ( zunw - zu_a(ji,jj) ) * tmu(ji,jj) ) * zmask 521 zv_n(ji,jj) = ( zv_a(ji,jj) + om * ( zvnw - zv_a(ji,jj) ) * tmu(ji,jj) ) * zmask 426 522 END DO 427 523 END DO 428 524 429 ! The computation of ice interaction term is splitted into two parts 430 !------------------------------------------------------------------------- 431 432 ! Terms that do not involve already up-dated velocities. 433 434 DO jj = k_j1+1, k_jpj-1 435 DO ji = 2, jpim1 436 iim1 = ji 437 ijm1 = jj - 1 438 iip1 = ji + 1 439 ijp1 = jj 440 ze11 = akappa(iim1,ijm1,1,1) * u_ice(iip1,ijp1) + akappa(iim1,ijm1,1,2) * v_ice(iip1,ijp1) 441 ze12 = + akappa(iim1,ijm1,2,2) * u_ice(iip1,ijp1) - akappa(iim1,ijm1,2,1) * v_ice(iip1,ijp1) 442 ze22 = + akappa(iim1,ijm1,2,2) * v_ice(iip1,ijp1) + akappa(iim1,ijm1,2,1) * u_ice(iip1,ijp1) 443 ze21 = akappa(iim1,ijm1,1,1) * v_ice(iip1,ijp1) - akappa(iim1,ijm1,1,2) * u_ice(iip1,ijp1) 444 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 445 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 446 zvis12 = zviseta (iim1,ijm1) + dm 447 zvis21 = zviseta (iim1,ijm1) 448 zdiag = zvis22 * ( ze11 + ze22 ) 449 zs11(ji,jj,2,1) = zvis11 * ze11 + zdiag 450 zs12(ji,jj,2,1) = zvis12 * ze12 + zvis21 * ze21 451 zs22(ji,jj,2,1) = zvis11 * ze22 + zdiag 452 zs21(ji,jj,2,1) = zvis12 * ze21 + zvis21 * ze12 453 454 455 iim1 = ji - 1 456 ijm1 = jj 457 iip1 = ji 458 ijp1 = jj + 1 459 ze11 = akappa(iim1,ijm1,1,1) * ( u_ice(iip1,ijp1) - u_ice(iim1,ijp1) ) & 460 & + akappa(iim1,ijm1,1,2) * ( v_ice(iip1,ijp1) + v_ice(iim1,ijp1) ) 461 ze12 = + akappa(iim1,ijm1,2,2) * ( u_ice(iim1,ijp1) + u_ice(iip1,ijp1) ) & 462 & - akappa(iim1,ijm1,2,1) * ( v_ice(iim1,ijp1) + v_ice(iip1,ijp1) ) 463 ze22 = + akappa(iim1,ijm1,2,2) * ( v_ice(iim1,ijp1) + v_ice(iip1,ijp1) ) & 464 & + akappa(iim1,ijm1,2,1) * ( u_ice(iim1,ijp1) + u_ice(iip1,ijp1) ) 465 ze21 = akappa(iim1,ijm1,1,1) * ( v_ice(iip1,ijp1) - v_ice(iim1,ijp1) ) & 466 & - akappa(iim1,ijm1,1,2) * ( u_ice(iip1,ijp1) + u_ice(iim1,ijp1) ) 467 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 468 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 469 zvis12 = zviseta (iim1,ijm1) + dm 470 zvis21 = zviseta (iim1,ijm1) 471 zdiag = zvis22 * ( ze11 + ze22 ) 472 zs11(ji,jj,1,2) = zvis11 * ze11 + zdiag 473 zs12(ji,jj,1,2) = zvis12 * ze12 + zvis21 * ze21 474 zs22(ji,jj,1,2) = zvis11 * ze22 + zdiag 475 zs21(ji,jj,1,2) = zvis12 * ze21 + zvis21 * ze12 476 477 iim1 = ji 478 ijm1 = jj 479 iip1 = ji + 1 480 ijp1 = jj + 1 481 ze11 = akappa(iim1,ijm1,1,1) * ( u_ice(iip1,ijm1) + u_ice(iip1,ijp1) - u_ice(iim1,ijp1) ) & 482 & + akappa(iim1,ijm1,1,2) * ( v_ice(iip1,ijm1) + v_ice(iip1,ijp1) + v_ice(iim1,ijp1) ) 483 ze12 = - akappa(iim1,ijm1,2,2) * ( u_ice(iip1,ijm1) - u_ice(iim1,ijp1) - u_ice(iip1,ijp1) ) & 484 & - akappa(iim1,ijm1,2,1) * ( v_ice(iip1,ijm1) + v_ice(iim1,ijp1) + v_ice(iip1,ijp1) ) 485 ze22 = - akappa(iim1,ijm1,2,2) * ( v_ice(iip1,ijm1) - v_ice(iim1,ijp1) - v_ice(iip1,ijp1) ) & 486 & + akappa(iim1,ijm1,2,1) * ( u_ice(iip1,ijm1) + u_ice(iim1,ijp1) + u_ice(iip1,ijp1) ) 487 ze21 = akappa(iim1,ijm1,1,1) * ( v_ice(iip1,ijm1) + v_ice(iip1,ijp1) - v_ice(iim1,ijp1) ) & 488 & - akappa(iim1,ijm1,1,2) * ( u_ice(iip1,ijm1) + u_ice(iip1,ijp1) + u_ice(iim1,ijp1) ) 489 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 490 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 491 zvis12 = zviseta (iim1,ijm1) + dm 492 zvis21 = zviseta (iim1,ijm1) 493 494 zdiag = zvis22 * ( ze11 + ze22 ) 495 zs11(ji,jj,2,2) = zvis11 * ze11 + zdiag 496 zs12(ji,jj,2,2) = zvis12 * ze12 + zvis21 * ze21 497 zs22(ji,jj,2,2) = zvis11 * ze22 + zdiag 498 zs21(ji,jj,2,2) = zvis12 * ze21 + zvis21 * ze12 499 500 END DO 525 CALL lbc_lnk( zu_n(:,1:jpj), 'I', -1. ) 526 CALL lbc_lnk( zv_n(:,1:jpj), 'I', -1. ) 527 528 ! Test of Convergence 529 DO jj = k_j1+1 , k_jpj-1 530 zresr(:,jj) = MAX( ABS( zu_a(:,jj) - zu_n(:,jj) ) , ABS( zv_a(:,jj) - zv_n(:,jj) ) ) 501 531 END DO 502 503 ! Terms involving already up-dated velocities. 504 !-Using the arrays zu_ice and zv_ice in the computation of the terms ze leads to JACOBI's method; 505 ! Using arrays u and v in the computation of the terms ze leads to GAUSS-SEIDEL method. 506 507 DO jj = k_j1+1, k_jpj-1 508 DO ji = 2, jpim1 509 iim1 = ji - 1 510 ijm1 = jj - 1 511 iip1 = ji 512 ijp1 = jj 513 ze11 = akappa(iim1,ijm1,1,1) * ( zu_ice(iip1,ijm1) - zu_ice(iim1,ijm1) - zu_ice(iim1,ijp1) ) & 514 & + akappa(iim1,ijm1,1,2) * ( zv_ice(iip1,ijm1) + zv_ice(iim1,ijm1) + zv_ice(iim1,ijp1) ) 515 ze12 = - akappa(iim1,ijm1,2,2) * ( zu_ice(iim1,ijm1) + zu_ice(iip1,ijm1) - zu_ice(iim1,ijp1) ) & 516 & - akappa(iim1,ijm1,2,1) * ( zv_ice(iim1,ijm1) + zv_ice(iip1,ijm1) + zv_ice(iim1,ijp1) ) 517 ze22 = - akappa(iim1,ijm1,2,2) * ( zv_ice(iim1,ijm1) + zv_ice(iip1,ijm1) - zv_ice(iim1,ijp1) ) & 518 & + akappa(iim1,ijm1,2,1) * ( zu_ice(iim1,ijm1) + zu_ice(iip1,ijm1) + zu_ice(iim1,ijp1) ) 519 ze21 = akappa(iim1,ijm1,1,1) * ( zv_ice(iip1,ijm1) - zv_ice(iim1,ijm1) - zv_ice(iim1,ijp1) ) & 520 & - akappa(iim1,ijm1,1,2) * ( zu_ice(iip1,ijm1) + zu_ice(iim1,ijm1) + zu_ice(iim1,ijp1) ) 521 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 522 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 523 zvis12 = zviseta (iim1,ijm1) + dm 524 zvis21 = zviseta (iim1,ijm1) 525 526 zdiag = zvis22 * ( ze11 + ze22 ) 527 zs11(ji,jj,1,1) = zvis11 * ze11 + zdiag 528 zs12(ji,jj,1,1) = zvis12 * ze12 + zvis21 * ze21 529 zs22(ji,jj,1,1) = zvis11 * ze22 + zdiag 530 zs21(ji,jj,1,1) = zvis12 * ze21 + zvis21 * ze12 531 532 #if defined key_agrif 533 END DO 534 END DO 535 536 DO jj = k_j1+1, k_jpj-1 537 DO ji = 2, jpim1 538 #endif 539 540 iim1 = ji 541 ijm1 = jj - 1 542 iip1 = ji + 1 543 ze11 = akappa(iim1,ijm1,1,1) * ( zu_ice(iip1,ijm1) - zu_ice(iim1,ijm1) ) & 544 & + akappa(iim1,ijm1,1,2) * ( zv_ice(iip1,ijm1) + zv_ice(iim1,ijm1) ) 545 ze12 = - akappa(iim1,ijm1,2,2) * ( zu_ice(iim1,ijm1) + zu_ice(iip1,ijm1) ) & 546 & - akappa(iim1,ijm1,2,1) * ( zv_ice(iim1,ijm1) + zv_ice(iip1,ijm1) ) 547 ze22 = - akappa(iim1,ijm1,2,2) * ( zv_ice(iim1,ijm1) + zv_ice(iip1,ijm1) ) & 548 & + akappa(iim1,ijm1,2,1) * ( zu_ice(iim1,ijm1) + zu_ice(iip1,ijm1) ) 549 ze21 = akappa(iim1,ijm1,1,1) * ( zv_ice(iip1,ijm1) - zv_ice(iim1,ijm1) ) & 550 & - akappa(iim1,ijm1,1,2) * ( zu_ice(iip1,ijm1) + zu_ice(iim1,ijm1) ) 551 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 552 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 553 zvis12 = zviseta (iim1,ijm1) + dm 554 zvis21 = zviseta (iim1,ijm1) 555 556 zdiag = zvis22 * ( ze11 + ze22 ) 557 zs11(ji,jj,2,1) = zs11(ji,jj,2,1) + zvis11 * ze11 + zdiag 558 zs12(ji,jj,2,1) = zs12(ji,jj,2,1) + zvis12 * ze12 + zvis21 * ze21 559 zs22(ji,jj,2,1) = zs22(ji,jj,2,1) + zvis11 * ze22 + zdiag 560 zs21(ji,jj,2,1) = zs21(ji,jj,2,1) + zvis12 * ze21 + zvis21 * ze12 561 562 563 iim1 = ji - 1 564 ijm1 = jj 565 ze11 = - akappa(iim1,ijm1,1,1) * zu_ice(iim1,ijm1) + akappa(iim1,ijm1,1,2) * zv_ice(iim1,ijm1) 566 ze12 = - akappa(iim1,ijm1,2,2) * zu_ice(iim1,ijm1) - akappa(iim1,ijm1,2,1) * zv_ice(iim1,ijm1) 567 ze22 = - akappa(iim1,ijm1,2,2) * zv_ice(iim1,ijm1) + akappa(iim1,ijm1,2,1) * zu_ice(iim1,ijm1) 568 ze21 = - akappa(iim1,ijm1,1,1) * zv_ice(iim1,ijm1) - akappa(iim1,ijm1,1,2) * zu_ice(iim1,ijm1) 569 zvis11 = 2.0 * zviseta (iim1,ijm1) + dm 570 zvis22 = zviszeta(iim1,ijm1) - zviseta(iim1,ijm1) 571 zvis12 = zviseta (iim1,ijm1) + dm 572 zvis21 = zviseta (iim1,ijm1) 573 574 zdiag = zvis22 * ( ze11 + ze22 ) 575 zs11(ji,jj,1,2) = zs11(ji,jj,1,2) + zvis11 * ze11 + zdiag 576 zs12(ji,jj,1,2) = zs12(ji,jj,1,2) + zvis12 * ze12 + zvis21 * ze21 577 zs22(ji,jj,1,2) = zs22(ji,jj,1,2) + zvis11 * ze22 + zdiag 578 zs21(ji,jj,1,2) = zs21(ji,jj,1,2) + zvis12 * ze21 + zvis21 * ze12 579 580 #if defined key_agrif 581 END DO 582 END DO 583 584 DO jj = k_j1+1, k_jpj-1 585 DO ji = 2, jpim1 586 #endif 587 zd1(ji,jj) = & 588 + alambd(ji,jj,2,2,2,1) * zs11(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs11(ji,jj,2,2) & 589 - alambd(ji,jj,2,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs11(ji,jj,1,2) & 590 - alambd(ji,jj,1,1,2,1) * zs12(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs12(ji,jj,1,1) & 591 + alambd(ji,jj,1,1,2,2) * zs12(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs12(ji,jj,1,2) & 592 + alambd(ji,jj,1,2,1,1) * zs21(ji,jj,1,1) + alambd(ji,jj,1,2,2,1) * zs21(ji,jj,2,1) & 593 + alambd(ji,jj,1,2,1,2) * zs21(ji,jj,1,2) + alambd(ji,jj,1,2,2,2) * zs21(ji,jj,2,2) & 594 - alambd(ji,jj,2,1,1,1) * zs22(ji,jj,1,1) - alambd(ji,jj,2,1,2,1) * zs22(ji,jj,2,1) & 595 - alambd(ji,jj,2,1,1,2) * zs22(ji,jj,1,2) - alambd(ji,jj,2,1,2,2) * zs22(ji,jj,2,2) 596 zd2(ji,jj) = & 597 + alambd(ji,jj,2,2,2,1) * zs21(ji,jj,2,1) + alambd(ji,jj,2,2,2,2) * zs21(ji,jj,2,2) & 598 - alambd(ji,jj,2,2,1,1) * zs21(ji,jj,1,1) - alambd(ji,jj,2,2,1,2) * zs21(ji,jj,1,2) & 599 - alambd(ji,jj,1,1,2,1) * zs22(ji,jj,2,1) - alambd(ji,jj,1,1,1,1) * zs22(ji,jj,1,1) & 600 + alambd(ji,jj,1,1,2,2) * zs22(ji,jj,2,2) + alambd(ji,jj,1,1,1,2) * zs22(ji,jj,1,2) & 601 - alambd(ji,jj,1,2,1,1) * zs11(ji,jj,1,1) - alambd(ji,jj,1,2,2,1) * zs11(ji,jj,2,1) & 602 - alambd(ji,jj,1,2,1,2) * zs11(ji,jj,1,2) - alambd(ji,jj,1,2,2,2) * zs11(ji,jj,2,2) & 603 + alambd(ji,jj,2,1,1,1) * zs12(ji,jj,1,1) + alambd(ji,jj,2,1,2,1) * zs12(ji,jj,2,1) & 604 + alambd(ji,jj,2,1,1,2) * zs12(ji,jj,1,2) + alambd(ji,jj,2,1,2,2) * zs12(ji,jj,2,2) 605 END DO 532 zresm = MAXVAL( zresr(1:jpi,k_j1+1:k_jpj-1) ) 533 !!!! this should be faster on scalar processor 534 ! zresm = MAXVAL( MAX( ABS( zu_a(1:jpi,k_j1+1:k_jpj-1) - zu_n(1:jpi,k_j1+1:k_jpj-1) ), & 535 ! & ABS( zv_a(1:jpi,k_j1+1:k_jpj-1) - zv_n(1:jpi,k_j1+1:k_jpj-1) ) ) ) 536 !!!! 537 IF( lk_mpp ) CALL mpp_max( zresm ) ! max over the global domain 538 539 DO jj = k_j1, k_jpj 540 zu_a(:,jj) = zu_n(:,jj) 541 zv_a(:,jj) = zv_n(:,jj) 606 542 END DO 607 543 608 DO jj = k_j1+1, k_jpj-1 609 DO ji = 2, jpim1 610 zunw = ( ( za1(ji,jj) + zd1(ji,jj) ) * zc2(ji,jj) & 611 & + ( za2(ji,jj) + zd2(ji,jj) ) * zc1(ji,jj) ) * zden(ji,jj) 612 613 zvnw = ( ( za2(ji,jj) + zd2(ji,jj) ) * zb1(ji,jj) & 614 & - ( za1(ji,jj) + zd1(ji,jj) ) * zb2(ji,jj) ) * zden(ji,jj) 615 616 zmask = ( 1.0 - MAX( rzero, SIGN( rone , 1.0 - zmass(ji,jj) ) ) ) * tmu(ji,jj) 617 618 u_ice(ji,jj) = ( u_ice(ji,jj) + om * ( zunw - u_ice(ji,jj) ) * tmu(ji,jj) ) * zmask 619 v_ice(ji,jj) = ( v_ice(ji,jj) + om * ( zvnw - v_ice(ji,jj) ) * tmu(ji,jj) ) * zmask 620 END DO 544 IF( zresm <= resl ) EXIT iflag 545 546 ! ! ================ ! 547 END DO iflag ! end Relaxation ! 548 ! ! ================ ! 549 550 IF( zindu == 0 ) THEN ! even iteration 551 DO jj = k_j1 , k_jpj-1 552 zu0(:,jj) = zu_a(:,jj) 553 zv0(:,jj) = zv_a(:,jj) 621 554 END DO 622 623 CALL lbc_lnk( u_ice, 'I', -1. ) 624 CALL lbc_lnk( v_ice, 'I', -1. ) 625 626 !--- 5.2.5.4. Convergence test. 627 DO jj = k_j1+1 , k_jpj-1 628 zresr(:,jj) = MAX( ABS( u_ice(:,jj) - zu_ice(:,jj) ) , ABS( v_ice(:,jj) - zv_ice(:,jj) ) ) 629 END DO 630 zresm = MAXVAL( zresr( 1:jpi , k_j1+1:k_jpj-1 ) ) 631 IF( lk_mpp ) CALL mpp_max( zresm ) ! max over the global domain 632 633 IF ( zresm <= resl) EXIT iflag 634 635 END DO iflag 636 637 zindu1 = 1.0 - zindu 638 DO jj = k_j1 , k_jpj-1 639 zu0(:,jj) = zindu * zu0(:,jj) + zindu1 * u_ice(:,jj) 640 zv0(:,jj) = zindu * zv0(:,jj) + zindu1 * v_ice(:,jj) 641 END DO 642 ! ! ==================== ! 555 ENDIF 556 ! ! ==================== ! 643 557 END DO ! end loop over iter ! 644 558 ! ! ==================== ! 559 560 ui_ice(:,:) = zu_a(:,1:jpj) 561 vi_ice(:,:) = zv_a(:,1:jpj) 645 562 646 563 IF(ln_ctl) THEN 647 564 WRITE(charout,FMT="('lim_rhg : res =',D23.16, ' iter =',I4)") zresm, jter 648 565 CALL prt_ctl_info(charout) 649 CALL prt_ctl(tab2d_1=u _ice, clinfo1=' lim_rhg : u_ice :', tab2d_2=v_ice, clinfo2=' v_ice :')566 CALL prt_ctl(tab2d_1=ui_ice, clinfo1=' lim_rhg : ui_ice :', tab2d_2=vi_ice, clinfo2=' vi_ice :') 650 567 ENDIF 651 568 -
trunk/NEMO/LIM_SRC_2/limrst_2.F90
r823 r888 17 17 !!---------------------------------------------------------------------- 18 18 USE ice_2 19 USE dom_oce20 USE ice_oce ! ice variables19 USE sbc_oce 20 USE sbc_ice 21 21 USE daymod 22 22 … … 27 27 PRIVATE 28 28 29 PUBLIC lim_rst_opn_2 ! routine called by ??? module30 PUBLIC lim_rst_write_2 ! routine called by ??? module31 PUBLIC lim_rst_read_2 ! routine called by ??? module29 PUBLIC lim_rst_opn_2 ! routine called by sbcice_lim_2.F90 30 PUBLIC lim_rst_write_2 ! routine called by sbcice_lim_2.F90 31 PUBLIC lim_rst_read_2 ! routine called by iceini_2.F90 32 32 33 33 LOGICAL, PUBLIC :: lrst_ice !: logical to control the ice restart write … … 36 36 !!---------------------------------------------------------------------- 37 37 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 38 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limrst.F90,v 1.15 2007/06/29 14:54:06 opalod Exp $38 !! $ Id: $ 39 39 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 40 40 !!---------------------------------------------------------------------- … … 57 57 58 58 ! to get better performances with NetCDF format: 59 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*n fice+ 1)60 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*n fice+ 161 IF( kt == nitrst - 2*n fice + 1 .OR. nstock == nfice .OR. ( kt == nitend - nfice+ 1 .AND. .NOT. lrst_ice ) ) THEN59 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 60 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 61 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 62 62 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 63 63 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst … … 72 72 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname 73 73 END SELECT 74 IF( kt == nitrst - 2*n fice+ 1 ) THEN75 WRITE(numout,*) ' kt = nitrst - 2*n fice+ 1 = ', kt,' date= ', ndastp76 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp74 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 75 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 76 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 77 77 ENDIF 78 78 ENDIF … … 90 90 !! ** purpose : output of sea-ice variable in a netcdf file 91 91 !!---------------------------------------------------------------------- 92 INTEGER, INTENT(in) :: kt 93 ! !94 INTEGER :: iter ! kt + nfice-195 !!---------------------------------------------------------------------- 96 97 iter = kt + n fice - 1 ! ice restarts are written at kt == nitrst - nfice+ 192 INTEGER, INTENT(in) :: kt ! number of iteration 93 ! 94 INTEGER :: iter ! kt + nn_fsbc -1 95 !!---------------------------------------------------------------------- 96 97 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 98 98 99 99 IF( iter == nitrst ) THEN 100 100 IF(lwp) WRITE(numout,*) 101 101 IF(lwp) WRITE(numout,*) 'lim_rst_write_2 : write ice restart file kt =', kt 102 IF(lwp) WRITE(numout,*) '~~~~~~~ '102 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~' 103 103 ENDIF 104 104 … … 106 106 ! ------------------ 107 107 ! ! calendar control 108 CALL iom_rstput( iter, nitrst, numriw, 'nfice' , REAL( nfice, wp) ) ! time-step 109 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter , wp) ) ! date 108 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) ) 110 109 111 110 CALL iom_rstput( iter, nitrst, numriw, 'hicif' , hicif (:,:) ) ! prognostic variables … … 119 118 CALL iom_rstput( iter, nitrst, numriw, 'tbif2' , tbif (:,:,2) ) 120 119 CALL iom_rstput( iter, nitrst, numriw, 'tbif3' , tbif (:,:,3) ) 121 CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice (:,:) ) 122 CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice (:,:) ) 123 CALL iom_rstput( iter, nitrst, numriw, 'gtaux' , gtaux (:,:) ) 124 CALL iom_rstput( iter, nitrst, numriw, 'gtauy' , gtauy (:,:) ) 120 CALL iom_rstput( iter, nitrst, numriw, 'ui_ice', ui_ice(:,:) ) 121 CALL iom_rstput( iter, nitrst, numriw, 'vi_ice', vi_ice(:,:) ) 125 122 CALL iom_rstput( iter, nitrst, numriw, 'qstoif', qstoif(:,:) ) 126 123 CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq (:,:) ) … … 175 172 !! ** purpose : read of sea-ice variable restart in a netcdf file 176 173 !!---------------------------------------------------------------------- 177 ! 178 REAL(wp) :: zfice, ziter 174 REAL(wp) :: ziter 179 175 !!---------------------------------------------------------------------- 180 176 … … 182 178 WRITE(numout,*) 183 179 WRITE(numout,*) 'lim_rst_read_2 : read ice NetCDF restart file' 184 WRITE(numout,*) '~~~~~~~~ '180 WRITE(numout,*) '~~~~~~~~~~~~~~' 185 181 ENDIF 186 182 187 183 CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) 188 184 189 CALL iom_get( numrir, 'nfice' , zfice ) 190 CALL iom_get( numrir, 'kt_ice', ziter ) 191 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 185 CALL iom_get( numrir, 'kt_ice' , ziter ) 186 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', INT( ziter ) 192 187 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 193 188 … … 196 191 IF( ( nit000 - INT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 ) & 197 192 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nit000 in ice restart', & 198 & ' verify the file or rerun with the value 0 for the', &199 & ' control of time parameter nrstdt' )200 IF( INT(zfice) /= nfice .AND. ABS( nrstdt ) == 1 ) &201 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nfice in ice restart', &202 193 & ' verify the file or rerun with the value 0 for the', & 203 194 & ' control of time parameter nrstdt' ) … … 213 204 CALL iom_get( numrir, jpdom_autoglo, 'tbif2' , tbif(:,:,2) ) 214 205 CALL iom_get( numrir, jpdom_autoglo, 'tbif3' , tbif(:,:,3) ) 215 CALL iom_get( numrir, jpdom_autoglo, 'u_ice' , u_ice ) 216 CALL iom_get( numrir, jpdom_autoglo, 'v_ice' , v_ice ) 217 CALL iom_get( numrir, jpdom_autoglo, 'gtaux' , gtaux ) 218 CALL iom_get( numrir, jpdom_autoglo, 'gtauy' , gtauy ) 206 CALL iom_get( numrir, jpdom_autoglo, 'ui_ice', ui_ice ) 207 CALL iom_get( numrir, jpdom_autoglo, 'vi_ice', vi_ice ) 219 208 CALL iom_get( numrir, jpdom_autoglo, 'qstoif', qstoif ) 220 209 CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq ) -
trunk/NEMO/LIM_SRC_2/limtab_2.F90
r823 r888 21 21 !!---------------------------------------------------------------------- 22 22 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 23 !! $ Header$24 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt23 !! $ Id: $ 24 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 25 25 !!---------------------------------------------------------------------- 26 26 CONTAINS -
trunk/NEMO/LIM_SRC_2/limthd_2.F90
r823 r888 4 4 !! LIM thermo ice model : ice thermodynamic 5 5 !!====================================================================== 6 !! History : 1.0 ! 00-01 (LIM) 7 !! 2.0 ! 02-07 (C. Ethe, G. Madec) F90 8 !! 2.0 ! 03-08 (C. Ethe) add lim_thd_init 9 !!--------------------------------------------------------------------- 6 10 #if defined key_lim2 7 11 !!---------------------------------------------------------------------- … … 18 22 USE ice_2 ! LIM sea-ice variables 19 23 USE ice_oce ! sea-ice/ocean variables 20 USE flx_oce ! sea-ice/ocean forcings variables 24 USE sbc_oce ! 25 USE sbc_ice ! 21 26 USE thd_ice_2 ! LIM thermodynamic sea-ice variables 22 27 USE dom_ice_2 ! LIM sea-ice domain … … 30 35 PRIVATE 31 36 32 !! * Routine accessibility 33 PUBLIC lim_thd_2 ! called by lim_step_2 34 35 !! * Module variables 36 REAL(wp) :: & ! constant values 37 epsi20 = 1.e-20 , & 38 epsi16 = 1.e-16 , & 39 epsi04 = 1.e-04 , & 40 zzero = 0.e0 , & 41 zone = 1.e0 37 PUBLIC lim_thd_2 ! called by lim_step 38 39 REAL(wp) :: epsi20 = 1.e-20 , & ! constant values 40 & epsi16 = 1.e-16 , & 41 & epsi04 = 1.e-04 , & 42 & zzero = 0.e0 , & 43 & zone = 1.e0 42 44 43 45 !! * Substitutions … … 46 48 !!-------- ------------------------------------------------------------- 47 49 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 48 !! $ Header$49 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt50 !! $ Id: $ 51 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 50 52 !!---------------------------------------------------------------------- 51 53 … … 68 70 !! - back to the geographic grid 69 71 !! 70 !! ** References : 71 !! H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90 72 !! 73 !! History : 74 !! 1.0 ! 00-01 (LIM) 75 !! 2.0 ! 02-07 (C. Ethe, G. Madec) F90 72 !! References : Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90 76 73 !!--------------------------------------------------------------------- 77 74 INTEGER, INTENT(in) :: kt ! number of iteration 78 75 !! 79 76 INTEGER :: ji, jj, & ! dummy loop indices 80 77 nbpb , & ! nb of icy pts for thermo. cal. … … 92 89 zfontn , & ! heat flux from snow thickness 93 90 zfntlat, zpareff ! test. the val. of lead heat budget 94 REAL(wp), DIMENSION(jpi,jpj) :: & 95 zhicifp , & ! ice thickness for outputs 96 zqlbsbq ! link with lead energy budget qldif 97 REAL(wp), DIMENSION(jpi,jpj,jpk) :: & 98 zmsk ! working array 91 REAL(wp), DIMENSION(jpi,jpj) :: zhicifp, & ! ice thickness for outputs 92 & zqlbsbq ! link with lead energy budget qldif 93 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmsk ! working array 99 94 !!------------------------------------------------------------------- 100 95 101 IF( kt == nit000 96 IF( kt == nit000 ) CALL lim_thd_init_2 ! Initialization (first time-step only) 102 97 103 98 !-------------------------------------------! … … 173 168 !-------------------------------------------------------------------------- 174 169 170 sst_m(:,:) = sst_m(:,:) + rt0 171 175 172 !CDIR NOVERRCHK 176 173 DO jj = 1, jpj … … 188 185 ! temperature and turbulent mixing (McPhee, 1992) 189 186 zfric_u = MAX ( MIN( SQRT( ust2s(ji,jj) ) , zfric_umax ) , zfric_umin ) ! friction velocity 190 fdtcn(ji,jj) = zindb * rau0 * rcp * 0.006 * zfric_u * ( sst_ io(ji,jj) - tfu(ji,jj) )187 fdtcn(ji,jj) = zindb * rau0 * rcp * 0.006 * zfric_u * ( sst_m(ji,jj) - tfu(ji,jj) ) 191 188 qdtcn(ji,jj) = zindb * fdtcn(ji,jj) * frld(ji,jj) * rdt_ice 192 189 193 190 ! partial computation of the lead energy budget (qldif) 194 191 zfontn = ( sprecip(ji,jj) / rhosn ) * xlsn ! energy for melting 195 zfnsol = qns r_oce(ji,jj) ! total non solar flux196 qldif(ji,jj) = tms(ji,jj) * ( qsr _oce(ji,jj) * ( 1.0 - thcm(ji,jj) ) &192 zfnsol = qns(ji,jj) ! total non solar flux over the ocean 193 qldif(ji,jj) = tms(ji,jj) * ( qsr(ji,jj) * ( 1.0 - thcm(ji,jj) ) & 197 194 & + zfnsol + fdtcn(ji,jj) - zfontn & 198 195 & + ( 1.0 - zindb ) * fsbbq(ji,jj) ) & … … 206 203 207 204 ! energy needed to bring ocean surface layer until its freezing 208 qcmif (ji,jj) = rau0 * rcp * fse3t(ji,jj,1) * ( tfu(ji,jj) - sst_ io(ji,jj) ) * ( 1 - zinda )205 qcmif (ji,jj) = rau0 * rcp * fse3t(ji,jj,1) * ( tfu(ji,jj) - sst_m(ji,jj) ) * ( 1 - zinda ) 209 206 210 207 ! calculate oceanic heat flux. … … 216 213 END DO 217 214 215 sst_m(:,:) = sst_m(:,:) - rt0 218 216 219 217 ! Select icy points and fulfill arrays for the vectorial grid. … … 258 256 CALL tab_2d_1d_2( nbpb, fr1_i0_1d (1:nbpb) , fr1_i0 , jpi, jpj, npb(1:nbpb) ) 259 257 CALL tab_2d_1d_2( nbpb, fr2_i0_1d (1:nbpb) , fr2_i0 , jpi, jpj, npb(1:nbpb) ) 260 CALL tab_2d_1d_2( nbpb, qns r_ice_1d(1:nbpb) , qnsr_ice, jpi, jpj, npb(1:nbpb) )258 CALL tab_2d_1d_2( nbpb, qns_ice_1d (1:nbpb) , qns_ice , jpi, jpj, npb(1:nbpb) ) 261 259 #if ! defined key_coupled 262 260 CALL tab_2d_1d_2( nbpb, qla_ice_1d (1:nbpb) , qla_ice , jpi, jpj, npb(1:nbpb) ) … … 404 402 CALL prt_ctl(tab2d_1=qstoif, clinfo1=' lim_thd: qstoif : ', tab2d_2=fsbbq , clinfo2=' fsbbq : ') 405 403 ENDIF 406 404 ! 407 405 END SUBROUTINE lim_thd_2 408 406 … … 419 417 !! 420 418 !! ** input : Namelist namicether 421 !!422 !! history :423 !! 8.5 ! 03-08 (C. Ethe) original code424 419 !!------------------------------------------------------------------- 425 420 NAMELIST/namicethd/ hmelt , hiccrit, hicmin, hiclim, amax , & -
trunk/NEMO/LIM_SRC_2/limthd_lac_2.F90
r823 r888 30 30 !!---------------------------------------------------------------------- 31 31 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 32 !! $ Header$32 !! $ Id: $ 33 33 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 34 34 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/limthd_zdf_2.F90
r823 r888 4 4 !! thermodynamic growth and decay of the ice 5 5 !!====================================================================== 6 !! History : 1.0 ! 01-04 (LIM) Original code 7 !! 2.0 ! 02-08 (C. Ethe, G. Madec) F90 8 !!---------------------------------------------------------------------- 6 9 #if defined key_lim2 7 10 !!---------------------------------------------------------------------- 8 11 !! 'key_lim2' LIM 2.0 sea-ice model 12 !!---------------------------------------------------------------------- 9 13 !!---------------------------------------------------------------------- 10 14 !! lim_thd_zdf_2 : vertical accr./abl. and lateral ablation of sea ice … … 22 26 PRIVATE 23 27 24 !! * Routine accessibility 25 PUBLIC lim_thd_zdf_2 ! called by lim_thd_2 26 27 !! * Module variables 28 REAL(wp) :: & ! constant values 29 epsi20 = 1.e-20 , & 30 epsi13 = 1.e-13 , & 31 zzero = 0.e0 , & 32 zone = 1.e0 28 PUBLIC lim_thd_zdf_2 ! called by lim_thd_2 29 30 REAL(wp) :: epsi20 = 1.e-20 , & ! constant values 31 & epsi13 = 1.e-13 , & 32 & zzero = 0.e0 , & 33 & zone = 1.e0 33 34 !!---------------------------------------------------------------------- 34 35 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 35 !! $Header$ 36 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 37 !!---------------------------------------------------------------------- 36 !! $ Id: $ 37 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 38 !!---------------------------------------------------------------------- 39 38 40 CONTAINS 39 41 … … 64 66 !! - Performs lateral ablation 65 67 !! 66 !! References : 67 !! Fichefet T. and M. Maqueda 1997, J. Geophys. Res., 102(C6), 12609-12646 68 !! Fichefet T. and M. Maqueda 1999, Clim. Dyn, 15(4), 251-268 68 !! References : Fichefet T. and M. Maqueda 1997, J. Geophys. Res., 102(C6), 12609-12646 69 !! Fichefet T. and M. Maqueda 1999, Clim. Dyn, 15(4), 251-268 70 !!------------------------------------------------------------------ 71 INTEGER, INTENT(in) :: kideb ! Start point on which the the computation is applied 72 INTEGER, INTENT(in) :: kiut ! End point on which the the computation is applied 69 73 !! 70 !! History :71 !! original : 01-04 (LIM)72 !! addition : 02-08 (C. Ethe, G. Madec)73 !!------------------------------------------------------------------74 !! * Arguments75 INTEGER , INTENT (in) :: &76 kideb , & ! Start point on which the the computation is applied77 kiut ! End point on which the the computation is applied78 79 !! * Local variables80 74 INTEGER :: ji ! dummy loop indices 81 82 REAL(wp) , DIMENSION(jpij,2) :: & 83 zqcmlt ! energy due to surface( /1 ) and bottom melting( /2 ) 84 75 REAL(wp), DIMENSION(jpij,2) :: zqcmlt ! energy due to surface( /1 ) and bottom melting( /2 ) 85 76 REAL(wp), DIMENSION(jpij) :: & 86 77 ztsmlt & ! snow/ice surface melting temperature … … 97 88 , zts_old & ! previous surface temperature 98 89 , zidsn , z1midsn , zidsnic ! tempory variables 99 100 REAL(wp), DIMENSION(jpij) :: & 90 REAL(wp), DIMENSION(jpij) :: & 101 91 zfnet & ! net heat flux at the top surface( incl. conductive heat flux) 102 92 , zsprecip & ! snow accumulation … … 109 99 , zfrld_1d & ! new sea/ice fraction 110 100 , zep ! internal temperature of the 2nd layer of the snow/ice system 111 112 101 REAL(wp), DIMENSION(3) :: & 113 102 zplediag & ! principle diagonal, subdiag. and supdiag. of the … … 115 104 , zsupdiag & ! of the temperatures inside the snow-ice system 116 105 , zsmbr ! second member 117 118 106 REAL(wp) :: & 119 107 zhsu & ! thickness of surface layer … … 130 118 , zb2 , zd2 , zb3 , zd3 & 131 119 , ztint ! equivalent temperature at the snow-ice interface 132 133 120 REAL(wp) :: & 134 121 zexp & ! exponential function of the ice thickness … … 148 135 , zdtic & ! ice internal temp. increment 149 136 , zqnes ! conductive energy due to ice melting in the first ice layer 150 151 137 REAL(wp) :: & 152 138 ztbot & ! temperature at the bottom surface … … 162 148 , zc1, zpc1, zc2, zpc2, zp1, zp2 & ! tempory variables 163 149 , ztb2, ztb3 164 165 150 REAL(wp) :: & 166 151 zdrmh & ! change in snow/ice thick. after snow-ice formation … … 181 166 ! Computation of energies due to surface and bottom melting 182 167 !----------------------------------------------------------------------- 183 184 168 185 169 DO ji = kideb , kiut … … 201 185 END DO 202 186 203 204 187 !------------------------------------------- 205 188 ! 2. Calculate some intermediate variables. … … 265 248 ! - qstbif_1d, total energy stored in brine pockets (updating) 266 249 !------------------------------------------------------------------- 267 268 250 269 251 DO ji = kideb , kiut … … 288 270 END DO 289 271 290 291 272 !-------------------------------------------------------------------------------- 292 273 ! 4. Computation of the surface temperature : determined by considering the … … 333 314 !---computation of the energy balance function 334 315 zfts = - z1mi0 (ji) * qsr_ice_1d(ji) & ! net absorbed solar radiation 335 & - qns r_ice_1d(ji) & ! total non solar radiation336 & - zfcsu (ji) ! conductive heat flux from the surface316 & - qns_ice_1d(ji) & ! total non solar radiation 317 & - zfcsu (ji) ! conductive heat flux from the surface 337 318 !---computation of surface temperature increment 338 319 zdts = -zfts / zdfts … … 360 341 sist_1d(ji) = MIN( ztsmlt(ji) , sist_1d(ji) ) 361 342 #if ! defined key_coupled 362 qns r_ice_1d(ji) = qnsr_ice_1d(ji) + dqns_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) )343 qns_ice_1d(ji) = qns_ice_1d(ji) + dqns_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 363 344 qla_ice_1d (ji) = qla_ice_1d (ji) + dqla_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 364 345 #endif … … 366 347 END DO 367 348 368 369 370 349 ! 5.2. Calculate available heat for surface ablation. 371 350 !--------------------------------------------------------------------- 372 351 373 352 DO ji = kideb, kiut 374 zfnet(ji) = qns r_ice_1d(ji) + z1mi0(ji) * qsr_ice_1d(ji) + zfcsu(ji)353 zfnet(ji) = qns_ice_1d(ji) + z1mi0(ji) * qsr_ice_1d(ji) + zfcsu(ji) 375 354 zfnet(ji) = MAX( zzero , zfnet(ji) ) 376 355 zfnet(ji) = zfnet(ji) * MAX( zzero , SIGN( zone , sist_1d(ji) - ztsmlt(ji) ) ) … … 730 709 dvnbq_1d(ji) = ( 1.0 - frld_1d(ji) ) * ( zhicnew - h_ice_1d(ji) ) 731 710 dmgwi_1d(ji) = dmgwi_1d(ji) + ( 1.0 -frld_1d(ji) ) * ( h_snow_1d(ji) - zhsnnew ) * rhosn 732 ! case of natural freshwater flux 733 #if defined key_lim_fdd 734 rdmicif_1d(ji) = rdmicif_1d(ji) + ( 1.0 - frld_1d(ji) ) * ( zhicnew - h_ice_1d(ji) ) * rhoic 711 !--- volume change of ice and snow (used for ocean-ice freshwater flux computation) 712 rdmicif_1d(ji) = rdmicif_1d(ji) + ( 1.0 - frld_1d(ji) ) * ( zhicnew - h_ice_1d (ji) ) * rhoic 735 713 rdmsnif_1d(ji) = rdmsnif_1d(ji) + ( 1.0 - frld_1d(ji) ) * ( zhsnnew - h_snow_1d(ji) ) * rhosn 736 714 737 #else738 rdmicif_1d(ji) = rdmicif_1d(ji) + ( 1.0 - frld_1d(ji) ) * ( ( zhicnew - h_ice_1d(ji) ) * rhoic &739 & + ( zhsnnew - h_snow_1d(ji) ) * rhosn )740 #endif741 742 715 !--- Actualize new snow and ice thickness. 743 744 716 h_snow_1d(ji) = zhsnnew 745 h_ice_1d (ji) = zhicnew717 h_ice_1d (ji) = zhicnew 746 718 747 719 END DO … … 799 771 qstbif_1d(ji) = zdrfrl2 * qstbif_1d(ji) 800 772 frld_1d(ji) = zfrld_1d(ji) 801 802 END DO 803 773 ! 774 END DO 775 ! 804 776 END SUBROUTINE lim_thd_zdf_2 777 805 778 #else 806 !!====================================================================== 807 !! *** MODULE limthd_zdf_2 *** 808 !! no sea ice model 809 !!====================================================================== 779 !!---------------------------------------------------------------------- 780 !! Default Option NO sea-ice model 781 !!---------------------------------------------------------------------- 810 782 CONTAINS 811 783 SUBROUTINE lim_thd_zdf_2 ! Empty routine 812 784 END SUBROUTINE lim_thd_zdf_2 813 785 #endif 814 END MODULE limthd_zdf_2 786 787 !!====================================================================== 788 END MODULE limthd_zdf_2 -
trunk/NEMO/LIM_SRC_2/limtrp_2.F90
r823 r888 30 30 31 31 !! * Routine accessibility 32 PUBLIC lim_trp_2 ! called by ice_step_232 PUBLIC lim_trp_2 ! called by sbc_ice_lim_2 33 33 34 34 !! * Shared module variables … … 48 48 !!---------------------------------------------------------------------- 49 49 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 50 !! $ Header$50 !! $ Id: $ 51 51 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 52 52 !!---------------------------------------------------------------------- … … 112 112 DO jj = 1, jpjm1 113 113 DO ji = 1, jpim1 114 zui_u(ji,jj) = ( u _ice(ji+1,jj ) + u_ice(ji+1,jj+1) ) / ( MAX( tmu(ji+1,jj ) + tmu(ji+1,jj+1), zvbord ) )115 zvi_v(ji,jj) = ( v _ice(ji ,jj+1) + v_ice(ji+1,jj+1) ) / ( MAX( tmu(ji ,jj+1) + tmu(ji+1,jj+1), zvbord ) )114 zui_u(ji,jj) = ( ui_ice(ji+1,jj ) + ui_ice(ji+1,jj+1) ) / ( MAX( tmu(ji+1,jj ) + tmu(ji+1,jj+1), zvbord ) ) 115 zvi_v(ji,jj) = ( vi_ice(ji ,jj+1) + vi_ice(ji+1,jj+1) ) / ( MAX( tmu(ji ,jj+1) + tmu(ji+1,jj+1), zvbord ) ) 116 116 END DO 117 117 END DO … … 128 128 IF (lk_mpp ) CALL mpp_max(zcfl) 129 129 130 IF ( zcfl > 0.5 .AND. lwp ) WRITE(numout,*) 'lim_trp : violation of cfl criterion the ',nday,'th day, cfl = ',zcfl130 IF ( zcfl > 0.5 .AND. lwp ) WRITE(numout,*) 'lim_trp_2 : violation of cfl criterion the ',nday,'th day, cfl = ',zcfl 131 131 132 132 ! content of properties -
trunk/NEMO/LIM_SRC_2/limwri_2.F90
r823 r888 9 9 #if defined key_lim2 10 10 !!---------------------------------------------------------------------- 11 !! 'key_lim2' iLIM 2.0 sea-ice model11 !! 'key_lim2' LIM 2.0 sea-ice model 12 12 !!---------------------------------------------------------------------- 13 13 !!---------------------------------------------------------------------- … … 15 15 !! lim_wri_init_2 : initialization and namelist read 16 16 !!---------------------------------------------------------------------- 17 USE ioipsl18 USE dianam ! build name of file (routine)19 17 USE phycst 20 18 USE dom_oce 21 19 USE daymod 22 USE in_out_manager23 20 USE ice_oce ! ice variables 24 USE flx_oce 21 USE sbc_oce 22 USE sbc_ice 25 23 USE dom_ice_2 26 24 USE ice_2 25 27 26 USE lbclnk 27 USE dianam ! build name of file (routine) 28 USE in_out_manager 29 USE ioipsl 28 30 29 31 IMPLICIT NONE 30 32 PRIVATE 31 33 32 PUBLIC lim_wri_2 ! routine called by lim_step_2.F9034 PUBLIC lim_wri_2 ! routine called by sbc_ice_lim_2 33 35 34 36 INTEGER, PARAMETER :: jpnoumax = 40 ! maximum number of variable for ice output … … 49 51 zone = 1.e0 50 52 51 !!---------------------------------------------------------------------- 52 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 53 !! $Header$ 53 !! * Substitutions 54 # include "vectopt_loop_substitute.h90" 55 !!---------------------------------------------------------------------- 56 !! LIM 2.0, UCL-LOCEAN-IPSL (2006) 57 !! $ Id: $ 54 58 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 59 !!---------------------------------------------------------------------- … … 79 83 !!------------------------------------------------------------------- 80 84 INTEGER, INTENT(in) :: kt ! number of iteration 81 85 !! 82 86 INTEGER :: ji, jj, jf ! dummy loop indices 83 87 CHARACTER(len = 40) :: clhstnam, clop … … 90 94 91 95 ! !--------------------! 92 IF ( kt == nit000 ) THEN! Initialisation !96 IF( kt == nit000 ) THEN ! Initialisation ! 93 97 ! !--------------------! 94 98 CALL lim_wri_init_2 … … 97 101 !!Chris clop = "ave(only(x))" !ibug namelist parameter a ajouter 98 102 clop = "ave(x)" 99 zout = nwrite * rdt_ice / n fice103 zout = nwrite * rdt_ice / nn_fsbc 100 104 zsec = 0. 101 105 niter = 0 … … 110 114 111 115 DO jf = 1, noumef 112 IF 113 &, nhorid, 1, 1, 1, -99, 32, clop, zsto, zout )116 IF( nc(jf) == 1 ) CALL histdef( nice, nam(jf), titn(jf), uni(jf), jpi, jpj & 117 & , nhorid, 1, 1, 1, -99, 32, clop, zsto, zout ) 114 118 END DO 115 119 CALL histend( nice ) 116 120 ! 117 121 ENDIF 118 122 ! !--------------------! … … 120 124 ! !--------------------! 121 125 122 !!gm change the print below to have it only at output time step or when nitend =< 100 123 IF(lwp) THEN 124 WRITE(numout,*) 125 WRITE(numout,*) 'lim_wri_2 : write ice outputs in NetCDF files at time : ', nyear, nmonth, nday, kt + nfice - 1 126 WRITE(numout,*) '~~~~~~~~~ ' 127 ENDIF 128 129 !-- calculs des valeurs instantanees 126 !-- Store instantaneous values in zcmo 130 127 131 128 zcmo(:,:, 1:jpnoumax ) = 0.e0 132 129 DO jj = 2 , jpjm1 133 DO ji = 2 ,jpim1130 DO ji = fs_2 , fs_jpim1 134 131 zindh = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) ) 135 132 zinda = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) ) … … 142 139 zcmo(ji,jj,5) = sist (ji,jj) 143 140 zcmo(ji,jj,6) = fbif (ji,jj) 144 zcmo(ji,jj,7) = zindb * ( u _ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) &145 + u _ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &141 zcmo(ji,jj,7) = zindb * ( ui_ice(ji,jj ) * tmu(ji,jj ) + ui_ice(ji+1,jj ) * tmu(ji+1,jj ) & 142 + ui_ice(ji,jj+1) * tmu(ji,jj+1) + ui_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 146 143 / ztmu 147 144 148 zcmo(ji,jj,8) = zindb * ( v _ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) &149 + v _ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &145 zcmo(ji,jj,8) = zindb * ( vi_ice(ji,jj ) * tmu(ji,jj ) + vi_ice(ji+1,jj ) * tmu(ji+1,jj ) & 146 + vi_ice(ji,jj+1) * tmu(ji,jj+1) + vi_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 150 147 / ztmu 151 zcmo(ji,jj,9) = sst_io(ji,jj) 152 zcmo(ji,jj,10) = sss_io(ji,jj) 153 154 zcmo(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj) 155 zcmo(ji,jj,12) = fsolar (ji,jj) 156 zcmo(ji,jj,13) = fnsolar(ji,jj) 148 zcmo(ji,jj,9) = sst_m(ji,jj) 149 zcmo(ji,jj,10) = sss_m(ji,jj) 150 zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 151 zcmo(ji,jj,12) = qsr(ji,jj) 152 zcmo(ji,jj,13) = qns(ji,jj) 157 153 ! See thersf for the coefficient 158 zcmo(ji,jj,14) = - fsalt(ji,jj) * rday * ( sss_io(ji,jj) + epsi16 ) / soce159 zcmo(ji,jj,15) = gtaux(ji,jj)160 zcmo(ji,jj,16) = gtauy(ji,jj)161 zcmo(ji,jj,17) = ( 1.0 - frld(ji,jj) ) * qsr_ice (ji,jj) + frld(ji,jj) * qsr_oce(ji,jj)162 zcmo(ji,jj,18) = ( 1.0 - frld(ji,jj) ) * qnsr_ice(ji,jj) + frld(ji,jj) * qnsr_oce(ji,jj)154 zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce !!gm ??? 155 zcmo(ji,jj,15) = utaui_ice(ji,jj) 156 zcmo(ji,jj,16) = vtaui_ice(ji,jj) 157 zcmo(ji,jj,17) = qsr_ice(ji,jj) 158 zcmo(ji,jj,18) = qns_ice(ji,jj) 163 159 zcmo(ji,jj,19) = sprecip(ji,jj) 164 160 END DO … … 175 171 END DO 176 172 177 IF ( jf == 7 .OR. jf == 8 .OR. jf == 15 .OR. jf == 16 ) THEN173 IF( jf == 7 .OR. jf == 8 .OR. jf == 15 .OR. jf == 16 ) THEN 178 174 CALL lbc_lnk( zfield, 'T', -1. ) 179 175 ELSE … … 181 177 ENDIF 182 178 183 IF ( nc(jf) == 1 )CALL histwrite( nice, nam(jf), niter, zfield, ndim, ndex51 )179 IF( nc(jf) == 1 ) CALL histwrite( nice, nam(jf), niter, zfield, ndim, ndex51 ) 184 180 185 181 END DO 186 182 187 IF ( ( nfice * niter + nit000 - 1 ) >= nitend ) THEN 188 CALL histclo( nice ) 189 ENDIF 183 IF( ( nn_fsbc * niter + nit000 - 1 ) >= nitend ) CALL histclo( nice ) 190 184 ! 191 185 END SUBROUTINE lim_wri_2 … … 225 219 field_13, field_14, field_15, field_16, field_17, field_18, & 226 220 field_19 227 !!gm NAMELIST/namiceout/ noumef, & 228 !! zfield( 1), zfield( 2), zfield( 3), zfield( 4), zfield( 5), & 229 !! zfield( 6), zfield( 7), zfield( 8), zfield( 9), zfield(10), & 230 !! zfield(11), zfield(12), zfield(13), zfield(14), zfield(15), & 231 !!gm zfield(16), zfield(17), zfield(18), zfield(19) 232 !!------------------------------------------------------------------- 233 234 ! Read Namelist namicewri 235 REWIND ( numnam_ice ) 221 !!------------------------------------------------------------------- 222 223 REWIND ( numnam_ice ) ! Read Namelist namicewri 236 224 READ ( numnam_ice , namiceout ) 237 225 238 zfield( 1)= field_1239 zfield( 2)= field_2240 zfield( 3)= field_3241 zfield( 4)= field_4242 zfield( 5)= field_5243 zfield( 6)= field_6244 zfield( 7)= field_7245 zfield( 8)= field_8246 zfield( 9)= field_9226 zfield( 1) = field_1 227 zfield( 2) = field_2 228 zfield( 3) = field_3 229 zfield( 4) = field_4 230 zfield( 5) = field_5 231 zfield( 6) = field_6 232 zfield( 7) = field_7 233 zfield( 8) = field_8 234 zfield( 9) = field_9 247 235 zfield(10) = field_10 248 236 zfield(11) = field_11 … … 274 262 DO nf = 1 , noumef 275 263 WRITE(numout,*) ' ', titn(nf), ' ', nam(nf),' ', uni(nf),' ', nc(nf),' ', cmulti(nf), & 276 ' ', cadd(nf)264 & ' ', cadd(nf) 277 265 END DO 278 266 ENDIF -
trunk/NEMO/LIM_SRC_2/limwri_dimg_2.h90
r823 r888 2 2 !!---------------------------------------------------------------------- 3 3 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 4 !! $ Header$4 !! $ Id: $ 5 5 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 6 6 !!---------------------------------------------------------------------- … … 82 82 83 83 zsto = rdt_ice 84 zout = nwrite * rdt_ice / n fice84 zout = nwrite * rdt_ice / nn_fsbc 85 85 zsec = 0. 86 86 niter = 0 … … 106 106 zcmo(ji,jj,5) = sist (ji,jj) 107 107 zcmo(ji,jj,6) = fbif (ji,jj) 108 zcmo(ji,jj,7) = zindb * ( u _ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) &109 + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &108 zcmo(ji,jj,7) = zindb * ( ui_ice(ji,jj ) * tmu(ji,jj ) + ui_ice(ji+1,jj ) * tmu(ji+1,jj ) & 109 & + ui_ice(ji,jj+1) * tmu(ji,jj+1) + ui_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 110 110 / ztmu 111 111 112 zcmo(ji,jj,8) = zindb * ( v _ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) &113 + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &112 zcmo(ji,jj,8) = zindb * ( vi_ice(ji,jj ) * tmu(ji,jj ) + vi_ice(ji+1,jj ) * tmu(ji+1,jj ) & 113 & + vi_ice(ji,jj+1) * tmu(ji,jj+1) + vi_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 114 114 / ztmu 115 zcmo(ji,jj,9) = sst_ io(ji,jj)116 zcmo(ji,jj,10) = sss_ io(ji,jj)117 118 zcmo(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj)119 zcmo(ji,jj,12) = fsolar(ji,jj)120 zcmo(ji,jj,13) = fnsolar(ji,jj)115 zcmo(ji,jj,9) = sst_m(ji,jj) 116 zcmo(ji,jj,10) = sss_m(ji,jj) 117 118 zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 119 zcmo(ji,jj,12) = qsr(ji,jj) 120 zcmo(ji,jj,13) = qns(ji,jj) 121 121 ! See thersf for the coefficient 122 zcmo(ji,jj,14) = - fsalt(ji,jj) * rday * ( sss_io(ji,jj) + epsi16 ) / soce123 zcmo(ji,jj,15) = gtaux(ji,jj)124 zcmo(ji,jj,16) = gtauy(ji,jj)125 zcmo(ji,jj,17) = ( 1.0 - frld(ji,jj) ) * qsr_ice (ji,jj) + frld(ji,jj) * qsr_oce(ji,jj)126 zcmo(ji,jj,18) = ( 1.0 - frld(ji,jj) ) * qnsr_ice(ji,jj) + frld(ji,jj) * qnsr_oce(ji,jj)122 zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 123 zcmo(ji,jj,15) = utaui_ice(ji,jj) 124 zcmo(ji,jj,16) = vtaui_ice(ji,jj) 125 zcmo(ji,jj,17) = qsr_ice(ji,jj) 126 zcmo(ji,jj,18) = qns_ice(ji,jj) 127 127 zcmo(ji,jj,19) = sprecip(ji,jj) 128 128 END DO … … 132 132 nmoyice = nmoyice + 1 133 133 ! compute mean value if it is time to write on file 134 IF ( MOD(kt+n fice-1-nit000+1,nwrite) == 0 ) THEN134 IF ( MOD(kt+nn_fsbc-1-nit000+1,nwrite) == 0 ) THEN 135 135 rcmoy(:,:,:) = rcmoy(:,:,:) / FLOAT(nmoyice) 136 136 #else 137 IF ( MOD(kt-n fice-1-nit000+1,nwrite) == 0 ) THEN137 IF ( MOD(kt-nn_fsbc-1-nit000+1,nwrite) == 0 ) THEN 138 138 ! case of instantaneaous output rcmoy(:,:, 1:jpnoumax ) = 0.e0 139 139 DO jj = 2 , jpjm1 … … 149 149 rcmoy(ji,jj,5) = sist (ji,jj) 150 150 rcmoy(ji,jj,6) = fbif (ji,jj) 151 rcmoy(ji,jj,7) = zindb * ( u _ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) &152 + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &151 rcmoy(ji,jj,7) = zindb * ( ui_ice(ji,jj ) * tmu(ji,jj ) + ui_ice(ji+1,jj ) * tmu(ji+1,jj ) & 152 & + ui_ice(ji,jj+1) * tmu(ji,jj+1) + ui_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 153 153 / ztmu 154 154 155 rcmoy(ji,jj,8) = zindb * ( v _ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) &156 + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) &155 rcmoy(ji,jj,8) = zindb * ( vi_ice(ji,jj ) * tmu(ji,jj ) + vi_ice(ji+1,jj ) * tmu(ji+1,jj ) & 156 & + vi_ice(ji,jj+1) * tmu(ji,jj+1) + vi_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 157 157 / ztmu 158 rcmoy(ji,jj,9) = sst_ io(ji,jj)159 rcmoy(ji,jj,10) = sss_ io(ji,jj)160 161 rcmoy(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj)162 rcmoy(ji,jj,12) = fsolar(ji,jj)163 rcmoy(ji,jj,13) = fnsolar(ji,jj)158 rcmoy(ji,jj,9) = sst_m(ji,jj) 159 rcmoy(ji,jj,10) = sss_m(ji,jj) 160 161 rcmoy(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 162 rcmoy(ji,jj,12) = qsr(ji,jj) 163 rcmoy(ji,jj,13) = qns(ji,jj) 164 164 ! See thersf for the coefficient 165 rcmoy(ji,jj,14) = - fsalt(ji,jj) * rday * ( sss_io(ji,jj) + epsi16 ) / soce166 rcmoy(ji,jj,15) = gtaux(ji,jj)167 rcmoy(ji,jj,16) = gtauy(ji,jj)168 rcmoy(ji,jj,17) = ( 1.0 - frld(ji,jj) ) * qsr_ice (ji,jj) + frld(ji,jj) * qsr_oce(ji,jj)169 rcmoy(ji,jj,18) = ( 1.0 - frld(ji,jj) ) * qnsr_ice(ji,jj) + frld(ji,jj) * qnsr_oce(ji,jj)165 rcmoy(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 166 rcmoy(ji,jj,15) = utaui_ice(ji,jj) 167 rcmoy(ji,jj,16) = vtaui_ice(ji,jj) 168 rcmoy(ji,jj,17) = qsr_ice(ji,jj) 169 rcmoy(ji,jj,18) = qns_ice(ji,jj) 170 170 rcmoy(ji,jj,19) = sprecip(ji,jj) 171 171 END DO … … 201 201 rcmoy(:,:,:) = 0.0 202 202 nmoyice = 0 203 END IF ! MOD(kt+n fice-1-nit000+1, nwrite == 0 ) !203 END IF ! MOD(kt+nn_fsbc-1-nit000+1, nwrite == 0 ) ! 204 204 205 205 END SUBROUTINE lim_wri_2 -
trunk/NEMO/LIM_SRC_2/par_ice_2.F90
r823 r888 7 7 !!---------------------------------------------------------------------- 8 8 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 9 !! $ Header$9 !! $ Id: $ 10 10 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 11 11 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_2/thd_ice_2.F90
r823 r888 9 9 !!---------------------------------------------------------------------- 10 10 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 11 !! $ Header$11 !! $ Id: $ 12 12 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 13 13 !!---------------------------------------------------------------------- … … 57 57 fr1_i0_1d , & !: " " fr1_i0 58 58 fr2_i0_1d , & !: " " fr2_i0 59 qns r_ice_1d, & !: " " qns_ice59 qns_ice_1d , & !: " " qns_ice 60 60 qfvbq_1d , & !: " " qfvbq 61 61 sist_1d , & !: " " sist -
trunk/NEMO/LIM_SRC_3/ice.F90
r834 r888 9 9 !!---------------------------------------------------------------------- 10 10 !! LIM 3.0, UCL-LOCEAN-IPSL (2005) 11 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/ice.F90,v 1.4 2005/03/27 18:34:41 opalod Exp$11 !! $ Id: $ 12 12 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 13 13 !!---------------------------------------------------------------------- … … 493 493 diag_bot_me, & ! vertical bottom melt 494 494 diag_sur_me ! vertical surface melt 495 INTEGER , PUBLIC :: & !: indexes of the debugging 496 jiindex, & ! point 497 jjindex 495 INTEGER , PUBLIC :: jiindx, jjindx !: indexes of the debugging point 498 496 499 497 #else -
trunk/NEMO/LIM_SRC_3/iceini.F90
r862 r888 13 13 USE in_out_manager 14 14 USE ice_oce ! ice variables 15 USE flx_oce 15 USE sbc_oce ! Surface boundary condition: ocean fields 16 USE sbc_ice ! Surface boundary condition: ice fields 16 17 USE phycst ! Define parameters for the routines 17 18 USE ocfzpt … … 50 51 !!---------------------------------------------------------------------- 51 52 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 52 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/iceini.F90,v 1.4 2005/03/27 18:34:41 opalod Exp $53 !! $ Id: $ 53 54 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 54 55 !!---------------------------------------------------------------------- … … 74 75 ! Louvain la Neuve Ice model 75 76 IF( nacc == 1 ) THEN 76 dtsd2 = n fice* rdtmin * 0.577 rdt_ice = n fice* rdtmin77 dtsd2 = nn_fsbc * rdtmin * 0.5 78 rdt_ice = nn_fsbc * rdtmin 78 79 ELSE 79 dtsd2 = n fice* rdt * 0.580 rdt_ice = n fice* rdt80 dtsd2 = nn_fsbc * rdt * 0.5 81 rdt_ice = nn_fsbc * rdt 81 82 ENDIF 82 83 … … 104 105 freeze(:,:) = at_i(:,:) ! initialisation of sea/ice cover 105 106 # if defined key_coupled 106 alb_ice(:,:) = albege(:,:) ! sea-ice albedo 107 Must be adpated to LIM3 108 alb_ice(:,:,:) = albege(:,:) ! sea-ice albedo 107 109 # endif 108 110 109 nstart = numit + n fice111 nstart = numit + nn_fsbc 110 112 nitrun = nitend - nit000 + 1 111 113 nlast = numit + nitrun … … 188 190 189 191 WRITE(numout,*) 'lim_itd_ini : Initialization of ice thickness distribution ' 190 WRITE(numout,*) '~~~~~~~~~~~~ ~~~'192 WRITE(numout,*) '~~~~~~~~~~~~' 191 193 192 194 !!-- End of declarations -
trunk/NEMO/LIM_SRC_3/limadv.F90
r868 r888 36 36 !!---------------------------------------------------------------------- 37 37 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 38 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limadv.F90,v 1.4 2005/03/27 18:34:41 opalod Exp $38 !! $ Id: $ 39 39 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 40 40 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_3/limdia.F90
r869 r888 7 7 !! 1) in lim_dia : add its definition for both hemispheres if wished 8 8 !! 2) add the new titles in lim_dia_init 9 !! 9 !!---------------------------------------------------------------------- 10 10 #if defined key_lim3 11 11 !!---------------------------------------------------------------------- … … 26 26 USE limistate 27 27 USE dom_oce 28 USE sbc_oce ! Surface boundary condition: ocean fields 28 29 29 30 IMPLICIT NONE … … 73 74 !!---------------------------------------------------------------------- 74 75 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 75 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limdia.F90,v 1.5 2005/03/27 18:34:41 opalod Exp$76 !! $ Id: $ 76 77 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 77 78 !!---------------------------------------------------------------------- … … 107 108 !--------------------------------------- 108 109 zday_min = 273.0 ! zday_min = date of minimum extent, here September 30th 109 zday = FLOAT(numit-nit000) * rdt_ice / ( 86400.0 * FLOAT(n fice) )110 zday = FLOAT(numit-nit000) * rdt_ice / ( 86400.0 * FLOAT(nn_fsbc) ) 110 111 IF (zday.GT.zday_min) THEN 111 112 zshift_date = zday - zday_min … … 142 143 vinfor(31) = vinfor(31) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + & 143 144 v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12 144 vinfor(53) = vinfor(53) + fsalt(ji,jj)*aire(ji,jj) / 1.0e12 !salt flux145 vinfor(53) = vinfor(53) + emps(ji,jj)*aire(ji,jj) / 1.0e12 !salt flux 145 146 vinfor(55) = vinfor(55) + fsbri(ji,jj)*aire(ji,jj) / 1.0e12 !brine drainage flux 146 147 vinfor(57) = vinfor(57) + fseqv(ji,jj)*aire(ji,jj) / 1.0e12 !equivalent salt flux 147 vinfor(59) = vinfor(59) + sst_io(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SST148 vinfor(61) = vinfor(61) + sss_ io(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SSS148 vinfor(59) = vinfor(59) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SST 149 vinfor(61) = vinfor(61) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SSS 149 150 vinfor(65) = vinfor(65) + et_s(ji,jj)/1.0e9*aire(ji,jj) / 1.0e12 ! snow temperature 150 151 vinfor(67) = vinfor(67) + et_i(ji,jj)/1.0e9*aire(ji,jj) / 1.0e12 ! ice heat content … … 155 156 vinfor(77) = vinfor(77) + v_i(ji,jj,5)*aire(ji,jj) / 1.0e12 !ice volume 156 157 vinfor(79) = 0.0 157 vinfor(81) = vinfor(81) + fmass(ji,jj)*aire(ji,jj) / 1.0e12 ! mass flux158 vinfor(81) = vinfor(81) + emp(ji,jj)*aire(ji,jj) / 1.0e12 ! mass flux 158 159 ENDIF 159 160 END DO … … 293 294 vinfor(32) = vinfor(32) + vt_i(ji,jj)*( u_ice(ji,jj)*u_ice(ji,jj) + & 294 295 v_ice(ji,jj)*v_ice(ji,jj) )*aire(ji,jj)/1.0e12 !ice vel 295 vinfor(54) = vinfor(54) + at_i(ji,jj)* fsalt(ji,jj)*aire(ji,jj) / 1.0e12 ! Total salt flux296 vinfor(54) = vinfor(54) + at_i(ji,jj)*emps(ji,jj)*aire(ji,jj) / 1.0e12 ! Total salt flux 296 297 vinfor(56) = vinfor(56) + at_i(ji,jj)*fsbri(ji,jj)*aire(ji,jj) / 1.0e12 ! Brine drainage salt flux 297 298 vinfor(58) = vinfor(58) + at_i(ji,jj)*fseqv(ji,jj)*aire(ji,jj) / 1.0e12 ! Equivalent salt flux 298 vinfor(60) = vinfor(60) + sst_io(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SST299 vinfor(62) = vinfor(62) + sss_ io(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SSS299 vinfor(60) = vinfor(60) +(sst_m(ji,jj)+rt0)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SST 300 vinfor(62) = vinfor(62) + sss_m(ji,jj)*at_i(ji,jj)*aire(ji,jj) / 1.0e12 !SSS 300 301 vinfor(66) = vinfor(66) + et_s(ji,jj)/1.0e9*aire(ji,jj) / 1.0e12 ! snow temperature 301 302 vinfor(68) = vinfor(68) + et_i(ji,jj)/1.0e9*aire(ji,jj) / 1.0e12 ! ice enthalpy … … 306 307 vinfor(78) = vinfor(78) + v_i(ji,jj,5)*aire(ji,jj) / 1.0e12 !ice volume 307 308 vinfor(80) = 0.0 308 vinfor(82) = vinfor(82) + fmass(ji,jj)*aire(ji,jj) / 1.0e12 ! mass flux309 vinfor(82) = vinfor(82) + emp(ji,jj)*aire(ji,jj) / 1.0e12 ! mass flux 309 310 ENDIF 310 311 END DO -
trunk/NEMO/LIM_SRC_3/limdyn.F90
r869 r888 16 16 USE dom_ice 17 17 USE dom_oce ! ocean space and time domain 18 USE taumod19 18 USE ice 20 19 USE par_ice 20 USE sbc_ice ! Surface boundary condition: ice fields 21 21 USE ice_oce 22 22 USE iceini … … 41 41 !!---------------------------------------------------------------------- 42 42 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 43 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limdyn.F90,v 1.5 2005/03/27 18:34:41 opalod Exp$44 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt43 !! $ Id: $ 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 45 45 !!---------------------------------------------------------------------- 46 46 … … 90 90 IF ( ln_limdyn ) THEN 91 91 92 ! ocean velocity93 u_oce(:,:) = u_io(:,:) * tmu(:,:)94 v_oce(:,:) = v_io(:,:) * tmv(:,:)95 96 92 old_u_ice(:,:) = u_ice(:,:) * tmu(:,:) 97 93 old_v_ice(:,:) = v_ice(:,:) * tmv(:,:) … … 162 158 ENDIF 163 159 164 ! Ice-Ocean stress165 ! ================166 DO jj = 2, jpjm1167 zsang = SIGN(1.e0, gphif(1,jj-1) ) * sangvg168 169 DO ji = fs_2, fs_jpim1170 ! computation of wind stress over ocean in X and Y direction171 #if defined key_coupled && defined key_lim_cp1172 ! ztairx = ( 1.0 - at_i(ji-1,jj) ) * gtaux(ji-1,jj) + &173 ! ( 1.0 - at_i(ji,jj) ) * gtaux(ji,jj ) + &174 ! ( 1.0 - at_i(ji-1,jj-1) ) * gtaux(ji-1,jj-1) + &175 ! ( 1.0 - at_i(ji,jj-1) ) * gtaux(ji,jj-1)176 177 ! ztairy = ( 1.0 - at_i(ji-1,jj) ) * gtauy(ji-1,jj ) + &178 ! ( 1.0 - at_i(ji,jj ) ) * gtauy(ji,jj ) + &179 ! ( 1.0 - at_i(ji-1,jj-1) ) * gtauy(ji-1,jj-1) + &180 ! ( 1.0 - at_i(ji,jj-1) ) * gtauy(ji,jj-1)181 #else182 ztairx = ( 2.0 - at_i(ji,jj) - at_i(ji+1,jj) ) * gtaux(ji,jj) / cai * cao183 ztairy = ( 2.0 - at_i(ji,jj) - at_i(ji,jj+1) ) * gtauy(ji,jj) / cai * cao184 185 zsfrldmx2 = at_i(ji,jj) + at_i(ji+1,jj)186 zsfrldmy2 = at_i(ji,jj) + at_i(ji,jj+1)187 188 #endif189 zu_ice = u_ice(ji,jj) - u_oce(ji,jj)190 zv_ice = v_ice(ji,jj) - v_oce(ji,jj)191 zmod = SQRT( zu_ice * zu_ice + zv_ice * zv_ice )192 193 ! quadratic drag formulation194 ztglx = zsfrldmx2 * rhoco * zmod * ( cangvg * zu_ice - zsang * zv_ice )195 ztgly = zsfrldmy2 * rhoco * zmod * ( cangvg * zv_ice + zsang * zu_ice )196 !197 ! ! IMPORTANT198 ! ! these lignes are bound to prevent numerical oscillations199 ! ! in the ice-ocean stress200 ! ! They are physically ill-based. There is a cleaner solution201 ! ! to try (remember discussion in Paris Gurvan)202 !203 ztglx = ztglx * exp( - zmod / 0.5 )204 ztgly = ztglx * exp( - zmod / 0.5 )205 206 tio_u(ji,jj) = - ( ztairx + 1.0 * ztglx ) / ( 2. * rau0 )207 tio_v(ji,jj) = - ( ztairy + 1.0 * ztgly ) / ( 2. * rau0 )208 END DO209 END DO210 211 160 ! computation of friction velocity 212 161 DO jj = 2, jpjm1 213 162 DO ji = fs_2, fs_jpim1 214 163 215 zu_ice = u_ice(ji,jj) - u_ io(ji,jj)164 zu_ice = u_ice(ji,jj) - u_oce(ji,jj) 216 165 zt11 = rhoco * zu_ice * zu_ice 217 166 218 zu_ice = u_ice(ji-1,jj) - u_ io(ji-1,jj)167 zu_ice = u_ice(ji-1,jj) - u_oce(ji-1,jj) 219 168 zt12 = rhoco * zu_ice * zu_ice 220 169 221 zv_ice = v_ice(ji,jj) - v_ io(ji,jj)170 zv_ice = v_ice(ji,jj) - v_oce(ji,jj) 222 171 zt21 = rhoco * zv_ice * zv_ice 223 172 224 zv_ice = v_ice(ji,jj-1) - v_ io(ji,jj-1)173 zv_ice = v_ice(ji,jj-1) - v_oce(ji,jj-1) 225 174 zt22 = rhoco * zv_ice * zv_ice 226 ztair2 = ( ( gtaux(ji,jj) + gtaux(ji-1,jj) ) / 2. )**2 + &227 ( ( gtauy(ji,jj) + gtauy(ji,jj-1) ) / 2. )**2175 ztair2 = ( ( utaui_ice(ji,jj) + utaui_ice(ji-1,jj) ) / 2. )**2 + & 176 ( ( vtaui_ice(ji,jj) + vtaui_ice(ji,jj-1) ) / 2. )**2 228 177 229 178 ! should not be weighted … … 241 190 DO jj = 2, jpjm1 242 191 DO ji = fs_2, fs_jpim1 243 #if defined key_coupled && defined key_lim_cp1 244 tio_u(ji,jj) = - ( gtaux(ji ,jj ) + gtaux(ji-1,jj ) & 245 & + gtaux(ji-1,jj-1) + gtaux(ji ,jj-1) ) / ( 4 * rau0 ) 246 247 tio_v(ji,jj) = - ( gtauy(ji ,jj ) + gtauy(ji-1,jj ) & 248 & + gtauy(ji-1,jj-1) + gtauy(ji ,jj-1) ) / ( 4 * rau0 ) 249 #else 250 tio_u(ji,jj) = - gtaux(ji,jj) / cai * cao / rau0 251 tio_v(ji,jj) = - gtauy(ji,jj) / cai * cao / rau0 252 #endif 253 ztair2 = ( ( gtaux(ji,jj) + gtaux(ji-1,jj) ) / 2. )**2 + & 254 ( ( gtauy(ji,jj) + gtauy(ji,jj-1) ) / 2. )**2 192 ztair2 = ( ( utaui_ice(ji,jj) + utaui_ice(ji-1,jj) ) / 2. )**2 + & 193 ( ( vtaui_ice(ji,jj) + vtaui_ice(ji,jj-1) ) / 2. )**2 255 194 zustm = SQRT( ztair2 ) 256 195 … … 262 201 263 202 CALL lbc_lnk( ust2s, 'T', 1. ) ! T-point 264 CALL lbc_lnk( tio_u, 'U', -1. ) ! I-point (i.e. ice U-V point)265 CALL lbc_lnk( tio_v, 'V', -1. ) ! I-point (i.e. ice U-V point)266 203 267 204 IF(ln_ctl) THEN ! Control print … … 269 206 CALL prt_ctl_info(' - Cell values : ') 270 207 CALL prt_ctl_info(' ~~~~~~~~~~~~~ ') 271 CALL prt_ctl(tab2d_1=tio_u , clinfo1=' lim_dyn : tio_u :', tab2d_2=tio_v , clinfo2=' tio_v :')272 208 CALL prt_ctl(tab2d_1=ust2s , clinfo1=' lim_dyn : ust2s :') 273 209 CALL prt_ctl(tab2d_1=divu_i , clinfo1=' lim_dyn : divu_i :') -
trunk/NEMO/LIM_SRC_3/limhdf.F90
r868 r888 34 34 !!---------------------------------------------------------------------- 35 35 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 36 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limhdf.F90,v 1.5 2005/03/27 18:34:41 opalod Exp $36 !! $ Id: $ 37 37 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 38 38 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_3/limistate.F90
r869 r888 16 16 USE oce ! dynamics and tracers variables 17 17 USE dom_oce 18 USE sbc_oce ! Surface boundary condition: ocean fields 18 19 USE par_ice ! ice parameters 19 20 USE ice_oce ! ice variables … … 51 52 !!---------------------------------------------------------------------- 52 53 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 53 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limistate.F90,v 1.3 2005/03/27 18:34:41 opalod Exp$54 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt54 !! $ Id: $ 55 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 56 !!---------------------------------------------------------------------- 56 57 … … 93 94 CALL lim_istate_init ! reading the initials parameters of the ice 94 95 95 !-- Initialisation of sst,sss,u,v do i=1,jpi96 u_io(:,:) = 0.e0 ! ice velocity in x direction97 v_io(:,:) = 0.e0 ! ice velocity in y direction98 99 96 ! Initialisation at tn or -2 if ice 100 97 DO jj = 1, jpj … … 104 101 END DO 105 102 END DO 106 107 u_io (:,:) = 0.108 v_io (:,:) = 0.109 sst_io(:,:) = ( nfice - 1 ) * ( tn(:,:,1) + rt0 ) ! use the ocean initial values110 sss_io(:,:) = ( nfice - 1 ) * sn(:,:,1) ! tricky trick *(nfice-1) !111 103 112 104 !-------------------------------------------------------------------- … … 280 272 !--------------- 281 273 sm_i(ji,jj,jl) = zidto * sinn + ( 1.0 - zidto ) * 0.1 282 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_ io(ji,jj) ) * v_i(ji,jj,jl)274 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) 283 275 284 276 !---------- … … 405 397 406 398 sm_i(ji,jj,jl) = zidto * sins + ( 1.0 - zidto ) * 0.1 407 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_ io(ji,jj) ) * v_i(ji,jj,jl)399 smv_i(ji,jj,jl) = MIN( sm_i(ji,jj,jl) , sss_m(ji,jj) ) * v_i(ji,jj,jl) 408 400 409 401 !---------- … … 538 530 539 531 CALL lbc_lnk( fsbbq , 'T', 1. ) 540 CALL lbc_lnk( sss_io , 'T', 1. )541 532 542 533 END SUBROUTINE lim_istate -
trunk/NEMO/LIM_SRC_3/limitd_me.F90
r869 r888 20 20 USE phycst ! physical constants (ocean directory) 21 21 USE ice_oce ! ice variables 22 USE sbc_oce ! Surface boundary condition: ocean fields 22 23 USE thd_ice 23 24 USE limistate … … 743 744 ! Temporal smoothing 744 745 !-------------------- 745 IF ( numit .EQ. nit000 + n fice- 1 ) THEN746 IF ( numit .EQ. nit000 + nn_fsbc - 1 ) THEN 746 747 strp1(:,:) = 0.0 747 748 strp2(:,:) = 0.0 … … 1194 1195 IF ( con_i ) THEN 1195 1196 CALL lim_column_sum (jpl, v_i, vice_init ) 1196 WRITE(numout,*) ' vice_init : ', vice_init(jiind ex,jjindex)1197 WRITE(numout,*) ' vice_init : ', vice_init(jiindx,jjindx) 1197 1198 CALL lim_column_sum_energy (jpl, nlay_i, e_i, eice_init ) 1198 WRITE(numout,*) ' eice_init : ', eice_init(jiind ex,jjindex)1199 WRITE(numout,*) ' eice_init : ', eice_init(jiindx,jjindx) 1199 1200 ENDIF 1200 1201 … … 1363 1364 ! Salinity 1364 1365 !------------- 1365 smsw(ji,jj) = sss_ io(ji,jj) * vsw(ji,jj) * ridge_por1366 smsw(ji,jj) = sss_m(ji,jj) * vsw(ji,jj) * ridge_por 1366 1367 1367 1368 ! salinity of new ridge … … 1447 1448 - eirft(ji,jj,jk) 1448 1449 ! sea water heat content 1449 ztmelts = - tmut * sss_ io(ji,jj) + rtt1450 ztmelts = - tmut * sss_m(ji,jj) + rtt 1450 1451 ! heat content per unit volume 1451 zdummy0 = - rcp * ( sst_ io(ji,jj)- rtt ) * vsw(ji,jj)1452 zdummy0 = - rcp * ( sst_m(ji,jj) + rt0 - rtt ) * vsw(ji,jj) 1452 1453 1453 1454 ! corrected sea water salinity … … 1616 1617 fieldid = ' v_i : limitd_me ' 1617 1618 CALL lim_cons_check (vice_init, vice_final, 1.0e-6, fieldid) 1618 WRITE(numout,*) ' vice_init : ', vice_init(jiind ex,jjindex)1619 WRITE(numout,*) ' vice_final : ', vice_final(jiind ex,jjindex)1619 WRITE(numout,*) ' vice_init : ', vice_init(jiindx,jjindx) 1620 WRITE(numout,*) ' vice_final : ', vice_final(jiindx,jjindx) 1620 1621 1621 1622 CALL lim_column_sum_energy (jpl, nlay_i, e_i, eice_final ) 1622 1623 fieldid = ' e_i : limitd_me ' 1623 1624 CALL lim_cons_check (eice_init, eice_final, 1.0e-2, fieldid) 1624 WRITE(numout,*) ' eice_init : ', eice_init(jiind ex,jjindex)1625 WRITE(numout,*) ' eice_final : ', eice_final(jiind ex,jjindex)1625 WRITE(numout,*) ' eice_init : ', eice_init(jiindx,jjindx) 1626 WRITE(numout,*) ' eice_final : ', eice_final(jiindx,jjindx) 1626 1627 ENDIF 1627 1628 … … 1839 1840 ! fresh_hist(i,j) = fresh_hist(i,j) + xtmp 1840 1841 1841 ! fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_ io(ji,jj) ) * &1842 ! fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_m(ji,jj) ) * & 1842 1843 ! rhosn * v_s(ji,jj,jl) / rdt_ice 1843 1844 1844 ! fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_ io(ji,jj) - sm_i(ji,jj,jl) ) * &1845 ! fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_m(ji,jj) - sm_i(ji,jj,jl) ) * & 1845 1846 ! rhoic * v_i(ji,jj,jl) / rdt_ice 1846 1847 1847 ! fsalt(i,j) = fsalt(i,j) + xtmp1848 ! emps(i,j) = emps(i,j) + xtmp 1848 1849 ! fsalt_hist(i,j) = fsalt_hist(i,j) + xtmp 1849 1850 -
trunk/NEMO/LIM_SRC_3/limmsh.F90
r869 r888 25 25 !!---------------------------------------------------------------------- 26 26 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 27 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limmsh.F90,v 1.5 2005/03/27 18:34:42 opalod Exp $27 !! $ Id: $ 28 28 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 29 29 !!---------------------------------------------------------------------- -
trunk/NEMO/LIM_SRC_3/limrhg.F90
r869 r888 16 16 USE dom_oce 17 17 USE dom_ice 18 USE sbc_ice ! Surface boundary condition: ice fields 18 19 USE ice 19 20 USE iceini … … 40 41 !!---------------------------------------------------------------------- 41 42 !! LIM 3.0, UCL-LOCEAN-IPSL (2008) 42 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limrhg.F90,v 1.5 2005/03/27 18:34:42 opalod Exp $43 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt43 !! $ Id: $ 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 44 45 !!---------------------------------------------------------------------- 45 46 … … 268 269 / ( e2t(ji,jj+1) + e2t(ji,jj) + epsd ) 269 270 ! 270 u_oce1(ji,jj) = u_ io(ji,jj)271 v_oce2(ji,jj) = v_ io(ji,jj)271 u_oce1(ji,jj) = u_oce(ji,jj) 272 v_oce2(ji,jj) = v_oce(ji,jj) 272 273 273 274 ! Ocean has no slip boundary condition 274 v_oce1(ji,jj) = 0.5*( (v_ io(ji,jj)+v_io(ji,jj-1))*e1t(ji,jj) &275 & +(v_ io(ji+1,jj)+v_io(ji+1,jj-1))*e1t(ji+1,jj)) &275 v_oce1(ji,jj) = 0.5*( (v_oce(ji,jj)+v_oce(ji,jj-1))*e1t(ji,jj) & 276 & +(v_oce(ji+1,jj)+v_oce(ji+1,jj-1))*e1t(ji+1,jj)) & 276 277 & /(e1t(ji+1,jj)+e1t(ji,jj)) * tmu(ji,jj) 277 278 278 u_oce2(ji,jj) = 0.5*((u_ io(ji,jj)+u_io(ji-1,jj))*e2t(ji,jj) &279 & +(u_ io(ji,jj+1)+u_io(ji-1,jj+1))*e2t(ji,jj+1)) &279 u_oce2(ji,jj) = 0.5*((u_oce(ji,jj)+u_oce(ji-1,jj))*e2t(ji,jj) & 280 & +(u_oce(ji,jj+1)+u_oce(ji-1,jj+1))*e2t(ji,jj+1)) & 280 281 & / (e2t(ji,jj+1)+e2t(ji,jj)) * tmv(ji,jj) 281 282 282 283 ! Wind stress. 283 ztagnx = ( 1. - zfrld1(ji,jj) ) * gtaux(ji,jj)284 ztagny = ( 1. - zfrld2(ji,jj) ) * gtauy(ji,jj)284 ztagnx = ( 1. - zfrld1(ji,jj) ) * utaui_ice(ji,jj) 285 ztagny = ( 1. - zfrld2(ji,jj) ) * vtaui_ice(ji,jj) 285 286 286 287 ! Computation of the velocity field taking into account the ice internal interaction. … … 621 622 zdummy = zindb * vt_i(ji,jj) / MAX(at_i(ji,jj) , 1.0e-06 ) 622 623 IF ( zdummy .LE. 5.0e-2 ) THEN 623 u_ice(ji,jj) = u_ io(ji,jj)624 v_ice(ji,jj) = v_ io(ji,jj)624 u_ice(ji,jj) = u_oce(ji,jj) 625 v_ice(ji,jj) = v_oce(ji,jj) 625 626 ENDIF ! zdummy 626 627 END DO -
trunk/NEMO/LIM_SRC_3/limrst.F90
r838 r888 18 18 USE dom_oce 19 19 USE ice_oce ! ice variables 20 USE sbc_oce ! Surface boundary condition: ocean fields 21 USE sbc_ice ! Surface boundary condition: ice fields 20 22 USE daymod 21 23 USE iom … … 34 36 !!---------------------------------------------------------------------- 35 37 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 36 !! $ Id:$38 !! $ Id: $ 37 39 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 38 40 !!---------------------------------------------------------------------- … … 55 57 56 58 ! to get better performances with NetCDF format: 57 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*n fice+ 1)58 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*n fice+ 159 IF( kt == nitrst - 2*n fice + 1 .OR. nstock == nfice .OR. ( kt == nitend - nfice+ 1 .AND. .NOT. lrst_ice ) ) THEN59 ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 60 ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 61 IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 60 62 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 61 63 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst … … 70 72 CASE DEFAULT ; WRITE(numout,*) ' open ice restart NetCDF file: '//clname 71 73 END SELECT 72 IF( kt == nitrst - 2*n fice+ 1 ) THEN73 WRITE(numout,*) ' kt = nitrst - 2*n fice+ 1 = ', kt,' date= ', ndastp74 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp74 IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN 75 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 76 ELSE ; WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 75 77 ENDIF 76 78 ENDIF … … 100 102 !!---------------------------------------------------------------------- 101 103 102 iter = kt + n fice - 1 ! ice restarts are written at kt == nitrst - nfice+ 1104 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 103 105 104 106 IF( iter == nitrst ) THEN … … 111 113 ! ------------------ 112 114 ! ! calendar control 113 CALL iom_rstput( iter, nitrst, numriw, 'n fice' , REAL( nfice, wp) ) ! time-step114 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp) )! date115 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp) ) ! time-step 116 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp) ) ! date 115 117 116 118 ! Prognostic variables … … 158 160 CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice ) 159 161 CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice ) 160 CALL iom_rstput( iter, nitrst, numriw, ' gtaux' , gtaux)161 CALL iom_rstput( iter, nitrst, numriw, ' gtauy' , gtauy)162 CALL iom_rstput( iter, nitrst, numriw, 'utaui_ice' , utaui_ice ) 163 CALL iom_rstput( iter, nitrst, numriw, 'vtaui_ice' , vtaui_ice ) 162 164 CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq ) 163 165 CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i ) … … 299 301 WRITE(numout,*) ' ~~~ Arctic' 300 302 301 ji = jiind ex302 jj = jjind ex303 ji = jiindx 304 jj = jjindx 303 305 304 306 WRITE(numout,*) ' ji, jj ', ji, jj … … 387 389 !!---------------------------------------------------------------------- 388 390 ! Local variables 389 INTEGER :: ji, jj, jk, jl, ind ex391 INTEGER :: ji, jj, jk, jl, indx 390 392 REAL(wp) :: zfice, ziter 391 393 REAL(wp) :: & !parameters for the salinity profile … … 405 407 CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) 406 408 407 CALL iom_get( numrir, 'n fice', zfice )408 CALL iom_get( numrir, 'kt_ice' , ziter )409 CALL iom_get( numrir, 'nn_fsbc', zfice ) 410 CALL iom_get( numrir, 'kt_ice' , ziter ) 409 411 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter 410 412 IF(lwp) WRITE(numout,*) ' in any case we force it to nit000 - 1 : ', nit000 - 1 … … 416 418 & ' verify the file or rerun with the value 0 for the', & 417 419 & ' control of time parameter nrstdt' ) 418 IF( INT(zfice) /= n fice.AND. ABS( nrstdt ) == 1 ) &419 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with n ficein ice restart', &420 & ' verify the file or rerun with the value 0 for the', &420 IF( INT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 421 & CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 422 & ' verify the file or rerun with the value 0 for the', & 421 423 & ' control of time parameter nrstdt' ) 422 424 … … 512 514 CALL iom_get( numrir, jpdom_autoglo, 'u_ice' , u_ice ) 513 515 CALL iom_get( numrir, jpdom_autoglo, 'v_ice' , v_ice ) 514 CALL iom_get( numrir, jpdom_autoglo, ' gtaux' , gtaux)515 CALL iom_get( numrir, jpdom_autoglo, ' gtauy' , gtauy)516 CALL iom_get( numrir, jpdom_autoglo, 'utaui_ice' , utaui_ice ) 517 CALL iom_get( numrir, jpdom_autoglo, 'vtaui_ice' , vtaui_ice ) 516 518 CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq ) 517 519 CALL iom_get( numrir, jpdom_autoglo, 'stress1_i' , stress1_i ) … … 650 652 WRITE(numout,*) ' ~~~ Arctic' 651 653 652 ind ex = 1654 indx = 1 653 655 ji = 24 654 656 jj = 24 -
trunk/NEMO/LIM_SRC_3/limtab.F90
r834 r888 23 23 !!---------------------------------------------------------------------- 24 24 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 25 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limtab.F90,v 1.2 2005/03/27 18:34:42 opalod Exp $26 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt25 !! $ Id: $ 26 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 27 27 !!---------------------------------------------------------------------- 28 28 CONTAINS -
trunk/NEMO/LIM_SRC_3/limthd.F90
r869 r888 18 18 USE ice ! LIM sea-ice variables 19 19 USE ice_oce ! sea-ice/ocean variables 20 USE flx_oce ! sea-ice/ocean forcings variables 20 USE sbc_oce ! Surface boundary condition: ocean fields 21 USE sbc_ice ! Surface boundary condition: ice fields 21 22 USE thd_ice ! LIM thermodynamic sea-ice variables 22 23 USE dom_ice ! LIM sea-ice domain … … 52 53 !!---------------------------------------------------------------------- 53 54 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 54 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limthd.F90,v 1.6 2005/03/27 18:34:42 opalod Exp$55 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt55 !! $ Id: $ 56 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 56 57 !!---------------------------------------------------------------------- 57 58 … … 84 85 !!--------------------------------------------------------------------- 85 86 !! * Local variables 86 INTEGER :: ji, jj, jk, jl, & 87 zji , zjj, & ! dummy loop indices 88 nbpb , & ! nb of icy pts for thermo. cal. 89 index 87 INTEGER :: ji, jj, jk, jl, nbpb ! nb of icy pts for thermo. cal. 90 88 91 89 REAL(wp) :: & … … 211 209 212 210 ! here the drag will depend on ice thickness and type (0.006) 213 fdtcn(ji,jj) = zindb * rau0 * rcp * 0.006 * zfric_u * ( sst_io(ji,jj) - t_bo(ji,jj) )211 fdtcn(ji,jj) = zindb * rau0 * rcp * 0.006 * zfric_u * ( (sst_m(ji,jj) + rt0) - t_bo(ji,jj) ) 214 212 ! also category dependent 215 213 ! !-- Energy from the turbulent oceanic heat flux heat flux coming in the lead … … 220 218 ! !-- Lead heat budget (part 1, next one is in limthd_dh 221 219 ! !-- qldif -- (or qldif_1d in 1d routines) 222 zfontn = sprecip(ji,jj) * lfus ! 223 zfnsol = qns r_oce(ji,jj) !total non solar flux224 qldif(ji,jj) = tms(ji,jj) * ( qsr _oce(ji,jj)&220 zfontn = sprecip(ji,jj) * lfus ! energy of melting 221 zfnsol = qns(ji,jj) ! total non solar flux 222 qldif(ji,jj) = tms(ji,jj) * ( qsr(ji,jj) & 225 223 & + zfnsol + fdtcn(ji,jj) - zfontn & 226 224 & + ( 1.0 - zindb ) * fsbbq(ji,jj) ) & … … 242 240 ! Energy needed to bring ocean surface layer until its freezing 243 241 ! qcmif, limflx 244 qcmif (ji,jj) = rau0 * rcp * fse3t(ji,jj,1) * ( t_bo(ji,jj) - sst_io(ji,jj) ) * ( 1. - zinda )242 qcmif (ji,jj) = rau0 * rcp * fse3t(ji,jj,1) * ( t_bo(ji,jj) - (sst_m(ji,jj) + rt0) ) * ( 1. - zinda ) 245 243 246 244 ! calculate oceanic heat flux (limthd_dh) … … 271 269 ENDIF 272 270 ! debug point to follow 273 IF ( (ji.eq.jiind ex).AND.(jj.eq.jjindex) ) THEN271 IF ( (ji.eq.jiindx).AND.(jj.eq.jjindx) ) THEN 274 272 jiindex_1d = nbpb 275 273 ENDIF … … 310 308 CALL tab_2d_1d( nbpb, fr1_i0_1d (1:nbpb) , fr1_i0 , jpi, jpj, npb(1:nbpb) ) 311 309 CALL tab_2d_1d( nbpb, fr2_i0_1d (1:nbpb) , fr2_i0 , jpi, jpj, npb(1:nbpb) ) 312 CALL tab_2d_1d( nbpb, qnsr_ice_1d(1:nbpb) , qns r_ice(:,:,jl), jpi, jpj, npb(1:nbpb) )310 CALL tab_2d_1d( nbpb, qnsr_ice_1d(1:nbpb) , qns_ice(:,:,jl) , jpi, jpj, npb(1:nbpb) ) 313 311 314 312 #if ! defined key_coupled … … 360 358 361 359 !---------------------------------! 362 CALL lim_thd_sal(1,nbpb ,jl)! Ice salinity computation !360 CALL lim_thd_sal(1,nbpb) ! Ice salinity computation ! 363 361 !---------------------------------! 364 362 … … 415 413 CALL tab_1d_2d( nbpb, s_i_newice , npb, s_i_new (1:nbpb) , jpi, jpj ) 416 414 CALL tab_1d_2d( nbpb, izero(:,:,jl) , npb, i0 (1:nbpb) , jpi, jpj ) 417 CALL tab_1d_2d( nbpb, qns r_ice(:,:,jl), npb, qnsr_ice_1d(1:nbpb), jpi, jpj)415 CALL tab_1d_2d( nbpb, qns_ice(:,:,jl), npb, qnsr_ice_1d(1:nbpb), jpi, jpj) 418 416 !+++++ 419 417 … … 543 541 544 542 INTEGER :: & 545 ji,j j,jk! loop indices543 ji,jk ! loop indices 546 544 547 545 !!----------------------------------------------------------------------- … … 598 596 ! is violated 599 597 INTEGER :: & 600 ji,j j,jk,& !: loop indices598 ji,jk, & !: loop indices 601 599 zji, zjj 602 600 !!--------------------------------------------------------------------- … … 726 724 WRITE(numout,*) ' foc : ', fbif_1d(ji) 727 725 WRITE(numout,*) ' fstroc : ', fstroc (zji,zjj,jl) 728 WRITE(numout,*) ' i0 : ', i0(ji)729 WRITE(numout,*) ' fsolar: ', (1.0-i0(ji))*qsr_ice_1d(ji)730 WRITE(numout,*) ' fnsolar: ', qnsr_ice_1d(ji)726 WRITE(numout,*) ' i0 : ', i0(ji) 727 WRITE(numout,*) ' qsr_ice : ', (1.0-i0(ji))*qsr_ice_1d(ji) 728 WRITE(numout,*) ' qns_ice : ', qnsr_ice_1d(ji) 731 729 WRITE(numout,*) ' Conduction fluxes : ' 732 730 WRITE(numout,*) ' fc_s : ', fc_s(ji,0:nlay_s) … … 778 776 numce !: number of points for which conservation 779 777 ! is violated 780 INTEGER :: & 781 ji,jj,jk, & !: loop indices 782 zji, zjj 783 778 INTEGER :: ji, zji, zjj ! loop indices 784 779 !!--------------------------------------------------------------------- 785 780 -
trunk/NEMO/LIM_SRC_3/limthd_dh.F90
r869 r888 16 16 USE phycst ! physical constants (OCE directory) 17 17 USE ice_oce ! ice variables 18 USE sbc_oce ! Surface boundary condition: ocean fields 18 19 USE thd_ice 19 20 USE iceini … … 338 339 zjj = ( npb(ji) - 1 ) / jpi + 1 339 340 zfsalt_melt(ji) = zfsalt_melt(ji) + & 340 ( sss_ io(zji,zjj) - sm_i_b(ji) ) *&341 ( sss_m(zji,zjj) - sm_i_b(ji) ) * & 341 342 a_i_b(ji) * & 342 343 MIN( zdeltah(ji,jk) , 0.0 ) * rhoic / rdt_ice … … 368 369 WRITE(numout,*) ' qlbbq_1d: ', qlbbq_1d(ji) 369 370 WRITE(numout,*) ' s_i_new : ', s_i_new(ji) 370 WRITE(numout,*) ' sss_ io : ', sss_io(zji,zjj)371 WRITE(numout,*) ' sss_m : ', sss_m(zji,zjj) 371 372 ENDIF 372 373 … … 494 495 zswi2 * 0.26 / & 495 496 ( 0.26 + 0.74 * EXP ( - 724300.0 * zgrr ) ) 496 zds = zfracs*sss_ io(zji,zjj) - s_i_new(ji)497 s_i_new(ji) = zfracs * sss_ io(zji,zjj)497 zds = zfracs*sss_m(zji,zjj) - s_i_new(ji) 498 s_i_new(ji) = zfracs * sss_m(zji,zjj) 498 499 ENDIF ! fc_bo_i 499 500 END DO ! ji … … 567 568 zjj = ( npb(ji) - 1 ) / jpi + 1 568 569 zfsalt_melt(ji) = zfsalt_melt(ji) + & 569 ( sss_ io(zji,zjj) - sm_i_b(ji) ) *&570 ( sss_m(zji,zjj) - sm_i_b(ji) ) * & 570 571 a_i_b(ji) * & 571 572 MIN( zdeltah(ji,jk) , 0.0 ) * rhoic / rdt_ice … … 596 597 WRITE(numout,*) ' qlbbq_1d: ', qlbbq_1d(ji) 597 598 WRITE(numout,*) ' s_i_new : ', s_i_new(ji) 598 WRITE(numout,*) ' sss_ io : ', sss_io(zji,zjj)599 WRITE(numout,*) ' sss_m : ', sss_m(zji,zjj) 599 600 WRITE(numout,*) ' dh_i_bott : ', dh_i_bott(ji) 600 601 WRITE(numout,*) ' innermelt : ', innermelt(ji) … … 701 702 fseqv_1d(ji) = fseqv_1d(ji) + zihgnew * zfsalt_melt(ji) + & 702 703 (1.0 - zihgnew) * rdmicif_1d(ji) * & 703 ( sss_ io(zji,zjj) - sm_i_b(ji) ) / rdt_ice704 ( sss_m(zji,zjj) - sm_i_b(ji) ) / rdt_ice 704 705 ! new lines 705 706 IF ( num_sal .EQ. 4 ) & 706 707 fseqv_1d(ji) = fseqv_1d(ji) + zihgnew * zfsalt_melt(ji) + & 707 708 (1.0 - zihgnew) * rdmicif_1d(ji) * & 708 ( sss_ io(zji,zjj) - bulk_sal ) / rdt_ice709 ( sss_m(zji,zjj) - bulk_sal ) / rdt_ice 709 710 ! Heat flux 710 711 ! excessive bottom ablation energy (fsup) - 0 except if jpl = 1 … … 762 763 *(ht_s_b(ji)-zhnnew)*rhosn 763 764 764 #if defined key_lim_fdd765 !(presently Activated)766 765 rdmicif_1d(ji) = rdmicif_1d(ji) + a_i_b(ji) & 767 766 * ( zhgnew(ji) - ht_i_b(ji) )*rhoic … … 775 774 776 775 zsm_snowice = ( rhoic - rhosn ) / rhoic * & 777 sss_ io(zji,zjj)776 sss_m(zji,zjj) 778 777 779 778 IF ( num_sal .NE. 2 ) zsm_snowice = sm_i_b(ji) … … 781 780 IF ( num_sal .NE. 4 ) & 782 781 fseqv_1d(ji) = fseqv_1d(ji) + & 783 ( sss_ io(zji,zjj) - zsm_snowice ) * &782 ( sss_m(zji,zjj) - zsm_snowice ) * & 784 783 a_i_b(ji) * & 785 784 ( zhgnew(ji) - ht_i_b(ji) ) * rhoic / rdt_ice … … 787 786 IF ( num_sal .EQ. 4 ) & 788 787 fseqv_1d(ji) = fseqv_1d(ji) + & 789 ( sss_ io(zji,zjj) - bulk_sal ) * &788 ( sss_m(zji,zjj) - bulk_sal ) * & 790 789 a_i_b(ji) * & 791 790 ( zhgnew(ji) - ht_i_b(ji) ) * rhoic / rdt_ice … … 801 800 - sm_i_b(ji) ) * isnowic 802 801 803 #else804 rdmicif_1d(ji) = rdmicif_1d(ji) + a_i_b(ji) &805 * ( zhgnew(ji) - ht_i_b(ji) ) * rhoic &806 + ( zhnnew - ht_s_b(ji) ) * rhosn )807 #endif808 802 ! Actualize new snow and ice thickness. 809 803 ht_s_b(ji) = zhnnew -
trunk/NEMO/LIM_SRC_3/limthd_lac.F90
r865 r888 1 1 MODULE limthd_lac 2 #if defined key_lim33 2 !!---------------------------------------------------------------------- 4 3 !! 'key_lim3' LIM3 sea-ice model … … 8 7 !! lateral thermodynamic growth of the ice 9 8 !!====================================================================== 10 9 #if defined key_lim3 11 10 !!---------------------------------------------------------------------- 12 11 !! lim_lat_acr : lateral accretion of ice … … 17 16 USE phycst 18 17 USE ice_oce ! ice variables 18 USE sbc_oce ! Surface boundary condition: ocean fields 19 USE sbc_ice ! Surface boundary condition: ice fields 19 20 USE thd_ice 20 21 USE dom_ice … … 23 24 USE iceini 24 25 USE limtab 25 USE taumod26 USE blk_oce27 26 USE limcons 28 27 … … 46 45 !!---------------------------------------------------------------------- 47 46 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 48 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limthd_lac.F90,v 1.5 2005/03/27 18:34:42 opalod Exp $49 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt47 !! $ Id: $ 48 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 50 49 !!---------------------------------------------------------------------- 51 50 … … 181 180 vt_s_init, vt_s_final, & ! snow volume summed over categories 182 181 et_i_init, et_i_final, & ! ice energy summed over categories 183 et_s_init , et_s_final! snow energy summed over categories182 et_s_init ! snow energy summed over categories 184 183 185 184 REAL(wp) :: & … … 267 266 !------------- 268 267 ! C-grid wind stress components 269 ztaux = ( gtaux(ji-1,jj ) * tmu(ji-1,jj ) &270 + gtaux(ji ,jj ) * tmu(ji ,jj ) ) / 2.0271 ztauy = ( gtauy(ji ,jj-1) * tmv(ji ,jj-1) &272 + gtauy(ji ,jj ) * tmv(ji ,jj ) ) / 2.0268 ztaux = ( utaui_ice(ji-1,jj ) * tmu(ji-1,jj ) & 269 + utaui_ice(ji ,jj ) * tmu(ji ,jj ) ) / 2.0 270 ztauy = ( vtaui_ice(ji ,jj-1) * tmv(ji ,jj-1) & 271 + vtaui_ice(ji ,jj ) * tmv(ji ,jj ) ) / 2.0 273 272 ! Square root of wind stress 274 273 ztenagm = SQRT( SQRT( ztaux * ztaux + ztauy * ztauy ) ) … … 343 342 nbpac = nbpac + 1 344 343 npac( nbpac ) = (jj - 1) * jpi + ji 345 IF ( (ji.eq.jiind ex).AND.(jj.eq.jjindex) ) THEN344 IF ( (ji.eq.jiindx).AND.(jj.eq.jjindx) ) THEN 346 345 jiindex_1d = nbpac 347 346 ENDIF … … 418 417 zji = MOD( npac(ji) - 1, jpi ) + 1 419 418 zjj = ( npac(ji) - 1 ) / jpi + 1 420 zs_newice(ji) = MIN( 0.5*sss_ io(zji,zjj) , zs_newice(ji) )419 zs_newice(ji) = MIN( 0.5*sss_m(zji,zjj) , zs_newice(ji) ) 421 420 END DO ! jl 422 421 … … 476 475 zjj = ( npac(ji) - 1 ) / jpi + 1 477 476 fseqv_1d(ji) = fseqv_1d(ji) + & 478 ( sss_ io(zji,zjj) - bulk_sal ) * rhoic *&477 ( sss_m(zji,zjj) - bulk_sal ) * rhoic * & 479 478 zv_newice(ji) / rdt_ice 480 479 END DO … … 484 483 zjj = ( npac(ji) - 1 ) / jpi + 1 485 484 fseqv_1d(ji) = fseqv_1d(ji) + & 486 ( sss_ io(zji,zjj) - zs_newice(ji) ) * rhoic *&485 ( sss_m(zji,zjj) - zs_newice(ji) ) * rhoic * & 487 486 zv_newice(ji) / rdt_ice 488 487 END DO ! ji … … 617 616 END DO 618 617 619 WRITE(numout,*) ' zv_i_ac : ', zv_i_ac(jiind ex, 1:jpl)618 WRITE(numout,*) ' zv_i_ac : ', zv_i_ac(jiindx, 1:jpl) 620 619 DO jl = ice_cat_bounds(jm,1), ice_cat_bounds(jm,2) 621 620 DO ji = 1, nbpac … … 626 625 END DO ! ji 627 626 END DO ! jl 628 WRITE(numout,*) ' zv_i_ac : ', zv_i_ac(jiind ex, 1:jpl)627 WRITE(numout,*) ' zv_i_ac : ', zv_i_ac(jiindx, 1:jpl) 629 628 630 629 !--------------------------------- … … 796 795 ! CALL lim_cons_check (et_s_init, et_s_final, 1.0e-3, fieldid) 797 796 798 WRITE(numout,*) ' vt_i_init : ', vt_i_init(jiind ex,jjindex)799 WRITE(numout,*) ' vt_i_final: ', vt_i_final(jiind ex,jjindex)800 WRITE(numout,*) ' et_i_init : ', et_i_init(jiind ex,jjindex)801 WRITE(numout,*) ' et_i_final: ', et_i_final(jiind ex,jjindex)797 WRITE(numout,*) ' vt_i_init : ', vt_i_init(jiindx,jjindx) 798 WRITE(numout,*) ' vt_i_final: ', vt_i_final(jiindx,jjindx) 799 WRITE(numout,*) ' et_i_init : ', et_i_init(jiindx,jjindx) 800 WRITE(numout,*) ' et_i_final: ', et_i_final(jiindx,jjindx) 802 801 803 802 ENDIF -
trunk/NEMO/LIM_SRC_3/limthd_sal.F90
r869 r888 1 1 MODULE limthd_sal 2 #if defined key_lim33 2 !!---------------------------------------------------------------------- 4 3 !! 'key_lim3' LIM3 sea-ice model … … 9 8 !! the ice 10 9 !!====================================================================== 11 10 #if defined key_lim3 12 11 !!---------------------------------------------------------------------- 13 12 !! lim_thd_sal : salinity variations in the ice … … 16 15 USE phycst ! physical constants (ocean directory) 17 16 USE ice_oce ! ice variables 17 USE sbc_oce ! Surface boundary condition: ocean fields 18 18 USE thd_ice 19 19 USE iceini … … 40 40 CONTAINS 41 41 42 SUBROUTINE lim_thd_sal(kideb,kiut ,jl)42 SUBROUTINE lim_thd_sal(kideb,kiut) 43 43 !!------------------------------------------------------------------- 44 44 !! *** ROUTINE lim_thd_sal *** … … 76 76 !! * Local variables 77 77 INTEGER, INTENT(in) :: & 78 kideb, kiut , jl!: thickness category index78 kideb, kiut !: thickness category index 79 79 80 80 INTEGER :: & … … 318 318 zjj = ( npb(ji) - 1 ) / jpi + 1 319 319 fseqv_1d(ji) = fseqv_1d(ji) + & 320 ( sss_ io(zji,zjj) - bulk_sal ) * &320 ( sss_m(zji,zjj) - bulk_sal ) * & 321 321 rhoic * a_i_b(ji) * & 322 322 MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice … … 327 327 zjj = ( npb(ji) - 1 ) / jpi + 1 328 328 fseqv_1d(ji) = fseqv_1d(ji) + & 329 ( sss_ io(zji,zjj) - s_i_new(ji) ) * &329 ( sss_m(zji,zjj) - s_i_new(ji) ) * & 330 330 rhoic * a_i_b(ji) * & 331 331 MAX( dh_i_bott(ji) , 0.0 ) / rdt_ice -
trunk/NEMO/LIM_SRC_3/limtrp.F90
r868 r888 17 17 USE in_out_manager ! I/O manager 18 18 USE ice_oce ! ice variables 19 USE sbc_oce ! Surface boundary condition: ocean fields 19 20 USE dom_ice 20 21 USE ice … … 51 52 !!---------------------------------------------------------------------- 52 53 !! LIM 3.0, UCL-ASTR-LOCEAN-IPSL (2008) 53 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limtrp.F90,v 1.5 2005/03/27 18:34:42 opalod Exp$54 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt54 !! $ Id: $ 55 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 56 !!---------------------------------------------------------------------- 56 57 CONTAINS … … 519 520 520 521 ! Ice salinity and age 521 zsal = MAX( MIN( (rhoic-rhosn)/rhoic*sss_ io(ji,jj) , &522 zsal = MAX( MIN( (rhoic-rhosn)/rhoic*sss_m(ji,jj) , & 522 523 zusvoic * zs0sm(ji,jj,jl) ), s_i_min ) * & 523 524 v_i(ji,jj,jl) -
trunk/NEMO/LIM_SRC_3/limupdate.F90
r869 r888 25 25 USE in_out_manager 26 26 USE ice_oce ! ice variables 27 USE flx_oce ! forcings variables 27 USE sbc_oce ! Surface boundary condition: ocean fields 28 USE sbc_ice ! Surface boundary condition: ice fields 28 29 USE dom_ice 29 30 USE daymod 30 31 USE phycst ! Define parameters for the routines 31 USE taumod32 32 USE ice 33 33 USE iceini 34 USE ocesbc35 34 USE lbclnk 36 35 USE limdyn 37 36 USE limtrp 38 37 USE limthd 39 USE lim flx38 USE limsbc 40 39 USE limdia 41 40 USE limwri … … 126 125 !+++++ [ 127 126 WRITE(numout,*) ' O) Initial values ' 128 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)129 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)130 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)131 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)132 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)133 DO jk = 1, nlay_i 134 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)127 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 128 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 129 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 130 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 131 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 132 DO jk = 1, nlay_i 133 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 135 134 END DO 136 135 !+++++ ] … … 238 237 239 238 !residual salt flux if ice is over-molten 240 fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_ io(ji,jj) - sm_i(ji,jj,jl) ) * &239 fsalt_res(ji,jj) = fsalt_res(ji,jj) + ( sss_m(ji,jj) - sm_i(ji,jj,jl) ) * & 241 240 ( rhoic * zdvres / rdt_ice ) 242 241 ! fheat_res(ji,jj) = fheat_res(ji,jj) + rhoic * lfus * zdvres / rdt_ice … … 254 253 255 254 !residual salt flux if snow is over-molten 256 fsalt_res(ji,jj) = fsalt_res(ji,jj) + sss_ io(ji,jj) * &255 fsalt_res(ji,jj) = fsalt_res(ji,jj) + sss_m(ji,jj) * & 257 256 ( rhosn * zdvres / rdt_ice ) 258 257 !this flux will be positive if snow was over-molten … … 276 275 277 276 WRITE(numout,*) ' 1. Before update of Global variables ' 278 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)279 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)280 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)281 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)282 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)283 DO jk = 1, nlay_i 284 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)277 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 278 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 279 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 280 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 281 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 282 DO jk = 1, nlay_i 283 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 285 284 END DO 286 285 !+++++ ] … … 294 293 CALL lim_var_glo2eqv ! useless, just for debug 295 294 DO jk = 1, nlay_i 296 WRITE(numout,*) ' t_i : ', t_i(jiind ex, jjindex, jk, 1:jpl)295 WRITE(numout,*) ' t_i : ', t_i(jiindx, jjindx, jk, 1:jpl) 297 296 END DO 298 297 e_i(:,:,:,:) = e_i(:,:,:,:) + d_e_i_trp(:,:,:,:) … … 300 299 WRITE(numout,*) ' After transport update ' 301 300 DO jk = 1, nlay_i 302 WRITE(numout,*) ' t_i : ', t_i(jiind ex, jjindex, jk, 1:jpl)301 WRITE(numout,*) ' t_i : ', t_i(jiindx, jjindx, jk, 1:jpl) 303 302 END DO 304 303 e_i(:,:,:,:) = e_i(:,:,:,:) + d_e_i_thd(:,:,:,:) … … 306 305 WRITE(numout,*) ' After thermodyn update ' 307 306 DO jk = 1, nlay_i 308 WRITE(numout,*) ' t_i : ', t_i(jiind ex, jjindex, jk, 1:jpl)307 WRITE(numout,*) ' t_i : ', t_i(jiindx, jjindx, jk, 1:jpl) 309 308 END DO 310 309 … … 316 315 !+++++ [ 317 316 WRITE(numout,*) ' 1. After update of Global variables (2) ' 318 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)319 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)320 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)321 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)322 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)323 WRITE(numout,*) ' oa_i : ', oa_i(jiind ex, jjindex, 1:jpl)324 WRITE(numout,*) ' e_s : ', e_s(jiind ex, jjindex, 1, 1:jpl)325 DO jk = 1, nlay_i 326 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)317 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 318 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 319 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 320 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 321 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 322 WRITE(numout,*) ' oa_i : ', oa_i(jiindx, jjindx, 1:jpl) 323 WRITE(numout,*) ' e_s : ', e_s(jiindx, jjindx, 1, 1:jpl) 324 DO jk = 1, nlay_i 325 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 327 326 END DO 328 327 !+++++ ] … … 348 347 !+++++ 349 348 WRITE(numout,*) ' Before everything ' 350 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)351 WRITE(numout,*) ' oa_i: ', oa_i(jiind ex, jjindex, 1:jpl)352 DO jk = 1, nlay_i 353 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)354 END DO 355 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)349 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 350 WRITE(numout,*) ' oa_i: ', oa_i(jiindx, jjindx, 1:jpl) 351 DO jk = 1, nlay_i 352 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 353 END DO 354 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 356 355 !+++++ 357 356 … … 362 361 !+++++ 363 362 WRITE(numout,*) ' After advection ' 364 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)365 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)363 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 364 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 366 365 !+++++ 367 366 … … 401 400 !+++++ [ 402 401 WRITE(numout,*) ' 2.1 ' 403 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)404 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)405 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)406 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)407 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)408 DO jk = 1, nlay_i 409 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)402 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 403 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 404 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 405 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 406 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 407 DO jk = 1, nlay_i 408 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 410 409 END DO 411 410 !+++++ ] … … 444 443 !+++++ [ 445 444 WRITE(numout,*) ' 2.1 initial ' 446 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)447 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)448 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)449 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)450 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)451 DO jk = 1, nlay_i 452 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)445 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 446 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 447 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 448 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 449 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 450 DO jk = 1, nlay_i 451 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 453 452 END DO 454 453 !+++++ ] … … 464 463 !+++++ [ 465 464 WRITE(numout,*) ' 2.1 before rebinning ' 466 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)467 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)468 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)469 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)470 DO jk = 1, nlay_i 471 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)472 END DO 473 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)465 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 466 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 467 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 468 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 469 DO jk = 1, nlay_i 470 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 471 END DO 472 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 474 473 !+++++ ] 475 474 … … 483 482 !+++++ [ 484 483 WRITE(numout,*) ' 2.1 after rebinning' 485 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)486 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)487 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)488 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)489 DO jk = 1, nlay_i 490 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)491 WRITE(numout,*) ' t_i : ', t_i(jiind ex, jjindex, jk, 1:jpl)492 END DO 493 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)484 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 485 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 486 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 487 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 488 DO jk = 1, nlay_i 489 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 490 WRITE(numout,*) ' t_i : ', t_i(jiindx, jjindx, jk, 1:jpl) 491 END DO 492 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 494 493 !+++++ ] 495 494 … … 611 610 !+++++ [ 612 611 WRITE(numout,*) ' 2.3 after melt of an internal ice layer ' 613 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)614 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)615 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)616 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)617 DO jk = 1, nlay_i 618 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)619 WRITE(numout,*) ' t_i : ', t_i(jiind ex, jjindex, jk, 1:jpl)620 END DO 621 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)612 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 613 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 614 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 615 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 616 DO jk = 1, nlay_i 617 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 618 WRITE(numout,*) ' t_i : ', t_i(jiindx, jjindx, jk, 1:jpl) 619 END DO 620 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 622 621 !+++++ ] 623 622 … … 638 637 639 638 !++++++ 640 IF ( (ji.eq.jiind ex) .AND. (jj.eq.jjindex) ) THEN639 IF ( (ji.eq.jiindx) .AND. (jj.eq.jjindx) ) THEN 641 640 WRITE(numout,*) ' jl : ', jl 642 641 WRITE(numout,*) ' ze_s : ', ze_s … … 737 736 !+++++ [ 738 737 WRITE(numout,*) ' 2.8 ' 739 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)740 WRITE(numout,*) ' at_i: ', at_i(jiind ex,jjindex)741 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)742 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)743 DO jk = 1, nlay_i 744 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)745 END DO 746 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)738 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 739 WRITE(numout,*) ' at_i: ', at_i(jiindx,jjindx) 740 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 741 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 742 DO jk = 1, nlay_i 743 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 744 END DO 745 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 747 746 !+++++ ] 748 747 … … 767 766 WRITE(numout,*) ' 2.9 ' 768 767 DO jk = 1, nlay_i 769 WRITE(numout,*) ' e_i : ', e_i(jiind ex, jjindex, jk, 1:jpl)770 END DO 771 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)772 773 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)768 WRITE(numout,*) ' e_i : ', e_i(jiindx, jjindx, jk, 1:jpl) 769 END DO 770 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 771 772 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 774 773 775 774 !--------------------- … … 784 783 DO ji = 1, jpi 785 784 ! salinity stays in bounds 786 smv_i(ji,jj,jl) = MAX(MIN((rhoic-rhosn)/rhoic*sss_ io(ji,jj),smv_i(ji,jj,jl)), &785 smv_i(ji,jj,jl) = MAX(MIN((rhoic-rhosn)/rhoic*sss_m(ji,jj),smv_i(ji,jj,jl)), & 787 786 0.1 * v_i(ji,jj,jl) ) 788 787 i_ice_switch = 1.0-MAX(0.0,SIGN(1.0,-v_i(ji,jj,jl))) … … 798 797 !+++++ [ 799 798 WRITE(numout,*) ' 2.11 ' 800 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)801 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)802 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)803 WRITE(numout,*) ' at_i ', at_i(jiind ex,jjindex)804 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)799 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 800 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 801 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 802 WRITE(numout,*) ' at_i ', at_i(jiindx,jjindx) 803 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 805 804 !+++++ ] 806 805 … … 826 825 !+++++ [ 827 826 WRITE(numout,*) ' 2.12 ' 828 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)829 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)830 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)831 WRITE(numout,*) ' at_i ', at_i(jiind ex,jjindex)832 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)827 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 828 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 829 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 830 WRITE(numout,*) ' at_i ', at_i(jiindx,jjindx) 831 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 833 832 !+++++ ] 834 833 … … 873 872 !+++++ [ 874 873 WRITE(numout,*) ' 2.13 ' 875 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)876 WRITE(numout,*) ' at_i ', at_i(jiind ex,jjindex)877 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)878 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)879 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)874 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 875 WRITE(numout,*) ' at_i ', at_i(jiindx,jjindx) 876 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 877 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 878 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 880 879 !+++++ ] 881 880 … … 907 906 !+++++ [ 908 907 WRITE(numout,*) ' rebinning before' 909 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)910 WRITE(numout,*) ' at_i ', at_i(jiind ex,jjindex)911 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)912 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)913 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)908 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 909 WRITE(numout,*) ' at_i ', at_i(jiindx,jjindx) 910 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 911 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 912 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 914 913 !+++++ ] 915 914 !old version … … 925 924 !+++++ [ 926 925 WRITE(numout,*) ' rebinning final' 927 WRITE(numout,*) ' a_i : ', a_i(jiind ex, jjindex, 1:jpl)928 WRITE(numout,*) ' at_i ', at_i(jiind ex,jjindex)929 WRITE(numout,*) ' v_i : ', v_i(jiind ex, jjindex, 1:jpl)930 WRITE(numout,*) ' v_s : ', v_s(jiind ex, jjindex, 1:jpl)931 WRITE(numout,*) ' smv_i: ', smv_i(jiind ex, jjindex, 1:jpl)926 WRITE(numout,*) ' a_i : ', a_i(jiindx, jjindx, 1:jpl) 927 WRITE(numout,*) ' at_i ', at_i(jiindx,jjindx) 928 WRITE(numout,*) ' v_i : ', v_i(jiindx, jjindx, 1:jpl) 929 WRITE(numout,*) ' v_s : ', v_s(jiindx, jjindx, 1:jpl) 930 WRITE(numout,*) ' smv_i: ', smv_i(jiindx, jjindx, 1:jpl) 932 931 !+++++ ] 933 932 … … 1014 1013 END DO !ji 1015 1014 1016 WRITE(numout,*) ' TESTOSC1 ', tio_u(jiind ex,jjindex), tio_v(jiindex,jjindex)1017 WRITE(numout,*) ' TESTOSC2 ', u_ice(jiind ex,jjindex), v_ice(jiindex,jjindex)1018 WRITE(numout,*) ' TESTOSC3 ', u_oce(jiind ex,jjindex), v_oce(jiindex,jjindex)1019 WRITE(numout,*) ' TESTOSC4 ', tauxw(jiindex,jjindex), tauxw(jiindex,jjindex)1015 WRITE(numout,*) ' TESTOSC1 ', tio_u(jiindx,jjindx), tio_v(jiindx,jjindx) 1016 WRITE(numout,*) ' TESTOSC2 ', u_ice(jiindx,jjindx), v_ice(jiindx,jjindx) 1017 WRITE(numout,*) ' TESTOSC3 ', u_oce(jiindx,jjindx), v_oce(jiindx,jjindx) 1018 WRITE(numout,*) ' TESTOSC4 ', utau (jiindx,jjindx), vtau (jiindx,jjindx) 1020 1019 1021 1020 … … 1087 1086 CALL prt_ctl_info(' ~~~~~~~~~~~~~~~~~~ ') 1088 1087 CALL prt_ctl(tab2d_1=fmmec , clinfo1= ' lim_update : fmmec : ', tab2d_2=fhmec , clinfo2= ' fhmec : ') 1089 CALL prt_ctl(tab2d_1=sst_ io , clinfo1= ' lim_update : sst : ', tab2d_2=sss_io, clinfo2= ' sss : ')1088 CALL prt_ctl(tab2d_1=sst_m , clinfo1= ' lim_update : sst : ', tab2d_2=sss_m , clinfo2= ' sss : ') 1090 1089 CALL prt_ctl(tab2d_1=fhbri , clinfo1= ' lim_update : fhbri : ', tab2d_2=fheat_rpo , clinfo2= ' fheat_rpo : ') 1091 1090 … … 1093 1092 CALL prt_ctl_info(' - Stresses : ') 1094 1093 CALL prt_ctl_info(' ~~~~~~~~~~ ') 1095 CALL prt_ctl(tab2d_1=tauxw , clinfo1= ' lim_update : tauxw : ', tab2d_2=tauyw , clinfo2= ' tauyw : ') 1096 CALL prt_ctl(tab2d_1=taux , clinfo1= ' lim_update : taux : ', tab2d_2=tauy , clinfo2= ' tauy : ') 1097 CALL prt_ctl(tab2d_1=ftaux , clinfo1= ' lim_update : ftaux : ', tab2d_2=ftauy , clinfo2= ' ftauy : ') 1098 CALL prt_ctl(tab2d_1=gtaux , clinfo1= ' lim_update : gtaux : ', tab2d_2=gtauy , clinfo2= ' gtauy : ') 1099 CALL prt_ctl(tab2d_1=u_io , clinfo1= ' lim_update : u_io : ', tab2d_2=v_io , clinfo2= ' v_io : ') 1094 CALL prt_ctl(tab2d_1=utau , clinfo1= ' lim_update : utau : ', tab2d_2=vtau , clinfo2= ' vtau : ') 1095 CALL prt_ctl(tab2d_1=utaui_ice , clinfo1= ' lim_update : utaui_ice : ', tab2d_2=vtaui_ice , clinfo2= ' vtaui_ice : ') 1096 CALL prt_ctl(tab2d_1=u_oce , clinfo1= ' lim_update : u_oce : ', tab2d_2=v_oce , clinfo2= ' v_oce : ') 1100 1097 ENDIF 1101 1098 -
trunk/NEMO/LIM_SRC_3/limvar.F90
r868 r888 1 1 MODULE limvar 2 #if defined key_lim33 2 !!---------------------------------------------------------------------- 4 3 !! 'key_lim3' LIM3 sea-ice model … … 33 32 !! - ot_i(jpi,jpj) !average ice age 34 33 !!====================================================================== 35 34 #if defined key_lim3 36 35 !!---------------------------------------------------------------------- 37 36 !! * Modules used … … 40 39 USE phycst ! physical constants (ocean directory) 41 40 USE ice_oce ! ice variables 41 USE sbc_oce ! Surface boundary condition: ocean fields 42 42 USE thd_ice 43 43 USE in_out_manager … … 428 428 zind0 , & !: switch, = 1 if sm_i lt s_i_0 429 429 zind01 , & !: switch, = 1 if sm_i between s_i_0 and s_i_1 430 zindbal , & !: switch, = 1, if 2*sm_i gt sss_ io430 zindbal , & !: switch, = 1, if 2*sm_i gt sss_m 431 431 zargtemp !: dummy factor 432 432 … … 491 491 zind01 = ( 1.0 - zind0 ) * & 492 492 MAX( 0.0 , SIGN( 1.0 , s_i_1 - sm_i(ji,jj,jl) ) ) 493 ! If 2.sm_i GE sss_ iothen zindbal = 1493 ! If 2.sm_i GE sss_m then zindbal = 1 494 494 zindbal = MAX( 0.0 , SIGN( 1.0 , 2. * sm_i(ji,jj,jl) - & 495 sss_ io(ji,jj) ) )495 sss_m(ji,jj) ) ) 496 496 zalpha(ji,jj,jl) = zind0 * 1.0 & 497 497 + zind01 * ( sm_i(ji,jj,jl) * dummy_fac0 + & … … 692 692 zind01 = ( 1.0 - zind0 ) * & 693 693 MAX( 0.0 , SIGN( 1.0 , s_i_1 - sm_i_b(ji) ) ) 694 ! if 2.sm_i GE sss_ iothen zindbal = 1694 ! if 2.sm_i GE sss_m then zindbal = 1 695 695 zindbal = MAX( 0.0 , SIGN( 1.0 , 2. * sm_i_b(ji) - & 696 sss_ io(zji,zjj) ) )696 sss_m(zji,zjj) ) ) 697 697 698 698 zalpha = zind0 * 1.0 & -
trunk/NEMO/LIM_SRC_3/limwri.F90
r869 r888 1 1 MODULE limwri 2 #if defined key_lim33 2 !!---------------------------------------------------------------------- 4 3 !! 'key_lim3' LIM3 sea-ice model … … 8 7 !! Ice diagnostics : write ice output files 9 8 !!====================================================================== 9 #if defined key_lim3 10 10 !!---------------------------------------------------------------------- 11 11 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 12 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limwri.F90,v 1.4 2005/03/27 18:34:42 opalod Exp$12 !! $ Id: $ 13 13 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 14 14 !!---------------------------------------------------------------------- … … 18 18 !! * Modules used 19 19 USE ioipsl 20 USE dianam ! build name of file (routine)20 USE dianam ! build name of file (routine) 21 21 USE phycst 22 22 USE dom_oce … … 24 24 USE in_out_manager 25 25 USE ice_oce ! ice variables 26 USE flx_oce 26 USE sbc_oce ! Surface boundary condition: ocean fields 27 USE sbc_ice ! Surface boundary condition: ice fields 27 28 USE dom_ice 28 29 USE ice … … 137 138 zsto = rdt_ice 138 139 clop = "ave(x)" 139 zout = nwrite * rdt_ice / n fice140 zout = nwrite * rdt_ice / nn_fsbc 140 141 zsec = 0. 141 142 niter = 0 … … 165 166 zsto = rdt_ice 166 167 clop = "ave(x)" 167 zout = nwrite * rdt_ice / n fice168 zout = nwrite * rdt_ice / nn_fsbc 168 169 zsec = 0. 169 170 nitera = 0 … … 221 222 zinda = MAX( zzero , SIGN( zone , at_i(ji,jj) - 0.10 ) ) 222 223 zcmo(ji,jj,17) = zcmo(ji,jj,17) + a_i(ji,jj,jl)*qsr_ice (ji,jj,jl) 223 zcmo(ji,jj,18) = zcmo(ji,jj,18) + a_i(ji,jj,jl)*qns r_ice(ji,jj,jl)224 zcmo(ji,jj,18) = zcmo(ji,jj,18) + a_i(ji,jj,jl)*qns_ice(ji,jj,jl) 224 225 zcmo(ji,jj,27) = zcmo(ji,jj,27) + t_su(ji,jj,jl)*a_i(ji,jj,jl)/MAX(at_i(ji,jj),epsi16)*zinda 225 226 END DO … … 253 254 & / 2.0 254 255 zcmo(ji,jj,8) = zindb * ( v_ice(ji,jj ) * tmv(ji,jj) & 255 & + v_ice(ji,jj-1) * tmv(ji,jj-1) )&256 & + v_ice(ji,jj-1) * tmv(ji,jj-1) ) & 256 257 & / 2.0 257 zcmo(ji,jj,9) = sst_ io(ji,jj)258 zcmo(ji,jj,10) = sss_ io(ji,jj)259 260 zcmo(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj)261 zcmo(ji,jj,12) = fsolar(ji,jj)262 zcmo(ji,jj,13) = fnsolar(ji,jj)258 zcmo(ji,jj,9) = sst_m(ji,jj) 259 zcmo(ji,jj,10) = sss_m(ji,jj) 260 261 zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 262 zcmo(ji,jj,12) = qsr(ji,jj) 263 zcmo(ji,jj,13) = qns(ji,jj) 263 264 zcmo(ji,jj,14) = fhbri(ji,jj) 264 zcmo(ji,jj,15) = gtaux(ji,jj)265 zcmo(ji,jj,16) = gtauy(ji,jj)266 zcmo(ji,jj,17) = zcmo(ji,jj,17) + (1.0-at_i(ji,jj))*qsr _oce(ji,jj)267 zcmo(ji,jj,18) = zcmo(ji,jj,18) + (1.0-at_i(ji,jj))*qns r_oce(ji,jj)265 zcmo(ji,jj,15) = utaui_ice(ji,jj) 266 zcmo(ji,jj,16) = vtaui_ice(ji,jj) 267 zcmo(ji,jj,17) = zcmo(ji,jj,17) + (1.0-at_i(ji,jj))*qsr(ji,jj) 268 zcmo(ji,jj,18) = zcmo(ji,jj,18) + (1.0-at_i(ji,jj))*qns(ji,jj) 268 269 zcmo(ji,jj,19) = sprecip(ji,jj) 269 270 zcmo(ji,jj,20) = smt_i(ji,jj) … … 299 300 END DO 300 301 301 IF ( jf == 7 .OR. jf == 8 .OR. jf == 11 .OR. jf == 12 .OR. jf == 15 .OR. & 302 jf == 16 ) THEN 302 IF ( jf == 7 .OR. jf == 8 .OR. jf == 15 .OR. jf == 16 ) THEN 303 303 CALL lbc_lnk( zfield, 'T', -1. ) 304 304 ELSE … … 315 315 END DO 316 316 317 IF ( ( n fice* niter + nit000 - 1 ) >= nitend .OR. kindic < 0 ) THEN317 IF ( ( nn_fsbc * niter + nit000 - 1 ) >= nitend .OR. kindic < 0 ) THEN 318 318 WRITE(numout,*) ' Closing the icemod file ' 319 319 CALL histclo( nice ) … … 374 374 ! not yet implemented 375 375 376 IF ( ( n fice* niter + nit000 - 1 ) >= nitend .OR. kindic < 0 ) THEN376 IF ( ( nn_fsbc * niter + nit000 - 1 ) >= nitend .OR. kindic < 0 ) THEN 377 377 WRITE(numout,*) ' Closing the icemod file ' 378 378 CALL histclo( nicea ) -
trunk/NEMO/LIM_SRC_3/limwri_dimg.h90
r825 r888 2 2 !!---------------------------------------------------------------------- 3 3 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 4 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/limwri_dimg.h90,v 1.2 2005/03/27 18:34:42 opalod Exp$4 !! $ Id: $ 5 5 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 6 6 !!---------------------------------------------------------------------- … … 80 80 81 81 zsto = rdt_ice 82 zout = nwrite * rdt_ice / n fice82 zout = nwrite * rdt_ice / nn_fsbc 83 83 zsec = 0. 84 84 niter = 0 … … 111 111 + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 112 112 / ztmu 113 zcmo(ji,jj,9) = sst_ io(ji,jj)114 zcmo(ji,jj,10) = sss_ io(ji,jj)115 116 zcmo(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj)117 zcmo(ji,jj,12) = fsolar(ji,jj)118 zcmo(ji,jj,13) = fnsolar(ji,jj)113 zcmo(ji,jj,9) = sst_m(ji,jj) 114 zcmo(ji,jj,10) = sss_m(ji,jj) 115 116 zcmo(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 117 zcmo(ji,jj,12) = qsr(ji,jj) 118 zcmo(ji,jj,13) = qns(ji,jj) 119 119 ! See thersf for the coefficient 120 zcmo(ji,jj,14) = - fsalt(ji,jj) * rday * ( sss_io(ji,jj) + epsi16 ) / soce121 zcmo(ji,jj,15) = gtaux(ji,jj)122 zcmo(ji,jj,16) = gtauy(ji,jj)123 zcmo(ji,jj,17) = ( 1.0 - frld(ji,jj) ) * qsr_ice (ji,jj) + frld(ji,jj) * qsr_oce(ji,jj)124 zcmo(ji,jj,18) = ( 1.0 - frld(ji,jj) ) * qnsr_ice(ji,jj) + frld(ji,jj) * qnsr_oce(ji,jj)120 zcmo(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 121 zcmo(ji,jj,15) = utaui_ice(ji,jj) 122 zcmo(ji,jj,16) = vtaui_ice(ji,jj) 123 zcmo(ji,jj,17) = qsr (ji,jj) 124 zcmo(ji,jj,18) = qns(ji,jj) 125 125 zcmo(ji,jj,19) = sprecip(ji,jj) 126 126 END DO … … 154 154 + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 155 155 / ztmu 156 rcmoy(ji,jj,9) = sst_ io(ji,jj)157 rcmoy(ji,jj,10) = sss_ io(ji,jj)158 159 rcmoy(ji,jj,11) = fnsolar(ji,jj) + fsolar(ji,jj)160 rcmoy(ji,jj,12) = fsolar(ji,jj)161 rcmoy(ji,jj,13) = fnsolar(ji,jj)156 rcmoy(ji,jj,9) = sst_m(ji,jj) 157 rcmoy(ji,jj,10) = sss_m(ji,jj) 158 159 rcmoy(ji,jj,11) = qns(ji,jj) + qsr(ji,jj) 160 rcmoy(ji,jj,12) = qsr(ji,jj) 161 rcmoy(ji,jj,13) = qns(ji,jj) 162 162 ! See thersf for the coefficient 163 rcmoy(ji,jj,14) = - fsalt(ji,jj) * rday * ( sss_io(ji,jj) + epsi16 ) / soce164 rcmoy(ji,jj,15) = gtaux(ji,jj)165 rcmoy(ji,jj,16) = gtauy(ji,jj)166 rcmoy(ji,jj,17) = ( 1.0 - frld(ji,jj) ) * qsr_ice (ji,jj) + frld(ji,jj) * qsr_oce(ji,jj)167 rcmoy(ji,jj,18) = ( 1.0 - frld(ji,jj) ) * qnsr_ice(ji,jj) + frld(ji,jj) * qnsr_oce(ji,jj)163 rcmoy(ji,jj,14) = - emps(ji,jj) * rday * ( sss_m(ji,jj) + epsi16 ) / soce 164 rcmoy(ji,jj,15) = utaui_ice(ji,jj) 165 rcmoy(ji,jj,16) = vtaui_ice(ji,jj) 166 rcmoy(ji,jj,17) = qsr(ji,jj) 167 rcmoy(ji,jj,18) = qns(ji,jj) 168 168 rcmoy(ji,jj,19) = sprecip(ji,jj) 169 169 END DO … … 176 176 zfield(:,:) = (rcmoy(:,:,jf) * cmulti(jf) + cadd(jf)) * tmask(:,:,1) 177 177 178 IF ( jf == 7 .OR. jf == 8 .OR. jf == 11 .OR. jf == 12 .OR. jf == 15 .OR. & 179 jf == 23 .OR. jf == 24 .OR. jf == 16 ) THEN 178 IF ( jf == 7 .OR. jf == 8 .OR. jf == 15 .OR. jf == 16 ) THEN 180 179 CALL lbc_lnk( zfield, 'T', -1. ) 181 180 ELSE -
trunk/NEMO/LIM_SRC_3/par_ice.F90
r825 r888 6 6 !!---------------------------------------------------------------------- 7 7 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 8 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/par_ice.F90,v 1.4 2005/03/27 18:34:42 opalod Exp$9 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt8 !! $ Id: $ 9 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 10 10 !!---------------------------------------------------------------------- 11 11 !! * Modules used -
trunk/NEMO/LIM_SRC_3/thd_ice.F90
r834 r888 8 8 !!---------------------------------------------------------------------- 9 9 !! LIM 2.0, UCL-LOCEAN-IPSL (2005) 10 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/LIM_SRC/thd_ice.F90,v 1.4 2005/03/27 18:34:42 opalod Exp$11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt10 !! $ Id: $ 11 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 12 12 !!---------------------------------------------------------------------- 13 13 !! * Modules used -
trunk/NEMO/NST_SRC/agrif_user.F90
r833 r888 62 62 USE sol_oce 63 63 USE in_out_manager 64 #if defined key_lim3 || defined key_lim 3_old64 #if defined key_lim3 || defined key_lim2 65 65 USE ice_oce 66 66 #endif -
trunk/NEMO/OPA_SRC/DIA/diafwb.F90
r719 r888 4 4 !! Ocean diagnostics: freshwater budget 5 5 !!====================================================================== 6 !! History : 8.2 ! 01-02 (E. Durand) Original code 7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 9 !!---------------------------------------------------------------------- 6 10 #if ( defined key_orca_r2 || defined key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled 7 11 !!---------------------------------------------------------------------- 8 12 !! NOT "key_dynspg_rl" and "key_orca_r2 or 4" 9 13 !!---------------------------------------------------------------------- 14 !!---------------------------------------------------------------------- 10 15 !! dia_fwb : freshwater budget for global ocean configurations 11 16 !!---------------------------------------------------------------------- 12 !! * Modules used13 17 USE oce ! ocean dynamics and tracers 14 18 USE dom_oce ! ocean space and time domain 15 19 USE phycst ! physical constants 20 USE sbc_oce ! ??? 16 21 USE zdf_oce ! ocean vertical physics 17 22 USE in_out_manager ! I/O manager 18 USE flxrnf ! ???19 USE ocesbc ! ???20 USE blk_oce ! ???21 USE flxblk ! atmospheric surface quantity22 23 USE lib_mpp ! distributed memory computing library 23 24 … … 25 26 PRIVATE 26 27 27 !! * Routine accessibility28 28 PUBLIC dia_fwb ! routine called by step.F90 29 29 30 !! * Shared module variables31 30 LOGICAL, PUBLIC, PARAMETER :: lk_diafwb = .TRUE. !: fresh water budget flag 32 31 33 !! * Module variables 34 REAL(wp) :: & 35 a_emp , a_precip, a_rnf, & 36 a_sshb, a_sshn, a_salb, a_saln, & 37 a_aminus, a_aplus 38 REAL(wp), DIMENSION(4) :: & 39 a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 32 REAL(wp) :: a_emp , & 33 & a_sshb, a_sshn, a_salb, a_saln 34 REAL(wp), DIMENSION(4) :: a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 40 35 41 36 !! * Substitutions … … 43 38 # include "vectopt_loop_substitute.h90" 44 39 !!---------------------------------------------------------------------- 45 !! OPA 9.0 , LOCEAN-IPSL (200 5)46 !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DIA/diafwb.F90,v 1.11 2007/06/29 17:01:51 opalod Exp $47 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt40 !! OPA 9.0 , LOCEAN-IPSL (2006) 41 !! $Header: $ 42 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 48 43 !!---------------------------------------------------------------------- 49 44 … … 55 50 !! 56 51 !! ** Purpose : 57 !!58 !! ** Method :59 !!60 !! History :61 !! 8.2 ! 01-02 (E. Durand) Original code62 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module63 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization64 52 !!---------------------------------------------------------------------- 65 !! * Arguments66 53 INTEGER, INTENT( in ) :: kt ! ocean time-step index 67 68 !! * Local declarations 69 CHARACTER (len=32) :: clname 54 !! 70 55 INTEGER :: inum ! temporary logical unit 71 56 INTEGER :: ji, jj, jk, jt ! dummy loop indices … … 85 70 86 71 a_emp = 0.e0 87 a_precip = 0.e088 a_rnf = 0.e089 72 a_sshb = 0.e0 ! valeur de ssh au debut de la simulation 90 73 a_salb = 0.e0 ! valeur de sal au debut de la simulation 91 a_aminus = 0.e092 a_aplus = 0.e093 74 ! sshb used because diafwb called after tranxt (i.e. after the swap) 94 75 a_sshb = SUM( e1t(:,:) * e2t(:,:) * sshb(:,:) * tmask_i(:,:) ) … … 108 89 a_emp = SUM( e1t(:,:) * e2t(:,:) * emp (:,:) * tmask_i(:,:) ) 109 90 IF( lk_mpp ) CALL mpp_sum( a_emp ) ! sum over the global domain 110 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily111 a_precip = SUM( e1t(:,:) * e2t(:,:) * watm (:,:) * tmask_i(:,:) )112 IF( lk_mpp ) CALL mpp_sum( a_precip ) ! sum over the global domain113 #endif114 a_rnf = SUM( e1t(:,:) * e2t(:,:) * runoff(:,:) * tmask_i(:,:) )115 IF( lk_mpp ) CALL mpp_sum( a_rnf ) ! sum over the global domain116 117 IF( aminus /= 0.e0 ) a_aminus = a_aminus + ( MIN( aplus, aminus ) / aminus )118 IF( aplus /= 0.e0 ) a_aplus = a_aplus + ( MIN( aplus, aminus ) / aplus )119 91 120 92 IF( kt == nitend ) THEN … … 142 114 IF( lk_mpp ) CALL mpp_sum( zvol ) ! sum over the global domain 143 115 144 a_aminus = a_aminus / ( nitend - nit000 + 1 )145 a_aplus = a_aplus / ( nitend - nit000 + 1 )146 147 116 ! Conversion in m3 148 117 a_emp = a_emp * rdttra(1) * 1.e-3 149 a_precip = a_precip * rdttra(1) * 1.e-3 / rday150 a_rnf = a_rnf * rdttra(1) * 1.e-3151 118 152 ! Alpha1=Alpha0-Rest/(Precip+runoff) 153 ! C A U T I O N : precipitations are negative !! 154 119 ! emp correction to bring back the mean ssh to zero 155 120 zempnew = a_sshn / ( ( nitend - nit000 + 1 ) * rdt ) * 1.e3 / zarea 156 121 … … 389 354 IF ( kt == nitend .AND. cp_cfg == "orca" ) THEN 390 355 391 clname = 'STRAIT.dat' 392 CALL ctlopn( inum, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 356 CALL ctlopn( inum, 'STRAIT.dat', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 393 357 & 1, numout, lwp, 1 ) 394 358 WRITE(inum,*) 395 359 WRITE(inum,*) 'Net freshwater budget ' 396 360 WRITE(inum,9010) ' emp = ',a_emp, ' m3 =', a_emp /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 397 WRITE(inum,9010) ' precip = ',a_precip,' m3 =', a_precip/(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv'398 WRITE(inum,9010) ' a_rnf = ',a_rnf, ' m3 =', a_rnf /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv'399 361 WRITE(inum,*) 400 362 WRITE(inum,9010) ' zarea =',zarea … … 417 379 WRITE(inum,9020) ' diff =',(a_saln-a_salb)/zvol,' psu' 418 380 WRITE(inum,9020) ' S-SLevitus=',a_saln/zvol,' psu' 419 WRITE(inum,*)420 WRITE(inum,*) 'Coeff : '421 WRITE(inum,9030) ' Alpha+ = ', a_aplus422 WRITE(inum,9030) ' Alpha- = ', a_aminus423 WRITE(inum,*)424 381 WRITE(inum,*) 425 382 WRITE(inum,*) 'Gibraltar : ' -
trunk/NEMO/OPA_SRC/DIA/diawri.F90
r833 r888 14 14 USE sol_oce ! solver variables 15 15 USE ice_oce ! ice variables 16 USE sbc_oce ! Surface boundary condition: ocean fields 17 USE sbc_ice ! Surface boundary condition: ice fields 18 USE sbcssr ! restoring term toward SST/SSS climatology 16 19 USE phycst ! physical constants 17 20 USE ocfzpt ! ocean freezing point 18 USE ocesbc ! surface thermohaline fluxes19 USE taumod ! surface stress20 USE flxrnf ! ocean runoffs21 21 USE zdfmxl ! mixed layer 22 22 USE daymod ! calendar … … 27 27 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 28 28 USE in_out_manager ! I/O manager 29 USE flx_oce ! sea-ice/ocean forcings variables30 29 USE diadimg ! dimg direct access file format output 31 30 USE ioipsl … … 54 53 !!---------------------------------------------------------------------- 55 54 !! OPA 9.0 , LOCEAN-IPSL (2005) 56 !! $ Header$55 !! $Id$ 57 56 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 58 57 !!---------------------------------------------------------------------- … … 245 244 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 246 245 #endif 247 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 )248 ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to249 ! internal damping to Levitus that can be diagnosed from others250 ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup251 CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater" , "kg/m2/s", & ! fsalt252 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )253 CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater" , "kg/m2/s", & ! fmass254 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )255 #endif246 !!$#if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 247 !!$ ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 248 !!$ ! internal damping to Levitus that can be diagnosed from others 249 !!$ ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup 250 !!$ CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater" , "kg/m2/s", & ! fsalt 251 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 252 !!$ CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater" , "kg/m2/s", & ! fmass 253 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 254 !!$#endif 256 255 CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux" , "Kg/m2/s", & ! emp 257 256 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 258 CALL histdef( nid_T, "sorunoff", "Runoffs" , "Kg/m2/s", & ! runoffs259 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )257 !!$ CALL histdef( nid_T, "sorunoff", "Runoffs" , "Kg/m2/s", & ! runoffs 258 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 260 259 CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux" , "kg/m2/s", & ! emps 261 260 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 262 261 CALL histdef( nid_T, "sosalflx", "Surface Salt Flux" , "Kg/m2/s", & ! emps * sn 263 262 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 264 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! q t263 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qns + qsr 265 264 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 266 265 CALL histdef( nid_T, "soshfldo", "Shortwave Radiation" , "W/m2" , & ! qsr … … 281 280 #endif 282 281 283 #if defined key_flx_core 284 CALL histdef( nid_T, "solhflup", "Latent Heat Flux Upward" , "W/m2" , & ! qla 285 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 286 CALL histdef( nid_T, "solwfldo", "Longwave Radiation downward" , "W/m2" , & ! qlw 287 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 288 CALL histdef( nid_T, "sosbhfup", "Sensible Heat Flux upward" , "W/m2" , & ! qsb 289 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 290 #endif 291 292 293 #if defined key_coupled && ! defined key_lim3 && ! defined key_lim2 282 283 284 #if ( defined key_coupled && ! defined key_lim3 && ! defined key_lim2 ) 294 285 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 295 286 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 317 308 #endif 318 309 319 #if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled 310 #if defined key_coupled 311 # if defined key_lim3 312 Must be adapted to LIM3 313 # else 320 314 CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature" , "K" , & ! tn_ice 321 315 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 322 316 CALL histdef( nid_T,"soicealb" , "Ice Albedo" , "[0,1]" , & ! alb_ice 323 317 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 318 # endif 324 319 #endif 325 320 … … 334 329 #endif 335 330 ! !!! nid_U : 2D 336 CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! taux331 CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis" , "N/m2" , & ! utau 337 332 & jpi, jpj, nh_U, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 338 333 #if defined key_dynspg_rl … … 351 346 #endif 352 347 ! !!! nid_V : 2D 353 CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! tauy348 CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis" , "N/m2" , & ! vtau 354 349 & jpi, jpj, nh_V, 1 , 1, 1 , - 99, 32, clop, zsto, zout ) 355 350 #if defined key_dynspg_rl … … 423 418 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 424 419 #endif 425 #if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 )426 CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux427 CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux428 #endif420 !!$#if ! defined key_dynspg_rl && ( defined key_lim3 || defined key_lim2 ) 421 !!$ CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux 422 !!$ CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux 423 !!$#endif 429 424 CALL histwrite( nid_T, "sowaflup", it, emp , ndim_hT, ndex_hT ) ! upward water flux 430 CALL histwrite( nid_T, "sorunoff", it, runoff , ndim_hT, ndex_hT ) ! runoff425 !!$ CALL histwrite( nid_T, "sorunoff", it, runoff , ndim_hT, ndex_hT ) ! runoff 431 426 CALL histwrite( nid_T, "sowaflcd", it, emps , ndim_hT, ndex_hT ) ! c/d water flux 432 427 zw2d(:,:) = emps(:,:) * sn(:,:,1) * tmask(:,:,1) 433 428 CALL histwrite( nid_T, "sosalflx", it, zw2d , ndim_hT, ndex_hT ) ! c/d salt flux 434 CALL histwrite( nid_T, "sohefldo", it, q t, ndim_hT, ndex_hT ) ! total heat flux429 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 435 430 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux 436 431 CALL histwrite( nid_T, "somxl010", it, hmlp , ndim_hT, ndex_hT ) ! mixed layer depth … … 443 438 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 444 439 #endif 445 #if defined key_flx_core 446 CALL histwrite( nid_T, "solhflup", it, qla , ndim_hT, ndex_hT ) ! latent heat flux 447 CALL histwrite( nid_T, "solwfldo", it, qlw , ndim_hT, ndex_hT ) ! longwave heat flux 448 CALL histwrite( nid_T, "sosbhfup", it, qsb , ndim_hT, ndex_hT ) ! sensible heat flux 449 #endif 450 #if defined key_coupled && ! defined key_lim3 && ! defined key_lim2 440 #if ( defined key_coupled && ! defined key_lim3 && ! defined key_lim2 ) 451 441 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 452 442 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping … … 466 456 CALL histwrite( nid_T, "sohtc300", it, htc3 , ndim_hT, ndex_hT ) ! first 300m heaat content 467 457 #endif 468 #if ( defined key_lim3 || defined key_lim2 ) && defined key_coupled 458 459 #if defined key_coupled 460 # if defined key_lim3 461 Must be adapted for LIM3 469 462 CALL histwrite( nid_T, "soicetem", it, tn_ice , ndim_hT, ndex_hT ) ! surf. ice temperature 470 463 CALL histwrite( nid_T, "soicealb", it, alb_ice , ndim_hT, ndex_hT ) ! ice albedo 464 # else 465 CALL histwrite( nid_T, "soicetem", it, tn_ice , ndim_hT, ndex_hT ) ! surf. ice temperature 466 CALL histwrite( nid_T, "soicealb", it, alb_ice , ndim_hT, ndex_hT ) ! ice albedo 467 # endif 471 468 #endif 472 469 ! Write fields on U grid … … 475 472 CALL histwrite( nid_U, "vozoeivu", it, u_eiv , ndim_U , ndex_U ) ! i-eiv current 476 473 #endif 477 CALL histwrite( nid_U, "sozotaux", it, taux, ndim_hU, ndex_hU ) ! i-wind stress474 CALL histwrite( nid_U, "sozotaux", it, utau , ndim_hU, ndex_hU ) ! i-wind stress 478 475 #if defined key_dynspg_rl 479 476 CALL lbc_lnk( spgu, 'U', -1. ) … … 486 483 CALL histwrite( nid_V, "vomeeivv", it, v_eiv , ndim_V , ndex_V ) ! j-eiv current 487 484 #endif 488 CALL histwrite( nid_V, "sometauy", it, tauy, ndim_hV, ndex_hV ) ! j-wind stress485 CALL histwrite( nid_V, "sometauy", it, vtau , ndim_hV, ndex_hV ) ! j-wind stress 489 486 #if defined key_dynspg_rl 490 487 CALL lbc_lnk( spgv, 'V', -1. ) … … 640 637 641 638 ! Write all fields on T grid 642 CALL histwrite( id_i, "votemper", 1, tn , jpi*jpj*jpk, idex ) ! now temperature643 CALL histwrite( id_i, "vosaline", 1, sn , jpi*jpj*jpk, idex ) ! now salinity644 #if defined key_dynspg_rl 645 CALL histwrite( id_i, "sobarstf", 1, bsfn , jpi*jpj , idex ) ! barotropic streamfunction639 CALL histwrite( id_i, "votemper", 1, tn , jpi*jpj*jpk, idex ) ! now temperature 640 CALL histwrite( id_i, "vosaline", 1, sn , jpi*jpj*jpk, idex ) ! now salinity 641 #if defined key_dynspg_rl 642 CALL histwrite( id_i, "sobarstf", 1, bsfn , jpi*jpj , idex ) ! barotropic streamfunction 646 643 #else 647 CALL histwrite( id_i, "sossheig", 1, sshn , jpi*jpj , idex ) ! sea surface height648 #endif 649 CALL histwrite( id_i, "vozocrtx", 1, un , jpi*jpj*jpk, idex ) ! now i-velocity650 CALL histwrite( id_i, "vomecrty", 1, vn , jpi*jpj*jpk, idex ) ! now j-velocity651 CALL histwrite( id_i, "vovecrtz", 1, wn , jpi*jpj*jpk, idex ) ! now k-velocity652 CALL histwrite( id_i, "sowaflup", 1, emp , jpi*jpj , idex ) ! freshwater budget653 CALL histwrite( id_i, "sohefldo", 1, q t, jpi*jpj , idex ) ! total heat flux654 CALL histwrite( id_i, "soshfldo", 1, qsr , jpi*jpj , idex ) ! totalheat flux655 CALL histwrite( id_i, "soicecov", 1, freeze , jpi*jpj , idex ) ! ice cover656 CALL histwrite( id_i, "sozotaux", 1, taux, jpi*jpj , idex ) ! i-wind stress657 CALL histwrite( id_i, "sometauy", 1, tauy, jpi*jpj , idex ) ! j-wind stress644 CALL histwrite( id_i, "sossheig", 1, sshn , jpi*jpj , idex ) ! sea surface height 645 #endif 646 CALL histwrite( id_i, "vozocrtx", 1, un , jpi*jpj*jpk, idex ) ! now i-velocity 647 CALL histwrite( id_i, "vomecrty", 1, vn , jpi*jpj*jpk, idex ) ! now j-velocity 648 CALL histwrite( id_i, "vovecrtz", 1, wn , jpi*jpj*jpk, idex ) ! now k-velocity 649 CALL histwrite( id_i, "sowaflup", 1, emp , jpi*jpj , idex ) ! freshwater budget 650 CALL histwrite( id_i, "sohefldo", 1, qsr + qns, jpi*jpj , idex ) ! total heat flux 651 CALL histwrite( id_i, "soshfldo", 1, qsr , jpi*jpj , idex ) ! solar heat flux 652 CALL histwrite( id_i, "soicecov", 1, freeze , jpi*jpj , idex ) ! ice cover 653 CALL histwrite( id_i, "sozotaux", 1, utau , jpi*jpj , idex ) ! i-wind stress 654 CALL histwrite( id_i, "sometauy", 1, vtau , jpi*jpj , idex ) ! j-wind stress 658 655 659 656 ! 3. Close the file -
trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r833 r888 3 3 !!---------------------------------------------------------------------- 4 4 !! OPA 9.0 , LOCEAN-IPSL (2005) 5 !! $ Header$5 !! $Id$ 6 6 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 7 7 !!---------------------------------------------------------------------- … … 41 41 !! To be tested with a lot of procs !!!! 42 42 !! 43 !! level 1: taux(:,:) * umask(:,:,1) zonal stress in N.m-244 !! level 2: tauy(:,:) * vmask(:,:,1) meridional stress in N. m-245 !! level 3: qt (:,:)total heat flux (W/m2)46 !! level 4: 43 !! level 1: utau(:,:) * umask(:,:,1) zonal stress in N.m-2 44 !! level 2: vtau(:,:) * vmask(:,:,1) meridional stress in N. m-2 45 !! level 3: qsr + qns total heat flux (W/m2) 46 !! level 4: emp (:,:) E-P flux (mm/day) 47 47 !! level 5: tb (:,:,1)-sst model SST -forcing sst (degree C) 48 48 !! level 6: bsfb(:,:) streamfunction (m**3/s) … … 76 76 !! * modules used 77 77 USE lib_mpp 78 USE dtasst, ONLY : sst79 78 80 79 !! * Arguments … … 167 166 sm(:,:,:)=sm(:,:,:) + sn (:,:,:) 168 167 ! 169 fsel(:,:,1 ) = fsel(:,:,1 ) + taux(:,:) * umask(:,:,1)170 fsel(:,:,2 ) = fsel(:,:,2 ) + tauy(:,:) * vmask(:,:,1)171 fsel(:,:,3 ) = fsel(:,:,3 ) + q t(:,:)168 fsel(:,:,1 ) = fsel(:,:,1 ) + utau(:,:) * umask(:,:,1) 169 fsel(:,:,2 ) = fsel(:,:,2 ) + vtau(:,:) * vmask(:,:,1) 170 fsel(:,:,3 ) = fsel(:,:,3 ) + qsr (:,:) + qns (:,:) 172 171 fsel(:,:,4 ) = fsel(:,:,4 ) + emp (:,:) 173 172 fsel(:,:,5 ) = fsel(:,:,5 ) + tb (:,:,1) - sst(:,:) … … 187 186 ! fsel(:,:,15) = fsel(:,:,15) + fbt(:,:) 188 187 fsel(:,:,16) = fsel(:,:,16) + emps(:,:) 189 #if defined key_lim3 || defined key_lim3_old190 fsel(:,:,17) = fsel(:,:,17) + fsalt(:,:)191 #endif192 188 #ifdef key_diaspr 193 189 fsel(:,:,18) = fsel(:,:,18) + gps(:,:)/g 194 #endif195 #if defined key_flx_core196 fsel(:,:,21) = fsel(:,:,21) + qla(:,:)197 fsel(:,:,22) = fsel(:,:,22) + qlw(:,:)198 fsel(:,:,23) = fsel(:,:,23) + qsb(:,:)199 190 #endif 200 191 ! … … 231 222 fsel(:,:,20)= spgv(:,:) 232 223 #endif 233 ! mask mean field with tmask except taux tauy(1,2)224 ! mask mean field with tmask except utau vtau (1,2) 234 225 DO jk=3,inbsel 235 226 fsel(:,:,jk)=fsel(:,:,jk)*tmask(:,:,1) … … 256 247 fsel(:,:,:) = 0._wp 257 248 ! 258 fsel(:,:,1 ) = taux(:,:) * umask(:,:,1)259 fsel(:,:,2 ) = tauy(:,:) * vmask(:,:,1)260 fsel(:,:,3 ) = qt (:,:) * tmask(:,:,1)249 fsel(:,:,1 ) = utau(:,:) * umask(:,:,1) 250 fsel(:,:,2 ) = vtau(:,:) * vmask(:,:,1) 251 fsel(:,:,3 ) = (qsr (:,:) + qnr (:,:)) * tmask(:,:,1) 261 252 fsel(:,:,4 ) = emp (:,:) * tmask(:,:,1) 262 253 fsel(:,:,5 ) = (tb (:,:,1) -sst(:,:)) *tmask(:,:,1) … … 277 268 ! fsel(:,:,15) = fbt(:,:) 278 269 fsel(:,:,16) = emps(:,:) * tmask(:,:,1) 279 #if defined key_lim3 || defined key_lim3_old280 fsel(:,:,17) = fsalt(:,:) * tmask(:,:,1)281 #endif282 270 #ifdef key_diaspr 283 271 fsel(:,:,18) = gps(:,:) /g 284 272 fsel(:,:,19) = spgu(:,:) 285 273 fsel(:,:,20) = spgv(:,:) 286 #endif287 #if defined key_flx_core288 fsel(:,:,21) = qla(:,:)* tmask(:,:,1)289 fsel(:,:,22) = qlw(:,:)* tmask(:,:,1)290 fsel(:,:,23) = qsb(:,:)* tmask(:,:,1)291 274 #endif 292 275 ! -
trunk/NEMO/OPA_SRC/DOM/closea.F90
r719 r888 2 2 !!====================================================================== 3 3 !! *** MODULE closea *** 4 !! Closed Seas : 4 !! Closed Seas : specific treatments associated with closed seas 5 5 !!====================================================================== 6 !! History : 8.2 ! 00-05 (O. Marti) Original code 7 !! 8.5 ! 02-06 (E. Durand, G. Madec) F90 8 !! 9.0 ! 06-07 (G. Madec) add clo_rnf, clo_ups, clo_bat 9 !!---------------------------------------------------------------------- 6 10 7 11 !!---------------------------------------------------------------------- 8 12 !! dom_clo : modification of the ocean domain for closed seas cases 9 !! flx_clo : Special handling of closed seas 10 !!---------------------------------------------------------------------- 11 !! * Modules used 13 !! sbc_clo : Special handling of closed seas 14 !! clo_rnf : set close sea outflows as river mouths (see sbcrnf) 15 !! clo_ups : set mixed centered/upstream scheme in closed sea (see traadv_cen2) 16 !! clo_bat : set to zero a field over closed sea (see domzrg) 17 !!---------------------------------------------------------------------- 12 18 USE oce ! dynamics and tracers 13 19 USE dom_oce ! ocean space and time domain 14 20 USE in_out_manager ! I/O manager 15 USE ocesbc ! ocean surface boundary conditions (fluxes) 16 USE flxrnf ! runoffs 21 USE sbc_oce ! ocean surface boundary conditions 17 22 USE lib_mpp ! distributed memory computing library 18 23 USE lbclnk ! ??? … … 21 26 PRIVATE 22 27 23 !! * Accessibility 24 PUBLIC dom_clo ! routine called by dom_init 25 PUBLIC flx_clo ! routine called by step 26 27 !! * Share module variables 28 INTEGER, PUBLIC, PARAMETER :: & !: 29 jpncs = 4 !: number of closed sea 30 INTEGER, PUBLIC :: & !!: namclo : closed seas and lakes 31 nclosea = 0 !: = 0 no closed sea or lake 32 ! ! = 1 closed sea or lake in the domain 33 INTEGER, PUBLIC, DIMENSION (jpncs) :: & !: 34 ncstt, & !: Type of closed sea 35 ncsi1, ncsj1, & !: closed sea limits 36 ncsi2, ncsj2, & !: 37 ncsnr !: number of point where run-off pours 38 INTEGER, PUBLIC, DIMENSION (jpncs,4) :: & 39 ncsir, ncsjr !: Location of run-off 40 41 !! * Module variable 42 REAL(wp), DIMENSION (jpncs+1) :: & 43 surf ! closed sea surface 28 PUBLIC dom_clo ! routine called by domain module 29 PUBLIC sbc_clo ! routine called by step module 30 PUBLIC clo_rnf ! routine called by sbcrnf module 31 PUBLIC clo_ups ! routine called in traadv_cen2(_jki) module 32 PUBLIC clo_bat ! routine called in domzgr module 33 34 !!* Namelist namclo : closed seas and lakes 35 INTEGER, PUBLIC :: nclosea = 0 !: = 0 no closed sea or lake 36 ! ! = 1 closed sea or lake in the domain 37 38 INTEGER, PUBLIC, PARAMETER :: jpncs = 4 !: number of closed sea 39 INTEGER, PUBLIC, DIMENSION(jpncs) :: ncstt !: Type of closed sea 40 INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsi1, ncsj1 !: south-west closed sea limits (i,j) 41 INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsi2, ncsj2 !: north-east closed sea limits (i,j) 42 INTEGER, PUBLIC, DIMENSION(jpncs) :: ncsnr !: number of point where run-off pours 43 INTEGER, PUBLIC, DIMENSION(jpncs,4) :: ncsir, ncsjr !: Location of runoff 44 45 REAL(wp), DIMENSION (jpncs+1) :: surf ! closed sea surface 44 46 45 47 !! * Substitutions 46 48 # include "vectopt_loop_substitute.h90" 47 49 !!---------------------------------------------------------------------- 48 !! OPA 9.0 , LOCEAN-IPSL (200 5)49 !! $ Header$50 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt50 !! OPA 9.0 , LOCEAN-IPSL (2006) 51 !! $Id$ 52 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 53 !!---------------------------------------------------------------------- 52 54 … … 60 62 !! 61 63 !! ** Method : if a closed sea is located only in a model grid point 62 !! just the thermodynamic processes are applied. 63 !! 64 !! ** Action : ncsi1(), ncsj1() : south-west closed sea limits (i,j) 65 !! ncsi2(), ncsj2() : north-east Closed sea limits (i,j) 66 !! ncsir(), ncsjr() : Location of runoff 67 !! ncsnr : number of point where run-off pours 68 !! ncstt : Type of closed sea 69 !! =0 spread over the world ocean 70 !! =2 put at location runoff 71 !! 72 !! History : 73 !! ! 01-04 (E. Durand) Original code 74 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 75 !!---------------------------------------------------------------------- 76 !! * Local variables 64 !! just the thermodynamic processes are applied. 65 !! 66 !! ** Action : ncsi1(), ncsj1() : south-west closed sea limits (i,j) 67 !! ncsi2(), ncsj2() : north-east Closed sea limits (i,j) 68 !! ncsir(), ncsjr() : Location of runoff 69 !! ncsnr : number of point where run-off pours 70 !! ncstt : Type of closed sea 71 !! =0 spread over the world ocean 72 !! =2 put at location runoff 73 !!---------------------------------------------------------------------- 77 74 INTEGER :: jc ! dummy loop indices 78 75 !!---------------------------------------------------------------------- … … 90 87 91 88 IF( cp_cfg == "orca" ) THEN 92 89 ! 93 90 SELECT CASE ( jp_cfg ) 94 91 ! ! ======================= 95 92 CASE ( 2 ) ! ORCA_R2 configuration 96 93 ! ! ======================= 97 98 94 ! ! Caspian Sea 99 95 ncsnr(1) = 1 ; ncstt(1) = 0 ! spread over the globe … … 116 112 ncsi2(4) = 6 ; ncsj2(4) = 112 117 113 ncsir(4,1) = 171 ; ncsjr(4,1) = 106 118 119 114 ! ! ======================= 120 115 CASE ( 4 ) ! ORCA_R4 configuration 121 116 ! ! ======================= 122 123 117 ! ! Caspian Sea 124 118 ncsnr(1) = 1 ; ncstt(1) = 0 … … 144 138 ncsi2(4) = 76 ; ncsj2(4) = 61 145 139 ncsir(4,1) = 84 ; ncsjr(4,1) = 59 146 147 140 ! ! ======================= 148 141 CASE ( 025 ) ! ORCA_R025 configuration … … 157 150 ncsi2(2) = 1304 ; ncsj2(2) = 747 158 151 ncsir(2,1) = 1 ; ncsjr(2,1) = 1 159 152 ! 160 153 END SELECT 161 154 ! 162 155 ENDIF 163 156 … … 171 164 ncsj2(jc) = mj1( ncsj2(jc) ) 172 165 END DO 173 174 166 ! 175 167 END SUBROUTINE dom_clo 176 168 177 169 178 SUBROUTINE flx_clo( kt )179 !!--------------------------------------------------------------------- 180 !! *** ROUTINE flx_clo ***170 SUBROUTINE sbc_clo( kt ) 171 !!--------------------------------------------------------------------- 172 !! *** ROUTINE sbc_clo *** 181 173 !! 182 174 !! ** Purpose : Special handling of closed seas … … 186 178 !! put as run-off in open ocean. 187 179 !! 188 !! ** Action : 189 !! 190 !! History : 191 !! 8.2 ! 00-05 (O. Marti) Original code 192 !! 8.5 ! 02-07 (G. Madec) Free form, F90 193 !!---------------------------------------------------------------------- 194 !! * Arguments 195 INTEGER, INTENT (in) :: kt 196 197 !! * Local declarations 198 REAL(wp), DIMENSION (jpncs) :: zemp 199 INTEGER :: ji, jj, jc, jn 200 REAL(wp) :: zze2 201 !!---------------------------------------------------------------------- 202 203 ! 1 - Initialisation 204 ! ------------------ 205 206 IF( kt == nit000 ) THEN 180 !! ** Action : emp, emps updated surface freshwater fluxes at kt 181 !!---------------------------------------------------------------------- 182 INTEGER, INTENT(in) :: kt ! ocean model time step 183 ! 184 INTEGER :: ji, jj, jc, jn ! dummy loop indices 185 REAL(wp) :: zze2 186 REAL(wp), DIMENSION (jpncs) :: zemp 187 !!---------------------------------------------------------------------- 188 ! 189 ! !------------------! 190 IF( kt == nit000 ) THEN ! Initialisation ! 191 ! !------------------! 207 192 IF(lwp) WRITE(numout,*) 208 IF(lwp) WRITE(numout,*)' flx_clo : closed seas '193 IF(lwp) WRITE(numout,*)'sbc_clo : closed seas ' 209 194 IF(lwp) WRITE(numout,*)'~~~~~~~' 210 195 … … 216 201 DO jj = ncsj1(jc), ncsj2(jc) 217 202 DO ji = ncsi1(jc), ncsi2(jc) 218 ! surface of closed seas 219 surf(jc) = surf(jc) + e1t(ji,jj)*e2t(ji,jj)*tmask_i(ji,jj) 220 ! upstream in closed seas 221 upsadv(ji,jj) = 0.5 203 surf(jc) = surf(jc) + e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj) ! surface of closed seas 222 204 END DO 223 205 END DO 224 ! upstream at closed sea outflow225 IF( ncstt(jc) >= 1 ) THEN226 DO jn = 1, 4227 ji = mi0( ncsir(jc,jn) )228 jj = mj0( ncsjr(jc,jn) )229 upsrnfh(ji,jj) = MAX( upsrnfh(ji,jj), 1.0 )230 END DO231 ENDIF232 206 END DO 233 207 IF( lk_mpp ) CALL mpp_sum ( surf, jpncs+1 ) ! mpp: sum over all the global domain … … 235 209 IF(lwp) WRITE(numout,*)' Closed sea surfaces' 236 210 DO jc = 1, jpncs 237 IF(lwp) WRITE(numout,FMT='(1I3,4I4,5X,F16.2)') & 238 jc, ncsi1(jc), ncsi2(jc), ncsj1(jc), ncsj2(jc), surf(jc) 211 IF(lwp)WRITE(numout,FMT='(1I3,4I4,5X,F16.2)') jc, ncsi1(jc), ncsi2(jc), ncsj1(jc), ncsj2(jc), surf(jc) 239 212 END DO 240 213 … … 243 216 surf(jpncs+1) = surf(jpncs+1) - surf(jc) 244 217 END DO 245 218 ! 246 219 ENDIF 247 248 ! 2 - Computation 249 ! --------------- 250 zemp = 0.e0 251 220 ! !--------------------! 221 ! ! update emp, emps ! 222 zemp = 0.e0 !--------------------! 252 223 DO jc = 1, jpncs 253 224 DO jj = ncsj1(jc), ncsj2(jc) … … 257 228 END DO 258 229 END DO 259 IF( lk_mpp ) CALL mpp_sum ( zemp , jpncs ) ! mpp: sum over all the global domain230 IF( lk_mpp ) CALL mpp_sum ( zemp(:) , jpncs ) ! mpp: sum over all the global domain 260 231 261 232 IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN ! Black Sea case for ORCA_R2 configuration … … 266 237 267 238 DO jc = 1, jpncs 268 239 ! 269 240 IF( ncstt(jc) == 0 ) THEN 270 241 ! water/evap excess is shared by all open ocean … … 303 274 ENDIF 304 275 ENDIF 305 276 ! 306 277 DO jj = ncsj1(jc), ncsj2(jc) 307 278 DO ji = ncsi1(jc), ncsi2(jc) … … 310 281 END DO 311 282 END DO 312 283 ! 313 284 END DO 314 315 316 ! 5. Boundary condition on emp and emps 317 ! ------------------------------------- 285 ! 318 286 CALL lbc_lnk( emp , 'T', 1. ) 319 287 CALL lbc_lnk( emps, 'T', 1. ) 320 321 END SUBROUTINE flx_clo 288 ! 289 END SUBROUTINE sbc_clo 290 291 292 SUBROUTINE clo_rnf( p_rnfmsk ) 293 !!--------------------------------------------------------------------- 294 !! *** ROUTINE sbc_rnf *** 295 !! 296 !! ** Purpose : allow the treatment of closed sea outflow grid-points 297 !! to be the same as river mouth grid-points 298 !! 299 !! ** Method : set to 1 the runoff mask (mskrnf, see sbcrnf module) 300 !! at the closed sea outflow grid-point. 301 !! 302 !! ** Action : update (p_)mskrnf (set 1 at closed sea outflow) 303 !!---------------------------------------------------------------------- 304 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: p_rnfmsk ! river runoff mask (rnfmsk array) 305 ! 306 INTEGER :: jc, jn ! dummy loop indices 307 INTEGER :: ii, ij ! temporary integer 308 !!---------------------------------------------------------------------- 309 ! 310 DO jc = 1, jpncs 311 IF( ncstt(jc) >= 1 ) THEN ! runoff mask set to 1 at closed sea outflows 312 DO jn = 1, 4 313 ii = mi0( ncsir(jc,jn) ) 314 ij = mj0( ncsjr(jc,jn) ) 315 p_rnfmsk(ii,ij) = MAX( p_rnfmsk(ii,ij), 1.0 ) 316 END DO 317 ENDIF 318 END DO 319 ! 320 END SUBROUTINE clo_rnf 321 322 323 SUBROUTINE clo_ups( p_upsmsk ) 324 !!--------------------------------------------------------------------- 325 !! *** ROUTINE sbc_rnf *** 326 !! 327 !! ** Purpose : allow the treatment of closed sea outflow grid-points 328 !! to be the same as river mouth grid-points 329 !! 330 !! ** Method : set to 0.5 the upstream mask (upsmsk, see traadv_cen2 331 !! module) over the closed seas. 332 !! 333 !! ** Action : update (p_)upsmsk (set 0.5 over closed seas) 334 !!---------------------------------------------------------------------- 335 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: p_upsmsk ! upstream mask (upsmsk array) 336 ! 337 INTEGER :: jc, ji, jj ! dummy loop indices 338 !!---------------------------------------------------------------------- 339 ! 340 DO jc = 1, jpncs 341 DO jj = ncsj1(jc), ncsj2(jc) 342 DO ji = ncsi1(jc), ncsi2(jc) 343 p_upsmsk(ji,jj) = 0.5 ! mixed upstream/centered scheme over closed seas 344 END DO 345 END DO 346 END DO 347 ! 348 END SUBROUTINE clo_ups 349 350 351 SUBROUTINE clo_bat( pbat, kbat ) 352 !!--------------------------------------------------------------------- 353 !! *** ROUTINE clo_bat *** 354 !! 355 !! ** Purpose : suppress closed sea from the domain 356 !! 357 !! ** Method : set to 0 the meter and level bathymetry (given in 358 !! arguments) over the closed seas. 359 !! 360 !! ** Action : set pbat=0 and kbat=0 over closed seas 361 !!---------------------------------------------------------------------- 362 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pbat ! bathymetry in meters (bathy array) 363 INTEGER , DIMENSION(jpi,jpj), INTENT(inout) :: kbat ! bathymetry in levels (mbathy array) 364 ! 365 INTEGER :: jc, ji, jj ! dummy loop indices 366 !!---------------------------------------------------------------------- 367 ! 368 DO jc = 1, jpncs 369 DO jj = ncsj1(jc), ncsj2(jc) 370 DO ji = ncsi1(jc), ncsi2(jc) 371 pbat(ji,jj) = 0.e0 372 kbat(ji,jj) = 0 373 END DO 374 END DO 375 END DO 376 ! 377 END SUBROUTINE clo_bat 322 378 323 379 !!====================================================================== -
trunk/NEMO/OPA_SRC/DOM/domain.F90
r833 r888 13 13 USE oce ! 14 14 USE dom_oce ! ocean space and time domain 15 USE ice_oce ! ice variables 16 USE sbc_oce ! surface boundary condition: ocean 15 17 USE phycst ! physical constants 18 USE daymod ! calendar 16 19 USE in_out_manager ! I/O manager 17 USE ice_oce ! ice variables18 USE blk_oce ! bulk variables19 USE flxrnf ! runoffs20 USE daymod ! calendar21 20 USE lib_mpp ! distributed memory computing library 22 21 … … 39 38 !!---------------------------------------------------------------------- 40 39 !! OPA 9.0 , LOCEAN-IPSL (2005) 41 !! $ Header$40 !! $Id$ 42 41 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 43 42 !!---------------------------------------------------------------------- … … 144 143 NAMELIST/namrun/ no , cexper , ln_rstart , nrstdt , nit000, & 145 144 & nitend, ndate0 , nleapy , ninist , nstock, & 146 & nwrite, nrunoff ,ln_dimgnnn145 & nwrite, ln_dimgnnn 147 146 148 147 NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, ngrid , nmsh , & 149 148 & nacc , atfp , rdt , rdtmin , rdtmax, & 150 & rdth , rdtbt , n fice , nfbulk , nclosea149 & rdth , rdtbt , nclosea 151 150 NAMELIST/namcla/ n_cla 152 151 !!---------------------------------------------------------------------- … … 175 174 WRITE(numout,*) ' frequency of restart file nstock = ', nstock 176 175 WRITE(numout,*) ' frequency of output file nwrite = ', nwrite 177 WRITE(numout,*) ' runoff option nrunoff = ', nrunoff178 176 WRITE(numout,*) ' multi file dimgout ln_dimgnnn = ', ln_dimgnnn 179 177 ENDIF … … 257 255 ENDIF 258 256 259 IF( lk_lim3 .OR. lk_lim2 ) THEN260 IF(lwp) WRITE(numout,*) ' ice model coupling frequency nfice = ', nfice261 IF( MOD( nitend - nit000 + 1, nfice) /= 0 ) THEN262 WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') is NOT a multiple of nfice (', nfice, ')'263 CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' )264 ENDIF265 IF( MOD( nstock , nfice) /= 0 ) THEN266 WRITE(ctmp1,*) 'nstock (' , nstock , ') is NOT a multiple of nfice (', nfice, ')'267 CALL ctl_stop( ctmp1, 'Impossible to do proper restart files' )268 ENDIF269 nfbulk = nfice270 IF( MOD( rday, nfice*rdt ) /= 0 ) CALL ctl_warn( 'nfice is NOT a multiple of the number of time steps in a day' )271 IF(lwp) WRITE(numout,*) ' bulk computation frequency nfbulk = ', nfbulk, ' = nfice if ice model used'272 IF(lwp) WRITE(numout,*) ' flag closed sea or not nclosea = ', nclosea273 ENDIF274 275 257 ! Default values 276 258 n_cla = 0 -
trunk/NEMO/OPA_SRC/DOM/domvvl.F90
r719 r888 18 18 USE oce ! ocean dynamics and tracers 19 19 USE dom_oce ! ocean space and time domain 20 USE sbc_oce ! surface boundary condition: ocean 21 USE dynspg_oce ! surface pressure gradient variables 22 USE phycst ! physical constants 20 23 USE in_out_manager ! I/O manager 21 24 USE lib_mpp ! distributed memory computing library 22 25 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE dynspg_oce ! surface pressure gradient variables24 USE ocesbc ! ocean surface boundary condition25 USE phycst ! physical constants26 26 27 27 IMPLICIT NONE … … 47 47 !!---------------------------------------------------------------------- 48 48 !! OPA 9.0 , LOCEAN-IPSL (2005) 49 !! $ Header$49 !! $Id$ 50 50 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 51 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90
r800 r888 16 16 USE oce ! ocean dynamics and tracers 17 17 USE dom_oce ! ocean space and time domain 18 USE in_out_manager ! I/O manager 18 USE sbc_oce ! surface boundary condition: ocean 19 USE obc_oce ! Lateral open boundary condition 19 20 USE phycst ! physical constants 20 USE ocesbc ! ocean surface boundary condition21 USE obc_oce ! Lateral open boundary condition22 21 USE obc_par ! open boundary condition parameters 23 22 USE obcdta ! open boundary condition data (obc_dta_bt routine) 23 USE in_out_manager ! I/O manager 24 24 USE lib_mpp ! distributed memory computing library 25 25 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 40 40 !!---------------------------------------------------------------------- 41 41 !! OPA 9.0 , LOCEAN-IPSL (2005) 42 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DYN/dynspg_exp.F90,v 1.9 2007/06/05 10:38:27 opalod Exp $42 !! $Id$ 43 43 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 44 44 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r800 r888 25 25 USE dom_oce ! ocean space and time domain 26 26 USE zdf_oce ! ocean vertical physics 27 USE sbc_oce ! surface boundary condition: ocean 28 USE obc_oce ! Lateral open boundary condition 29 USE sol_oce ! ocean elliptic solver 27 30 USE phycst ! physical constants 28 USE ocesbc ! ocean surface boundary condition 29 USE flxrnf ! ocean runoffs 30 USE sol_oce ! ocean elliptic solver 31 USE domvvl ! variable volume 31 32 USE solver ! solver initialization 32 33 USE solpcg ! preconditionned conjugate gradient solver 33 34 USE solsor ! Successive Over-relaxation solver 34 35 USE solfet ! FETI solver 35 USE obc_oce ! Lateral open boundary condition36 36 USE obcdyn ! ocean open boundary condition (obc_dyn routines) 37 37 USE obcvol ! ocean open boundary condition (obc_vol routines) 38 USE cla_dynspg ! cross land advection 39 USE in_out_manager ! I/O manager 38 40 USE lib_mpp ! distributed memory computing library 39 41 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 40 USE cla_dynspg ! cross land advection41 42 USE prtctl ! Print control 42 43 USE solmat ! matrix construction for elliptic solvers 43 44 USE agrif_opa_interp 44 USE in_out_manager ! I/O manager45 45 USE iom 46 46 USE restart ! only for lrst_oce 47 USE domvvl ! variable volume48 47 49 48 IMPLICIT NONE … … 58 57 !!---------------------------------------------------------------------- 59 58 !! OPA 9.0 , LOCEAN-IPSL (2005) 60 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DYN/dynspg_flt.F90,v 1.14 2007/06/05 10:38:27 opalod Exp $59 !! $Id$ 61 60 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 62 61 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r800 r888 21 21 USE oce ! ocean dynamics and tracers 22 22 USE dom_oce ! ocean space and time domain 23 USE sbc_oce ! surface boundary condition: ocean 24 USE dynspg_oce ! surface pressure gradient variables 23 25 USE phycst ! physical constants 24 USE ocesbc ! ocean surface boundary condition26 USE domvvl ! variable volume 25 27 USE obcdta ! open boundary condition data 26 28 USE obcfla ! Flather open boundary condition … … 31 33 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 32 34 USE prtctl ! Print control 33 USE dynspg_oce ! surface pressure gradient variables34 35 USE in_out_manager ! I/O manager 35 36 USE iom 36 37 USE restart ! only for lrst_oce 37 USE domvvl ! variable volume38 38 39 39 IMPLICIT NONE … … 52 52 !!---------------------------------------------------------------------- 53 53 !! OPA 9.0 , LOCEAN-IPSL (2005) 54 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DYN/dynspg_ts.F90,v 1.16 2007/06/05 10:38:27 opalod Exp $54 !! $Id$ 55 55 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 56 56 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynzad.F90
r789 r888 16 16 USE oce ! ocean dynamics and tracers 17 17 USE dom_oce ! ocean space and time domain 18 USE sbc_oce ! surface boundary condition: ocean 19 USE trdmod_oce ! ocean variables trends 20 USE trdmod ! ocean dynamics trends 18 21 USE in_out_manager ! I/O manager 19 USE trdmod ! ocean dynamics trends20 USE trdmod_oce ! ocean variables trends21 USE flxrnf ! ocean runoffs22 22 USE prtctl ! Print control 23 23 … … 32 32 !!---------------------------------------------------------------------- 33 33 !! OPA 9.0 , LOCEAN-IPSL (2005) 34 !! $ Header$34 !! $Id$ 35 35 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
r719 r888 18 18 USE phycst ! physical constants 19 19 USE zdf_oce ! ocean vertical physics 20 USE sbc_oce ! surface boundary condition: ocean 20 21 USE in_out_manager ! I/O manager 21 USE taumod ! surface ocean stress22 22 23 23 IMPLICIT NONE … … 32 32 !!---------------------------------------------------------------------- 33 33 !! OPA 9.0 , LOCEAN-IPSL (2005) 34 !! $ Header$34 !! $Id$ 35 35 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- … … 81 81 ! Surface boundary condition 82 82 DO ji = 2, jpim1 83 zwy(ji,1) = taux(ji,jj) * zrau0r84 zww(ji,1) = tauy(ji,jj) * zrau0r83 zwy(ji,1) = utau(ji,jj) * zrau0r 84 zww(ji,1) = vtau(ji,jj) * zrau0r 85 85 END DO 86 86 -
trunk/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
r719 r888 14 14 !!---------------------------------------------------------------------- 15 15 !! OPA 9.0 , LOCEAN-IPSL (2005) 16 !! $ Header$16 !! $Id$ 17 17 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 18 18 !!---------------------------------------------------------------------- … … 20 20 USE oce ! ocean dynamics and tracers 21 21 USE dom_oce ! ocean space and time domain 22 USE sbc_oce ! surface boundary condition: ocean 23 USE zdf_oce ! ocean vertical physics 22 24 USE phycst ! physical constants 23 USE zdf_oce ! ocean vertical physics24 25 USE in_out_manager ! I/O manager 25 USE taumod ! surface ocean stress26 26 27 27 IMPLICIT NONE … … 36 36 !!---------------------------------------------------------------------- 37 37 !! OPA 9.0 , LOCEAN-IPSL (2005) 38 !! $ Header$38 !! $Id$ 39 39 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 40 40 !!---------------------------------------------------------------------- … … 141 141 !!! change les resultats (derniers digit, pas significativement + rapide 1* de moins) 142 142 !!! ua(ji,jj,1) = ub(ji,jj,1) & 143 !!! + p2dt * ( ua(ji,jj,1) + taux(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) )143 !!! + p2dt * ( ua(ji,jj,1) + utau(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) ) 144 144 z2dtf = p2dt / ( fse3u(ji,jj,1)*rau0 ) 145 145 ua(ji,jj,1) = ub(ji,jj,1) & 146 + p2dt * ua(ji,jj,1) + z2dtf * taux(ji,jj)146 + p2dt * ua(ji,jj,1) + z2dtf * utau(ji,jj) 147 147 END DO 148 148 END DO … … 236 236 !!! change les resultats (derniers digit, pas significativement + rapide 1* de moins) 237 237 !!! va(ji,jj,1) = vb(ji,jj,1) & 238 !!! + p2dt * ( va(ji,jj,1) + tauy(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) )238 !!! + p2dt * ( va(ji,jj,1) + vtau(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) ) 239 239 z2dtf = p2dt / ( fse3v(ji,jj,1)*rau0 ) 240 240 va(ji,jj,1) = vb(ji,jj,1) & 241 + p2dt * va(ji,jj,1) + z2dtf * tauy(ji,jj)241 + p2dt * va(ji,jj,1) + z2dtf * vtau(ji,jj) 242 242 END DO 243 243 END DO -
trunk/NEMO/OPA_SRC/DYN/wzvmod.F90
r789 r888 13 13 USE oce ! ocean dynamics and tracers variables 14 14 USE dom_oce ! ocean space and time domain variables 15 USE sbc_oce ! surface boundary condition: ocean 16 USE domvvl ! Variable volume 15 17 USE in_out_manager ! I/O manager 16 18 USE prtctl ! Print control 17 18 USE domvvl ! Variable volume19 19 USE phycst 20 USE ocesbc ! ocean surface boundary condition21 20 USE lbclnk ! ocean lateral boundary condition (or mpp link) 22 21 … … 31 30 !!---------------------------------------------------------------------- 32 31 !! OPA 9.0 , LOCEAN-IPSL (2005) 33 !! $ Header$32 !! $Id$ 34 33 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 35 34 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/LDF/ldfeiv.F90
r789 r888 14 14 USE oce ! ocean dynamics and tracers 15 15 USE dom_oce ! ocean space and time domain 16 USE sbc_oce ! surface boundary condition: ocean 17 USE sbcrnf ! river runoffs 16 18 USE ldftra_oce ! ocean tracer lateral physics 17 19 USE phycst ! physical constants 18 20 USE ldfslp ! iso-neutral slopes 19 USE flxrnf !20 21 USE in_out_manager ! I/O manager 21 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 29 30 !!---------------------------------------------------------------------- 30 31 !! OPA 9.0 , LOCEAN-IPSL (2005) 31 !! $ Header$32 !! $Id$ 32 33 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 33 34 !!---------------------------------------------------------------------- … … 188 189 DO ji = 1, jpi 189 190 zaht = ( 1. - MIN( 1., ABS( ff(ji,jj) / zf20 ) ) ) * ( aht0 - zaht_min ) & 190 & + aht0 * upsrnfh(ji,jj) ! enhanced near river mouths191 & + aht0 * rnfmsk(ji,jj) ! enhanced near river mouths 191 192 ahtu(ji,jj) = MAX( MAX( zaht_min, aeiu(ji,jj) ) + zaht, aht0 ) 192 193 ahtv(ji,jj) = MAX( MAX( zaht_min, aeiv(ji,jj) ) + zaht, aht0 ) -
trunk/NEMO/OPA_SRC/OBC/obcvol.F90
r719 r888 12 12 USE oce ! ocean dynamics and tracers 13 13 USE dom_oce ! ocean space and time domain 14 USE sbc_oce ! surface boundary condition: ocean 14 15 USE phycst ! physical constants 15 16 USE obc_oce ! ocean open boundary conditions 16 17 USE lib_mpp ! for mppsum 17 18 USE in_out_manager ! I/O manager 18 USE ocesbc ! ocean surface boundary conditions19 19 20 20 IMPLICIT NONE … … 29 29 !!--------------------------------------------------------------------------------- 30 30 !! OPA 9.0 , LOCEAN-IPSL (2005) 31 !! $ Header$31 !! $Id$ 32 32 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 33 33 !!--------------------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/SBC/albedo.F90
r833 r888 4 4 !! Ocean forcing: bulk thermohaline forcing of the ocean (or ice) 5 5 !!===================================================================== 6 !!---------------------------------------------------------------------- 7 !! flx_blk_albedo : albedo for ocean and ice (clear and overcast skies) 8 !!---------------------------------------------------------------------- 9 !! * Modules used 10 USE oce ! ocean dynamics and tracers 11 USE dom_oce ! ocean space and time domain 12 USE cpl_oce ! ??? 6 !! History : 8.0 ! 01-04 (LIM 1.0) 7 !! 8.5 ! 03-07 (C. Ethe, G. Madec) Optimization (old name:shine) 8 !! 9.0 ! 04-11 (C. Talandier) add albedo_init 9 !! - ! 01-06 (M. Vancoppenolle) LIM 3.0 10 !! - ! 06-08 (G. Madec) cleaning for surface module 11 !!---------------------------------------------------------------------- 12 !! albedo_ice : albedo for ice (clear and overcast skies) 13 !! albedo_oce : albedo for ocean (clear and overcast skies) 14 !! albedo_init : initialisation of albedo computation 15 !!---------------------------------------------------------------------- 13 16 USE phycst ! physical constants 14 USE daymod 15 USE blk_oce ! bulk variables 16 USE flx_oce ! forcings variables 17 USE ocfzpt ! ??? 18 USE in_out_manager 19 USE lbclnk 17 USE in_out_manager ! I/O manager 20 18 21 19 IMPLICIT NONE 22 20 PRIVATE 23 21 24 !! * Accessibility25 PUBLIC flx_blk_albedo ! routine called by limflx.F90 in coupled26 ! and in flxblk.F90 in forced 27 !! * Module variables28 INTEGER :: & !: nameos : ocean physical parameters29 albd_init = 0 !: control flag for initialization30 31 REAL(wp) :: & ! constantvalues32 zzero = 0.e0 , &33 zone = 1.034 35 !! * constants for albedo computation (flx_blk_albedo)22 PUBLIC albedo_ice ! routine called sbcice_lim.F90 23 PUBLIC albedo_oce ! routine called by ??? 24 25 INTEGER :: albd_init = 0 !: control flag for initialization 26 REAL(wp) :: zzero = 0.e0 ! constant values 27 REAL(wp) :: zone = 1.e0 ! " " 28 29 REAL(wp) :: c1 = 0.05 ! constants values 30 REAL(wp) :: c2 = 0.10 ! " " 31 REAL(wp) :: rmue = 0.40 ! cosine of local solar altitude 32 33 !!* namelist namalb 36 34 REAL(wp) :: & 37 c 1 = 0.05 , & ! constants values38 c2 = 0.10 , &35 cgren = 0.06 , & ! correction of the snow or ice albedo to take into account 36 ! ! effects of cloudiness (Grenfell & Perovich, 1984) 39 37 #if defined key_lim3 40 38 albice = 0.53 , & ! albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers) … … 42 40 albice = 0.50 , & ! albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers) 43 41 #endif 44 cgren = 0.06 , & ! correction of the snow or ice albedo to take into account45 ! effects of cloudiness (Grenfell & Perovich, 1984)46 42 alphd = 0.80 , & ! coefficients for linear interpolation used to compute 47 43 alphdi = 0.72 , & ! albedo between two extremes values (Pyane, 1972) 48 alphc = 0.65 , & 49 zmue = 0.40 ! cosine of local solar altitude 50 51 !!---------------------------------------------------------------------- 52 !! OPA 9.0 , LOCEAN-IPSL (2005) 53 !! $Header$ 54 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 44 alphc = 0.65 45 46 !!---------------------------------------------------------------------- 47 !! OPA 9.0 , LOCEAN-IPSL (2006) 48 !! $Id$ 49 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 55 50 !!---------------------------------------------------------------------- 56 51 57 52 CONTAINS 58 53 59 #if defined key_lim3 || defined key_lim2 60 !!---------------------------------------------------------------------- 61 !! 'key_lim3' OR 'key_lim2' LIM 2.0 or LIM 3.0 ice model 62 !!---------------------------------------------------------------------- 63 64 SUBROUTINE flx_blk_albedo( palb , palcn , palbp , palcnp ) 65 !!---------------------------------------------------------------------- 66 !! *** ROUTINE flx_blk_albedo *** 54 SUBROUTINE albedo_ice( pt_ice, ph_ice, ph_snw, pa_ice_cs, pa_ice_os ) 55 !!---------------------------------------------------------------------- 56 !! *** ROUTINE albedo_ice *** 67 57 !! 68 58 !! ** Purpose : Computation of the albedo of the snow/ice system 69 !! as well as the ocean one59 !! as well as the ocean one 70 60 !! 71 61 !! ** Method : - Computation of the albedo of snow or ice (choose the 72 !! rignt one by a large number of tests62 !! rignt one by a large number of tests 73 63 !! - Computation of the albedo of the ocean 74 64 !! 75 !! References : 76 !! Shine and Hendersson-Sellers 1985, JGR, 90(D1), 2243-2250. 77 !! 78 !! History : 79 !! 8.0 ! 01-04 (LIM 1.0) 80 !! 8.5 ! 03-07 (C. Ethe, G. Madec) Optimization (old name:shine) 81 !! 9.0 ! 01-06 (M. Vancoppenolle) LIM 3.0 82 !!---------------------------------------------------------------------- 83 !! * Modules used 84 #if defined key_lim3 85 USE par_ice 86 USE ice ! ??? 87 #elif defined key_lim2 88 USE ice_2 ! ??? 89 #endif 90 91 !! * Arguments 92 #if defined key_lim3 93 REAL(wp), DIMENSION(jpi,jpj,jpl), INTENT(out) :: & 94 #elif defined key_lim2 95 REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: & 96 #endif 97 palb , & ! albedo of ice under overcast sky 98 palbp ! albedo of ice under clear sky 99 REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: & 100 palcn , & ! albedo of ocean under overcast sky 101 palcnp ! albedo of ocean under clear sky 102 103 !! * Local variables 104 INTEGER :: & 105 ji, jj, jl ! dummy loop indices 106 REAL(wp) :: & 107 zmue14 , & ! zmue**1.4 108 zalbpsnm , & ! albedo of ice under clear sky when snow is melting 109 zalbpsnf , & ! albedo of ice under clear sky when snow is freezing 110 zalbpsn , & ! albedo of snow/ice system when ice is coverd by snow 111 zalbpic , & ! albedo of snow/ice system when ice is free of snow 112 zithsn , & ! = 1 for hsn >= 0 ( ice is cov. by snow ) ; = 0 otherwise (ice is free of snow) 113 zitmlsn , & ! = 1 freezinz snow (t_su >=rt0_snow) ; = 0 melting snow (t_su<rt0_snow) 114 zihsc1 , & ! = 1 hsn <= c1 ; = 0 hsn > c1 115 zihsc2 ! = 1 hsn >= c2 ; = 0 hsn < c2 116 #if defined key_lim3 117 REAL(wp), DIMENSION(jpi,jpj,jpl) :: & 118 #elif defined key_lim2 119 REAL(wp), DIMENSION(jpi,jpj) :: & 120 #endif 121 zalbfz , & ! ( = alphdi for freezing ice ; = albice for melting ice ) 122 zficeth ! function of ice thickness 123 #if defined key_lim3 124 LOGICAL , DIMENSION(jpi,jpj,jpl) :: & 125 #elif defined key_lim2 126 LOGICAL , DIMENSION(jpi,jpj) :: & 127 #endif 128 llmask 65 !! References : Shine and Hendersson-Sellers 1985, JGR, 90(D1), 2243-2250. 66 !!---------------------------------------------------------------------- 67 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: pt_ice ! ice surface temperature 68 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: ph_ice ! sea-ice thickness 69 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: ph_snw ! snow thickness 70 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: pa_ice_cs ! albedo of ice under clear sky 71 REAL(wp), INTENT( out), DIMENSION(:,:,:) :: pa_ice_os ! albedo of ice under overcast sky 72 !! 73 INTEGER :: ji, jj, jl ! dummy loop indices 74 INTEGER :: ijpl ! number of ice categories (3rd dim of ice input arrays) 75 REAL(wp) :: zalbpsnm ! albedo of ice under clear sky when snow is melting 76 REAL(wp) :: zalbpsnf ! albedo of ice under clear sky when snow is freezing 77 REAL(wp) :: zalbpsn ! albedo of snow/ice system when ice is coverd by snow 78 REAL(wp) :: zalbpic ! albedo of snow/ice system when ice is free of snow 79 REAL(wp) :: zithsn ! = 1 for hsn >= 0 ( ice is cov. by snow ) ; = 0 otherwise (ice is free of snow) 80 REAL(wp) :: zitmlsn ! = 1 freezinz snow (pt_ice >=rt0_snow) ; = 0 melting snow (pt_ice<rt0_snow) 81 REAL(wp) :: zihsc1 ! = 1 hsn <= c1 ; = 0 hsn > c1 82 REAL(wp) :: zihsc2 ! = 1 hsn >= c2 ; = 0 hsn < c2 83 !! 84 LOGICAL , DIMENSION(jpi,jpj,SIZE(pt_ice,3)) :: llmask 85 REAL(wp), DIMENSION(jpi,jpj,SIZE(pt_ice,3)) :: zalbfz ! = alphdi for freezing ice ; = albice for melting ice 86 REAL(wp), DIMENSION(jpi,jpj,SIZE(pt_ice,3)) :: zficeth ! function of ice thickness 129 87 !!--------------------------------------------------------------------- 130 88 131 ! initialization 132 IF( albd_init == 0 ) CALL albedo_init 133 134 !------------------------- 89 ijpl = SIZE( pt_ice, 3 ) ! number of ice categories 90 91 IF( albd_init == 0 ) CALL albedo_init ! initialization 92 93 !--------------------------- 135 94 ! Computation of zficeth 136 !-------------------------- 137 #if defined key_lim3 138 llmask = (ht_s(:,:,:) == 0.e0) .AND. ( t_su(:,:,:) >= rt0_ice ) 139 #elif defined key_lim2 140 llmask = (hsnif == 0.e0) .AND. ( sist >= rt0_ice ) 141 #endif 142 WHERE ( llmask ) ! ice free of snow and melts 143 zalbfz = albice 144 ELSEWHERE 145 zalbfz = alphdi 95 !--------------------------- 96 llmask = ( ph_snw == 0.e0 ) .AND. ( pt_ice >= rt0_ice ) 97 ! ice free of snow and melts 98 WHERE( llmask ) ; zalbfz = albice 99 ELSEWHERE ; zalbfz = alphdi 146 100 END WHERE 147 148 #if defined key_lim3 149 DO jl = 1, jpl 101 102 DO jl = 1, ijpl 150 103 DO jj = 1, jpj 151 104 DO ji = 1, jpi 152 IF( ht_i(ji,jj,jl) > 1.5 ) THEN105 IF( ph_ice(ji,jj,jl) > 1.5 ) THEN 153 106 zficeth(ji,jj,jl) = zalbfz(ji,jj,jl) 154 ELSEIF( ht_i(ji,jj,jl) > 1.0 .AND. ht_i(ji,jj,jl) <= 1.5 ) THEN155 zficeth(ji,jj,jl) = 0.472 + 2.0 * ( zalbfz(ji,jj,jl) - 0.472 ) * ( ht_i(ji,jj,jl) - 1.0 )156 ELSEIF( ht_i(ji,jj,jl) > 0.05 .AND. ht_i(ji,jj,jl) <= 1.0 ) THEN157 zficeth(ji,jj,jl) = 0.2467 + 0.7049 * ht_i(ji,jj,jl) &158 & - 0.8608 * ht_i(ji,jj,jl) * ht_i(ji,jj,jl) &159 & + 0.3812 * ht_i(ji,jj,jl) * ht_i(ji,jj,jl) * ht_i(ji,jj,jl)107 ELSEIF( ph_ice(ji,jj,jl) > 1.0 .AND. ph_ice(ji,jj,jl) <= 1.5 ) THEN 108 zficeth(ji,jj,jl) = 0.472 + 2.0 * ( zalbfz(ji,jj,jl) - 0.472 ) * ( ph_ice(ji,jj,jl) - 1.0 ) 109 ELSEIF( ph_ice(ji,jj,jl) > 0.05 .AND. ph_ice(ji,jj,jl) <= 1.0 ) THEN 110 zficeth(ji,jj,jl) = 0.2467 + 0.7049 * ph_ice(ji,jj,jl) & 111 & - 0.8608 * ph_ice(ji,jj,jl) * ph_ice(ji,jj,jl) & 112 & + 0.3812 * ph_ice(ji,jj,jl) * ph_ice(ji,jj,jl) * ph_ice (ji,jj,jl) 160 113 ELSE 161 zficeth(ji,jj,jl) = 0.1 + 3.6 * ht_i(ji,jj,jl)114 zficeth(ji,jj,jl) = 0.1 + 3.6 * ph_ice(ji,jj,jl) 162 115 ENDIF 163 116 END DO 164 117 END DO 165 118 END DO 166 #elif defined key_lim2167 DO jj = 1, jpj168 DO ji = 1, jpi169 IF( hicif(ji,jj) > 1.5 ) THEN170 zficeth(ji,jj) = zalbfz(ji,jj)171 ELSEIF( hicif(ji,jj) > 1.0 .AND. hicif(ji,jj) <= 1.5 ) THEN172 zficeth(ji,jj) = 0.472 + 2.0 * ( zalbfz(ji,jj) - 0.472 ) * ( hicif(ji,jj) - 1.0 )173 ELSEIF( hicif(ji,jj) > 0.05 .AND. hicif(ji,jj) <= 1.0 ) THEN174 zficeth(ji,jj) = 0.2467 + 0.7049 * hicif(ji,jj) &175 & - 0.8608 * hicif(ji,jj) * hicif(ji,jj) &176 & + 0.3812 * hicif(ji,jj) * hicif(ji,jj) * hicif (ji,jj)177 ELSE178 zficeth(ji,jj) = 0.1 + 3.6 * hicif(ji,jj)179 ENDIF180 END DO181 END DO182 #endif183 119 184 120 !----------------------------------------------- … … 188 124 ! Albedo of snow-ice for clear sky. 189 125 !----------------------------------------------- 190 #if defined key_lim3 191 DO jl = 1, jpl 126 DO jl = 1, ijpl 192 127 DO jj = 1, jpj 193 128 DO ji = 1, jpi 194 129 ! Case of ice covered by snow. 195 196 ! freezing snow 197 zihsc1 = 1.0 - MAX ( zzero , SIGN ( zone , - ( ht_s(ji,jj,jl) - c1 ) ) ) 198 zalbpsnf = ( 1.0 - zihsc1 ) * ( zficeth(ji,jj,jl) + ht_s(ji,jj,jl) * ( alphd - zficeth(ji,jj,jl) ) / c1 ) & 199 & + zihsc1 * alphd 200 201 ! melting snow 202 zihsc2 = MAX ( zzero , SIGN ( zone , ht_s(ji,jj,jl) - c2 ) ) 203 zalbpsnm = ( 1.0 - zihsc2 ) * ( albice + ht_s(ji,jj,jl) * ( alphc - albice ) / c2 ) & 204 & + zihsc2 * alphc 205 206 207 zitmlsn = MAX ( zzero , SIGN ( zone , t_su(ji,jj,jl) - rt0_snow ) ) 208 zalbpsn = zitmlsn * zalbpsnm + ( 1.0 - zitmlsn ) * zalbpsnf 130 ! ! freezing snow 131 zihsc1 = 1.0 - MAX( zzero , SIGN( zone , - ( ph_snw(ji,jj,jl) - c1 ) ) ) 132 zalbpsnf = ( 1.0 - zihsc1 ) * ( zficeth(ji,jj,jl) & 133 & + ph_snw(ji,jj,jl) * ( alphd - zficeth(ji,jj,jl) ) / c1 ) & 134 & + zihsc1 * alphd 135 ! ! melting snow 136 zihsc2 = MAX( zzero , SIGN( zone , ph_snw(ji,jj,jl) - c2 ) ) 137 zalbpsnm = ( 1.0 - zihsc2 ) * ( albice + ph_snw(ji,jj,jl) * ( alphc - albice ) / c2 ) & 138 & + zihsc2 * alphc 139 ! 140 zitmlsn = MAX( zzero , SIGN( zone , pt_ice(ji,jj,jl) - rt0_snow ) ) 141 zalbpsn = zitmlsn * zalbpsnm + ( 1.0 - zitmlsn ) * zalbpsnf 209 142 210 143 ! Case of ice free of snow. 211 zalbpic 144 zalbpic = zficeth(ji,jj,jl) 212 145 213 146 ! albedo of the system 214 zithsn = 1.0 - MAX ( zzero , SIGN ( zone , - ht_s(ji,jj,jl) ) )215 pa lbp(ji,jj,jl) = zithsn * zalbpsn + ( 1.0 - zithsn ) * zalbpic147 zithsn = 1.0 - MAX( zzero , SIGN( zone , - ph_snw(ji,jj,jl) ) ) 148 pa_ice_cs(ji,jj,jl) = zithsn * zalbpsn + ( 1.0 - zithsn ) * zalbpic 216 149 END DO 217 150 END DO … … 220 153 ! Albedo of snow-ice for overcast sky. 221 154 !---------------------------------------------- 222 palb(:,:,:) = palbp(:,:,:) + cgren ! Oberhuber correction 223 224 #elif defined key_lim2 225 226 DO jj = 1, jpj 227 DO ji = 1, jpi 228 ! Case of ice covered by snow. 229 230 ! melting snow 231 zihsc1 = 1.0 - MAX ( zzero , SIGN ( zone , - ( hsnif(ji,jj) - c1 ) ) ) 232 zalbpsnm = ( 1.0 - zihsc1 ) * ( zficeth(ji,jj) + hsnif(ji,jj) * ( alphd - zficeth(ji,jj) ) / c1 ) & 233 & + zihsc1 * alphd 234 ! freezing snow 235 zihsc2 = MAX ( zzero , SIGN ( zone , hsnif(ji,jj) - c2 ) ) 236 zalbpsnf = ( 1.0 - zihsc2 ) * ( albice + hsnif(ji,jj) * ( alphc - albice ) / c2 ) & 237 & + zihsc2 * alphc 238 239 zitmlsn = MAX ( zzero , SIGN ( zone , sist(ji,jj) - rt0_snow ) ) 240 zalbpsn = zitmlsn * zalbpsnf + ( 1.0 - zitmlsn ) * zalbpsnm 241 242 ! Case of ice free of snow. 243 zalbpic = zficeth(ji,jj) 244 245 ! albedo of the system 246 zithsn = 1.0 - MAX ( zzero , SIGN ( zone , - hsnif(ji,jj) ) ) 247 palbp(ji,jj) = zithsn * zalbpsn + ( 1.0 - zithsn ) * zalbpic 248 END DO 249 END DO 250 251 ! Albedo of snow-ice for overcast sky. 252 !---------------------------------------------- 253 palb(:,:) = palbp(:,:) + cgren 254 #endif 255 256 !-------------------------------------------- 257 ! Computation of the albedo of the ocean 258 !-------------------------- ----------------- 259 260 ! Parameterization of Briegled and Ramanathan, 1982 261 zmue14 = zmue**1.4 262 palcnp(:,:) = 0.05 / ( 1.1 * zmue14 + 0.15 ) 263 264 ! Parameterization of Kondratyev, 1969 and Payne, 1972 265 palcn(:,:) = 0.06 266 267 END SUBROUTINE flx_blk_albedo 268 269 # else 270 !!---------------------------------------------------------------------- 271 !! Default option : NO sea-ice model 272 !!---------------------------------------------------------------------- 273 274 SUBROUTINE flx_blk_albedo( palb , palcn , palbp , palcnp ) 275 !!---------------------------------------------------------------------- 276 !! *** ROUTINE flx_blk_albedo *** 155 pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + cgren ! Oberhuber correction 156 ! 157 END SUBROUTINE albedo_ice 158 159 160 SUBROUTINE albedo_oce( pa_oce_os , pa_oce_cs ) 161 !!---------------------------------------------------------------------- 162 !! *** ROUTINE albedo_oce *** 277 163 !! 278 !! ** Purpose : Computation of the albedo of the snow/ice system 279 !! as well as the ocean one 280 !! 281 !! ** Method : Computation of the albedo of snow or ice (choose the 282 !! wright one by a large number of tests Computation of the albedo 283 !! of the ocean 284 !! 285 !! History : 286 !! 8.0 ! 01-04 (LIM 1.0) 287 !! 8.5 ! 03-07 (C. Ethe, G. Madec) Optimization (old name:shine) 288 !!---------------------------------------------------------------------- 289 !! * Arguments 290 REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: & 291 palb , & ! albedo of ice under overcast sky 292 palcn , & ! albedo of ocean under overcast sky 293 palbp , & ! albedo of ice under clear sky 294 palcnp ! albedo of ocean under clear sky 295 296 REAL(wp) :: & 297 zmue14 ! zmue**1.4 298 !!---------------------------------------------------------------------- 299 300 !-------------------------------------------- 301 ! Computation of the albedo of the ocean 302 !-------------------------- ----------------- 303 304 ! Parameterization of Briegled and Ramanathan, 1982 305 zmue14 = zmue**1.4 306 palcnp(:,:) = 0.05 / ( 1.1 * zmue14 + 0.15 ) 307 308 ! Parameterization of Kondratyev, 1969 and Payne, 1972 309 palcn(:,:) = 0.06 310 311 palb (:,:) = palcn(:,:) 312 palbp(:,:) = palcnp(:,:) 313 314 END SUBROUTINE flx_blk_albedo 315 316 #endif 164 !! ** Purpose : Computation of the albedo of the ocean 165 !! 166 !! ** Method : .... 167 !!---------------------------------------------------------------------- 168 REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: pa_oce_os ! albedo of ocean under overcast sky 169 REAL(wp), DIMENSION(jpi,jpj), INTENT(out) :: pa_oce_cs ! albedo of ocean under clear sky 170 !! 171 REAL(wp) :: zcoef ! temporary scalar 172 !!---------------------------------------------------------------------- 173 ! 174 zcoef = 0.05 / ( 1.1 * rmue**1.4 + 0.15 ) ! Parameterization of Briegled and Ramanathan, 1982 175 pa_oce_cs(:,:) = zcoef 176 pa_oce_os(:,:) = 0.06 ! Parameterization of Kondratyev, 1969 and Payne, 1972 177 ! 178 END SUBROUTINE albedo_oce 179 317 180 318 181 SUBROUTINE albedo_init … … 323 186 !! 324 187 !! ** Method : Read the namelist namalb 325 !!326 !! ** Action :327 !!328 !!329 !! History :330 !! 9.0 ! 04-11 (C. Talandier) Original code331 188 !!---------------------------------------------------------------------- 332 189 NAMELIST/namalb/ cgren, albice, alphd, alphdi, alphc 333 !!----------------------------------------------------------------------334 !! OPA 9.0, LODYC-IPSL (2004)335 190 !!---------------------------------------------------------------------- 336 191 … … 342 197 READ ( numnam, namalb ) 343 198 344 ! Control print 345 IF(lwp) THEN 199 IF(lwp) THEN ! Control print 346 200 WRITE(numout,*) 347 WRITE(numout,*) 'albedo_init : albedo'201 WRITE(numout,*) 'albedo_init : set albedo parameters from namelist namalb' 348 202 WRITE(numout,*) '~~~~~~~~~~~' 349 WRITE(numout,*) ' Namelist namalb : set albedo parameters' 350 WRITE(numout,*) 351 WRITE(numout,*) ' correction of the snow or ice albedo to take into account cgren = ', cgren 352 WRITE(numout,*) ' albedo of melting ice in the arctic and antarctic albice = ', albice 353 WRITE(numout,*) ' coefficients for linear alphd = ', alphd 354 WRITE(numout,*) ' interpolation used to compute albedo alphdi = ', alphdi 355 WRITE(numout,*) ' between two extremes values (Pyane, 1972) alphc = ', alphc 356 WRITE(numout,*) 203 WRITE(numout,*) ' correction for snow and ice albedo cgren = ', cgren 204 WRITE(numout,*) ' albedo of melting ice in the arctic and antarctic albice = ', albice 205 WRITE(numout,*) ' coefficients for linear alphd = ', alphd 206 WRITE(numout,*) ' interpolation used to compute albedo alphdi = ', alphdi 207 WRITE(numout,*) ' between two extremes values (Pyane, 1972) alphc = ', alphc 357 208 ENDIF 358 209 ! 359 210 END SUBROUTINE albedo_init 211 360 212 !!====================================================================== 361 213 END MODULE albedo -
trunk/NEMO/OPA_SRC/SBC/cpl_oasis3.F90
r719 r888 45 45 USE daymod ! date and time info 46 46 USE dom_oce ! ocean space and time domain 47 USE sbc_ice ! surface boundary condition: ice 47 48 USE in_out_manager ! I/O manager 48 49 USE par_oce ! … … 50 51 51 52 USE oce, only: tn, un, vn 52 USE ice, only: frld, hicif, hsnif 53 USE flx_oce, only : alb_ice , & ! albedo of ice54 tn_ice ! ice surface temperature 53 #if defined key_lim2 54 USE ice_2, only: frld, hicif, hsnif 55 #endif 55 56 56 57 IMPLICIT NONE … … 116 117 !!---------------------------------------------------------------------- 117 118 !! OPA 9.0 , LOCEAN-IPSL (2006) 118 !! $ Header$119 !! $Id$ 119 120 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 120 121 !!---------------------------------------------------------------------- … … 309 310 310 311 #if defined key_cpl_albedo 312 # if defined key_lim3 313 Must be adapted for LIM3 314 # endif 311 315 tn_ice = 271.285 312 316 alb_ice = 0.75 -
trunk/NEMO/OPA_SRC/SBC/cpl_oasis4.F90
r719 r888 120 120 !!---------------------------------------------------------------------- 121 121 !! OPA 9.0 , LOCEAN-IPSL (2006) 122 !! $ Header$122 !! $ Id: $ 123 123 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 124 124 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/SBC/oasis4_date.F90
r719 r888 11 11 !!---------------------------------------------------------------------- 12 12 !! OPA 9.0 , LOCEAN-IPSL (2006) 13 !! $ Header$13 !! $ Id: $ 14 14 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 15 15 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90
r833 r888 1 1 MODULE traadv_cen2 2 !!====================================================================== ========3 !! 2 !!====================================================================== 3 !! *** MODULE traadv_cen2 *** 4 4 !! Ocean active tracers: horizontal & vertical advective trend 5 !!============================================================================== 6 !! History : 8.2 ! 01-08 (G. Madec, E. Durand) trahad+trazad = traadv 7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 9 !! " " ! 06-04 (R. Benshila, G. Madec) Step reorganization 5 !!====================================================================== 6 !! History : 8.2 ! 01-08 (G. Madec, E. Durand) trahad+trazad=traadv 7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 8 !! 9.0 ! 04-08 (C. Talandier) New trends organization 9 !! " " ! 05-11 (V. Garnier) Surface pressure gradient organization 10 !! " " ! 06-04 (R. Benshila, G. Madec) Step reorganization 11 !! " " ! 06-07 (G. madec) add ups_orca_set routine 10 12 !!---------------------------------------------------------------------- 11 13 … … 13 15 !! tra_adv_cen2 : update the tracer trend with the horizontal and 14 16 !! vertical advection trends using a seconder order 17 !! ups_orca_set : allow mixed upstream/centered scheme in specific 18 !! area (set for orca 2 and 4 only) 15 19 !!---------------------------------------------------------------------- 16 20 USE oce ! ocean dynamics and active tracers 17 21 USE dom_oce ! ocean space and time domain 22 USE sbc_oce ! surface boundary condition: ocean 23 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 24 USE trdmod_oce ! ocean variables trends 18 25 USE trdmod ! ocean active tracers trends 19 USE trdmod_oce ! ocean variables trends 20 USE flxrnf ! 26 USE closea ! closed sea 21 27 USE trabbl ! advective term in the BBL 22 28 USE ocfzpt ! 29 USE sbcrnf ! river runoffs 30 USE in_out_manager ! I/O manager 23 31 USE lib_mpp 24 32 USE lbclnk ! ocean lateral boundary condition (or mpp link) 25 USE in_out_manager ! I/O manager26 33 USE diaptr ! poleward transport diagnostics 27 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient28 34 USE prtctl ! Print control 29 35 … … 31 37 PRIVATE 32 38 33 PUBLIC tra_adv_cen2 ! routine called by step.F90 39 PUBLIC tra_adv_cen2 ! routine called by step.F90 40 PUBLIC ups_orca_set ! routine used by traadv_cen2_jki.F90 41 42 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: upsmsk !: mixed upstream/centered scheme near some straits 43 ! ! and in closed seas (orca 2 and 4 configurations) 34 44 35 45 REAL(wp), DIMENSION(jpi,jpj) :: btr2 ! inverse of T-point surface [1/(e1t*e2t)] … … 39 49 # include "vectopt_loop_substitute.h90" 40 50 !!---------------------------------------------------------------------- 41 !! OPA 9.0 , LOCEAN-IPSL (200 5)42 !! $ Header$51 !! OPA 9.0 , LOCEAN-IPSL (2006) 52 !! $Id$ 43 53 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 44 54 !!---------------------------------------------------------------------- … … 118 128 !! 119 129 INTEGER :: ji, jj, jk ! dummy loop indices 120 REAL(wp) :: & 121 zbtr, zta, zsa, zfui, zfvj, & ! temporary scalars 122 zhw, ze3tr, zcofi, zcofj, & ! " " 123 zupsut, zupsvt, zupsus, zupsvs, & ! " " 124 zfp_ui, zfp_vj, zfm_ui, zfm_vj, & ! " " 125 zcofk, zupst, zupss, zcent, & ! " " 126 zcens, zfp_w, zfm_w, & ! " " 127 zcenut, zcenvt, zcenus, zcenvs, & ! " " 128 z_hdivn_x, z_hdivn_y, z_hdivn 129 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwz, ztrdt, zind ! 3D workspace 130 REAL(wp) :: zta, zsa, zbtr, zhw, ze3tr, & ! temporary scalars 131 & zfp_ui, zfp_vj, zfp_w , zfui , & ! " " 132 & zfm_ui, zfm_vj, zfm_w , zfvj , & ! " " 133 & zcofi , zcofj , zcofk , & ! " " 134 & zupsut, zupsus, zcenut, zcenus, & ! " " 135 & zupsvt, zupsvs, zcenvt, zcenvs, & ! " " 136 & zupst , zupss , zcent , zcens , & ! " " 137 & z_hdivn_x, z_hdivn_y, z_hdivn 138 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zwz, ztrdt, zind ! 3D workspace 130 139 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zww, ztrds ! " " 131 140 !!---------------------------------------------------------------------- … … 136 145 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~ Vector optimization case' 137 146 IF(lwp) WRITE(numout,*) 138 ! 139 btr2(:,:) = 1. / ( e1t(:,:) * e2t(:,:) ) 147 ! 148 upsmsk(:,:) = 0.e0 ! not upstream by default 149 IF( cp_cfg == "orca" ) CALL ups_orca_set ! set mixed Upstream/centered scheme near some straits 150 ! ! and in closed seas (orca2 and orca4 only) 151 ! 152 btr2(:,:) = 1. / ( e1t(:,:) * e2t(:,:) ) ! inverse of T-point surface 140 153 ENDIF 141 154 … … 145 158 DO jj = 1, jpj 146 159 DO ji = 1, jpi 147 zind(ji,jj,jk) = MAX ( upsrnfh(ji,jj) * upsrnfz(jk), & ! changing advection scheme near runoff 148 & upsadv(ji,jj) & ! in the vicinity of some straits 160 zind(ji,jj,jk) = MAX ( & 161 rnfmsk(ji,jj) * rnfmsk_z(jk), & ! near runoff mouths (& closed sea outflows) 162 upsmsk(ji,jj) & ! some of some straits 149 163 #if defined key_lim3 || defined key_lim2 150 & , tmask(ji,jj,jk) & ! half upstream tracer fluxes 151 & * MAX( 0., SIGN( 1., fzptn(ji,jj) & ! if tn < ("freezing"+0.1 ) 152 & +0.1-tn(ji,jj,jk) ) ) & 164 ! ! below ice covered area (if tn < "freezing"+0.1 ) 165 , MAX( 0., SIGN( 1., fzptn(ji,jj) + 0.1 - tn(ji,jj,jk) ) ) * tmask(ji,jj,jk) & 153 166 #endif 154 167 & ) … … 157 170 END DO 158 171 159 160 ! Horizontal advective fluxes 161 ! ----------------------------- 172 ! I. Horizontal advective fluxes 173 ! ------------------------------ 174 ! Second order centered tracer flux at u and v-points 175 ! ----------------------------------------------------- 162 176 ! ! =============== 163 177 DO jk = 1, jpkm1 ! Horizontal slab … … 278 292 & tab3d_2=sa, clinfo2= ' Sa: ', mask2=tmask, clinfo3='tra' ) 279 293 280 ! 4."zonal" mean advective heat and salt transport281 ! ---------------------------------------------- ---294 ! "zonal" mean advective heat and salt transport 295 ! ---------------------------------------------- 282 296 283 297 IF( ln_diaptr .AND. ( MOD( kt, nf_ptr ) == 0 ) ) THEN … … 312 326 ENDIF 313 327 314 ! 1. Vertical advective fluxes 328 ! 1. Vertical advective fluxes 315 329 ! ---------------------------- 316 330 ! Second order centered tracer flux at w-point … … 386 400 ! 387 401 END SUBROUTINE tra_adv_cen2 402 403 404 SUBROUTINE ups_orca_set 405 !!---------------------------------------------------------------------- 406 !! *** ROUTINE ups_orca_set *** 407 !! 408 !! ** Purpose : add a portion of upstream scheme in area where the 409 !! centered scheme generates too strong overshoot 410 !! 411 !! ** Method : orca (R4 and R2) confiiguration setting. Set upsmsk 412 !! array to nozero value in some straith. 413 !! 414 !! ** Action : - upsmsk set to 1 at some strait, 0 elsewhere for orca 415 !!---------------------------------------------------------------------- 416 INTEGER :: ii0, ii1, ij0, ij1 ! temporary integers 417 !!---------------------------------------------------------------------- 418 419 ! mixed upstream/centered scheme near river mouths 420 ! ------------------------------------------------ 421 SELECT CASE ( jp_cfg ) 422 ! ! ======================= 423 CASE ( 4 ) ! ORCA_R4 configuration 424 ! ! ======================= 425 ! ! Gibraltar Strait 426 ii0 = 70 ; ii1 = 71 427 ij0 = 52 ; ij1 = 53 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50 428 ! 429 ! ! ======================= 430 CASE ( 2 ) ! ORCA_R2 configuration 431 ! ! ======================= 432 ! ! Gibraltar Strait 433 ij0 = 102 ; ij1 = 102 434 ii0 = 138 ; ii1 = 138 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.20 435 ii0 = 139 ; ii1 = 139 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.40 436 ii0 = 140 ; ii1 = 140 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50 437 ij0 = 101 ; ij1 = 102 438 ii0 = 141 ; ii1 = 141 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50 439 ! ! Bab el Mandeb Strait 440 ij0 = 87 ; ij1 = 88 441 ii0 = 164 ; ii1 = 164 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.10 442 ij0 = 88 ; ij1 = 88 443 ii0 = 163 ; ii1 = 163 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25 444 ii0 = 162 ; ii1 = 162 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.40 445 ii0 = 160 ; ii1 = 161 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50 446 ij0 = 89 ; ij1 = 89 447 ii0 = 158 ; ii1 = 160 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25 448 ij0 = 90 ; ij1 = 90 449 ii0 = 160 ; ii1 = 160 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25 450 ! ! Sound Strait 451 ij0 = 116 ; ij1 = 116 452 ii0 = 144 ; ii1 = 144 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25 453 ii0 = 145 ; ii1 = 147 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.50 454 ii0 = 148 ; ii1 = 148 ; upsmsk( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) = 0.25 455 ! 456 END SELECT 457 458 ! mixed upstream/centered scheme over closed seas 459 ! ----------------------------------------------- 460 CALL clo_ups( upsmsk(:,:) ) 461 ! 462 END SUBROUTINE ups_orca_set 388 463 389 464 !!====================================================================== -
trunk/NEMO/OPA_SRC/TRA/traadv_qck.F90
r789 r888 14 14 USE oce ! ocean dynamics and active tracers 15 15 USE dom_oce ! ocean space and time domain 16 USE dynspg_oce ! 17 USE trdmod_oce ! ocean variables trends 16 18 USE trdmod ! ocean active tracers trends 17 USE trdmod_oce ! ocean variables trends18 USE flxrnf !19 19 USE trabbl ! advective term in the BBL 20 USE ocfzpt !21 20 USE lib_mpp 22 21 USE lbclnk ! ocean lateral boundary condition (or mpp link) 23 22 USE in_out_manager ! I/O manager 24 23 USE diaptr ! poleward transport diagnostics 25 USE dynspg_oce !26 24 USE prtctl ! Print control 27 25 … … 47 45 !!---------------------------------------------------------------------- 48 46 !! OPA 9.0 , LOCEAN-IPSL (2005) 49 !! $ Header$47 !! $Id$ 50 48 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 51 49 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/TRA/tranxt.F90
r782 r888 21 21 USE dom_oce ! ocean space and time domain variables 22 22 USE zdf_oce ! ??? 23 USE dynspg_oce ! surface pressure gradient variables 24 USE trdmod_oce ! ocean variables trends 25 USE trdmod ! ocean active tracers trends 26 USE phycst 27 USE domvvl ! variable volume 28 USE obctra ! open boundary condition (obc_tra routine) 23 29 USE in_out_manager ! I/O manager 24 30 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 25 USE obctra ! open boundary condition (obc_tra routine)26 USE trdmod ! ocean active tracers trends27 USE trdmod_oce ! ocean variables trends28 31 USE prtctl ! Print control 29 32 USE agrif_opa_update 30 33 USE agrif_opa_interp 31 34 32 USE ocesbc ! ocean surface boundary condition33 USE domvvl ! variable volume34 USE dynspg_oce ! surface pressure gradient variables35 USE phycst36 35 37 36 IMPLICIT NONE … … 47 46 !!---------------------------------------------------------------------- 48 47 !! OPA 9.0 , LOCEAN-IPSL (2006) 49 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/TRA/tranxt.F90,v 1.12 2007/05/25 15:51:50 opalod Exp $48 !! $Id$ 50 49 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 50 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/TRA/traqsr.F90
r719 r888 17 17 USE oce ! ocean dynamics and active tracers 18 18 USE dom_oce ! ocean space and time domain 19 USE sbc_oce ! surface boundary condition: ocean 20 USE trc_oce ! share SMS/Ocean variables 21 USE trdmod_oce ! ocean variables trends 19 22 USE trdmod ! ocean active tracers trends 20 USE trdmod_oce ! ocean variables trends21 23 USE in_out_manager ! I/O manager 22 USE trc_oce ! share SMS/Ocean variables23 USE ocesbc ! thermohaline fluxes24 24 USE phycst ! physical constants 25 25 USE prtctl ! Print control … … 46 46 !!---------------------------------------------------------------------- 47 47 !! OPA 9.0 , LOCEAN-IPSL (2005) 48 !! $ Header$48 !! $Id$ 49 49 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 50 50 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/TRA/trasbc.F90
r719 r888 13 13 !!---------------------------------------------------------------------- 14 14 USE oce ! ocean dynamics and active tracers 15 USE sbc_oce ! surface boundary condition: ocean 15 16 USE dom_oce ! ocean space domain variables 16 USE ocesbc ! surface thermohaline fluxes17 17 USE phycst ! physical constant 18 18 USE traqsr ! solar radiation penetration … … 32 32 !!---------------------------------------------------------------------- 33 33 !! OPA 9.0 , LOCEAN-IPSL (2005) 34 !! $ Header$34 !! $Id$ 35 35 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 36 36 !!---------------------------------------------------------------------- … … 132 132 #endif 133 133 IF( lk_vvl) THEN 134 zta = ro0cpr * ( qt(ji,jj) - qsr(ji,jj) ) * zse3t &! temperature : heat flux134 zta = ro0cpr * qns(ji,jj) * zse3t & ! temperature : heat flux 135 135 & - emp(ji,jj) * zsrau * tn(ji,jj,1) * zse3t ! & cooling/heating effet of EMP flux 136 136 zsa = 0.e0 ! No salinity concent./dilut. effect 137 137 ELSE 138 zta = ro0cpr * ( qt(ji,jj) - qsr(ji,jj)) * zse3t ! temperature : heat flux138 zta = ro0cpr * qns(ji,jj) * zse3t ! temperature : heat flux 139 139 zsa = emps(ji,jj) * zsrau * sn(ji,jj,1) * zse3t ! salinity : concent./dilut. effect 140 140 ENDIF -
trunk/NEMO/OPA_SRC/TRA/trazdf.F90
r789 r888 14 14 USE dom_oce ! ocean space and time domain variables 15 15 USE zdf_oce ! ocean vertical physics variables 16 USE sbc_oce ! surface boundary condition: ocean 17 USE dynspg_oce 16 18 17 19 USE trazdf_exp ! vertical diffusion: explicit (tra_zdf_exp routine) … … 25 27 26 28 USE phycst 27 USE dynspg_oce28 USE ocesbc ! ocean surface boundary condition29 29 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 30 30 USE domvvl ! variable volume … … 47 47 !!---------------------------------------------------------------------- 48 48 !! OPA 9.0 , LOCEAN-IPSL (2005) 49 !! $ Header$49 !! $Id$ 50 50 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 51 51 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/TRD/trdmod.F90
r719 r888 12 12 !! trd_mod_init : Initialization step 13 13 !!---------------------------------------------------------------------- 14 USE phycst ! physical constants15 14 USE oce ! ocean dynamics and tracers variables 16 15 USE dom_oce ! ocean space and time domain variables … … 18 17 USE trdmod_oce ! ocean variables trends 19 18 USE ldftra_oce ! ocean active tracers lateral physics 19 USE sbc_oce ! surface boundary condition: ocean 20 USE phycst ! physical constants 20 21 USE trdvor ! ocean vorticity trends 21 22 USE trdicp ! ocean bassin integral constraints properties 22 23 USE trdmld ! ocean active mixed layer tracers trends 23 24 USE in_out_manager ! I/O manager 24 USE taumod ! surface ocean stress25 25 26 26 IMPLICIT NONE … … 37 37 !!---------------------------------------------------------------------- 38 38 !! OPA 9.0 , LOCEAN-IPSL (2005) 39 !! $ Header$39 !! $Id$ 40 40 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 41 41 !!---------------------------------------------------------------------- … … 124 124 DO ji = fs_2, fs_jpim1 ! vector opt. 125 125 ! save the surface forcing momentum fluxes 126 ztswu(ji,jj) = taux(ji,jj) / ( fse3u(ji,jj,1)*rau0 )127 ztswv(ji,jj) = tauy(ji,jj) / ( fse3v(ji,jj,1)*rau0 )126 ztswu(ji,jj) = utau(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) 127 ztswv(ji,jj) = vtau(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) 128 128 ! save bottom friction momentum fluxes 129 129 ikbu = MIN( mbathy(ji+1,jj ), mbathy(ji,jj) ) … … 175 175 DO ji = fs_2, fs_jpim1 ! vector opt. 176 176 ! save the surface forcing momentum fluxes 177 ztswu(ji,jj) = taux(ji,jj) / ( fse3u(ji,jj,1)*rau0 )178 ztswv(ji,jj) = tauy(ji,jj) / ( fse3v(ji,jj,1)*rau0 )177 ztswu(ji,jj) = utau(ji,jj) / ( fse3u(ji,jj,1)*rau0 ) 178 ztswv(ji,jj) = vtau(ji,jj) / ( fse3v(ji,jj,1)*rau0 ) 179 179 ! save bottom friction momentum fluxes 180 180 ikbu = MIN( mbathy(ji+1,jj ), mbathy(ji,jj) ) -
trunk/NEMO/OPA_SRC/ZDF/zdfkpp.F90
r719 r888 21 21 USE dom_oce ! ocean space and time domain 22 22 USE zdf_oce ! ocean vertical physics 23 USE sbc_oce ! surface boundary condition: ocean 23 24 USE phycst ! physical constants 24 USE taumod ! surface stress25 25 USE eosbn2 ! equation of state 26 USE ocesbc ! thermohaline fluxes27 26 USE zdfddm ! double diffusion mixing 28 27 USE in_out_manager ! I/O manager … … 148 147 !!---------------------------------------------------------------------- 149 148 !! OPA 9.0 , LOCEAN-IPSL (2005) 150 !! $ Header$149 !! $Id$ 151 150 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 152 151 !!---------------------------------------------------------------------- … … 460 459 zBosol(ji,jj) = grav * zthermal * qsr(ji,jj) 461 460 ! Non radiative surface buoyancy force 462 zBo (ji,jj) = grav * zthermal * ( qt(ji,jj) - qsr(ji,jj)) - grav * zhalin * emp(ji,jj)461 zBo (ji,jj) = grav * zthermal * qns(ji,jj) - grav * zhalin * emp(ji,jj) 463 462 ! Surface Temperature flux for non-local term 464 wt0(ji,jj) = - qt(ji,jj)* ro0cpr * tmask(ji,jj,1)463 wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* ro0cpr * tmask(ji,jj,1) 465 464 ! Surface salinity flux for non-local term 466 465 ws0(ji,jj) = - ( emp(ji,jj) * sn(ji,jj,1) * rcs ) * tmask(ji,jj,1) … … 476 475 zrhos = rhop(ji,jj,1) + zflageos * rau0 * ( 1. - tmask(ji,jj,1) ) 477 476 ! Friction velocity (zustar), at T-point : LMD94 eq. 2 478 ztx = 0.5 * ( taux(ji,jj) + taux(ji - 1, jj ) )479 zty = 0.5 * ( tauy(ji,jj) + tauy(ji , jj - 1) )477 ztx = 0.5 * ( utau(ji,jj) + utau(ji - 1, jj ) ) 478 zty = 0.5 * ( vtau(ji,jj) + vtau(ji , jj - 1) ) 480 479 ztau = SQRT( ztx * ztx + zty * zty ) 481 480 zustar(ji,jj) = SQRT( ztau / ( zrhos + epsln ) ) -
trunk/NEMO/OPA_SRC/ZDF/zdftke.F90
r789 r888 31 31 USE dom_oce ! ocean space and time domain 32 32 USE zdf_oce ! ocean vertical physics 33 USE sbc_oce ! surface boundary condition: ocean 33 34 USE phycst ! physical constants 34 USE taumod ! surface stress35 35 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 36 36 USE prtctl ! Print control … … 79 79 !!---------------------------------------------------------------------- 80 80 !! OPA 9.0 , LOCEAN-IPSL (2006) 81 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/ZDF/zdftke.F90,v 1.16 2007/06/05 10:39:27 opalod Exp $81 !! $Id$ 82 82 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 83 83 !!---------------------------------------------------------------------- … … 99 99 !! - ediss / emxl en**(2/3) ! dissipation 100 100 !! with the boundary conditions: 101 !! surface: en = max( emin0,ebb sqrt( taux^2 + tauy^2) )101 !! surface: en = max( emin0,ebb sqrt(utau^2 + vtau^2) ) 102 102 !! bottom : en = emin 103 103 !! -1- The dissipation and mixing turbulent lengh scales are computed … … 299 299 ! 2. Surface boundary condition on tke and its eddy viscosity (zmxlm) 300 300 ! ------------------------------------------------- 301 ! en(1) = ebb sqrt( taux^2+tauy^2) / rau0 (min value emin0)301 ! en(1) = ebb sqrt(utau^2+vtau^2) / rau0 (min value emin0) 302 302 ! zmxlm(1) = avmb(1) and zmxlm(jpk) = 0. 303 303 !CDIR NOVERRCHK … … 305 305 !CDIR NOVERRCHK 306 306 DO ji = fs_2, fs_jpim1 ! vector opt. 307 ztx2 = taux(ji-1,jj ) + taux(ji,jj)308 zty2 = tauy(ji ,jj-1) + tauy(ji,jj)307 ztx2 = utau(ji-1,jj ) + utau(ji,jj) 308 zty2 = vtau(ji ,jj-1) + vtau(ji,jj) 309 309 zesurf = zbbrau * SQRT( ztx2 * ztx2 + zty2 * zty2 ) 310 310 en (ji,jj,1) = MAX( zesurf, emin0 ) * tmask(ji,jj,1) -
trunk/NEMO/OPA_SRC/cla.F90
r719 r888 19 19 USE oce ! ocean dynamics and tracers variables 20 20 USE dom_oce ! ocean space and time domain variables 21 USE sbc_oce ! surface boundary condition: ocean 21 22 USE in_out_manager ! I/O manager 22 23 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE ocesbc ! ocean surface boundary condition (fluxes)24 24 USE lib_mpp ! distributed memory computing 25 25 … … 48 48 !!---------------------------------------------------------------------- 49 49 !! OPA 9.0 , LOCEAN-IPSL (2005) 50 !! $ Header$50 !! $Id$ 51 51 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 52 52 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/cla_div.F90
r719 r888 18 18 USE oce ! ocean dynamics and tracers 19 19 USE dom_oce ! ocean space and time domain 20 USE sbc_oce ! surface boundary condition: ocean 20 21 USE in_out_manager ! I/O manager 21 USE ocesbc ! ocean surface boundary condition (fluxes)22 22 USE lib_mpp ! distributed memory computing library 23 23 USE lbclnk ! ocean lateral boundary conditions (or mpp link) … … 45 45 !!---------------------------------------------------------------------- 46 46 !! OPA 9.0 , LOCEAN-IPSL (2005) 47 !! $ Header$47 !! $Id$ 48 48 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 49 49 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/cla_dynspg.F90
r719 r888 13 13 USE obc_oce ! Lateral open boundary condition 14 14 USE sol_oce ! solver variables 15 USE sbc_oce ! surface boundary condition: ocean 15 16 USE phycst ! physical constants 16 USE ocesbc ! ocean surface boundary condition (fluxes)17 USE flxrnf ! ocean runoffs18 17 USE solpcg ! preconditionned conjugate gradient solver 19 18 USE solsor ! Successive Over-relaxation solver … … 36 35 !!---------------------------------------------------------------------- 37 36 !! OPA 9.0 , LOCEAN-IPSL (2005) 38 !! $ Header$37 !! $Id$ 39 38 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 40 39 !!---------------------------------------------------------------------- -
trunk/NEMO/OPA_SRC/cpl_oce.F90
r833 r888 16 16 !!---------------------------------------------------------------------- 17 17 !! OPA 9.0 , LOCEAN-IPSL (2005) 18 !! $ Header$18 !! $Id$ 19 19 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 20 20 !!---------------------------------------------------------------------- … … 218 218 qsrc !: solar radiation (w m-2) 219 219 220 # if defined key_lim3 || defined key_lim 3220 # if defined key_lim3 || defined key_lim2 221 221 REAL(wp), DIMENSION(jpi,jpj) :: & !: 222 222 watm , & !: -
trunk/NEMO/OPA_SRC/daymod.F90
r719 r888 4 4 !! Ocean : calendar 5 5 !!===================================================================== 6 !! History : ! 94-09 (M. Pontaud M. Imbard) Original code 7 !! ! 97-03 (O. Marti) 8 !! ! 97-05 (G. Madec) 9 !! ! 97-08 (M. Imbard) 10 !! 9.0 ! 03-09 (G. Madec) F90 + nyear, nmonth, nday 11 !! ! 04-01 (A.M. Treguier) new calculation based on adatrj 12 !! ! 06-08 (G. Madec) surface module major update 13 !!---------------------------------------------------------------------- 6 14 7 15 !!---------------------------------------------------------------------- 8 16 !! day : calendar 9 17 !!---------------------------------------------------------------------- 10 !! * Modules used11 18 USE dom_oce ! ocean space and time domain 12 19 USE phycst ! physical constants … … 17 24 PRIVATE 18 25 19 !! * Routine accessibility20 26 PUBLIC day ! called by step.F90 21 27 22 !! * Shared module variables 23 INTEGER , PUBLIC :: & !: 24 nyear , & !: current year 25 nmonth , & !: current month 26 nday , & !: current day of the month 27 nday_year , & !: curent day counted from jan 1st of the current year 28 ndastp !: time step date in year/month/day aammjj 29 REAL(wp), PUBLIC :: & !: 30 adatrj , & !: number of elapsed days since the begining of the run 31 adatrj0 !: value of adatrj at nit000-1 (before the present run). 32 ! ! it is the accumulated duration of previous runs 33 ! ! that may have been run with different time steps. 34 !!---------------------------------------------------------------------- 35 !! OPA 9.0 , LOCEAN-IPSL (2005) 36 !! $Header$ 37 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 28 INTEGER , PUBLIC :: nyear !: current year 29 INTEGER , PUBLIC :: nmonth !: current month 30 INTEGER , PUBLIC :: nday !: current day of the month 31 INTEGER , PUBLIC :: nday_year !: current day counted from jan 1st of the current year 32 REAL(wp), PUBLIC :: rsec_year !: current time step counted in second since 00h jan 1st of the current year 33 REAL(wp), PUBLIC :: rsec_month !: current time step counted in second since 00h 1st day of the current month 34 REAL(wp), PUBLIC :: rsec_day !: current time step counted in second since 00h of the current day 35 INTEGER , PUBLIC :: ndastp !: time step date in year/month/day aammjj 36 37 !!gm supprimer adatrj et adatrj0 ==> remplacer par rsecday..... 38 REAL(wp), PUBLIC :: adatrj !: number of elapsed days since the begining of the run 39 REAL(wp), PUBLIC :: adatrj0 !: value of adatrj at nit000-1 (before the present run). 40 ! ! it is the accumulated duration of previous runs 41 ! ! that may have been run with different time steps. 42 INTEGER , PUBLIC, DIMENSION(0:13) :: nmonth_len !: length of the current year 43 44 INTEGER, PUBLIC, DIMENSION(12) :: nbiss = (/ 31, 29, 31, 30, 31, 30, & !: number of days per month 45 & 31, 31, 30, 31, 30, 31 /) !: (leap-year) 46 INTEGER, PUBLIC, DIMENSION(12) :: nobis = (/ 31, 28, 31, 30, 31, 30, & !: number of days per month 47 & 31, 31, 30, 31, 30, 31 /) !: (365 days a year) 48 49 REAL(wp), PUBLIC, DIMENSION(0:14) :: rmonth_half(0:14) 50 51 !!---------------------------------------------------------------------- 52 !! OPA 9.0 , LOCEAN-IPSL (2006) 53 !! $Id$ 54 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 38 55 !!---------------------------------------------------------------------- 39 56 … … 54 71 !! - ndastp : =nyear*10000+nmonth*100+nday 55 72 !! - adatrj : date in days since the beginning of the run 56 !! 57 !! History : 58 !! ! 94-09 (M. Pontaud M. Imbard) Original code 59 !! ! 97-03 (O. Marti) 60 !! ! 97-05 (G. Madec) 61 !! ! 97-08 (M. Imbard) 62 !! 9.0 ! 03-09 (G. Madec) F90 + nyear, nmonth, nday 63 !! ! 04-01 (A.M. Treguier) new calculation based on adatrj 73 !! - rsec_year : current time of the year (in second since 00h, jan 1st) 64 74 !!---------------------------------------------------------------------- 65 !! * Arguments 66 INTEGER, INTENT( in ) :: kt ! ocean time-step indices 67 68 !! * Local declarations 69 INTEGER :: js ! dummy loop indice 70 INTEGER :: iend, iday0, iday1 ! temporary integers 71 REAL(wp) :: zadatrjn, zadatrjb ! adatrj at timestep kt-1 and kt-2 72 CHARACTER (len=25) :: charout 75 INTEGER, INTENT(in) :: kt ! ocean time-step indices 76 ! 77 INTEGER :: js, jm ! dummy loop indice 78 CHARACTER (len=25) :: charout 73 79 !!---------------------------------------------------------------------- 74 80 … … 77 83 !----------------------------------------------------------------- 78 84 79 IF( kt == nit000 ) THEN 80 85 ! ! ---------------- ! 86 IF( kt == -1 ) THEN ! Initialisation ! 87 ! ! ---------------- ! 88 ! 81 89 IF( .NOT.ln_rstart ) adatrj0 = 0.e0 ! adatrj0 initialized in rst_read when restart 82 90 83 adatrj = adatrj0 91 ! set the calandar from adatrj0 and ndastp (read in restart file and namelist) 92 adatrj = adatrj0 !???? bug.... toujours rest !!gm 84 93 nyear = ndastp / 10000 85 94 nmonth = ( ndastp - (nyear * 10000) ) / 100 86 95 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 87 96 88 ! Calculates nday_year, day since january 1st (useful to read daily forcing fields) 97 ! length of the month of the current year (from nleapy, read in namelist) 98 nmonth_len(0) = nbiss(12) ; nmonth_len(13) = nbiss(1) 99 SELECT CASE( nleapy ) 100 CASE( 1 ) 101 IF( MOD( nyear, 4 ) == 0 ) THEN 102 ; nmonth_len(1:12) = nbiss(:) ! 366 days per year (leap year) 103 ELSE 104 ; nmonth_len(1:12) = nobis(:) ! 365 days per year 105 ENDIF 106 CASE( 0 ) ; nmonth_len(1:12) = nobis(:) ! 365 days per year 107 CASE( 2: ) ; nmonth_len(1:13) = nleapy ! 12*nleapy days per year 108 END SELECT 109 110 ! half month in second since the bigining of the year 111 rmonth_half(0) = - 0.5 * rday * REAL( nmonth_len( 0 ) ) 112 DO jm = 1, 12 113 rmonth_half(jm) = rmonth_half(jm-1) + 0.5 * rday * REAL( nmonth_len(jm-1) + nmonth_len(jm) ) 114 END DO 115 rmonth_half(13) = rmonth_half( 1 ) + 365. * rday 116 rmonth_half(14) = rmonth_half( 2 ) + 365. * rday 117 118 ! day since january 1st (useful to read daily forcing fields) 89 119 nday_year = nday 90 ! ! accumulates days of previous months of this year 91 DO js = 1, nmonth-1 92 IF( nleapy == 1 .AND. MOD( nyear, 4 ) == 0 ) THEN 93 nday_year = nday_year + nbiss(js) 94 ELSE 95 nday_year = nday_year + nobis(js) 120 DO js = 1, nmonth - 1 ! accumulates days of previous months of this year 121 nday_year = nday_year + nmonth_len(js) 122 END DO 123 124 ! number of seconds since... 125 IF( ln_rstart ) THEN 126 rsec_year = REAL( nday_year ) * rday - rdttra(1) ! 00h 1st day of the current year 127 rsec_month = REAL( nday ) * rday - rdttra(1) ! 00h 1st day of the current month 128 rsec_day = REAL( nday ) * rday - rdttra(1) ! 00h of the current day 129 ELSE 130 rsec_year = REAL( nday_year - 1 ) * rday - rdttra(1) ! 00h 1st day of the current year 131 rsec_month = REAL( nday - 1 ) * rday - rdttra(1) ! 00h 1st day of the current month 132 rsec_day = - rdttra(1) ! 00h of the current day 133 ENDIF 134 135 ! control print 136 IF(lwp) WRITE(numout,*)' ==============>> time-step =', kt, ' Initial DATE Y/M/D = ', & 137 & nyear, '/', nmonth, '/', nday, ' rsec_day:', rsec_day 138 139 ! ! -------------------------------- ! 140 ELSE ! Model calendar at time-step kt ! 141 ! ! -------------------------------- ! 142 143 rsec_year = rsec_year + rdttra(1) ! New time-step 144 rsec_month = rsec_month + rdttra(1) ! New time-step 145 rsec_day = rsec_day + rdttra(1) ! New time-step 146 147 adatrj = adatrj0 + ( kt - nit000 + 1 ) * rdttra(1) / rday 148 149 IF( rsec_day >= rday ) THEN 150 ! 151 rsec_day = 0.e0 ! NEW day 152 nday = nday + 1 153 nday_year = nday_year + 1 154 ! 155 IF( nday == nmonth_len(nmonth) + 1 ) THEN ! NEW month 156 nday = 1 157 rsec_month = 0.e0 158 nmonth = nmonth + 1 159 IF( nmonth == 13 ) THEN ! NEW year 160 nyear = nyear + 1 161 nmonth = 1 162 nday_year = 1 163 rsec_year = 0.e0 164 ! ! update the length of the month 165 IF( nleapy == 1 ) THEN ! of the current year (if necessary) 166 IF( MOD( nyear, 4 ) == 0 ) THEN 167 nmonth_len(1:12) = nbiss(:) ! 366 days per year (leap year) 168 ELSE 169 nmonth_len(1:12) = nobis(:) ! 365 days per year 170 ENDIF 171 ! half month in second since the bigining of the year 172 rmonth_half(0) = - 0.5 * rday * REAL( nmonth_len( 0 ) ) 173 DO jm = 1, 12 174 rmonth_half(jm) = rmonth_half(jm-1) + 0.5 * rday * REAL( nmonth_len(jm-1) + nmonth_len(jm) ) 175 END DO 176 rmonth_half(13) = rmonth_half( 1 ) + 365. * rday 177 rmonth_half(14) = rmonth_half( 2 ) + 365. * rday 178 ENDIF 179 ENDIF 96 180 ENDIF 97 END DO 98 99 ENDIF 100 101 ! I. calculates adatrj, zadatrjn, zadatrjb. 102 ! ------------------------------------------------------------------ 103 104 adatrj = adatrj0 + ( kt - nit000 + 1 ) * rdttra(1) / rday 105 zadatrjn = adatrj0 + ( kt - nit000 ) * rdttra(1) / rday 106 zadatrjb = adatrj0 + ( kt - nit000 - 1 ) * rdttra(1) / rday 107 108 109 ! II. increment the date. The date corresponds to 'now' variables (kt-1), 110 ! which is the time step of forcing fields. 111 ! Do not do this at nit000 unless nrstdt= 2 112 ! In that case ndastp (read in restart) was for step nit000-2 113 ! ------------------------------------------------------------------- 114 115 iday0 = INT( zadatrjb ) 116 iday1 = INT( zadatrjn ) 117 118 IF( iday1 - iday0 >= 1 .AND. ( kt /= nit000 .OR. nrstdt == 2 ) ) THEN 119 120 ! increase calendar 121 nyear = ndastp / 10000 122 nmonth = ( ndastp - (nyear * 10000) ) / 100 123 nday = ndastp - (nyear * 10000) - ( nmonth * 100 ) 124 nday = nday + 1 125 IF( nleapy == 1 .AND. MOD( nyear, 4 ) == 0 ) THEN 126 iend = nbiss(nmonth) 127 ELSEIF( nleapy > 1 ) THEN 128 iend = nleapy 129 ELSE 130 iend = nobis(nmonth) 181 182 ! 183 ndastp = nyear * 10000 + nmonth * 100 + nday ! NEW date 184 ! 185 IF(lwp) WRITE(numout,'(a,i8,a,i4,a,i2,a,i2,a,i3)') '======>> time-step =', kt, & 186 & ' New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, ' nday_year = ', nday_year 187 IF(lwp) WRITE(numout,'(a,F9.0,a,F9.0,a,F9.0)') ' rsec_year = ', rsec_year, & 188 & ' rsec_month = ', rsec_month, ' rsec_day = ', rsec_day 131 189 ENDIF 132 IF( nday == iend + 1 ) THEN 133 nday = 1 134 nmonth = nmonth + 1 135 IF( nmonth == 13 ) THEN 136 nmonth = 1 137 nyear = nyear + 1 138 ENDIF 190 191 IF(ln_ctl) THEN 192 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 193 CALL prt_ctl_info(charout) 139 194 ENDIF 140 ndastp = nyear * 10000 + nmonth * 100 + nday 141 142 ! Calculates nday_year, day since january 1st (useful to read daily forcing fields) 143 nday_year = nday 144 ! ! accumulates days of previous months of this year 145 DO js = 1, nmonth-1 146 IF( nleapy == 1 .AND. MOD( nyear, 4 ) == 0 ) THEN 147 nday_year = nday_year + nbiss(js) 148 ELSE 149 nday_year = nday_year + nobis(js) 150 ENDIF 151 END DO 152 153 IF(lwp) WRITE(numout,*)' ==============>> time-step =', kt, ' New day, DATE= ', & 154 & nyear, '/', nmonth, '/', nday, 'nday_year:', nday_year 155 ENDIF 156 157 IF(ln_ctl) THEN 158 WRITE(charout,FMT="('kt =', I4,' d/m/y =',I2,I2,I4)") kt, nday, nmonth, nyear 159 CALL prt_ctl_info(charout, itime=kt) 195 ! 160 196 ENDIF 161 197 -
trunk/NEMO/OPA_SRC/eosbn2.F90
r789 r888 5 5 !! - Brunt-Vaisala frequency 6 6 !!============================================================================== 7 !! History : ! 89-03 (O. Marti) Original code 8 !! 6.0 ! 94-07 (G. Madec, M. Imbard) add bn2 9 !! 6.0 ! 94-08 (G. Madec) Add Jackett & McDougall eos 10 !! 7.0 ! 96-01 (G. Madec) statement function for e3 11 !! 8.1 ! 97-07 (G. Madec) introduction of neos, OPA8.1 12 !! 8.1 ! 97-07 (G. Madec) density instead of volumic mass 13 !! ! 99-02 (G. Madec, N. Grima) semi-implicit pressure gradient 14 !! ! 01-09 (M. Ben Jelloul) bugfix onlinear eos 15 !! 8.5 ! 02-10 (G. Madec) add eos_init 16 !! 8.5 ! 02-11 (G. Madec, A. Bozec) partial step, eos_insitu_2d 17 !! 9.0 ! 03-08 (G. Madec) F90, free form 18 !! 9.0 ! 06-08 (G. Madec) add tfreez function 19 !!---------------------------------------------------------------------- 7 20 8 21 !!---------------------------------------------------------------------- … … 13 26 !! eos_insitu_2d : Compute the in situ density for 2d fields 14 27 !! eos_bn2 : Compute the Brunt-Vaisala frequency 28 !! tfreez : Compute the surface freezing temperature 15 29 !! eos_init : set eos parameters (namelist) 16 30 !!---------------------------------------------------------------------- 17 !! * Modules used18 31 USE dom_oce ! ocean space and time domain 19 32 USE phycst ! physical constants … … 33 46 END INTERFACE 34 47 35 !! * Routine accessibility 36 PUBLIC eos ! called by step.F90, inidtr.F90, tranpc.F90 and intgrd.F90 37 PUBLIC bn2 ! called by step.F90 38 PUBLIC eos_init ! called by step.F90 39 40 !! * Share module variables 41 INTEGER , PUBLIC :: & !: nameos : ocean physical parameters 42 neos = 0, & !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 43 neos_init = 0 !: control flag for initialization 44 45 REAL(wp), PUBLIC :: & !: nameos : ocean physical parameters 46 ralpha = 2.0e-4, & !: thermal expension coeff. (linear equation of state) 47 rbeta = 7.7e-4 !: saline expension coeff. (linear equation of state) 48 PUBLIC eos ! called by step, istate, tranpc and zpsgrd modules 49 PUBLIC bn2 ! called by step module 50 PUBLIC tfreez ! called by sbcice_... modules 51 52 !!* Namelist (nameos) 53 INTEGER , PUBLIC :: neos = 0 !: = 0/1/2 type of eq. of state and Brunt-Vaisala frequ. 54 REAL(wp), PUBLIC :: ralpha = 2.0e-4 !: thermal expension coeff. (linear equation of state) 55 REAL(wp), PUBLIC :: rbeta = 7.7e-4 !: saline expension coeff. (linear equation of state) 56 NAMELIST/nameos/ neos, ralpha, rbeta 48 57 58 INTEGER :: neos_init = 0 !: control flag for initialization 59 49 60 !! * Substitutions 50 61 # include "domzgr_substitute.h90" 51 62 # include "vectopt_loop_substitute.h90" 52 63 !!---------------------------------------------------------------------- 53 !! OPA 9.0 , LOCEAN-IPSL (200 5)54 !! $ Header$55 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt64 !! OPA 9.0 , LOCEAN-IPSL (2006) 65 !! $Id$ 66 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 56 67 !!---------------------------------------------------------------------- 57 68 58 69 CONTAINS 59 70 60 SUBROUTINE eos_insitu 71 SUBROUTINE eos_insitu( ptem, psal, prd ) 61 72 !!---------------------------------------------------------------------- 62 73 !! *** ROUTINE eos_insitu *** … … 92 103 !! ** Action : compute prd , the in situ density (no units) 93 104 !! 94 !! References : 95 !! Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994 96 !! 97 !! History : 98 !! ! 89-03 (o. Marti) Original code 99 !! ! 94-08 (G. Madec) 100 !! ! 96-01 (G. Madec) statement function for e3 101 !! ! 97-07 (G. Madec) introduction of neos, OPA8.1 102 !! ! 97-07 (G. Madec) density instead of volumic mass 103 !! ! 99-02 (G. Madec, N. Grima) semi-implicit pressure gradient 104 !! ! 01-09 (M. Ben Jelloul) bugfix 105 !!---------------------------------------------------------------------- 106 !! * Arguments 107 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) :: & 108 ptem, & ! potential temperature 109 psal ! salinity 110 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) :: & 111 prd ! potential density (surface referenced) 112 113 !! * Local declarations 105 !! References : Jackett and McDougall, J. Atmos. Ocean. Tech., 1994 106 !!---------------------------------------------------------------------- 107 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: ptem ! potential temperature [Celcius] 108 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: psal ! salinity [psu] 109 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out) :: prd ! in situ density 110 !! 114 111 INTEGER :: ji, jj, jk ! dummy loop indices 115 112 REAL(wp) :: & … … 119 116 zd , zc , zaw, za , & ! " " 120 117 zb1, za1, zkw, zk0 ! " " 121 REAL(wp), DIMENSION(jpi,jpj,jpk) :: & 122 zws ! temporary workspace 123 !!---------------------------------------------------------------------- 124 125 126 ! initialization (in not already done) 127 IF( neos_init == 0 ) CALL eos_init 128 118 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zws ! temporary workspace 119 !!---------------------------------------------------------------------- 120 121 IF( neos_init == 0 ) CALL eos_init ! initialization (in not already done) 129 122 130 123 SELECT CASE ( neos ) 131 124 ! 132 125 CASE ( 0 ) ! Jackett and McDougall (1994) formulation 133 126 ! 134 127 !CDIR NOVERRCHK 135 128 zws(:,:,:) = SQRT( ABS( psal(:,:,:) ) ) 136 137 129 ! ! =============== 138 130 DO jk = 1, jpkm1 ! Horizontal slab … … 181 173 END DO ! End of slab 182 174 ! ! =============== 183 184 175 ! 185 176 CASE ( 1 ) ! Linear formulation function of temperature only 186 177 ! 187 178 ! ! =============== 188 179 DO jk = 1, jpkm1 ! Horizontal slab … … 199 190 END DO ! End of slab 200 191 ! ! =============== 201 202 192 ! 203 193 CASE ( 2 ) ! Linear formulation function of temperature and salinity 204 194 ! 205 195 ! ! =============== 206 196 DO jk = 1, jpkm1 ! Horizontal slab … … 217 207 END DO ! End of slab 218 208 ! ! =============== 219 209 ! 220 210 CASE DEFAULT 221 211 ! 222 212 WRITE(ctmp1,*) ' bad flag value for neos = ', neos 223 213 CALL ctl_stop( ctmp1 ) 224 214 ! 225 215 END SELECT 226 227 IF(ln_ctl) THEN 228 CALL prt_ctl(tab3d_1=prd, clinfo1=' eos : ', ovlap=1, kdim=jpk) 229 ENDIF 230 216 ! 217 IF(ln_ctl) CALL prt_ctl(tab3d_1=prd, clinfo1=' eos : ', ovlap=1, kdim=jpk) 218 ! 231 219 END SUBROUTINE eos_insitu 232 220 233 221 234 SUBROUTINE eos_insitu_pot ( ptem, psal, prd, prhop)222 SUBROUTINE eos_insitu_pot( ptem, psal, prd, prhop ) 235 223 !!---------------------------------------------------------------------- 236 224 !! *** ROUTINE eos_insitu_pot *** … … 275 263 !! - prhop, the potential volumic mass (Kg/m3) 276 264 !! 277 !! References : 278 !! Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994 279 !! Brown, J. A. and K. A. Campana. Mon. Weather Rev., 1978 280 !! 281 !! History : 282 !! 4.0 ! 89-03 (O. Marti) 283 !! ! 94-08 (G. Madec) 284 !! ! 96-01 (G. Madec) statement function for e3 285 !! ! 97-07 (G. Madec) introduction of neos, OPA8.1 286 !! ! 97-07 (G. Madec) density instead of volumic mass 287 !! ! 99-02 (G. Madec, N. Grima) semi-implicit pressure gradient 288 !! ! 01-09 (M. Ben Jelloul) bugfix 289 !! 9.0 ! 03-08 (G. Madec) F90, free form 290 !!---------------------------------------------------------------------- 291 !! * Arguments 292 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) :: & 293 ptem, & ! potential temperature 294 psal ! salinity 295 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) :: & 296 prd, & ! potential density (surface referenced) 297 prhop ! potential density (surface referenced) 298 299 !! * Local declarations 265 !! References : Jackett and McDougall, J. Atmos. Ocean. Tech., 1994 266 !! Brown and Campana, Mon. Weather Rev., 1978 267 !!---------------------------------------------------------------------- 268 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: ptem ! potential temperature [Celcius] 269 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: psal ! salinity [psu] 270 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out) :: prd ! in situ density 271 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out) :: prhop ! potential density (surface referenced) 272 300 273 INTEGER :: ji, jj, jk ! dummy loop indices 301 274 REAL(wp) :: & ! temporary scalars 302 275 zt, zs, zh, zsr, zr1, zr2, zr3, zr4, zrhop, ze, zbw, & 303 276 zb, zd, zc, zaw, za, zb1, za1, zkw, zk0 304 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zws 305 !!---------------------------------------------------------------------- 306 307 ! initialization (in not already done) 308 IF( neos_init == 0 ) CALL eos_init 309 277 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zws 278 !!---------------------------------------------------------------------- 279 280 IF( neos_init == 0 ) CALL eos_init ! initialization (in not already done) 310 281 311 282 SELECT CASE ( neos ) 312 283 ! 313 284 CASE ( 0 ) ! Jackett and McDougall (1994) formulation 314 285 ! 315 286 !CDIR NOVERRCHK 316 287 zws(:,:,:) = SQRT( ABS( psal(:,:,:) ) ) 317 318 288 ! ! =============== 319 289 DO jk = 1, jpkm1 ! Horizontal slab … … 326 296 zh = fsdept(ji,jj,jk) 327 297 ! square root salinity 328 !!Edmee zsr= SQRT( ABS( zs ) )329 298 zsr= zws(ji,jj,jk) 330 299 ! compute volumic mass pure water at atm pressure … … 366 335 END DO ! End of slab 367 336 ! ! =============== 368 369 337 ! 370 338 CASE ( 1 ) ! Linear formulation function of temperature only 371 339 ! 372 340 ! ! =============== 373 341 DO jk = 1, jpkm1 ! Horizontal slab … … 385 353 END DO ! End of slab 386 354 ! ! =============== 387 388 355 ! 389 356 CASE ( 2 ) ! Linear formulation function of temperature and salinity 390 357 ! 391 358 ! ! =============== 392 359 DO jk = 1, jpkm1 ! Horizontal slab … … 404 371 END DO ! End of slab 405 372 ! ! =============== 406 373 ! 407 374 CASE DEFAULT 408 375 ! 409 376 WRITE(ctmp1,*) ' bad flag value for neos = ', neos 410 377 CALL ctl_stop( ctmp1 ) 411 378 ! 412 379 END SELECT 413 414 IF(ln_ctl) THEN 415 CALL prt_ctl(tab3d_1=prd, clinfo1=' eos-p: ', tab3d_2=prhop, clinfo2=' pot : ', ovlap=1, kdim=jpk) 416 ENDIF 417 380 ! 381 IF(ln_ctl) CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-p: ', tab3d_2=prhop, clinfo2=' pot : ', ovlap=1, kdim=jpk ) 382 ! 418 383 END SUBROUTINE eos_insitu_pot 419 384 420 SUBROUTINE eos_insitu_2d ( ptem, psal, pdep, prd ) 385 386 SUBROUTINE eos_insitu_2d( ptem, psal, pdep, prd ) 421 387 !!---------------------------------------------------------------------- 422 388 !! *** ROUTINE eos_insitu_2d *** … … 452 418 !! ** Action : - prd , the in situ density (no units) 453 419 !! 454 !! References : 455 !! Jackett, D.R., and T.J. McDougall. J. Atmos. Ocean. Tech., 1994 456 !! 457 !! History : 458 !! 8.5 ! 02-11 (G. Madec, A. Bozec) partial step 459 !!---------------------------------------------------------------------- 460 !! * Arguments 461 REAL(wp), DIMENSION(jpi,jpj), INTENT( in ) :: & 462 ptem, & ! potential temperature 463 psal, & ! salinity 464 pdep ! depth 465 REAL(wp), DIMENSION(jpi,jpj), INTENT( out ) :: & 466 prd ! potential density (surface referenced) 467 468 !! * Local declarations 469 INTEGER :: ji, jj ! dummy loop indices 420 !! References : Jackett and McDougall, J. Atmos. Ocean. Tech., 1994 421 !!---------------------------------------------------------------------- 422 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: ptem ! potential temperature [Celcius] 423 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: psal ! salinity [psu] 424 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pdep ! depth [m] 425 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: prd ! in situ density 426 !! 427 INTEGER :: ji, jj ! dummy loop indices 470 428 REAL(wp) :: & ! temporary scalars 471 429 zt, zs, zh, zsr, zr1, zr2, zr3, zr4, zrhop, ze, zbw, & 472 430 zb, zd, zc, zaw, za, zb1, za1, zkw, zk0, & 473 431 zmask 474 REAL(wp), DIMENSION(jpi,jpj) :: zws 475 !!---------------------------------------------------------------------- 476 477 478 ! initialization (in not already done) 479 IF( neos_init == 0 ) CALL eos_init 432 REAL(wp), DIMENSION(jpi,jpj) :: zws 433 !!---------------------------------------------------------------------- 434 435 IF( neos_init == 0 ) CALL eos_init ! initialization (in not already done) 480 436 481 437 prd(:,:) = 0.e0 482 438 483 439 SELECT CASE ( neos ) 484 440 ! 485 441 CASE ( 0 ) ! Jackett and McDougall (1994) formulation 486 442 ! 487 443 !CDIR NOVERRCHK 488 444 DO jj = 1, jpjm1 … … 492 448 END DO 493 449 END DO 494 495 450 ! ! =============== 496 451 DO jj = 1, jpjm1 ! Horizontal slab 497 452 ! ! =============== 498 453 DO ji = 1, fs_jpim1 ! vector opt. 499 500 454 zmask = tmask(ji,jj,1) ! land/sea bottom mask = surf. mask 501 455 … … 535 489 ! masked in situ density anomaly 536 490 prd(ji,jj) = ( zrhop / ( 1.0 - zh / ( zk0 - zh * ( za - zh * zb ) ) ) - rau0 ) & 537 / rau0 * zmask 538 END DO 539 ! ! =============== 540 END DO ! End of slab 541 ! ! =============== 542 543 491 & / rau0 * zmask 492 END DO 493 ! ! =============== 494 END DO ! End of slab 495 ! ! =============== 496 ! 544 497 CASE ( 1 ) ! Linear formulation function of temperature only 545 498 ! 546 499 ! ! =============== 547 500 DO jj = 1, jpjm1 ! Horizontal slab … … 553 506 END DO ! End of slab 554 507 ! ! =============== 555 556 508 ! 557 509 CASE ( 2 ) ! Linear formulation function of temperature and salinity 558 510 ! 559 511 ! ! =============== 560 512 DO jj = 1, jpjm1 ! Horizontal slab … … 566 518 END DO ! End of slab 567 519 ! ! =============== 568 520 ! 569 521 CASE DEFAULT 570 522 ! 571 523 WRITE(ctmp1,*) ' bad flag value for neos = ', neos 572 524 CALL ctl_stop( ctmp1 ) 573 525 ! 574 526 END SELECT 575 527 576 IF(ln_ctl) CALL prt_ctl( tab2d_1=prd, clinfo1=' eos2d: ')577 528 IF(ln_ctl) CALL prt_ctl( tab2d_1=prd, clinfo1=' eos2d: ' ) 529 ! 578 530 END SUBROUTINE eos_insitu_2d 579 531 … … 607 559 !! ** Action : - pn2 : the brunt-vaisala frequency 608 560 !! 609 !! References : 610 !! McDougall, T. J., J. Phys. Oceanogr., 17, 1950-1964, 1987. 611 !! 612 !! History : 613 !! 6.0 ! 94-07 (G. Madec, M. Imbard) Original code 614 !! 8.0 ! 97-07 (G. Madec) introduction of statement functions 615 !! 8.5 ! 02-07 (G. Madec) Free form, F90 616 !! 8.5 ! 02-08 (G. Madec) introduction of arguments 617 !!---------------------------------------------------------------------- 618 !! * Arguments 619 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in ) :: & 620 ptem, & ! potential temperature 621 psal ! salinity 622 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out ) :: & 623 pn2 ! Brunt-Vaisala frequency 624 625 !! * Local declarations 561 !! References : McDougall, J. Phys. Oceanogr., 17, 1950-1964, 1987. 562 !!---------------------------------------------------------------------- 563 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: ptem ! potential temperature [Celcius] 564 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in ) :: psal ! salinity [psu] 565 REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( out) :: pn2 ! Brunt-Vaisala frequency [s-1] 566 626 567 INTEGER :: ji, jj, jk ! dummy loop indices 627 REAL(wp) :: & 628 zgde3w, zt, zs, zh, & ! temporary scalars 629 zalbet, zbeta ! " " 568 REAL(wp) :: zgde3w, zt, zs, zh, & ! temporary scalars 569 & zalbet, zbeta ! " " 630 570 #if defined key_zdfddm 631 571 REAL(wp) :: zds ! temporary scalars 632 572 #endif 633 573 !!---------------------------------------------------------------------- 634 !! OPA8.5, LODYC-IPSL (2002)635 !!----------------------------------------------------------------------636 574 637 575 ! pn2 : first and last levels … … 644 582 645 583 SELECT CASE ( neos ) 646 584 ! 647 585 CASE ( 0 ) ! Jackett and McDougall (1994) formulation 648 586 ! 649 587 ! ! =============== 650 588 DO jk = 2, jpkm1 ! Horizontal slab … … 696 634 END DO ! End of slab 697 635 ! ! =============== 698 699 636 ! 700 637 CASE ( 1 ) ! Linear formulation function of temperature only 701 638 ! 702 639 ! ! =============== 703 640 DO jk = 2, jpkm1 ! Horizontal slab … … 712 649 END DO ! End of slab 713 650 ! ! =============== 714 715 651 ! 716 652 CASE ( 2 ) ! Linear formulation function of temperature and salinity 717 653 ! 718 654 ! ! =============== 719 655 DO jk = 2, jpkm1 ! Horizontal slab … … 740 676 END DO ! End of slab 741 677 ! ! =============== 742 678 ! 743 679 CASE DEFAULT 744 680 ! 745 681 WRITE(ctmp1,*) ' bad flag value for neos = ', neos 746 682 CALL ctl_stop( ctmp1 ) 747 683 ! 748 684 END SELECT 749 685 750 IF(ln_ctl) THEN 751 CALL prt_ctl(tab3d_1=pn2, clinfo1=' bn2 : ', ovlap=1, kdim=jpk) 686 IF(ln_ctl) CALL prt_ctl(tab3d_1=pn2, clinfo1=' bn2 : ', ovlap=1, kdim=jpk) 752 687 #if defined key_zdfddm 753 CALL prt_ctl(tab3d_1=rrau, clinfo1=' rrau : ', ovlap=1, kdim=jpk)688 IF(ln_ctl) CALL prt_ctl(tab3d_1=rrau, clinfo1=' rrau : ', ovlap=1, kdim=jpk) 754 689 #endif 755 ENDIF 756 690 ! 757 691 END SUBROUTINE eos_bn2 758 692 759 693 694 FUNCTION tfreez( psal ) RESULT( ptf ) 695 !!---------------------------------------------------------------------- 696 !! *** ROUTINE eos_init *** 697 !! 698 !! ** Purpose : Compute the sea surface freezing temperature [Celcius] 699 !! 700 !! ** Method : UNESCO freezing point at the surface (pressure = 0???) 701 !! freezing point [Celcius]=(-.0575+1.710523e-3*sqrt(abs(s))-2.154996e-4*s)*s-7.53e-4*p 702 !! checkvalue: tf= -2.588567 Celsius for s=40.0psu, p=500. decibars 703 !! 704 !! Reference : UNESCO tech. papers in the marine science no. 28. 1978 705 !!---------------------------------------------------------------------- 706 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: psal ! salinity [psu] 707 REAL(wp), DIMENSION(jpi,jpj) :: ptf ! freezing temperature [Celcius] 708 !!---------------------------------------------------------------------- 709 ptf(:,:) = ( - 0.0575 + 1.710523e-3 * SQRT( psal(:,:) ) & 710 & - 2.154996e-4 * psal(:,:) ) * psal(:,:) 711 END FUNCTION tfreez 712 713 760 714 SUBROUTINE eos_init 761 715 !!---------------------------------------------------------------------- … … 764 718 !! ** Purpose : initializations for the equation of state 765 719 !! 766 !! ** Method : Read the namelist nameos 767 !! 768 !! ** Action : blahblah.... 769 !! 770 !! History : 771 !! 8.5 ! 02-10 (G. Madec) Original code 772 !!---------------------------------------------------------------------- 773 NAMELIST/nameos/ neos, ralpha, rbeta 774 !!---------------------------------------------------------------------- 775 !! OPA 8.5, LODYC-IPSL (2002) 776 !!---------------------------------------------------------------------- 777 778 ! set the initialization flag to 1 779 neos_init = 1 ! indicate that the initialization has been done 780 781 ! namelist nameos : ocean physical parameters 782 783 ! Read Namelist nameos : equation of state 784 REWIND( numnam ) 720 !! ** Method : Read the namelist nameos and control the parameters 721 !!---------------------------------------------------------------------- 722 723 neos_init = 1 ! indicate that the initialization has been done 724 725 REWIND( numnam ) ! Read Namelist nameos : equation of state 785 726 READ ( numnam, nameos ) 786 727 … … 791 732 WRITE(numout,*) '~~~~~~~~' 792 733 WRITE(numout,*) ' Namelist nameos : set eos parameters' 793 WRITE(numout,*)794 734 WRITE(numout,*) ' flag for eq. of state and N^2 neos = ', neos 795 735 WRITE(numout,*) ' thermal exp. coef. (linear) ralpha = ', ralpha 796 736 WRITE(numout,*) ' saline exp. coef. (linear) rbeta = ', rbeta 797 WRITE(numout,*)798 737 ENDIF 799 738 … … 801 740 802 741 CASE ( 0 ) ! Jackett and McDougall (1994) formulation 803 742 IF(lwp) WRITE(numout,*) 804 743 IF(lwp) WRITE(numout,*) ' use of Jackett & McDougall (1994) equation of state and' 805 744 IF(lwp) WRITE(numout,*) ' McDougall (1987) Brunt-Vaisala frequency' 806 745 ! 807 746 CASE ( 1 ) ! Linear formulation function of temperature only 808 747 IF(lwp) WRITE(numout,*) 809 748 IF(lwp) WRITE(numout,*) ' use of linear eos rho(T) = rau0 * ( 1.0285 - ralpha * T )' 810 749 IF( lk_zdfddm ) CALL ctl_stop( ' double diffusive mixing parameterization requires', & 811 750 & ' that T and S are used as state variables' ) 812 751 ! 813 752 CASE ( 2 ) ! Linear formulation function of temperature and salinity 814 753 IF(lwp) WRITE(numout,*) 815 754 IF(lwp) WRITE(numout,*) ' use of linear eos rho(T,S) = rau0 * ( rbeta * S - ralpha * T )' 816 817 CASE DEFAULT 818 755 ! 756 CASE DEFAULT ! E R R O R in neos 819 757 WRITE(ctmp1,*) ' bad flag value for neos = ', neos 820 758 CALL ctl_stop( ctmp1 ) 821 822 759 END SELECT 823 760 -
trunk/NEMO/OPA_SRC/ice_oce.F90
r833 r888 8 8 !!---------------------------------------------------------------------- 9 9 !! OPA 9.0 , LOCEAN-IPSL (2005) 10 !! $ Header$10 !! $Id$ 11 11 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 12 12 !!---------------------------------------------------------------------- 13 #if defined key_lim 2 || defined key_lim313 #if defined key_lim3 || defined key_lim2 14 14 !!---------------------------------------------------------------------- 15 !! 'key_lim2 or key_lim3 ' :LIM 2.0 or 3.0 ice model15 !! 'key_lim2' or 'key_lim3' : LIM 2.0 or 3.0 ice model 16 16 !!---------------------------------------------------------------------- 17 17 !! * Modules used 18 18 USE par_oce ! ocean parameters 19 USE blk_oce ! bulk parameters20 19 21 20 IMPLICIT NONE … … 47 46 # endif 48 47 49 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: field exchanges with ice model to ocean50 sst_io, sss_io , & !: sea surface temperature (C) and salinity (PSU)51 u_io , v_io , & !: velocity at ice surface (m/s)52 fsolar, fnsolar, & !: solar and non-solar heat fluxes (W/m2)53 fsalt , fmass , & !: salt and freshwater fluxes54 ftaux , ftauy , & !: wind stresses55 gtaux , gtauy !: wind stresses56 57 48 # if defined key_lim3 58 49 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: field exchanges with ice model to ocean … … 68 59 #else 69 60 !!---------------------------------------------------------------------- 70 !! Default option NO LIMsea-ice model61 !! Default option NO LIM 2.0 or 3.0 sea-ice model 71 62 !!---------------------------------------------------------------------- 72 63 LOGICAL, PUBLIC, PARAMETER :: lk_lim2 = .FALSE. !: No LIM 2.0 ice model … … 74 65 #endif 75 66 76 INTEGER, PUBLIC :: & !: namdom : space/time domain (namlist)77 nfice = 5 !: coupling frequency OPA ICELLN nfice78 79 67 !!---------------------------------------------------------------------- 80 68 END MODULE ice_oce -
trunk/NEMO/OPA_SRC/istate.F90
r719 r888 55 55 !!---------------------------------------------------------------------- 56 56 !! OPA 9.0 , LOCEAN-IPSL (2006) 57 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/istate.F90,v 1.20 2007/06/06 20:25:36 opalod Exp $57 !! $Id$ 58 58 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 59 59 !!---------------------------------------------------------------------- … … 81 81 neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 82 82 CALL rst_read ! Read the restart file 83 CALL day( -1 ) ! model calendar (using both namelist and restart infos) 83 84 ELSE 84 85 ! ! Start from rest … … 86 87 neuler = 0 ! Set time-step indicator at nit000 (euler forward) 87 88 adatrj = 0._wp 89 CALL day( -1 ) ! model calendar (using namelist infos) 88 90 numror = 0 ! define numror = 0 -> no restart file to read 89 91 ! ! Initialization of ocean to zero -
trunk/NEMO/OPA_SRC/lbclnk.F90
r869 r888 93 93 !!---------------------------------------------------------------------- 94 94 !! OPA 9.0 , LOCEAN-IPSL (2005) 95 !! $ Header$95 !! $Id$ 96 96 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 97 97 !!---------------------------------------------------------------------- … … 329 329 330 330 331 SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp )331 SUBROUTINE lbc_lnk_3d( pt3d, cd_type, psgn, cd_mpp, pval ) 332 332 !!--------------------------------------------------------------------- 333 333 !! *** ROUTINE lbc_lnk_3d *** … … 355 355 CHARACTER(len=3), INTENT( in ), OPTIONAL :: & 356 356 cd_mpp ! fill the overlap area only (here do nothing) 357 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (used at closed boundaries) 357 358 358 359 !! * Local declarations 359 360 INTEGER :: ji, jk 360 361 INTEGER :: ijt, iju 362 REAL(wp) :: zland 361 363 !!---------------------------------------------------------------------- 362 364 !! OPA 9.0 , LOCEAN-IPSL (2005) 363 !! $ Header$365 !! $Id$ 364 366 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 365 367 !!---------------------------------------------------------------------- 366 368 367 IF (PRESENT(cd_mpp)) THEN 369 IF( PRESENT( pval ) ) THEN ! set land value (zero by default) 370 zland = pval 371 ELSE 372 zland = 0.e0 373 ENDIF 374 375 376 IF( PRESENT( cd_mpp ) ) THEN 368 377 ! only fill the overlap area and extra allows 369 378 ! this is in mpp case. In this module, just do nothing … … 385 394 SELECT CASE ( cd_type ) 386 395 CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points 387 pt3d( 1 ,:,jk) = 0.e0388 pt3d(jpi,:,jk) = 0.e0389 CASE ( 'F' ) ! F-point 390 pt3d(jpi,:,jk) = 0.e0396 pt3d( 1 ,:,jk) = zland 397 pt3d(jpi,:,jk) = zland 398 CASE ( 'F' ) ! F-point 399 pt3d(jpi,:,jk) = zland 391 400 END SELECT 392 401 … … 402 411 CASE ( 'T' , 'U' , 'W' ) ! T-, U-, W-points 403 412 pt3d(:, 1 ,jk) = pt3d(:,3,jk) 404 pt3d(:,jpj,jk) = 0.e0413 pt3d(:,jpj,jk) = zland 405 414 CASE ( 'V' , 'F' ) ! V-, F-points 406 415 pt3d(:, 1 ,jk) = psgn * pt3d(:,2,jk) 407 pt3d(:,jpj,jk) = 0.e0416 pt3d(:,jpj,jk) = zland 408 417 END SELECT 409 418 410 419 CASE ( 3 , 4 ) ! * North fold T-point pivot 411 420 412 ! pt3d( 1 ,jpj,jk) = 0.e0 413 ! pt3d(jpi,jpj,jk) = 0.e0 421 pt3d( 1 ,jpj,jk) = zland 422 pt3d(jpi,jpj,jk) = zland 414 423 415 424 SELECT CASE ( cd_type ) … … 417 426 DO ji = 2, jpi 418 427 ijt = jpi-ji+2 419 pt3d(ji, 1 ,jk) = 0.e0428 pt3d(ji, 1 ,jk) = zland 420 429 pt3d(ji,jpj,jk) = psgn * pt3d(ijt,jpj-2,jk) 421 430 END DO … … 427 436 DO ji = 1, jpi-1 428 437 iju = jpi-ji+1 429 pt3d(ji, 1 ,jk) = 0.e0438 pt3d(ji, 1 ,jk) = zland 430 439 pt3d(ji,jpj,jk) = psgn * pt3d(iju,jpj-2,jk) 431 440 END DO … … 437 446 DO ji = 2, jpi 438 447 ijt = jpi-ji+2 439 pt3d(ji, 1 ,jk) = 0.e0448 pt3d(ji, 1 ,jk) = zland 440 449 pt3d(ji,jpj-1,jk) = psgn * pt3d(ijt,jpj-2,jk) 441 450 pt3d(ji,jpj ,jk) = psgn * pt3d(ijt,jpj-3,jk) … … 451 460 CASE ( 5 , 6 ) ! * North fold F-point pivot 452 461 453 pt3d( 1 ,jpj,jk) = 0.e0454 pt3d(jpi,jpj,jk) = 0.e0462 pt3d( 1 ,jpj,jk) = zland 463 pt3d(jpi,jpj,jk) = zland 455 464 456 465 SELECT CASE ( cd_type ) … … 458 467 DO ji = 1, jpi 459 468 ijt = jpi-ji+1 460 pt3d(ji, 1 ,jk) = 0.e0469 pt3d(ji, 1 ,jk) = zland 461 470 pt3d(ji,jpj,jk) = psgn * pt3d(ijt,jpj-1,jk) 462 471 END DO … … 464 473 DO ji = 1, jpi-1 465 474 iju = jpi-ji 466 pt3d(ji, 1 ,jk) = 0.e0475 pt3d(ji, 1 ,jk) = zland 467 476 pt3d(ji,jpj,jk) = psgn * pt3d(iju,jpj-1,jk) 468 477 END DO … … 470 479 DO ji = 1, jpi 471 480 ijt = jpi-ji+1 472 pt3d(ji, 1 ,jk) = 0.e0481 pt3d(ji, 1 ,jk) = zland 473 482 pt3d(ji,jpj,jk) = psgn * pt3d(ijt,jpj-2,jk) 474 483 END DO … … 492 501 SELECT CASE ( cd_type ) 493 502 CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points 494 pt3d(:, 1 ,jk) = 0.e0495 pt3d(:,jpj,jk) = 0.e0496 CASE ( 'F' ) ! F-point 497 pt3d(:,jpj,jk) = 0.e0503 pt3d(:, 1 ,jk) = zland 504 pt3d(:,jpj,jk) = zland 505 CASE ( 'F' ) ! F-point 506 pt3d(:,jpj,jk) = zland 498 507 END SELECT 499 508 … … 506 515 507 516 508 SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp )517 SUBROUTINE lbc_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) 509 518 !!--------------------------------------------------------------------- 510 519 !! *** ROUTINE lbc_lnk_2d *** … … 532 541 CHARACTER(len=3), INTENT( in ), OPTIONAL :: & 533 542 cd_mpp ! fill the overlap area only (here do nothing) 543 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (used at closed boundaries) 534 544 535 545 !! * Local declarations 536 546 INTEGER :: ji 537 547 INTEGER :: ijt, iju 548 REAL(wp) :: zland 538 549 !!---------------------------------------------------------------------- 539 !! OPA 8.5, LODYC-IPSL (2002) 540 !!---------------------------------------------------------------------- 550 551 IF( PRESENT( pval ) ) THEN ! set land value (zero by default) 552 zland = pval 553 ELSE 554 zland = 0.e0 555 ENDIF 541 556 542 557 IF (PRESENT(cd_mpp)) THEN … … 556 571 SELECT CASE ( cd_type ) 557 572 CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points 558 pt2d( 1 ,:) = 0.e0559 pt2d(jpi,:) = 0.e0573 pt2d( 1 ,:) = zland 574 pt2d(jpi,:) = zland 560 575 CASE ( 'F' ) ! F-point, ice U-V point 561 pt2d(jpi,:) = 0.e0576 pt2d(jpi,:) = zland 562 577 CASE ( 'I' ) ! F-point, ice U-V point 563 pt2d( 1 ,:) = 0.e0564 pt2d(jpi,:) = 0.e0578 pt2d( 1 ,:) = zland 579 pt2d(jpi,:) = zland 565 580 END SELECT 566 581 … … 576 591 CASE ( 'T' , 'U' , 'W' ) ! T-, U-, W-points 577 592 pt2d(:, 1 ) = pt2d(:,3) 578 pt2d(:,jpj) = 0.e0593 pt2d(:,jpj) = zland 579 594 CASE ( 'V' , 'F' , 'I' ) ! V-, F-points, ice U-V point 580 595 pt2d(:, 1 ) = psgn * pt2d(:,2) 581 pt2d(:,jpj) = 0.e0596 pt2d(:,jpj) = zland 582 597 END SELECT 583 598 584 599 CASE ( 3 , 4 ) ! * North fold T-point pivot 585 600 586 ! pt2d( 1 , 1 ) = 0.e0!!!!! bug gm ??? !Edmee587 ! pt2d( 1 ,jpj) = 0.e0 588 ! pt2d(jpi,jpj) = 0.e0 601 pt2d( 1 , 1 ) = zland !!!!! bug gm ??? !Edmee 602 pt2d( 1 ,jpj) = zland 603 pt2d(jpi,jpj) = zland 589 604 590 605 SELECT CASE ( cd_type ) … … 593 608 DO ji = 2, jpi 594 609 ijt = jpi-ji+2 595 pt2d(ji, 1 ) = 0.e0610 pt2d(ji, 1 ) = zland 596 611 pt2d(ji,jpj) = psgn * pt2d(ijt,jpj-2) 597 612 END DO … … 604 619 DO ji = 1, jpi-1 605 620 iju = jpi-ji+1 606 pt2d(ji, 1 ) = 0.e0621 pt2d(ji, 1 ) = zland 607 622 pt2d(ji,jpj) = psgn * pt2d(iju,jpj-2) 608 623 END DO … … 615 630 DO ji = 2, jpi 616 631 ijt = jpi-ji+2 617 pt2d(ji, 1 ) = 0.e0632 pt2d(ji, 1 ) = zland 618 633 pt2d(ji,jpj-1) = psgn * pt2d(ijt,jpj-2) 619 634 pt2d(ji,jpj ) = psgn * pt2d(ijt,jpj-3) … … 628 643 629 644 CASE ( 'I' ) ! ice U-V point 630 pt2d(:, 1 ) = 0.e0645 pt2d(:, 1 ) = zland 631 646 pt2d(2,jpj) = psgn * pt2d(3,jpj-1) 632 647 DO ji = 3, jpi … … 639 654 CASE ( 5 , 6 ) ! * North fold F-point pivot 640 655 641 pt2d( 1 , 1 ) = 0.e0!!bug ???642 pt2d( 1 ,jpj) = 0.e0643 pt2d(jpi,jpj) = 0.e0656 pt2d( 1 , 1 ) = zland !!bug ??? 657 pt2d( 1 ,jpj) = zland 658 pt2d(jpi,jpj) = zland 644 659 645 660 SELECT CASE ( cd_type ) … … 648 663 DO ji = 1, jpi 649 664 ijt = jpi-ji+1 650 pt2d(ji, 1 ) = 0.e0665 pt2d(ji, 1 ) = zland 651 666 pt2d(ji,jpj) = psgn * pt2d(ijt,jpj-1) 652 667 END DO … … 655 670 DO ji = 1, jpi-1 656 671 iju = jpi-ji 657 pt2d(ji, 1 ) = 0.e0672 pt2d(ji, 1 ) = zland 658 673 pt2d(ji,jpj) = psgn * pt2d(iju,jpj-1) 659 674 END DO … … 662 677 DO ji = 1, jpi 663 678 ijt = jpi-ji+1 664 pt2d(ji, 1 ) = 0.e0679 pt2d(ji, 1 ) = zland 665 680 pt2d(ji,jpj) = psgn * pt2d(ijt,jpj-2) 666 681 END DO … … 681 696 682 697 CASE ( 'I' ) ! ice U-V point 683 pt2d( : , 1 ) = 0.e0684 pt2d( 2 ,jpj) = 0.e0698 pt2d( : , 1 ) = zland 699 pt2d( 2 ,jpj) = zland 685 700 DO ji = 2 , jpim1 686 701 ijt = jpi - ji + 2 … … 694 709 SELECT CASE ( cd_type ) 695 710 CASE ( 'T' , 'U' , 'V' , 'W' ) ! T-, U-, V-, W-points 696 pt2d(:, 1 ) = 0.e0697 pt2d(:,jpj) = 0.e0711 pt2d(:, 1 ) = zland 712 pt2d(:,jpj) = zland 698 713 CASE ( 'F' ) ! F-point 699 pt2d(:,jpj) = 0.e0714 pt2d(:,jpj) = zland 700 715 CASE ( 'I' ) ! ice U-V point 701 pt2d(:, 1 ) = 0.e0702 pt2d(:,jpj) = 0.e0716 pt2d(:, 1 ) = zland 717 pt2d(:,jpj) = zland 703 718 END SELECT 704 719 -
trunk/NEMO/OPA_SRC/lib_mpp.F90
r869 r888 48 48 !!---------------------------------------------------------------------- 49 49 !! OPA 9.0 , LOCEAN-IPSL (2005) 50 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/lib_mpp.F90,v 1.21 2007/06/05 10:28:55 opalod Exp $50 !! $Id$ 51 51 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 52 52 !!--------------------------------------------------------------------- … … 278 278 !!---------------------------------------------------------------------- 279 279 !! OPA 9.0 , LOCEAN-IPSL (2005) 280 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/lib_mpp.F90,v 1.21 2007/06/05 10:28:55 opalod Exp $280 !! $Id$ 281 281 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 282 282 !!--------------------------------------------------------------------- … … 605 605 #endif 606 606 607 SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp )607 SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp, pval ) 608 608 !!---------------------------------------------------------------------- 609 609 !! *** routine mpp_lnk_3d *** … … 640 640 CHARACTER(len=3), INTENT( in ), OPTIONAL :: & 641 641 cd_mpp ! fill the overlap area only 642 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (used at closed boundaries) 642 643 643 644 !! * Local variables … … 646 647 INTEGER :: ml_req1, ml_req2, ml_err ! for key_mpi_isend 647 648 INTEGER :: ml_stat(MPI_STATUS_SIZE) ! for key_mpi_isend 649 REAL(wp) :: zland 648 650 !!---------------------------------------------------------------------- 649 651 650 652 ! 1. standard boundary treatment 651 653 ! ------------------------------ 654 655 IF( PRESENT( pval ) ) THEN ! set land value (zero by default) 656 zland = pval 657 ELSE 658 zland = 0.e0 659 ENDIF 652 660 653 661 IF( PRESENT( cd_mpp ) ) THEN … … 670 678 SELECT CASE ( cd_type ) 671 679 CASE ( 'T', 'U', 'V', 'W' ) 672 ptab( 1 :jpreci,:,:) = 0.e0673 ptab(nlci-jpreci+1:jpi ,:,:) = 0.e0680 ptab( 1 :jpreci,:,:) = zland 681 ptab(nlci-jpreci+1:jpi ,:,:) = zland 674 682 CASE ( 'F' ) 675 ptab(nlci-jpreci+1:jpi ,:,:) = 0.e0683 ptab(nlci-jpreci+1:jpi ,:,:) = zland 676 684 END SELECT 677 685 ENDIF … … 681 689 SELECT CASE ( cd_type ) 682 690 CASE ( 'T', 'U', 'V', 'W' ) 683 ptab(:, 1 :jprecj,:) = 0.e0684 ptab(:,nlcj-jprecj+1:jpj ,:) = 0.e0691 ptab(:, 1 :jprecj,:) = zland 692 ptab(:,nlcj-jprecj+1:jpj ,:) = zland 685 693 CASE ( 'F' ) 686 ptab(:,nlcj-jprecj+1:jpj ,:) = 0.e0694 ptab(:,nlcj-jprecj+1:jpj ,:) = zland 687 695 END SELECT 688 696 … … 1058 1066 1059 1067 1060 SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp )1068 SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval ) 1061 1069 !!---------------------------------------------------------------------- 1062 1070 !! *** routine mpp_lnk_2d *** … … 1092 1100 CHARACTER(len=3), INTENT( in ), OPTIONAL :: & 1093 1101 cd_mpp ! fill the overlap area only 1102 REAL(wp) , INTENT(in ), OPTIONAL :: pval ! background value (used at closed boundaries) 1094 1103 1095 1104 !! * Local variables … … 1100 1109 INTEGER :: ml_req1, ml_req2, ml_err ! for key_mpi_isend 1101 1110 INTEGER :: ml_stat(MPI_STATUS_SIZE) ! for key_mpi_isend 1111 REAL(wp) :: zland 1102 1112 !!---------------------------------------------------------------------- 1113 1114 IF( PRESENT( pval ) ) THEN ! set land value (zero by default) 1115 zland = pval 1116 ELSE 1117 zland = 0.e0 1118 ENDIF 1103 1119 1104 1120 ! 1. standard boundary treatment … … 1123 1139 SELECT CASE ( cd_type ) 1124 1140 CASE ( 'T', 'U', 'V', 'W' , 'I' ) 1125 pt2d( 1 :jpreci,:) = 0.e01126 pt2d(nlci-jpreci+1:jpi ,:) = 0.e01141 pt2d( 1 :jpreci,:) = zland 1142 pt2d(nlci-jpreci+1:jpi ,:) = zland 1127 1143 CASE ( 'F' ) 1128 pt2d(nlci-jpreci+1:jpi ,:) = 0.e01144 pt2d(nlci-jpreci+1:jpi ,:) = zland 1129 1145 END SELECT 1130 1146 ENDIF … … 1134 1150 SELECT CASE ( cd_type ) 1135 1151 CASE ( 'T', 'U', 'V', 'W' , 'I' ) 1136 pt2d(:, 1 :jprecj) = 0.e01137 pt2d(:,nlcj-jprecj+1:jpj ) = 0.e01152 pt2d(:, 1 :jprecj) = zland 1153 pt2d(:,nlcj-jprecj+1:jpj ) = zland 1138 1154 CASE ( 'F' ) 1139 pt2d(:,nlcj-jprecj+1:jpj ) = 0.e01155 pt2d(:,nlcj-jprecj+1:jpj ) = zland 1140 1156 END SELECT 1141 1157 … … 1402 1418 1403 1419 CASE ( 'I' ) ! ice U-V point 1404 pt2d( 2 ,nlcj) = 0.e01420 pt2d( 2 ,nlcj) = zland 1405 1421 DO ji = 2 , nlci-1 1406 1422 ijt = iloc - ji + 2 … … 3087 3103 INTEGER , INTENT( in ) :: kdim ! size of array 3088 3104 INTEGER , INTENT(inout), DIMENSION(kdim) :: ktab ! input array 3089 INTEGER , INTENT(in) , OPTIONAL:: kcom3105 INTEGER , INTENT(in) , OPTIONAL :: kcom 3090 3106 3091 3107 #if defined key_mpp_shmem … … 3197 3213 INTEGER , INTENT( in ) :: kdim ! size of array 3198 3214 INTEGER , INTENT(inout), DIMENSION(kdim) :: ktab ! input array 3199 INTEGER , INTENT( in), OPTIONAL :: kcom ! input array3215 INTEGER , INTENT( in ), OPTIONAL :: kcom ! input array 3200 3216 3201 3217 #if defined key_mpp_shmem … … 3538 3554 INTEGER , INTENT( in ) :: kdim 3539 3555 REAL(wp), INTENT(inout), DIMENSION(kdim) :: ptab 3540 INTEGER , INTENT( in ), OPTIONAL :: kcom3556 INTEGER , INTENT( in ), OPTIONAL :: kcom 3541 3557 3542 3558 #if defined key_mpp_shmem … … 3595 3611 !! * Arguments 3596 3612 REAL(wp), INTENT(inout) :: ptab ! ??? 3597 INTEGER , INTENT(in), OPTIONAL :: kcom ! ???3613 INTEGER , INTENT( in ), OPTIONAL :: kcom ! ??? 3598 3614 3599 3615 #if defined key_mpp_shmem … … 3703 3719 !! * Arguments 3704 3720 REAL(wp), INTENT( inout ) :: ptab ! 3705 INTEGER ,INTENT(in), OPTIONAL :: kcom3721 INTEGER , INTENT( in ), OPTIONAL :: kcom 3706 3722 3707 3723 #if defined key_mpp_shmem … … 3753 3769 INTEGER , INTENT( in ) :: kdim ! size of ptab 3754 3770 REAL(wp), DIMENSION(kdim), INTENT( inout ) :: ptab ! input array 3755 INTEGER , INTENT(in), OPTIONAL:: kcom3771 INTEGER , INTENT( in ), OPTIONAL :: kcom 3756 3772 3757 3773 #if defined key_mpp_shmem … … 3811 3827 !!----------------------------------------------------------------------- 3812 3828 REAL(wp), INTENT(inout) :: ptab ! input scalar 3813 INTEGER , INTENT(in), OPTIONAL :: kcom3829 INTEGER , INTENT( in ), OPTIONAL :: kcom 3814 3830 3815 3831 #if defined key_mpp_shmem … … 5454 5470 INTEGER :: kdim 5455 5471 INTEGER, OPTIONAL :: kcom 5456 WRITE(*,*) 'mppmax_a_int: You should not have seen this print! error?', kdim, karr(1) 5472 WRITE(*,*) 'mppmax_a_int: You should not have seen this print! error?', kdim, karr(1), kcom 5457 5473 END SUBROUTINE mppmax_a_int 5458 5474 … … 5568 5584 END SUBROUTINE mppstop 5569 5585 5570 SUBROUTINE mpp_ini_lim 5571 WRITE(*,*) 'mpp_ini_north: You should not have seen this print! error?' 5572 END SUBROUTINE mpp_ini_lim 5586 SUBROUTINE mpp_ini_ice(kcom) 5587 INTEGER :: kcom 5588 WRITE(*,*) 'mpp_ini_ice: You should not have seen this print! error?',kcom 5589 END SUBROUTINE mpp_ini_ice 5573 5590 5574 5591 SUBROUTINE mpp_comm_free(kcom) 5575 5592 INTEGER :: kcom 5576 WRITE(*,*) 'mpp_comm_free: You should not have seen this print! error?' 5593 WRITE(*,*) 'mpp_comm_free: You should not have seen this print! error?',kcom 5577 5594 END SUBROUTINE mpp_comm_free 5578 5595 -
trunk/NEMO/OPA_SRC/opa.F90
r833 r888 36 36 !!---------------------------------------------------------------------- 37 37 !! * Modules used 38 USE oce ! dynamics and tracers variables 38 39 USE cpl_oce ! ocean-atmosphere-sea ice coupled exchanges 39 40 USE dom_oce ! ocean space domain variables 40 USE oce ! dynamics and tracers variables41 USE sbc_oce ! surface boundary condition: ocean 41 42 USE trdmod_oce ! ocean variables trends 42 43 USE daymod ! calendar … … 59 60 60 61 USE phycst ! physical constant (par_cst routine) 61 #if defined key_lim362 USE iceini ! initialization of sea-ice (ice_init routine)63 #endif64 #if defined key_lim265 USE iceini_2 ! initialization of sea-ice (ice_init_2 routine)66 #endif67 USE cpl ! coupled ocean/atmos. (cpl_init routine)68 62 USE ocfzpt ! ocean freezing point (oc_fz_pt routine) 69 63 USE trdmod ! momentum/tracers trends (trd_mod_init routine) 70 USE flxfwb ! freshwater budget correction (flx_fwb_init routine)71 USE flxmod ! thermohaline forcing of the ocean (flx_init routine)72 64 73 65 USE diaptr ! poleward transports (dia_ptr_init routine) … … 99 91 !!---------------------------------------------------------------------- 100 92 !! OPA 9.0 , LOCEAN-IPSL (2005) 101 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/opa.F90,v 1.38 2007/06/05 10:32:02 opalod Exp $93 !! $Id$ 102 94 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 103 95 !!---------------------------------------------------------------------- … … 281 273 IF( lk_obc ) CALL obc_init ! Open boundaries 282 274 283 CALL day( nit000 ) ! Calendar284 285 275 CALL istate_init ! ocean initial state (Dynamics and tracers) 286 276 287 277 CALL oc_fz_pt ! Surface freezing point 288 289 #if defined key_lim3290 CALL ice_init ! Sea ice model LIM3291 #endif292 293 #if defined key_lim2294 CALL ice_init_2 ! Sea ice model LIM2295 #endif296 278 297 279 ! ! Ocean physics … … 319 301 CALL cpl_prism_define 320 302 #endif 321 322 CALL flx_init ! Thermohaline forcing initialization323 324 CALL flx_fwb_init ! FreshWater Budget correction325 303 326 304 CALL dia_ptr_init ! Poleward TRansports initialization … … 475 453 USE dtatem ! temperature data 476 454 USE dtasal ! salinity data 477 USE dtasst ! sea surface temperature data478 455 !!---------------------------------------------------------------------- 479 456 -
trunk/NEMO/OPA_SRC/phycst.F90
r833 r888 4 4 !! Definition of of both ocean and ice parameters used in the code 5 5 !!===================================================================== 6 !! * Modules used 6 !! History : ! 90-10 (C. Levy - G. Madec) Original code 7 !! ! 91-11 (G. Madec) 8 !! ! 91-12 (M. Imbard) 9 !! 8.5 ! 02-08 (G. Madec, C. Ethe) F90, add ice constants 10 !! 9.0 ! 06-08 (G. Madec) style 11 !!---------------------------------------------------------------------- 12 13 !!---------------------------------------------------------------------- 14 !! phy_cst : define and print physical constant and domain parameters 15 !!---------------------------------------------------------------------- 7 16 USE par_oce ! ocean parameters 8 17 USE in_out_manager ! I/O manager … … 11 20 PRIVATE 12 21 13 !! * Routine accessibility 14 PUBLIC phy_cst ! routine called by inipar.F90 15 16 !! * Shared module variables 17 INTEGER, PUBLIC, DIMENSION(12) :: & !: 18 nbiss = (/ 31, 29, 31, 30, 31, 30, & !: number of days per month 19 & 31, 31, 30, 31, 30, 31 /) , & ! (leap-year) 20 nobis = (/ 31, 28, 31, 30, 31, 30, & !: number of days per month 21 & 31, 31, 30, 31, 30, 31 /) ! (365 days a year) 22 23 REAL(wp), PUBLIC :: & !: 24 rpi = 3.141592653589793_wp , & !: pi 25 rad = 3.141592653589793_wp / 180._wp , & !: conversion from degre into radian 26 rsmall = 0.5 * EPSILON( 1. ) !: smallest real computer value 22 PUBLIC phy_cst ! routine called by inipar.F90 23 24 REAL(wp), PUBLIC :: rpi = 3.141592653589793_wp !: pi 25 REAL(wp), PUBLIC :: rad = 3.141592653589793_wp / 180._wp !: conversion from degre into radian 26 REAL(wp), PUBLIC :: rsmall = 0.5 * EPSILON( 1. ) !: smallest real computer value 27 27 28 28 REAL(wp), PUBLIC :: & !: … … 54 54 #endif 55 55 rau0 = 1020._wp , & !: volumic mass of reference (kg/m3) 56 rauw = 1000._wp , & !: densityof pure water (kg/m3)56 rauw = 1000._wp , & !: volumic mass of pure water (kg/m3) 57 57 rcp = 4.e+3_wp, & !: ocean specific heat 58 58 ro0cpr !: = 1. / ( rau0 * rcp ) … … 66 66 lsub = 2.834e+6 , & !: pure ice latent heat of sublimation (J.kg-1) 67 67 lfus = 0.334e+6 , & !: latent heat of fusion of fresh ice (J.kg-1) 68 rhoic = 917._wp , & !: densityof sea ice (kg/m3)68 rhoic = 917._wp , & !: volumic mass of sea ice (kg/m3) 69 69 tmut = 0.054 , & !: decrease of seawater meltpoint with salinity 70 70 #else … … 76 76 xlic = 300.33e+6_wp , & !: volumetric latent heat fusion of ice 77 77 xsn = 2.8e+6 , & !: latent heat of sublimation of snow 78 rhoic = 900._wp , & !: densityof sea ice (kg/m3)78 rhoic = 900._wp , & !: volumic mass of sea ice (kg/m3) 79 79 #endif 80 rhosn = 330._wp , & !: densityof snow (kg/m3)80 rhosn = 330._wp , & !: volumic mass of snow (kg/m3) 81 81 emic = 0.97_wp , & !: emissivity of snow or ice 82 82 sice = 6.0_wp , & !: salinity of ice (psu) … … 99 99 !! 100 100 !! ** Purpose : Print model parameters and set and print the constants 101 !! 102 !! ** Method : no 103 !! 104 !! History : 105 !! ! 90-10 (C. Levy - G. Madec) Original code 106 !! ! 91-11 (G. Madec) 107 !! ! 91-12 (M. Imbard) 108 !! 8.5 ! 02-08 (G. Madec, C. Ethe) F90, add ice constants 109 !!---------------------------------------------------------------------- 110 !! * Local variables 111 CHARACTER (len=64) :: cform = "(A9, 3(A13, I7) )" 101 !!---------------------------------------------------------------------- 102 CHARACTER (len=64) :: cform = "(A12, 3(A13, I7) )" 112 103 !!---------------------------------------------------------------------- 113 104 … … 119 110 ! ---------------- 120 111 IF(lwp) THEN 121 WRITE(numout,*) ' parameter file' 122 WRITE(numout,*) 112 WRITE(numout,*) ' Domain info' 123 113 WRITE(numout,*) ' dimension of model' 124 WRITE(numout,*) ' Local domain Global domain Data domain ' 125 WRITE(numout,cform) ' ',' jpi : ', jpi, ' jpiglo : ', jpiglo, ' jpidta : ', jpidta 126 WRITE(numout,cform) ' ',' jpj : ', jpj, ' jpjglo : ', jpjglo, ' jpjdta : ', jpjdta 127 WRITE(numout,cform) ' ',' jpk : ', jpk, ' jpk : ', jpk , ' jpkdta : ', jpkdta 128 WRITE(numout,*) ' ',' jpij : ', jpij 129 WRITE(numout,*) 114 WRITE(numout,*) ' Local domain Global domain Data domain ' 115 WRITE(numout,cform) ' ',' jpi : ', jpi, ' jpiglo : ', jpiglo, ' jpidta : ', jpidta 116 WRITE(numout,cform) ' ',' jpj : ', jpj, ' jpjglo : ', jpjglo, ' jpjdta : ', jpjdta 117 WRITE(numout,cform) ' ',' jpk : ', jpk, ' jpk : ', jpk , ' jpkdta : ', jpkdta 118 WRITE(numout,*) ' ',' jpij : ', jpij 130 119 WRITE(numout,*) ' mpp local domain info (mpp)' 131 120 WRITE(numout,*) ' jpni : ', jpni, ' jpreci : ', jpreci 132 121 WRITE(numout,*) ' jpnj : ', jpnj, ' jprecj : ', jprecj 133 122 WRITE(numout,*) ' jpnij : ', jpnij 134 135 WRITE(numout,*)136 123 WRITE(numout,*) ' lateral domain boundary condition type : jperio = ', jperio 137 WRITE(numout,*) ' domain island (use in rigid-lid case) : jpisl = ', jpisl 138 WRITE(numout,*) ' jpnisl = ', jpnisl 124 WRITE(numout,*) ' domain island (use in rigid-lid case) : jpisl = ', jpisl, ' jpnisl = ', jpnisl 139 125 ENDIF 140 126 … … 142 128 ! ---------------- 143 129 IF(lwp) WRITE(numout,*) 144 IF(lwp) WRITE(numout,*) ' constants'130 IF(lwp) WRITE(numout,*) ' Constants' 145 131 146 132 IF(lwp) WRITE(numout,*) -
trunk/NEMO/OPA_SRC/restart.F90
r833 r888 19 19 USE phycst ! physical constants 20 20 USE daymod ! calendar 21 USE ice_oce ! ice variables22 USE blk_oce ! bulk variables23 21 USE cpl_oce, ONLY : lk_cpl ! 24 22 USE in_out_manager ! I/O manager … … 43 41 !!---------------------------------------------------------------------- 44 42 !! OPA 9.0 , LOCEAN-IPSL (2006) 45 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/restart.F90,v 1.27 2007/06/05 10:35:19 opalod Exp $43 !! $Id$ 46 44 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 47 45 !!---------------------------------------------------------------------- … … 143 141 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn ) 144 142 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn ) 145 146 #if defined key_lim3 || defined key_lim2147 CALL iom_rstput( kt, nitrst, numrow, 'nfice' , REAL( nfice, wp) ) ! ice computation frequency148 CALL iom_rstput( kt, nitrst, numrow, 'sst_io' , sst_io )149 CALL iom_rstput( kt, nitrst, numrow, 'sss_io' , sss_io )150 CALL iom_rstput( kt, nitrst, numrow, 'u_io' , u_io )151 CALL iom_rstput( kt, nitrst, numrow, 'v_io' , v_io )152 # if defined key_coupled153 CALL iom_rstput( kt, nitrst, numrow, 'alb_ice', alb_ice )154 # endif155 #endif156 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core157 CALL iom_rstput( kt, nitrst, numrow, 'nfbulk' , REAL( nfbulk, wp) ) ! bulk computation frequency158 CALL iom_rstput( kt, nitrst, numrow, 'gsst' , gsst )159 #endif160 143 161 144 IF( nn_dynhpg_rst == 1 .OR. lk_vvl ) THEN … … 209 192 !! has been stored in the restart file. 210 193 !!---------------------------------------------------------------------- 211 REAL(wp) :: zcoef, zkt, zrdt, zrdttra1, zndastp, znfice, znfbulk 212 #if defined key_lim3 || defined key_lim2 213 INTEGER :: ji, jj 214 #endif 194 REAL(wp) :: zkt, zrdt, zrdttra1, zndastp 215 195 !!---------------------------------------------------------------------- 216 196 … … 304 284 ENDIF 305 285 306 !!sm: TO BE MOVED IN NEW SURFACE MODULE...307 308 #if defined key_lim3 || defined key_lim2309 ! Louvain La Neuve Sea Ice Model310 IF( iom_varid( numror, 'nfice', ldstop = .FALSE. ) > 0 ) then311 CALL iom_get( numror , 'nfice' , znfice ) ! ice computation frequency312 CALL iom_get( numror, jpdom_autoglo, 'sst_io' , sst_io )313 CALL iom_get( numror, jpdom_autoglo, 'sss_io' , sss_io )314 CALL iom_get( numror, jpdom_autoglo, 'u_io' , u_io )315 CALL iom_get( numror, jpdom_autoglo, 'v_io' , v_io )316 # if defined key_coupled317 CALL iom_get( numror, jpdom_autoglo, 'alb_ice', alb_ice )318 # endif319 IF( znfice /= REAL( nfice, wp ) ) THEN ! if nfice changed between 2 runs320 zcoef = REAL( nfice-1, wp ) / znfice321 sst_io(:,:) = zcoef * sst_io(:,:)322 sss_io(:,:) = zcoef * sss_io(:,:)323 u_io (:,:) = zcoef * u_io (:,:)324 v_io (:,:) = zcoef * v_io (:,:)325 ENDIF326 ELSE327 IF(lwp) WRITE(numout,*)328 IF(lwp) WRITE(numout,*) 'rst_read : LLN sea Ice Model => Ice initialization'329 IF(lwp) WRITE(numout,*)330 zcoef = REAL( nfice-1, wp )331 sst_io(:,:) = zcoef *( tn(:,:,1) + rt0 ) !!bug a explanation is needed here!332 sss_io(:,:) = zcoef * sn(:,:,1)333 zcoef = 0.5 * REAL( nfice-1, wp )334 DO jj = 2, jpj335 DO ji = fs_2, jpi ! vector opt.336 u_io(ji,jj) = zcoef * ( un(ji-1,jj ,1) + un(ji-1,jj-1,1) )337 v_io(ji,jj) = zcoef * ( vn(ji ,jj-1,1) + vn(ji-1,jj-1,1) )338 END DO339 END DO340 # if defined key_coupled341 alb_ice(:,:) = 0.8 * tmask(:,:,1)342 # endif343 ENDIF344 #endif345 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core346 ! Louvain La Neuve Sea Ice Model347 IF( iom_varid( numror, 'nfbulk', ldstop = .FALSE. ) > 0 ) THEN348 CALL iom_get( numror , 'nfbulk', znfbulk ) ! bulk computation frequency349 CALL iom_get( numror, jpdom_autoglo, 'gsst' , gsst )350 IF( znfbulk /= REAL(nfbulk, wp) ) THEN ! if you change nfbulk between 2 runs351 zcoef = REAL( nfbulk-1, wp ) / znfbulk352 gsst(:,:) = zcoef * gsst(:,:)353 ENDIF354 ELSE355 IF(lwp) WRITE(numout,*)356 IF(lwp) WRITE(numout,*) 'rst_read : LLN sea Ice Model => Ice initialization'357 IF(lwp) WRITE(numout,*)358 gsst(:,:) = REAL( nfbulk - 1, wp )*( tn(:,:,1) + rt0 )359 ENDIF360 #endif361 362 !!sm: end of TO BE MOVED IN NEW SURFACE MODULE...363 364 286 IF( iom_varid( numror, 'rhd', ldstop = .FALSE. ) > 0 ) THEN 365 287 CALL iom_get( numror, jpdom_autoglo, 'rhd' , rhd ) -
trunk/NEMO/OPA_SRC/step.F90
r833 r888 4 4 !! Time-stepping : manager of the ocean, tracer and ice time stepping 5 5 !!====================================================================== 6 !! History : ! 91-03 () Original code 7 !! ! 91-11 (G. Madec) 6 !! History : ! 91-03 (G. Madec) Original code 8 7 !! ! 92-06 (M. Imbard) add a first output record 9 8 !! ! 96-04 (G. Madec) introduction of dynspg … … 20 19 !! " " ! 06-01 (L. Debreu, C. Mazauric) Agrif implementation 21 20 !! " " ! 06-07 (S. Masson) restart using iom 21 !! " " ! 06-08 (G. Madec) surface module 22 !!---------------------------------------------------------------------- 23 22 24 !!---------------------------------------------------------------------- 23 25 !! stp : OPA system time-stepping … … 30 32 USE cpl_oce ! coupled ocean-atmosphere variables 31 33 USE in_out_manager ! I/O manager 32 USE iom 34 USE iom ! 33 35 USE lbclnk 34 36 … … 37 39 USE dtatem ! ocean temperature data (dta_tem routine) 38 40 USE dtasal ! ocean salinity data (dta_sal routine) 39 USE dtasst ! ocean sea surface temperature (dta_sst routine) 40 USE dtasss ! ocean sea surface salinity (dta_sss routine) 41 USE taumod ! surface stress (tau routine) 42 USE flxmod ! thermohaline fluxes (flx routine) 43 USE ocesbc ! thermohaline fluxes (oce_sbc routine) 44 USE flxrnf ! runoffs (flx_rnf routine) 45 USE flxfwb ! freshwater budget correction (flx_fwb routine) 46 USE closea ! closed sea freshwater budget (flx_clo routine) 41 USE sbcmod ! surface boundary condition (sbc routine) 42 USE sbcrnf ! surface boundary condition: runoff variables 47 43 USE ocfzpt ! surface ocean freezing point (oc_fz_pt routine) 48 44 … … 96 92 USE zpshde ! partial step: hor. derivative (zps_hde routine) 97 93 USE ice_oce ! sea-ice variable 98 #if defined key_lim3 99 USE icestp ! sea-ice time-stepping (ice_stp routine) 100 #endif 101 #if defined key_lim2 102 USE icestp_2 ! sea-ice time-stepping (ice_stp_2 routine) 103 #endif 94 104 95 USE diawri ! Standard run outputs (dia_wri routine) 105 96 USE trdicp ! Ocean momentum/tracers trends (trd_wri routine) … … 119 110 USE stpctl ! time stepping control (stp_ctl routine) 120 111 USE restart ! ocean restart (rst_wri routine) 121 USE cpl ! exchanges in coupled mode (cpl_stp routine)122 112 USE prtctl ! Print control (prt_ctl routine) 123 113 USE domvvl ! variable volume (dom_vvl routine) … … 137 127 !!---------------------------------------------------------------------- 138 128 !! OPA 9.0 , LOCEAN-IPSL (2005) 139 !! $ Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/step.F90,v 1.35 2007/06/01 16:55:39 opalod Exp $129 !! $Id$ 140 130 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 141 131 !!---------------------------------------------------------------------- … … 166 156 !! * Arguments 167 157 #if defined key_agrif 168 INTEGER ::kstp ! ocean time-step index158 INTEGER :: kstp ! ocean time-step index 169 159 #else 170 INTEGER, INTENT( in ) ::kstp ! ocean time-step index160 INTEGER, INTENT(in) :: kstp ! ocean time-step index 171 161 #endif 172 173 !! * local declarations 162 INTEGER :: jk ! dummy loop indice 174 163 INTEGER :: indic ! error indicator if < 0 175 164 !! --------------------------------------------------------------------- … … 182 171 indic = 1 ! reset to no error condition 183 172 184 adatrj = adatrj + rdt/86400._wp185 186 173 CALL day( kstp ) ! Calendar 187 174 … … 189 176 190 177 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 191 ! Update data, open boundaries and Forcings178 ! Update data, open boundaries, surface boundary condition (including sea-ice) 192 179 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 193 180 194 181 IF( lk_dtatem ) CALL dta_tem( kstp ) ! update 3D temperature data 195 196 IF( lk_dtasal ) CALL dta_sal( kstp ) ! Salinity data 197 198 IF( lk_dtasst ) CALL dta_sst( kstp ) ! Sea Surface Temperature data 199 200 IF( lk_dtasss ) CALL dta_sss( kstp ) ! Sea Surface Salinity data 182 IF( lk_dtasal ) CALL dta_sal( kstp ) ! update 3D salinity data 183 184 CALL sbc ( kstp ) ! Sea Boundary Condition (including sea-ice) 201 185 202 186 IF( lk_obc ) CALL obc_dta( kstp ) ! update dynamic and tracer data at open boundaries 203 204 187 IF( lk_obc ) CALL obc_rad( kstp ) ! compute phase velocities at open boundaries 205 188 206 IF( .NOT. lk_core ) CALL tau( kstp ) ! wind stress 207 208 CALL flx_rnf( kstp ) ! runoff data 209 210 CALL flx( kstp ) ! heat and freshwater fluxes 211 212 #if defined key_lim3 213 CALL ice_stp( kstp ) ! sea-ice model (Update stress & fluxes) 214 #endif 215 #if defined key_lim2 216 CALL ice_stp_2( kstp ) ! sea-ice model (Update stress & fluxes) 217 #endif 218 219 CALL oce_sbc( kstp ) ! ocean surface boudaries 220 221 IF( ln_fwb ) CALL flx_fwb( kstp ) ! freshwater budget 222 223 IF( nclosea == 1 ) CALL flx_clo( kstp ) ! closed sea in the domain (update freshwater fluxes) 224 225 IF( kstp == nit000 ) THEN 226 IF( ninist == 1 ) THEN ! Output the initial state and forcings 227 CALL dia_wri_state( 'output.init' ) 228 ENDIF 229 ENDIF 230 231 IF(ln_ctl) THEN ! print mean trends (used for debugging) 232 CALL prt_ctl(tab2d_1=emp , clinfo1=' emp - : ', mask1=tmask, ovlap=1) 233 CALL prt_ctl(tab2d_1=emps , clinfo1=' emps - : ', mask1=tmask, ovlap=1) 234 CALL prt_ctl(tab2d_1=qt , clinfo1=' qt - : ', mask1=tmask, ovlap=1) 235 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1) 236 CALL prt_ctl(tab2d_1=runoff , clinfo1=' runoff : ', mask1=tmask, ovlap=1) 237 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask : ', mask1=tmask, ovlap=1, kdim=jpk) 238 CALL prt_ctl(tab3d_1=tn , clinfo1=' sst - : ', mask1=tmask, ovlap=1, kdim=1) 239 CALL prt_ctl(tab3d_1=sn , clinfo1=' sss - : ', mask1=tmask, ovlap=1, kdim=1) 240 CALL prt_ctl(tab2d_1=taux , clinfo1=' tau - x : ', mask1=umask, & 241 & tab2d_2=tauy , clinfo2=' - y : ', mask2=vmask,ovlap=1) 189 IF( ninist == 1 ) THEN ! Output the initial state and forcings 190 CALL dia_wri_state( 'output.init' ) 191 ninist = 0 242 192 ENDIF 243 193 … … 252 202 !----------------------------------------------------------------------- 253 203 254 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency204 CALL bn2( tb, sb, rn2 ) ! before Brunt-Vaisala frequency 255 205 256 206 ! ! Vertical eddy viscosity and diffusivity coefficients … … 267 217 ENDIF 268 218 269 IF( cp_cfg == "orca" ) THEN ! ORCA: Reduce vertical mixing in some specific areas 270 SELECT CASE ( jp_cfg ) 271 CASE ( 05 ) ! ORCA R2 configuration 272 avt (:,:,2) = avt (:,:,2) + 1.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 273 CASE ( 025 ) ! ORCA R025 configuration 274 avt (:,:,2) = avt (:,:,2) + 2.e-3 * upsrnfh(:,:) ! increase diffusivity of rivers mouths 275 END SELECT 219 IF( nn_runoff /=0 ) THEN ! increase diffusivity at rivers mouths 220 DO jk = 2, nkrnf ; avt(:,:,jk) = avt(:,:,jk) + rn_avt_rnf * rnfmsk(:,:) ; END DO 276 221 ENDIF 277 222 278 223 IF( ln_zdfevd ) CALL zdf_evd( kstp ) ! enhanced vertical eddy diffusivity 279 224 280 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) &225 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 281 226 & CALL zdf_ddm( kstp ) ! double diffusive mixing 282 227 … … 291 236 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 292 237 !----------------------------------------------------------------------- 293 294 238 IF( lk_ldfslp ) CALL ldf_slp( kstp, rhd, rn2 ) ! before slope of the lateral mixing 295 296 239 #if defined key_traldf_c2d 297 240 IF( lk_traldf_eiv ) CALL ldf_eiv( kstp ) ! eddy induced velocity coefficient 298 241 #endif 299 242 300 301 243 #if defined key_passivetrc 302 244 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 305 247 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 306 248 !----------------------------------------------------------------------- 307 308 249 CALL trc_stp( kstp, indic ) ! time-stepping 309 310 #endif 311 250 #endif 312 251 313 252 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> … … 316 255 ! N.B. ua, va arrays are used as workspace in this section 317 256 !----------------------------------------------------------------------- 318 319 257 ta(:,:,:) = 0.e0 ! set tracer trends to zero 320 258 sa(:,:,:) = 0.e0 321 259 322 260 CALL tra_sbc ( kstp ) ! surface boundary condition 323 324 261 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 325 326 262 IF( lk_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 327 328 263 IF( lk_trabbl_dif ) CALL tra_bbl_dif( kstp ) ! diffusive bottom boundary layer scheme 329 264 IF( lk_trabbl_adv ) CALL tra_bbl_adv( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme 330 331 265 IF( lk_tradmp ) CALL tra_dmp ( kstp ) ! internal damping trends 332 333 266 CALL tra_adv ( kstp ) ! horizontal & vertical advection 334 335 267 IF( n_cla == 1 ) CALL tra_cla ( kstp ) ! Cross Land Advection (Update Hor. advection) 336 337 268 IF( lk_zdfkpp ) CALL tra_kpp ( kstp ) ! KPP non-local tracer fluxes 338 339 269 CALL tra_ldf ( kstp ) ! lateral mixing 340 270 #if defined key_agrif … … 342 272 #endif 343 273 CALL tra_zdf ( kstp ) ! vertical mixing 344 345 274 CALL tra_nxt( kstp ) ! tracer fields at next time step 346 347 275 IF( ln_zdfnpc ) CALL tra_npc( kstp ) ! update the new (t,s) fields by non 348 276 ! ! penetrative convective adjustment … … 365 293 ! N.B. ta, sa arrays are used as workspace in this section 366 294 !----------------------------------------------------------------------- 367 368 369 295 ua(:,:,:) = 0.e0 ! set dynamics trends to zero 370 296 va(:,:,:) = 0.e0 371 297 372 298 CALL dyn_adv( kstp ) ! advection (vector or flux form) 373 374 299 CALL dyn_vor( kstp ) ! vorticity term including Coriolis 375 376 300 CALL dyn_ldf( kstp ) ! lateral mixing 377 301 #if defined key_agrif … … 379 303 #endif 380 304 CALL dyn_hpg( kstp ) ! horizontal gradient of Hydrostatic pressure 381 382 305 CALL dyn_zdf( kstp ) ! vertical diffusion 383 384 306 IF( lk_dynspg_rl ) THEN 385 307 IF( lk_obc ) CALL obc_spg( kstp ) ! surface pressure gradient at open boundaries 386 308 ENDIF 387 indic=0 388 !i bug lbc sur emp 389 CALL lbc_lnk( emp, 'T', 1. ) 390 !i 309 indic=0 391 310 CALL dyn_spg( kstp, indic ) ! surface pressure gradient 392 393 311 CALL dyn_nxt( kstp ) ! lateral velocity at next time step 394 395 312 IF( lk_vvl ) CALL dom_vvl ! vertical mesh at next time step 396 313 … … 401 318 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 402 319 !----------------------------------------------------------------------- 403 404 320 CALL oc_fz_pt ! ocean surface freezing temperature 405 406 321 CALL div_cur( kstp ) ! Horizontal divergence & Relative vorticity 407 408 322 IF( n_cla == 1 ) CALL div_cla( kstp ) ! Cross Land Advection (Update Hor. divergence) 409 410 323 CALL wzv( kstp ) ! Vertical velocity 411 324 412 413 414 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 415 ! Control, and restarts 416 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 417 ! N.B. ua, va, ta, sa arrays are used as workspace in this section 418 !----------------------------------------------------------------------- 419 ! ! Time loop: control and print 325 !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 326 ! Control and restarts 327 !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 420 328 CALL stp_ctl( kstp, indic ) 421 329 IF( indic < 0 ) CALL ctl_stop( 'step: indic < 0' ) 422 423 330 IF( kstp == nit000 ) CALL iom_close( numror ) ! close input ocean restart file 424 331 IF( lrst_oce ) CALL rst_write ( kstp ) ! write output ocean restart file … … 431 338 !----------------------------------------------------------------------- 432 339 433 IF ( nstop == 0 ) THEN ! Diagnostics340 IF( nstop == 0 ) THEN ! Diagnostics: 434 341 IF( lk_floats ) CALL flo_stp( kstp ) ! drifting Floats 435 342 IF( lk_trddyn ) CALL trd_dwr( kstp ) ! trends: dynamics … … 443 350 IF( lk_diafwb ) CALL dia_fwb( kstp ) ! Fresh water budget diagnostics 444 351 IF( ln_diaptr ) CALL dia_ptr( kstp ) ! Poleward TRansports diagnostics 445 446 ! ! Outputs 447 CALL dia_wri ( kstp, indic ) ! ocean model: outputs 352 ! ! outputs 353 CALL dia_wri( kstp, indic ) ! ocean model: outputs 448 354 ENDIF 449 355 -
trunk/NEMO/TOP_SRC/TRP/trcadv_cen2.F90
r833 r888 164 164 zind(ji,jj,jk) = MAX ( upsrnfh(ji,jj) * upsrnfz(jk), & ! changing advection scheme near runoff 165 165 & upsadv(ji,jj) & ! in the vicinity of some straits 166 #if defined key_lim3 166 #if defined key_lim3 || defined key_lim2 167 167 & , tmask(ji,jj,jk) & ! half upstream tracer fluxes 168 168 & * MAX( 0., SIGN( 1., fzptn(ji,jj) & ! if tn < ("freezing"+0.1 )
Note: See TracChangeset
for help on using the changeset viewer.