Changeset 3625 for branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC
- Timestamp:
- 2012-11-21T14:19:18+01:00 (12 years ago)
- Location:
- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ASM/asmtrj.F90
r3294 r3625 213 213 ! ! Output trajectory fields 214 214 CALL iom_rstput( it, it, inum, 'emp' , emp ) 215 CALL iom_rstput( it, it, inum, ' emps' , emps)215 CALL iom_rstput( it, it, inum, 'sfx' , sfx ) 216 216 CALL iom_rstput( it, it, inum, 'un' , un ) 217 217 CALL iom_rstput( it, it, inum, 'vn' , vn ) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r3294 r3625 83 83 z_frc_trd_s = SUM( sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes 84 84 ! Add penetrative solar radiation 85 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r o0cpr* SUM( qsr (:,:) * surf(:,:) )85 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * SUM( qsr (:,:) * surf(:,:) ) 86 86 ! Add geothermal heat flux 87 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + r o0cpr* SUM( qgh_trd0(:,:) * surf(:,:) )87 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * SUM( qgh_trd0(:,:) * surf(:,:) ) 88 88 IF( lk_mpp ) THEN 89 89 CALL mpp_sum( z_frc_trd_v ) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r3609 r3625 400 400 CALL histdef( nid_T, "sossheig", "Sea Surface Height" , "m" , & ! ssh 401 401 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 402 !!$#if defined key_lim3 || defined key_lim2403 !!$ ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to404 !!$ ! internal damping to Levitus that can be diagnosed from others405 !!$ ! sowaflcd = sowaflep + sorunoff + sowafldp + iowaflup406 !!$ CALL histdef( nid_T, "iowaflup", "Ice=>ocean net freshwater" , "kg/m2/s", & ! fsalt407 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )408 !!$ CALL histdef( nid_T, "sowaflep", "atmos=>ocean net freshwater" , "kg/m2/s", & ! fmass409 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )410 !!$#endif411 402 CALL histdef( nid_T, "sowaflup", "Net Upward Water Flux" , "Kg/m2/s", & ! (emp-rnf) 412 403 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 413 !!$ CALL histdef( nid_T, "sorunoff", "Runoffs" , "Kg/m2/s", & ! runoffs 414 !!$ & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 415 CALL histdef( nid_T, "sowaflcd", "concentration/dilution water flux" , "kg/m2/s", & ! (emps-rnf) 416 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 417 CALL histdef( nid_T, "sosalflx", "Surface Salt Flux" , "Kg/m2/s", & ! (emps-rnf) * sn 418 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 404 CALL histdef( nid_T, "sosfldow", "downward salt flux" , "PSU/m2/s", & ! sfx 405 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 406 #if ! defined key_vvl 407 CALL histdef( nid_T, "sosst_cd", "Concentration/Dilution term on temperature" & ! emp * tsn(:,:,1,jp_tem) 408 & , "KgC/m2/s", & ! sosst_cd 409 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 410 CALL histdef( nid_T, "sosss_cd", "Concentration/Dilution term on salinity" & ! emp * tsn(:,:,1,jp_sal) 411 & , "KgPSU/m2/s",& ! sosss_cd 412 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 413 #endif 419 414 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qns + qsr 420 415 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 602 597 CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal), ndim_hT, ndex_hT ) ! sea surface salinity 603 598 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 604 !!$#if defined key_lim3 || defined key_lim2605 !!$ CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:) , ndim_hT, ndex_hT ) ! ice=>ocean water flux606 !!$ CALL histwrite( nid_T, "sowaflep", it, fmass(:,:) , ndim_hT, ndex_hT ) ! atmos=>ocean water flux607 !!$#endif608 599 CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf ) , ndim_hT, ndex_hT ) ! upward water flux 609 !!$ CALL histwrite( nid_T, "sorunoff", it, runoff , ndim_hT, ndex_hT ) ! runoff 610 CALL histwrite( nid_T, "sowaflcd", it, ( emps-rnf ) , ndim_hT, ndex_hT ) ! c/d water flux 611 zw2d(:,:) = ( emps(:,:) - rnf(:,:) ) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 612 CALL histwrite( nid_T, "sosalflx", it, zw2d , ndim_hT, ndex_hT ) ! c/d salt flux 600 CALL histwrite( nid_T, "sosfldow", it, sfx , ndim_hT, ndex_hT ) ! downward salt flux 601 ! (includes virtual salt flux beneath ice 602 ! in linear free surface case) 603 #if ! defined key_vvl 604 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) 605 CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sst 606 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal) 607 CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sss 608 #endif 613 609 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 614 610 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux … … 782 778 !!---------------------------------------------------------------------- 783 779 ! 784 IF( nn_timing == 1 ) CALL timing_start('dia_wri_state') 780 ! IF( nn_timing == 1 ) CALL timing_start('dia_wri_state') ! not sure this works for routines not called in first timestep 785 781 786 782 ! 0. Initialisation … … 879 875 #endif 880 876 881 IF( nn_timing == 1 ) CALL timing_stop('dia_wri_state') 877 ! IF( nn_timing == 1 ) CALL timing_stop('dia_wri_state') ! not sure this works for routines not called in first timestep 882 878 ! 883 879 -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r3294 r3625 54 54 !! level 14: qct(:,:) equivalent flux due to treshold SST 55 55 !! level 15: fbt(:,:) feedback term . 56 !! level 16: ( emps(:,:) - rnf(:,:) ) concentration/dilution water flux 56 !! level 16: ( emp * sss ) concentration/dilution term on salinity 57 !! level 17: ( emp * sst ) concentration/dilution term on temperature 57 58 !! level 17: fsalt(:,:) Ice=>ocean net freshwater 58 59 !! level 18: gps(:,:) the surface pressure (m). … … 107 108 108 109 109 inbsel = 1 7110 inbsel = 18 110 111 111 112 IF( inbsel > jpk ) THEN … … 172 173 ! fsel(:,:,14) = fsel(:,:,14) + qct(:,:) 173 174 ! fsel(:,:,15) = fsel(:,:,15) + fbt(:,:) 174 fsel(:,:,16) = fsel(:,:,16) + ( emps(:,:)-rnf(:,:) ) 175 fsel(:,:,16) = fsel(:,:,16) + ( emp(:,:)*tsn(:,:,1,jp_sal) ) 176 fsel(:,:,17) = fsel(:,:,17) + ( emp(:,:)*tsn(:,:,1,jp_tem) ) 175 177 ! 176 178 ! Output of dynamics and tracer fields and selected fields … … 240 242 ! fsel(:,:,14) = qct(:,:) 241 243 ! fsel(:,:,15) = fbt(:,:) 242 fsel(:,:,16) = ( emps(:,:)-rnf(:,:) ) * tmask(:,:,1) 244 fsel(:,:,16) = ( emp(:,:)-tsn(:,:,1,jp_sal) ) * tmask(:,:,1) 245 fsel(:,:,17) = ( emp(:,:)-tsn(:,:,1,jp_tem) ) * tmask(:,:,1) 243 246 ! 244 247 ! qct(:,:) = 0._wp -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90
r2715 r3625 18 18 USE oce ! dynamics and tracers 19 19 USE dom_oce ! ocean space and time domain 20 USE phycst 20 21 USE in_out_manager ! I/O manager 21 22 USE sbc_oce ! ocean surface boundary conditions … … 173 174 !! put as run-off in open ocean. 174 175 !! 175 !! ** Action : emp , emps updated surface freshwater fluxesat kt176 !! ** Action : emp updated surface freshwater flux at kt 176 177 !!---------------------------------------------------------------------- 177 178 INTEGER, INTENT(in) :: kt ! ocean model time step 178 179 ! 179 180 INTEGER :: ji, jj, jc, jn ! dummy loop indices 180 REAL(wp) :: zze2 181 REAL(wp) :: zze2, zcoef, zcoef1 181 182 REAL(wp), DIMENSION (jpncs) :: zfwf 182 183 !!---------------------------------------------------------------------- … … 214 215 ENDIF 215 216 ! !--------------------! 216 ! ! update emp , emps!217 ! ! update emp ! 217 218 zfwf = 0.e0 !--------------------! 218 219 DO jc = 1, jpncs … … 235 236 IF( ncstt(jc) == 0 ) THEN 236 237 ! water/evap excess is shared by all open ocean 237 emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 238 emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 238 zcoef = zfwf(jc) / surf(jpncs+1) 239 zcoef1 = rcp * zcoef 240 emp(:,:) = emp(:,:) + zcoef 241 qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) 239 242 ELSEIF( ncstt(jc) == 1 ) THEN 240 243 ! Excess water in open sea, at outflow location, excess evap shared … … 245 248 IF ( ji > 1 .AND. ji < jpi & 246 249 .AND. jj > 1 .AND. jj < jpj ) THEN 247 emp (ji,jj) = emp (ji,jj) + zfwf(jc) / &248 (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj))249 emp s(ji,jj) = emps(ji,jj) + zfwf(jc) / &250 (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj))250 zcoef = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) ) 251 zcoef1 = rcp * zcoef 252 emp(ji,jj) = emp(ji,jj) + zcoef 253 qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) 251 254 END IF 252 255 END DO 253 256 ELSE 254 emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1) 255 emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1) 257 zcoef = zfwf(jc) / surf(jpncs+1) 258 zcoef1 = rcp * zcoef 259 emp(:,:) = emp(:,:) + zcoef 260 qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:) 256 261 ENDIF 257 262 ELSEIF( ncstt(jc) == 2 ) THEN … … 262 267 ji = mi0(ncsir(jc,jn)) 263 268 jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean 264 emp (ji,jj) = emp (ji,jj) + zfwf(jc) &265 / (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj) )266 emp s(ji,jj) = emps(ji,jj) + zfwf(jc) &267 / (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj))269 zcoef = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) ) 270 zcoef1 = rcp * zcoef 271 emp(ji,jj) = emp(ji,jj) + zcoef 272 qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj) 268 273 END DO 269 274 ENDIF … … 272 277 DO jj = ncsj1(jc), ncsj2(jc) 273 278 DO ji = ncsi1(jc), ncsi2(jc) 274 emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc) 275 emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc) 279 zcoef = zfwf(jc) / surf(jc) 280 zcoef1 = rcp * zcoef 281 emp(ji,jj) = emp(ji,jj) - zcoef 282 qns(ji,jj) = qns(ji,jj) + zcoef1 * sst_m(ji,jj) 276 283 END DO 277 284 END DO … … 280 287 ! 281 288 CALL lbc_lnk( emp , 'T', 1. ) 282 CALL lbc_lnk( emps, 'T', 1. )283 289 ! 284 290 END SUBROUTINE sbc_clo -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90
r3294 r3625 27 27 REAL(wp), PUBLIC :: rsmall = 0.5 * EPSILON( 1.e0 ) !: smallest real computer value 28 28 29 REAL(wp), PUBLIC :: rday = 24.*60.*60. !: day (s) 30 REAL(wp), PUBLIC :: rsiyea !: sideral year (s) 31 REAL(wp), PUBLIC :: rsiday !: sideral day (s) 32 REAL(wp), PUBLIC :: raamo = 12._wp !: number of months in one year 33 REAL(wp), PUBLIC :: rjjhh = 24._wp !: number of hours in one day 34 REAL(wp), PUBLIC :: rhhmm = 60._wp !: number of minutes in one hour 35 REAL(wp), PUBLIC :: rmmss = 60._wp !: number of seconds in one minute 36 !! REAL(wp), PUBLIC :: omega = 7.292115083046061e-5_wp , & !: change the last digit! 37 REAL(wp), PUBLIC :: omega !: earth rotation parameter 38 REAL(wp), PUBLIC :: ra = 6371229._wp !: earth radius (meter) 39 REAL(wp), PUBLIC :: grav = 9.80665_wp !: gravity (m/s2) 40 41 REAL(wp), PUBLIC :: rtt = 273.16_wp !: triple point of temperature (Kelvin) 42 REAL(wp), PUBLIC :: rt0 = 273.15_wp !: freezing point of water (Kelvin) 29 REAL(wp), PUBLIC :: rday = 24.*60.*60. !: day [s] 30 REAL(wp), PUBLIC :: rsiyea !: sideral year [s] 31 REAL(wp), PUBLIC :: rsiday !: sideral day [s] 32 REAL(wp), PUBLIC :: raamo = 12._wp !: number of months in one year 33 REAL(wp), PUBLIC :: rjjhh = 24._wp !: number of hours in one day 34 REAL(wp), PUBLIC :: rhhmm = 60._wp !: number of minutes in one hour 35 REAL(wp), PUBLIC :: rmmss = 60._wp !: number of seconds in one minute 36 REAL(wp), PUBLIC :: omega !: earth rotation parameter [s-1] 37 REAL(wp), PUBLIC :: ra = 6371229._wp !: earth radius [m] 38 REAL(wp), PUBLIC :: grav = 9.80665_wp !: gravity [m/s2] 39 40 REAL(wp), PUBLIC :: rtt = 273.16_wp !: triple point of temperature [Kelvin] 41 REAL(wp), PUBLIC :: rt0 = 273.15_wp !: freezing point of fresh water [Kelvin] 43 42 #if defined key_lim3 44 REAL(wp), PUBLIC :: rt0_snow = 273.16_wp !: melting point of snow (Kelvin) 45 REAL(wp), PUBLIC :: rt0_ice = 273.16_wp !: melting point of ice (Kelvin) 46 #else 47 REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow (Kelvin) 48 REAL(wp), PUBLIC :: rt0_ice = 273.05_wp !: melting point of ice (Kelvin) 49 #endif 50 43 REAL(wp), PUBLIC :: rt0_snow = 273.16_wp !: melting point of snow [Kelvin] 44 REAL(wp), PUBLIC :: rt0_ice = 273.16_wp !: melting point of ice [Kelvin] 45 #else 46 REAL(wp), PUBLIC :: rt0_snow = 273.15_wp !: melting point of snow [Kelvin] 47 REAL(wp), PUBLIC :: rt0_ice = 273.05_wp !: melting point of ice [Kelvin] 48 #endif 51 49 #if defined key_cice 52 REAL(wp), PUBLIC :: rau0 = 1026._wp !: reference volumic mass (density) (kg/m3) 53 #else 54 REAL(wp), PUBLIC :: rau0 = 1035._wp !: reference volumic mass (density) (kg/m3) 55 #endif 56 REAL(wp), PUBLIC :: rau0r !: reference specific volume (m3/kg) 57 REAL(wp), PUBLIC :: rcp = 4.e+3_wp !: ocean specific heat 58 REAL(wp), PUBLIC :: ro0cpr !: = 1. / ( rau0 * rcp ) 50 REAL(wp), PUBLIC :: rau0 = 1026._wp !: volumic mass of reference [kg/m3] 51 #else 52 REAL(wp), PUBLIC :: rau0 = 1035._wp !: volumic mass of reference [kg/m3] 53 #endif 54 REAL(wp), PUBLIC :: r1_rau0 !: = 1. / rau0 [m3/kg] 55 REAL(wp), PUBLIC :: rauw = 1000._wp !: volumic mass of pure water [m3/kg] 56 REAL(wp), PUBLIC :: rcp = 4.e3_wp !: ocean specific heat [J/Kelvin] 57 REAL(wp), PUBLIC :: r1_rcp !: = 1. / rcp [Kelvin/J] 58 REAL(wp), PUBLIC :: r1_rau0_rcp !: = 1. / ( rau0 * rcp ) 59 60 REAL(wp), PUBLIC :: rhosn = 330._wp !: volumic mass of snow [kg/m3] 61 REAL(wp), PUBLIC :: emic = 0.97_wp !: emissivity of snow or ice 62 REAL(wp), PUBLIC :: sice = 6.0_wp !: salinity of ice [psu] 63 REAL(wp), PUBLIC :: soce = 34.7_wp !: salinity of sea [psu] 64 REAL(wp), PUBLIC :: cevap = 2.5e+6_wp !: latent heat of evaporation (water) 65 REAL(wp), PUBLIC :: srgamma = 0.9_wp !: correction factor for solar radiation (Oberhuber, 1974) 66 REAL(wp), PUBLIC :: vkarmn = 0.4_wp !: von Karman constant 67 REAL(wp), PUBLIC :: stefan = 5.67e-8_wp !: Stefan-Boltzmann constant 59 68 60 69 #if defined key_lim3 || defined key_cice 61 REAL(wp), PUBLIC :: rcdsn = 0.31_wp !: thermal conductivity of snow 62 REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: thermal conductivity of fresh ice 63 REAL(wp), PUBLIC :: cpic = 2067.0 !: specific heat of sea ice 64 REAL(wp), PUBLIC :: lsub = 2.834e+6 !: pure ice latent heat of sublimation (J.kg-1) 65 REAL(wp), PUBLIC :: lfus = 0.334e+6 !: latent heat of fusion of fresh ice (J.kg-1) 66 REAL(wp), PUBLIC :: rhoic = 917._wp !: volumic mass of sea ice (kg/m3) 67 REAL(wp), PUBLIC :: tmut = 0.054 !: decrease of seawater meltpoint with salinity 68 #else 69 REAL(wp), PUBLIC :: rcdsn = 0.22_wp !: conductivity of the snow 70 REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: conductivity of the ice 71 REAL(wp), PUBLIC :: rcpsn = 6.9069e+5_wp !: density times specific heat for snow 72 REAL(wp), PUBLIC :: rcpic = 1.8837e+6_wp !: volumetric latent heat fusion of sea ice 73 REAL(wp), PUBLIC :: lfus = 0.3337e+6 !: latent heat of fusion of fresh ice (J.kg-1) 74 REAL(wp), PUBLIC :: xlsn = 110.121e+6_wp !: volumetric latent heat fusion of snow 75 REAL(wp), PUBLIC :: xlic = 300.33e+6_wp !: volumetric latent heat fusion of ice 76 REAL(wp), PUBLIC :: xsn = 2.8e+6 !: latent heat of sublimation of snow 77 REAL(wp), PUBLIC :: rhoic = 900._wp !: volumic mass of sea ice (kg/m3) 78 #endif 79 REAL(wp), PUBLIC :: rhosn = 330._wp !: volumic mass of snow (kg/m3) 80 REAL(wp), PUBLIC :: emic = 0.97_wp !: emissivity of snow or ice 81 REAL(wp), PUBLIC :: sice = 6.0_wp !: reference salinity of ice (psu) 82 REAL(wp), PUBLIC :: soce = 34.7_wp !: reference salinity of sea (psu) 83 REAL(wp), PUBLIC :: cevap = 2.5e+6_wp !: latent heat of evaporation (water) 84 REAL(wp), PUBLIC :: srgamma = 0.9_wp !: correction factor for solar radiation (Oberhuber, 1974) 85 REAL(wp), PUBLIC :: vkarmn = 0.4_wp !: von Karman constant 86 REAL(wp), PUBLIC :: stefan = 5.67e-8_wp !: Stefan-Boltzmann constant 70 REAL(wp), PUBLIC :: rhoic = 917._wp !: volumic mass of sea ice [kg/m3] 71 REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: thermal conductivity of fresh ice 72 REAL(wp), PUBLIC :: rcdsn = 0.31_wp !: thermal conductivity of snow 73 REAL(wp), PUBLIC :: cpic = 2067.0_wp !: specific heat for ice 74 REAL(wp), PUBLIC :: lsub = 2.834e+6_wp !: pure ice latent heat of sublimation [J/kg] 75 REAL(wp), PUBLIC :: lfus = 0.334e+6_wp !: latent heat of fusion of fresh ice [J/kg] 76 REAL(wp), PUBLIC :: tmut = 0.054_wp !: decrease of seawater meltpoint with salinity 77 REAL(wp), PUBLIC :: xlsn !: = lfus*rhosn (volumetric latent heat fusion of snow) [J/m3] 78 #else 79 REAL(wp), PUBLIC :: rhoic = 900._wp !: volumic mass of sea ice [kg/m3] 80 REAL(wp), PUBLIC :: rcdic = 2.034396_wp !: conductivity of the ice [W/m/K] 81 REAL(wp), PUBLIC :: rcpic = 1.8837e+6_wp !: volumetric specific heat for ice [J/m3/K] 82 REAL(wp), PUBLIC :: cpic !: = rcpic / rhoic (specific heat for ice) [J/Kg/K] 83 REAL(wp), PUBLIC :: rcdsn = 0.22_wp !: conductivity of the snow [W/m/K] 84 REAL(wp), PUBLIC :: rcpsn = 6.9069e+5_wp !: volumetric specific heat for snow [J/m3/K] 85 REAL(wp), PUBLIC :: xlsn = 110.121e+6_wp !: volumetric latent heat fusion of snow [J/m3] 86 REAL(wp), PUBLIC :: lfus !: = xlsn / rhosn (latent heat of fusion of fresh ice) [J/Kg] 87 REAL(wp), PUBLIC :: xlic = 300.33e+6_wp !: volumetric latent heat fusion of ice [J/m3] 88 REAL(wp), PUBLIC :: xsn = 2.8e+6_wp !: volumetric latent heat of sublimation of snow [J/m3] 89 #endif 87 90 !!---------------------------------------------------------------------- 88 91 !! NEMO/OPA 3.3 , NEMO Consortium (2010) … … 102 105 !!---------------------------------------------------------------------- 103 106 104 ! ! Define additional parameters 105 rsiyea = 365.25 * rday * 2. * rpi / 6.283076 106 rsiday = rday / ( 1. + rday / rsiyea ) 107 #if defined key_cice 108 omega = 7.292116e-05 109 #else 110 omega = 2. * rpi / rsiday 111 #endif 112 113 rau0r = 1. / rau0 114 ro0cpr = 1. / ( rau0 * rcp ) 115 116 117 IF(lwp) THEN ! control print 118 WRITE(numout,*) 119 WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants' 120 WRITE(numout,*) ' ~~~~~~~' 107 IF(lwp) WRITE(numout,*) 108 IF(lwp) WRITE(numout,*) ' phy_cst : initialization of ocean parameters and constants' 109 IF(lwp) WRITE(numout,*) ' ~~~~~~~' 110 111 ! Ocean Parameters 112 ! ---------------- 113 IF(lwp) THEN 121 114 WRITE(numout,*) ' Domain info' 122 115 WRITE(numout,*) ' dimension of model' … … 131 124 WRITE(numout,*) ' jpnij : ', jpnij 132 125 WRITE(numout,*) ' lateral domain boundary condition type : jperio = ', jperio 133 WRITE(numout,*) 134 WRITE(numout,*) ' Constants' 135 WRITE(numout,*) 136 WRITE(numout,*) ' mathematical constant rpi = ', rpi 137 WRITE(numout,*) ' day rday = ', rday, ' s' 138 WRITE(numout,*) ' sideral year rsiyea = ', rsiyea, ' s' 139 WRITE(numout,*) ' sideral day rsiday = ', rsiday, ' s' 140 WRITE(numout,*) ' omega omega = ', omega, ' s-1' 141 WRITE(numout,*) 142 WRITE(numout,*) ' nb of months per year raamo = ', raamo, ' months' 143 WRITE(numout,*) ' nb of hours per day rjjhh = ', rjjhh, ' hours' 144 WRITE(numout,*) ' nb of minutes per hour rhhmm = ', rhhmm, ' mn' 145 WRITE(numout,*) ' nb of seconds per minute rmmss = ', rmmss, ' s' 146 WRITE(numout,*) 147 WRITE(numout,*) ' earth radius ra = ', ra, ' m' 148 WRITE(numout,*) ' gravity grav = ', grav , ' m/s^2' 149 WRITE(numout,*) 150 WRITE(numout,*) ' triple point of temperature rtt = ', rtt , ' K' 151 WRITE(numout,*) ' freezing point of water rt0 = ', rt0 , ' K' 152 WRITE(numout,*) ' melting point of snow rt0_snow = ', rt0_snow, ' K' 153 WRITE(numout,*) ' melting point of ice rt0_ice = ', rt0_ice , ' K' 154 WRITE(numout,*) 155 WRITE(numout,*) ' ocean reference volumic mass rau0 = ', rau0 , ' kg/m^3' 156 WRITE(numout,*) ' ocean reference specific volume rau0r = ', rau0r, ' m^3/Kg' 157 WRITE(numout,*) ' ocean specific heat rcp = ', rcp 158 WRITE(numout,*) ' 1. / ( rau0 * rcp ) = ro0cpr = ', ro0cpr 126 ENDIF 127 128 ! Define constants 129 ! ---------------- 130 IF(lwp) WRITE(numout,*) 131 IF(lwp) WRITE(numout,*) ' Constants' 132 133 IF(lwp) WRITE(numout,*) 134 IF(lwp) WRITE(numout,*) ' mathematical constant rpi = ', rpi 135 136 rsiyea = 365.25_wp * rday * 2._wp * rpi / 6.283076_wp 137 rsiday = rday / ( 1._wp + rday / rsiyea ) 138 #if defined key_cice 139 omega = 7.292116e-05 140 #else 141 omega = 2._wp * rpi / rsiday 142 #endif 143 IF(lwp) WRITE(numout,*) 144 IF(lwp) WRITE(numout,*) ' day rday = ', rday, ' s' 145 IF(lwp) WRITE(numout,*) ' sideral year rsiyea = ', rsiyea, ' s' 146 IF(lwp) WRITE(numout,*) ' sideral day rsiday = ', rsiday, ' s' 147 IF(lwp) WRITE(numout,*) ' omega omega = ', omega, ' s^-1' 148 149 IF(lwp) WRITE(numout,*) 150 IF(lwp) WRITE(numout,*) ' nb of months per year raamo = ', raamo, ' months' 151 IF(lwp) WRITE(numout,*) ' nb of hours per day rjjhh = ', rjjhh, ' hours' 152 IF(lwp) WRITE(numout,*) ' nb of minutes per hour rhhmm = ', rhhmm, ' mn' 153 IF(lwp) WRITE(numout,*) ' nb of seconds per minute rmmss = ', rmmss, ' s' 154 155 IF(lwp) WRITE(numout,*) 156 IF(lwp) WRITE(numout,*) ' earth radius ra = ', ra, ' m' 157 IF(lwp) WRITE(numout,*) ' gravity grav = ', grav , ' m/s^2' 158 159 IF(lwp) WRITE(numout,*) 160 IF(lwp) WRITE(numout,*) ' triple point of temperature rtt = ', rtt , ' K' 161 IF(lwp) WRITE(numout,*) ' freezing point of water rt0 = ', rt0 , ' K' 162 IF(lwp) WRITE(numout,*) ' melting point of snow rt0_snow = ', rt0_snow, ' K' 163 IF(lwp) WRITE(numout,*) ' melting point of ice rt0_ice = ', rt0_ice , ' K' 164 165 r1_rau0 = 1._wp / rau0 166 r1_rcp = 1._wp / rcp 167 r1_rau0_rcp = 1._wp / ( rau0 * rcp ) 168 IF(lwp) WRITE(numout,*) 169 IF(lwp) WRITE(numout,*) ' volumic mass of pure water rauw = ', rauw , ' kg/m^3' 170 IF(lwp) WRITE(numout,*) ' volumic mass of reference rau0 = ', rau0 , ' kg/m^3' 171 IF(lwp) WRITE(numout,*) ' 1. / rau0 r1_rau0 = ', r1_rau0, ' m^3/kg' 172 IF(lwp) WRITE(numout,*) ' ocean specific heat rcp = ', rcp , ' J/Kelvin' 173 IF(lwp) WRITE(numout,*) ' 1. / ( rau0 * rcp ) r1_rau0_rcp = ', r1_rau0_rcp 174 175 176 #if defined key_lim3 || defined key_cice 177 xlsn = lfus * rhosn ! volumetric latent heat fusion of snow [J/m3] 178 #else 179 cpic = rcpic / rhoic ! specific heat for ice [J/Kg/K] 180 lfus = xlsn / rhosn ! latent heat of fusion of fresh ice 181 #endif 182 183 IF(lwp) THEN 159 184 WRITE(numout,*) 160 185 WRITE(numout,*) ' thermal conductivity of the snow = ', rcdsn , ' J/s/m/K' 161 186 WRITE(numout,*) ' thermal conductivity of the ice = ', rcdic , ' J/s/m/K' 162 #if defined key_lim3163 187 WRITE(numout,*) ' fresh ice specific heat = ', cpic , ' J/kg/K' 164 188 WRITE(numout,*) ' latent heat of fusion of fresh ice / snow = ', lfus , ' J/kg' 189 #if defined key_lim3 || defined key_cice 165 190 WRITE(numout,*) ' latent heat of subl. of fresh ice / snow = ', lsub , ' J/kg' 166 #elif defined key_cice167 WRITE(numout,*) ' latent heat of fusion of fresh ice / snow = ', lfus , ' J/kg'168 191 #else 169 192 WRITE(numout,*) ' density times specific heat for snow = ', rcpsn , ' J/m^3/K' 170 193 WRITE(numout,*) ' density times specific heat for ice = ', rcpic , ' J/m^3/K' 171 194 WRITE(numout,*) ' volumetric latent heat fusion of sea ice = ', xlic , ' J/m' 172 WRITE(numout,*) ' volumetric latent heat fusion of snow = ', xlsn , ' J/m'173 195 WRITE(numout,*) ' latent heat of sublimation of snow = ', xsn , ' J/kg' 174 196 #endif 197 WRITE(numout,*) ' volumetric latent heat fusion of snow = ', xlsn , ' J/m^3' 175 198 WRITE(numout,*) ' density of sea ice = ', rhoic , ' kg/m^3' 176 199 WRITE(numout,*) ' density of snow = ', rhosn , ' kg/m^3' -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
r3322 r3625 81 81 ! 82 82 INTEGER :: ji, jj, jk ! dummy loop indices 83 REAL(wp) :: z2dt, zg_2 83 REAL(wp) :: z2dt, zg_2, zintp, zgrau0r ! temporary scalar 84 84 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 85 REAL(wp), POINTER, DIMENSION(:,:) :: zpice 85 86 !!---------------------------------------------------------------------- 86 87 ! … … 117 118 END DO 118 119 END DO 120 ENDIF 121 122 IF( nn_ice_embd == 2 ) THEN !== embedded sea ice: Pressure gradient due to snow-ice mass ==! 123 CALL wrk_alloc( jpi, jpj, zpice ) 124 ! 125 zintp = REAL( MOD( kt-1, nn_fsbc ) ) / REAL( nn_fsbc ) 126 zgrau0r = - grav * r1_rau0 127 zpice(:,:) = ( zintp * snwice_mass(:,:) + ( 1.- zintp ) * snwice_mass_b(:,:) ) * zgrau0r 128 DO jj = 2, jpjm1 129 DO ji = fs_2, fs_jpim1 ! vector opt. 130 spgu(ji,jj) = ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 131 spgv(ji,jj) = ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 132 END DO 133 END DO 134 DO jk = 1, jpkm1 ! Add the surface pressure trend to the general trend 135 DO jj = 2, jpjm1 136 DO ji = fs_2, fs_jpim1 ! vector opt. 137 ua(ji,jj,jk) = ua(ji,jj,jk) + spgu(ji,jj) 138 va(ji,jj,jk) = va(ji,jj,jk) + spgv(ji,jj) 139 END DO 140 END DO 141 END DO 142 ! 143 CALL wrk_dealloc( jpi, jpj, zpice ) 119 144 ENDIF 120 145 -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
r3294 r3625 61 61 ! 62 62 INTEGER :: ji, jj, jk, jl ! dummy loop indices 63 REAL(wp) :: z rau0r, zlavmr, zua, zva ! local scalars63 REAL(wp) :: zlavmr, zua, zva ! local scalars 64 64 REAL(wp), POINTER, DIMENSION(:,:,:) :: zwx, zwy, zwz, zww 65 65 !!---------------------------------------------------------------------- … … 75 75 ENDIF 76 76 77 zrau0r = 1. / rau0 ! Local constant initialization78 77 zlavmr = 1. / REAL( nn_zdfexp ) 79 78 … … 81 80 DO jj = 2, jpjm1 ! Surface boundary condition 82 81 DO ji = 2, jpim1 83 zwy(ji,jj,1) = ( utau_b(ji,jj) + utau(ji,jj) ) * zrau0r84 zww(ji,jj,1) = ( vtau_b(ji,jj) + vtau(ji,jj) ) * zrau0r82 zwy(ji,jj,1) = ( utau_b(ji,jj) + utau(ji,jj) ) * r1_rau0 83 zww(ji,jj,1) = ( vtau_b(ji,jj) + vtau(ji,jj) ) * r1_rau0 85 84 END DO 86 85 END DO -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
r3294 r3625 161 161 DO ji = fs_2, fs_jpim1 ! vector opt. 162 162 ua(ji,jj,1) = ub(ji,jj,1) + p2dt * ( ua(ji,jj,1) + 0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) ) & 163 & / ( fse3u(ji,jj,1) * rau0 ))163 & * r1_rau0 / fse3u(ji,jj,1) ) 164 164 END DO 165 165 END DO … … 247 247 DO ji = fs_2, fs_jpim1 ! vector opt. 248 248 va(ji,jj,1) = vb(ji,jj,1) + p2dt * ( va(ji,jj,1) + 0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) ) & 249 & / ( fse3v(ji,jj,1) * rau0 ))249 & * r1_rau0 / fse3v(ji,jj,1) ) 250 250 END DO 251 251 END DO -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
r3608 r3625 8 8 !!---------------------------------------------------------------------- 9 9 USE dom_oce ! ocean space and time domain variables 10 #if defined key_nemocice_decomp 11 USE ice_domain_size, only: nx_global, ny_global 12 #endif 10 13 USE in_out_manager ! I/O manager 11 14 USE lib_mpp ! distributed memory computing … … 431 434 ! array (cf. par_oce.F90). 432 435 436 #if defined key_nemocice_decomp 437 ijpi = ( nx_global+2-2*jpreci + (isplt-1) ) / isplt + 2*jpreci 438 ijpj = ( ny_global+2-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj 439 #else 433 440 ijpi = ( jpiglo-2*jpreci + (isplt-1) ) / isplt + 2*jpreci 434 #if defined key_nemocice_decomp435 ijpj = ( jpjglo+1-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj436 #else437 441 ijpj = ( jpjglo-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj 438 442 #endif -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
r3609 r3625 120 120 121 121 ! variables used in case of sea-ice 122 INTEGER, PUBLIC :: ncomm_ice !: communicator made by the processors with sea-ice 122 INTEGER, PUBLIC :: ncomm_ice !: communicator made by the processors with sea-ice (public so that it can be freed in limthd) 123 INTEGER :: ngrp_iworld ! group ID for the world processors (for rheology) 123 124 INTEGER :: ngrp_ice ! group ID for the ice processors (for rheology) 124 125 INTEGER :: ndim_rank_ice ! number of 'ice' processors … … 1978 1979 !! ndim_rank_ice = number of processors with ice 1979 1980 !! nrank_ice (ndim_rank_ice) = ice processors 1980 !! ngrp_ world = group ID for the world processors1981 !! ngrp_iworld = group ID for the world processors 1981 1982 !! ngrp_ice = group ID for the ice processors 1982 1983 !! ncomm_ice = communicator for the ice procs. … … 2027 2028 2028 2029 ! Create the world group 2029 CALL MPI_COMM_GROUP( mpi_comm_opa, ngrp_ world, ierr )2030 CALL MPI_COMM_GROUP( mpi_comm_opa, ngrp_iworld, ierr ) 2030 2031 2031 2032 ! Create the ice group from the world group 2032 CALL MPI_GROUP_INCL( ngrp_ world, ndim_rank_ice, nrank_ice, ngrp_ice, ierr )2033 CALL MPI_GROUP_INCL( ngrp_iworld, ndim_rank_ice, nrank_ice, ngrp_ice, ierr ) 2033 2034 2034 2035 ! Create the ice communicator , ie the pool of procs with sea-ice … … 2037 2038 ! Find proc number in the world of proc 0 in the north 2038 2039 ! The following line seems to be useless, we just comment & keep it as reminder 2039 ! CALL MPI_GROUP_TRANSLATE_RANKS(ngrp_ice,1,0,ngrp_world,n_ice_root,ierr) 2040 ! 2040 ! CALL MPI_GROUP_TRANSLATE_RANKS(ngrp_ice,1,0,ngrp_iworld,n_ice_root,ierr) 2041 ! 2042 CALL MPI_GROUP_FREE(ngrp_ice, ierr) 2043 CALL MPI_GROUP_FREE(ngrp_iworld, ierr) 2044 2041 2045 DEALLOCATE(kice, zwork) 2042 2046 ! -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
r3294 r3625 16 16 !! 'key_ldfslp' Rotation of lateral mixing tensor 17 17 !!---------------------------------------------------------------------- 18 !! ldf_slp_grif : calculates the triads of isoneutral slopes (Griffies operator)19 !! ldf_slp : calculates the slopes of neutral surface (Madec operator)20 !! ldf_slp_mxl : calculates the slopes at the base of the mixed layer (Madec operator)21 !! ldf_slp_init : initialization of the slopes computation18 !! ldf_slp_grif : calculates the triads of isoneutral slopes (Griffies operator) 19 !! ldf_slp : calculates the slopes of neutral surface (Madec operator) 20 !! ldf_slp_mxl : calculates the slopes at the base of the mixed layer (Madec operator) 21 !! ldf_slp_init : initialization of the slopes computation 22 22 !!---------------------------------------------------------------------- 23 USE oce ! ocean dynamics and tracers 24 USE dom_oce ! ocean space and time domain 25 USE ldftra_oce ! lateral diffusion: traceur 26 USE ldfdyn_oce ! lateral diffusion: dynamics 27 USE phycst ! physical constants 28 USE zdfmxl ! mixed layer depth 29 USE eosbn2 ! equation of states 30 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 31 USE in_out_manager ! I/O manager 32 USE prtctl ! Print control 33 USE wrk_nemo ! work arrays 34 USE timing ! Timing 23 USE oce ! ocean dynamics and tracers 24 USE dom_oce ! ocean space and time domain 25 USE ldftra_oce ! lateral diffusion: traceur 26 USE ldfdyn_oce ! lateral diffusion: dynamics 27 USE phycst ! physical constants 28 USE zdfmxl ! mixed layer depth 29 USE eosbn2 ! equation of states 30 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 31 USE in_out_manager ! I/O manager 32 USE prtctl ! Print control 33 USE wrk_nemo ! work arrays 34 USE timing ! Timing 35 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 35 36 36 37 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90
r3294 r3625 12 12 13 13 !!---------------------------------------------------------------------- 14 !! albedo_ice : albedo for ice (clear and overcast skies) 15 !! albedo_oce : albedo for ocean (clear and overcast skies) 16 !! albedo_init : initialisation of albedo computation 17 !!---------------------------------------------------------------------- 18 USE phycst ! physical constants 19 USE in_out_manager ! I/O manager 20 USE lib_mpp ! MPP library 21 USE wrk_nemo ! work arrays 14 !! albedo_ice : albedo for ice (clear and overcast skies) 15 !! albedo_oce : albedo for ocean (clear and overcast skies) 16 !! albedo_init : initialisation of albedo computation 17 !!---------------------------------------------------------------------- 18 USE phycst ! physical constants 19 USE in_out_manager ! I/O manager 20 USE lib_mpp ! MPP library 21 USE wrk_nemo ! work arrays 22 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 22 23 23 24 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
r3294 r3625 94 94 ! finally, arrays corresponding to different ice categories 95 95 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: a_i !: category ice fraction 96 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: topmelt !: category topmelt97 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: botmelt !: category botmelt96 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: topmelt !: category topmelt 97 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: botmelt !: category botmelt 98 98 #endif 99 99 -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r3609 r3625 40 40 LOGICAL , PUBLIC :: ln_apr_dyn = .FALSE. !: Atmospheric pressure forcing used on dynamics (ocean & ice) 41 41 LOGICAL , PUBLIC :: ln_icebergs = .FALSE. !: Icebergs 42 INTEGER , PUBLIC :: nn_ice = 0 !: flag on ice in the surface boundary condition (=0/1/2/3) 42 INTEGER , PUBLIC :: nn_ice = 0 !: flag for ice in the surface boundary condition (=0/1/2/3) 43 INTEGER , PUBLIC :: nn_ice_embd = 0 !: flag for levitating/embedding sea-ice in the ocean 44 ! !: =0 levitating ice (no mass exchange, concentration/dilution effect) 45 ! !: =1 levitating ice with mass and salt exchange but no presure effect 46 ! !: =2 embedded sea-ice (full salt and mass exchanges and pressure) 43 47 INTEGER , PUBLIC :: nn_fwb = 0 !: FreshWater Budget: 44 48 ! !: = 0 unchecked … … 62 66 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns_tot !: total non solar heat flux (over sea and ice) [W/m2] 63 67 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp , emp_b !: freshwater budget: volume flux [Kg/m2/s] 64 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emps , emps_b !: freshwater budget: concentration/dillution [Kg/m2/s]68 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sfx , sfx_b !: salt flux [PSU/m2/s] 65 69 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: emp_tot !: total E-P over ocean and ice [Kg/m2/s] 66 70 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rnf , rnf_b !: river runoff [Kg/m2/s] … … 106 110 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , STAT=ierr(1) ) 107 111 ! 108 ALLOCATE( qns_tot(jpi,jpj) , qns 109 & qsr_tot(jpi,jpj) , qsr 110 & emp (jpi,jpj) , emp_b 111 & emps (jpi,jpj) , emps_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) )112 ALLOCATE( qns_tot(jpi,jpj) , qns (jpi,jpj) , qns_b(jpi,jpj), & 113 & qsr_tot(jpi,jpj) , qsr (jpi,jpj) , & 114 & emp (jpi,jpj) , emp_b(jpi,jpj) , & 115 & sfx (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj) , STAT=ierr(2) ) 112 116 ! 113 117 ALLOCATE( rnf (jpi,jpj) , sbc_tsc (jpi,jpj,jpts) , qsr_hc (jpi,jpj,jpk) , & -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90
r3294 r3625 60 60 !! 61 61 !! ** Action : - set the ocean surface boundary condition, i.e. 62 !! utau, vtau, taum, wndm, qns, qsr, emp , emps62 !! utau, vtau, taum, wndm, qns, qsr, emp 63 63 !!---------------------------------------------------------------------- 64 64 INTEGER, INTENT(in) :: kt ! ocean time step … … 89 89 nn_tau000 = MAX( nn_tau000, 1 ) ! must be >= 1 90 90 ! 91 qns (:,:) = rn_qns0 91 emp (:,:) = rn_emp0 92 sfx (:,:) = 0.0_wp 93 qns (:,:) = rn_qns0 - emp(:,:) * sst_m(:,:) * rcp ! including heat content associated with mass flux at SST 92 94 qsr (:,:) = rn_qsr0 93 emp (:,:) = rn_emp094 emps(:,:) = rn_emp095 95 ! 96 96 utau(:,:) = rn_utau0 … … 130 130 !! 131 131 !! ** Action : - set the ocean surface boundary condition, i.e. 132 !! utau, vtau, taum, wndm, qns, qsr, emp, emps132 !! utau, vtau, taum, wndm, qns, qsr, emp, sfx 133 133 !! 134 134 !! Reference : Hazeleger, W., and S. Drijfhout, JPO, 30, 677-695, 2000. … … 211 211 END DO 212 212 END DO 213 emps(:,:) = emp(:,:)214 213 215 214 ! Compute the emp flux such as its integration on the whole domain at each time is zero … … 224 223 ENDIF 225 224 226 !salinity terms 227 emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1) 228 emps(:,:) = emp(:,:) 225 ! freshwater (mass flux) and update of qns with heat content of emp 226 emp (:,:) = emp(:,:) - zsumemp * tmask(:,:,1) ! freshwater flux (=0 in domain average) 227 sfx (:,:) = 0.0_wp ! no salt flux 228 qns (:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp ! evap and precip are at SST 229 229 230 230 -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
r3294 r3625 12 12 13 13 !!---------------------------------------------------------------------- 14 !! sbc_blk_clio : CLIO bulk formulation: read and update required input fields15 !! blk_clio_oce : ocean CLIO bulk formulea: compute momentum, heat and freswater fluxes for the ocean16 !! blk_ice_clio : ice CLIO bulk formulea: compute momentum, heat and freswater fluxes for the sea-ice14 !! sbc_blk_clio : CLIO bulk formulation: read and update required input fields 15 !! blk_clio_oce : ocean CLIO bulk formulea: compute momentum, heat and freswater fluxes for the ocean 16 !! blk_ice_clio : ice CLIO bulk formulea: compute momentum, heat and freswater fluxes for the sea-ice 17 17 !! blk_clio_qsr_oce : shortwave radiation for ocean computed from the cloud cover 18 18 !! blk_clio_qsr_ice : shortwave radiation for ice computed from the cloud cover 19 !! flx_blk_declin : solar declinaison19 !! flx_blk_declin : solar declination 20 20 !!---------------------------------------------------------------------- 21 USE oce ! ocean dynamics and tracers 22 USE dom_oce ! ocean space and time domain 23 USE phycst ! physical constants 24 USE fldread ! read input fields 25 USE sbc_oce ! Surface boundary condition: ocean fields 26 USE iom ! I/O manager library 27 USE in_out_manager ! I/O manager 28 USE lib_mpp ! distribued memory computing library 29 USE wrk_nemo ! work arrays 30 USE timing ! Timing 31 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 21 USE oce ! ocean dynamics and tracers 22 USE dom_oce ! ocean space and time domain 23 USE phycst ! physical constants 24 USE fldread ! read input fields 25 USE sbc_oce ! Surface boundary condition: ocean fields 26 USE iom ! I/O manager library 27 USE in_out_manager ! I/O manager 28 USE lib_mpp ! distribued memory computing library 29 USE wrk_nemo ! work arrays 30 USE timing ! Timing 31 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 32 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 32 33 33 34 USE albedo … … 50 51 INTEGER , PARAMETER :: jp_vtau = 2 ! index of wind stress (j-component) (N/m2) at V-point 51 52 INTEGER , PARAMETER :: jp_wndm = 3 ! index of 10m wind module (m/s) at T-point 52 INTEGER , PARAMETER :: jp_humi = 4 ! index of specific humidity ( -)53 INTEGER , PARAMETER :: jp_ccov = 5 ! index of cloud cover ( -)53 INTEGER , PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 54 INTEGER , PARAMETER :: jp_ccov = 5 ! index of cloud cover ( % ) 54 55 INTEGER , PARAMETER :: jp_tair = 6 ! index of 10m air temperature (Kelvin) 55 56 INTEGER , PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) … … 100 101 !! the i-component of the stress (N/m2) 101 102 !! the j-component of the stress (N/m2) 102 !! the 10m wind pseed module (m/s)103 !! the 10m wind speed module (m/s) 103 104 !! the 10m air temperature (Kelvin) 104 !! the 10m specific humidity ( -)105 !! the cloud cover ( -)105 !! the 10m specific humidity (%) 106 !! the cloud cover (%) 106 107 !! the total precipitation (rain+snow) (Kg/m2/s) 107 108 !! (2) CALL blk_oce_clio 108 109 !! 109 110 !! C A U T I O N : never mask the surface stress fields 110 !! the stress is assumed to be in the mesh referential 111 !! i.e. the (i,j) referential 111 !! the stress is assumed to be in the (i,j) mesh referential 112 112 !! 113 113 !! ** Action : defined at each time-step at the air-sea interface … … 115 115 !! - taum wind stress module at T-point 116 116 !! - wndm 10m wind module at T-point 117 !! - qns, qsr non-slor and solar heat flux 118 !! - emp, emps evaporation minus precipitation 117 !! - qns non-solar heat flux including latent heat of solid 118 !! precip. melting and emp heat content 119 !! - qsr solar heat flux 120 !! - emp upward mass flux (evap. - precip) 121 !! - sfx salt flux; set to zero at nit000 but possibly non-zero 122 !! if ice is present (computed in limsbc(_2).F90) 119 123 !!---------------------------------------------------------------------- 120 INTEGER, INTENT( in) :: kt ! ocean time step124 INTEGER, INTENT( in ) :: kt ! ocean time step 121 125 !! 122 126 INTEGER :: ifpr, jfpr ! dummy indices … … 171 175 ALLOCATE( sbudyko(jpi,jpj) , stauc(jpi,jpj), STAT=ierr3 ) 172 176 IF( ierr3 > 0 ) CALL ctl_stop( 'STOP', 'sbc_blk_clio: unable to allocate arrays' ) 177 ! 178 sfx(:,:) = 0._wp ! salt flux; zero unless ice is present (computed in limsbc(_2).F90) 173 179 ! 174 180 ENDIF … … 205 211 !! - taum wind stress module at T-point 206 212 !! - wndm 10m wind module at T-point 207 !! - qns, qsr non-slor and solar heat flux 208 !! - emp, emps evaporation minus precipitation 213 !! - qns non-solar heat flux including latent heat of solid 214 !! precip. melting and emp heat content 215 !! - qsr solar heat flux 216 !! - emp suface mass flux (evap.-precip.) 209 217 !! ** Nota : sf has to be a dummy argument for AGRIF on NEC 210 218 !!---------------------------------------------------------------------- … … 223 231 REAL(wp) :: zsst, ztatm, zcco1, zpatm, zcmax, zrmax ! - - 224 232 REAL(wp) :: zrhoa, zev, zes, zeso, zqatm, zevsqr ! - - 225 REAL(wp) :: ztx2, zty2 233 REAL(wp) :: ztx2, zty2, zcevap, zcprec ! - - 226 234 REAL(wp), POINTER, DIMENSION(:,:) :: zqlw ! long-wave heat flux over ocean 227 235 REAL(wp), POINTER, DIMENSION(:,:) :: zqla ! latent heat flux over ocean … … 363 371 ! III Total FLUXES ! 364 372 ! ----------------------------------------------------------------------------- ! 365 366 !CDIR COLLAPSE 367 emp (:,:) = zqla(:,:) / cevap - sf(jp_prec)%fnow(:,:,1) / rday * tmask(:,:,1) 368 qns (:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) ! Downward Non Solar flux 369 emps(:,:) = emp(:,:) 370 ! 373 zcevap = rcp / cevap ! convert zqla ==> evap (Kg/m2/s) ==> m/s ==> W/m2 374 zcprec = rcp / rday ! convert prec ( mm/day ==> m/s) ==> W/m2 375 376 !CDIR COLLAPSE 377 emp(:,:) = zqla(:,:) / cevap & ! freshwater flux 378 & - sf(jp_prec)%fnow(:,:,1) / rday * tmask(:,:,1) 379 ! 380 !CDIR COLLAPSE 381 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) & ! Downward Non Solar flux 382 & - zqla(:,:) * pst(:,:) * zcevap & ! remove evap. heat content at SST in Celcius 383 & + sf(jp_prec)%fnow(:,:,1) * sf(jp_tair)%fnow(:,:,1) * zcprec ! add precip. heat content at Tair in Celcius 384 ! NB: if sea-ice model, the snow precip are computed and the associated heat is added to qns (see blk_ice_clio) 385 371 386 CALL iom_put( "qlw_oce", zqlw ) ! output downward longwave heat over the ocean 372 387 CALL iom_put( "qsb_oce", - zqsb ) ! output downward sensible heat over the ocean … … 407 422 !! 408 423 !! ** Action : call albedo_oce/albedo_ice to compute ocean/ice albedo 409 !! computation of snow precipitation 410 !! computation of solar flux at the ocean and ice surfaces 411 !! computation of the long-wave radiation for the ocean and sea/ice 412 !! computation of turbulent heat fluxes over water and ice 413 !! computation of evaporation over water 414 !! computation of total heat fluxes sensitivity over ice (dQ/dT) 415 !! computation of latent heat flux sensitivity over ice (dQla/dT) 416 !! 424 !! - snow precipitation 425 !! - solar flux at the ocean and ice surfaces 426 !! - the long-wave radiation for the ocean and sea/ice 427 !! - turbulent heat fluxes over water and ice 428 !! - evaporation over water 429 !! - total heat fluxes sensitivity over ice (dQ/dT) 430 !! - latent heat flux sensitivity over ice (dQla/dT) 431 !! - qns : modified the non solar heat flux over the ocean 432 !! to take into account solid precip latent heat flux 417 433 !!---------------------------------------------------------------------- 418 434 REAL(wp), INTENT(in ), DIMENSION(:,:,:) :: pst ! ice surface temperature [Kelvin] … … 594 610 ! 595 611 ! ----------------------------------------------------------------------------- ! 596 ! Total FLUXES !612 ! Total FLUXES ! 597 613 ! ----------------------------------------------------------------------------- ! 598 614 ! … … 601 617 !CDIR COLLAPSE 602 618 p_tpr(:,:) = sf(jp_prec)%fnow(:,:,1) / rday ! total precipitation [kg/m2/s] 619 ! 620 ! ----------------------------------------------------------------------------- ! 621 ! Correct the OCEAN non solar flux with the existence of solid precipitation ! 622 ! ---------------=====--------------------------------------------------------- ! 623 !CDIR COLLAPSE 624 qns(:,:) = qns(:,:) & ! update the non-solar heat flux with: 625 & - p_spr(:,:) * lfus & ! remove melting solid precip 626 & + p_spr(:,:) * MIN( sf(jp_tair)%fnow(:,:,1), rt0_snow - rt0 ) * cpic & ! add solid P at least below melting 627 & - p_spr(:,:) * sf(jp_tair)%fnow(:,:,1) * rcp ! remove solid precip. at Tair 603 628 ! 604 629 !!gm : not necessary as all input data are lbc_lnk... -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
r3294 r3625 52 52 INTEGER , PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 53 53 INTEGER , PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 54 INTEGER , PARAMETER :: jp_humi = 3 ! index of specific humidity ( -)54 INTEGER , PARAMETER :: jp_humi = 3 ! index of specific humidity ( % ) 55 55 INTEGER , PARAMETER :: jp_qsr = 4 ! index of solar heat (W/m2) 56 56 INTEGER , PARAMETER :: jp_qlw = 5 ! index of Long wave (W/m2) … … 69 69 REAL(wp), PARAMETER :: Stef = 5.67e-8 ! Stefan Boltzmann constant 70 70 REAL(wp), PARAMETER :: Cice = 1.63e-3 ! transfer coefficient over ice 71 REAL(wp), PARAMETER :: albo = 0.066 ! ocean albedo assumed to be con tant71 REAL(wp), PARAMETER :: albo = 0.066 ! ocean albedo assumed to be constant 72 72 73 73 ! !!* Namelist namsbc_core : CORE bulk parameters … … 96 96 !! the 10m wind velocity (i-component) (m/s) at T-point 97 97 !! the 10m wind velocity (j-component) (m/s) at T-point 98 !! the specific humidity ( -)98 !! the 10m or 2m specific humidity ( % ) 99 99 !! the solar heat (W/m2) 100 100 !! the Long wave (W/m2) 101 !! the 10m air temperature(Kelvin)101 !! the 10m or 2m air temperature (Kelvin) 102 102 !! the total precipitation (rain+snow) (Kg/m2/s) 103 103 !! the snow (solid prcipitation) (kg/m2/s) 104 !! OPTIONAL parameter (see ln_taudif namelist flag): 105 !! the tau diff associated to HF tau (N/m2) at T-point 104 !! the tau diff associated to HF tau (N/m2) at T-point (ln_taudif=T) 106 105 !! (2) CALL blk_oce_core 107 106 !! 108 107 !! C A U T I O N : never mask the surface stress fields 109 !! the stress is assumed to be in the mesh referential 110 !! i.e. the (i,j) referential 108 !! the stress is assumed to be in the (i,j) mesh referential 111 109 !! 112 110 !! ** Action : defined at each time-step at the air-sea interface 113 111 !! - utau, vtau i- and j-component of the wind stress 114 !! - taum wind stress module at T-point 115 !! - wndm 10m wind module at T-point 116 !! - qns, qsr non-slor and solar heat flux 117 !! - emp, emps evaporation minus precipitation 112 !! - taum, wndm wind stress and 10m wind modules at T-point 113 !! - qns, qsr non-solar and solar heat fluxes 114 !! - emp upward mass flux (evapo. - precip.) 115 !! - sfx salt flux due to freezing/melting (non-zero only if ice is present) 116 !! (set in limsbc(_2).F90) 118 117 !!---------------------------------------------------------------------- 119 118 INTEGER, INTENT(in) :: kt ! ocean time step … … 125 124 CHARACTER(len=100) :: cn_dir ! Root directory for location of core files 126 125 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i ! array of namelist informations on the fields to read 127 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 128 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow ! " " 129 TYPE(FLD_N) :: sn_tdif ! " " 126 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 127 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow, sn_tdif ! - - 130 128 NAMELIST/namsbc_core/ cn_dir , ln_2m , ln_taudif, rn_pfac, & 131 129 & sn_wndi, sn_wndj, sn_humi , sn_qsr , & … … 181 179 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_core', 'flux formulation for ocean surface boundary condition', 'namsbc_core' ) 182 180 ! 183 ENDIF 184 185 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 186 187 ! ! surface ocean fluxes computed with CLIO bulk formulea 181 sfx(:,:) = 0._wp ! salt flux; zero unless ice is present (computed in limsbc(_2).F90) 182 ! 183 ENDIF 184 185 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 186 187 ! ! compute the surface ocean fluxes using CORE bulk formulea 188 188 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m ) 189 189 … … 221 221 !! - qns : Non Solar heat flux over the ocean (W/m2) 222 222 !! - evap : Evaporation over the ocean (kg/m2/s) 223 !! - emp (s): evaporation minus precipitation (kg/m2/s)223 !! - emp : evaporation minus precipitation (kg/m2/s) 224 224 !! 225 225 !! ** Nota : sf has to be a dummy argument for AGRIF on NEC … … 252 252 zcoef_qsatw = 0.98 * 640380. / rhoa 253 253 254 zst(:,:) = pst(:,:) + rt0 ! convert eCelcius to Kelvin (and set minimum value far above 0 K)254 zst(:,:) = pst(:,:) + rt0 ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 255 255 256 256 ! ----------------------------------------------------------------------------- ! … … 378 378 379 379 !CDIR COLLAPSE 380 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) ! Downward Non Solar flux 381 !CDIR COLLAPSE 382 emp(:,:) = zevap(:,:) - sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) 383 !CDIR COLLAPSE 384 emps(:,:) = emp(:,:) 380 emp (:,:) = ( zevap(:,:) & ! mass flux (evap. - precip.) 381 & - sf(jp_prec)%fnow(:,:,1) * rn_pfac ) * tmask(:,:,1) 382 !CDIR COLLAPSE 383 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:) & ! Downward Non Solar flux 384 & - sf(jp_snow)%fnow(:,:,1) * lfus & ! remove latent melting heat for solid precip 385 & - zevap(:,:) * pst(:,:) * rcp & ! remove evap heat content at SST 386 & + ( sf(jp_prec)%fnow(:,:,1) - sf(jp_snow)%fnow(:,:,1) ) & ! add liquid precip heat content at Tair 387 & * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp & 388 & + sf(jp_snow)%fnow(:,:,1) & ! add solid precip heat content at min(Tair,Tsnow) 389 & * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0_snow ) - rt0 ) * cpic 385 390 ! 386 391 CALL iom_put( "qlw_oce", zqlw ) ! output downward longwave heat over the ocean 387 392 CALL iom_put( "qsb_oce", - zqsb ) ! output downward sensible heat over the ocean 388 393 CALL iom_put( "qla_oce", - zqla ) ! output downward latent heat over the ocean 394 CALL iom_put( "qhc_oce", qns-zqlw+zqsb+zqla ) ! output downward heat content of E-P over the ocean 389 395 CALL iom_put( "qns_oce", qns ) ! output downward non solar heat over the ocean 390 396 ! -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
r3294 r3625 84 84 !! - wndm 10m wind module at T-point 85 85 !! - qns, qsr non-slor and solar heat flux 86 !! - emp , empsevaporation minus precipitation86 !! - emp evaporation minus precipitation 87 87 !!---------------------------------------------------------------------- 88 88 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: sh_now ! specific humidity at T-point … … 258 258 emp (:,:) = evap(:,:) - sf(jp_prec)%fnow(:,:,1) * tmask(:,:,1) 259 259 !CDIR COLLAPSE 260 emps(:,:) = emp(:,:)261 260 262 261 CALL iom_put( "qlw_oce", qbw ) ! output downward longwave heat over the ocean -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r3294 r3625 664 664 !! ** Action : update utau, vtau ocean stress at U,V grid 665 665 !! taum, wndm wind stres and wind speed module at T-point 666 !! qns , qsr non solar and solar ocean heat fluxes ('ocean only case) 667 !! emp = emps evap. - precip. (- runoffs) (- calving) ('ocean only case) 666 !! qns non solar heat fluxes including emp heat content (ocean only case) 667 !! and the latent heat flux of solid precip. melting 668 !! qsr solar ocean heat fluxes (ocean only case) 669 !! emp upward mass flux [evap. - precip. (- runoffs) (- calving)] (ocean only case) 668 670 !!---------------------------------------------------------------------- 669 671 INTEGER, INTENT(in) :: kt ! ocean model time step index … … 777 779 ! Stress module can be negative when received (interpolation problem) 778 780 IF( llnewtau ) THEN 779 frcv(jpr_taum)%z3(:,:,1) = MAX( 0. 0e0, frcv(jpr_taum)%z3(:,:,1) )781 frcv(jpr_taum)%z3(:,:,1) = MAX( 0._wp, frcv(jpr_taum)%z3(:,:,1) ) 780 782 ENDIF 781 783 ENDIF … … 821 823 ! ! ========================= ! 822 824 ! 823 ! ! non solar heat flux over the ocean (qns) 824 IF( srcv(jpr_qnsoce)%laction ) qns(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) 825 IF( srcv(jpr_qnsmix)%laction ) qns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 826 ! add the latent heat of solid precip. melting 827 IF( srcv(jpr_snow )%laction ) qns(:,:) = qns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus 828 829 ! ! solar flux over the ocean (qsr) 830 IF( srcv(jpr_qsroce)%laction ) qsr(:,:) = frcv(jpr_qsroce)%z3(:,:,1) 831 IF( srcv(jpr_qsrmix)%laction ) qsr(:,:) = frcv(jpr_qsrmix)%z3(:,:,1) 832 IF( ln_dm2dc ) qsr(:,:) = sbc_dcy( qsr ) ! modify qsr to include the diurnal cycle 833 ! 834 ! ! total freshwater fluxes over the ocean (emp, emps) 825 ! ! total freshwater fluxes over the ocean (emp) 835 826 SELECT CASE( TRIM( sn_rcv_emp%cldes ) ) ! evaporation - precipitation 836 827 CASE( 'conservative' ) … … 863 854 !!gm end of internal cooking 864 855 ! 865 emps(:,:) = emp(:,:) ! concentration/dilution = emp 856 ! ! non solar heat flux over the ocean (qns) 857 IF( srcv(jpr_qnsoce)%laction ) qns(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) 858 IF( srcv(jpr_qnsmix)%laction ) qns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 859 ! add the latent heat of solid precip. melting 860 IF( srcv(jpr_snow )%laction ) THEN ! update qns over the free ocean with: 861 qns(:,:) = qns(:,:) - frcv(jpr_snow)%z3(:,:,1) * lfus & ! energy for melting solid precipitation over the free ocean 862 & - emp(:,:) * sst_m(:,:) * rcp ! remove heat content due to mass flux (assumed to be at SST) 863 ENDIF 864 865 ! ! solar flux over the ocean (qsr) 866 IF( srcv(jpr_qsroce)%laction ) qsr(:,:) = frcv(jpr_qsroce)%z3(:,:,1) 867 IF( srcv(jpr_qsrmix)%laction ) qsr(:,:) = frcv(jpr_qsrmix)%z3(:,:,1) 868 IF( ln_dm2dc ) qsr(:,:) = sbc_dcy( qsr ) ! modify qsr to include the diurnal cycle 869 ! 866 870 867 871 ENDIF … … 1141 1145 1142 1146 zicefr(:,:) = 1.- p_frld(:,:) 1143 IF( lk_diaar5 ) zcptn(:,:) = rcp * tsn(:,:,1,jp_tem)1147 zcptn(:,:) = rcp * sst_m(:,:) 1144 1148 ! 1145 1149 ! ! ========================= ! … … 1233 1237 & + pist(:,:,1) * zicefr(:,:) ) ) 1234 1238 END SELECT 1235 ztmp(:,:) = p_frld(:,:) * sprecip(:,:) * lfus ! add the latent heat of solid precip. melting 1236 qns_tot(:,:) = qns_tot(:,:) - ztmp(:,:) ! over free ocean 1239 ztmp(:,:) = p_frld(:,:) * sprecip(:,:) * lfus 1240 qns_tot(:,:) = qns_tot(:,:) & ! qns_tot update over free ocean with: 1241 & - ztmp(:,:) & ! remove the latent heat flux of solid precip. melting 1242 & - ( emp_tot(:,:) & ! remove the heat content of mass flux (assumed to be at SST) 1243 & - emp_ice(:,:) * zicefr(:,:) ) * zcptn(:,:) 1237 1244 IF( lk_diaar5 ) CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) ) ! heat flux from snow (cell average) 1238 1245 !!gm … … 1254 1261 ! ! ========================= ! 1255 1262 CASE( 'oce only' ) 1256 qsr_tot(:,: ) = MAX( 0.0,frcv(jpr_qsroce)%z3(:,:,1))1263 qsr_tot(:,: ) = MAX( 0._wp , frcv(jpr_qsroce)%z3(:,:,1) ) 1257 1264 CASE( 'conservative' ) 1258 1265 qsr_tot(:,: ) = frcv(jpr_qsrmix)%z3(:,:,1) … … 1357 1364 ztmp3(:,:,1:jpl) = tn_ice(:,:,1:jpl) * a_i(:,:,1:jpl) 1358 1365 CASE( 'no' ) 1359 ztmp3(:,:,:) = 0. 01366 ztmp3(:,:,:) = 0._wp 1360 1367 DO jl=1,jpl 1361 1368 ztmp3(:,:,1) = ztmp3(:,:,1) + tn_ice(:,:,jl) * a_i(:,:,jl) … … 1409 1416 ztmp4(:,:,1:jpl) = ht_s(:,:,1:jpl) * a_i(:,:,1:jpl) 1410 1417 CASE( 'no' ) 1411 ztmp3(:,:,:) = 0. 0 ; ztmp4(:,:,:) = 0.01418 ztmp3(:,:,:) = 0._wp ; ztmp4(:,:,:) = 0._wp 1412 1419 DO jl=1,jpl 1413 1420 ztmp3(:,:,1) = ztmp3(:,:,1) + ht_i(:,:,jl) * a_i(:,:,jl) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
r2715 r3625 61 61 !! 62 62 !! CAUTION : - never mask the surface stress fields 63 !! - the stress is assumed to be in the mesh referential 64 !! i.e. the (i,j) referential 63 !! - the stress is assumed to be in the (i,j) mesh referential 65 64 !! 66 65 !! ** Action : update at each time-step … … 68 67 !! - taum wind stress module at T-point 69 68 !! - wndm 10m wind module at T-point 70 !! - qns, qsr non-slor and solar heat flux 71 !! - emp, emps evaporation minus precipitation 69 !! - qns non solar heat flux including heat flux due to emp 70 !! - qsr solar heat flux 71 !! - emp upward mass flux (evap. - precip.) 72 !! - sfx salt flux; set to zero at nit000 but possibly non-zero 73 !! if ice is present (computed in limsbc(_2).F90) 72 74 !!---------------------------------------------------------------------- 73 75 INTEGER, INTENT(in) :: kt ! ocean time step … … 121 123 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_flx', 'flux formulation for ocean surface boundary condition', 'namsbc_flx' ) 122 124 ! 125 sfx(:,:) = 0.0_wp ! salt flux due to freezing/melting (non-zero only if ice is present; set in limsbc(_2).F90) 126 ! 123 127 ENDIF 124 128 … … 139 143 END DO 140 144 END DO 145 ! ! add to qns the heat due to e-p 146 qns(:,:) = qns(:,:) - emp(:,:) * sst_m(:,:) * rcp ! mass flux is at SST 147 ! 141 148 ! ! module of wind stress and wind speed at T-point 142 149 zcoef = 1. / ( zrhoa * zcdrag ) … … 154 161 CALL lbc_lnk( taum(:,:), 'T', 1. ) ; CALL lbc_lnk( wndm(:,:), 'T', 1. ) 155 162 156 emps(:,:) = emp (:,:) ! Initialization of emps (needed when no ice model)157 158 163 IF( nitend-nit000 <= 100 .AND. lwp ) THEN ! control print (if less than 100 time-step asked) 159 164 WRITE(numout,*) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90
r3294 r3625 59 59 !! =3 global mean of emp set to zero at each nn_fsbc time step 60 60 !! & spread out over erp area depending its sign 61 !! Note: if sea ice is embedded it is taken into account when computing the budget 61 62 !!---------------------------------------------------------------------- 62 63 INTEGER, INTENT( in ) :: kt ! ocean time-step index … … 64 65 INTEGER, INTENT( in ) :: kn_fwb ! ocean time-step index 65 66 ! 66 INTEGER :: inum, ikty, iyear ! local integers 67 REAL(wp) :: z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp ! local scalars 68 REAL(wp) :: zsurf_neg, zsurf_pos, zsurf_tospread ! - - 69 REAL(wp), POINTER, DIMENSION(:,:) :: ztmsk_neg, ztmsk_pos, ztmsk_tospread, z_wgt, zerp_cor 67 INTEGER :: inum, ikty, iyear ! local integers 68 REAL(wp) :: z_fwf, z_fwf_nsrf, zsum_fwf, zsum_erp ! local scalars 69 REAL(wp) :: zsurf_neg, zsurf_pos, zsurf_tospread, zcoef ! - - 70 REAL(wp), POINTER, DIMENSION(:,:) :: ztmsk_neg, ztmsk_pos, z_wgt ! 2D workspaces 71 REAL(wp), POINTER, DIMENSION(:,:) :: ztmsk_tospread, zerp_cor ! - - 70 72 !!---------------------------------------------------------------------- 71 73 ! … … 87 89 ! 88 90 area = glob_sum( e1e2t(:,:) ) ! interior global domain surface 91 ! 92 #if ! defined key_lim2 && ! defined key_lim3 && ! defined key_cice 93 snwice_mass_b(:,:) = 0.e0 ! no sea-ice model is being used : no snow+ice mass 94 snwice_mass (:,:) = 0.e0 95 #endif 96 ! 89 97 ENDIF 90 98 … … 95 103 ! 96 104 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 97 z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area ! sum over the global domain 98 emp (:,:) = emp (:,:) - z_fwf 99 emps(:,:) = emps(:,:) - z_fwf 105 z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - snwice_fmass(:,:) ) ) / area ! sum over the global domain 106 zcoef = z_fwf * rcp 107 emp(:,:) = emp(:,:) - z_fwf 108 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) ! account for change to the heat budget due to fw correction 100 109 ENDIF 101 110 ! 102 111 CASE ( 2 ) !== fwf budget adjusted from the previous year ==! 103 112 ! 104 IF( kt == nit000 ) THEN ! initialisation113 IF( kt == nit000 ) THEN ! initialisation 105 114 ! ! Read the corrective factor on precipitations (fwfold) 106 115 CALL ctl_opn( inum, 'EMPave_old.dat', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) … … 117 126 ikty = 365 * 86400 / rdttra(1) !!bug use of 365 days leap year or 360d year !!!!!!! 118 127 IF( MOD( kt, ikty ) == 0 ) THEN 119 a_fwb_b = a_fwb 120 a_fwb = glob_sum( e1e2t(:,:) * sshn(:,:) ) ! sum over the global domain 128 a_fwb_b = a_fwb ! mean sea level taking into account the ice+snow 129 ! sum over the global domain 130 a_fwb = glob_sum( e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 121 131 a_fwb = a_fwb * 1.e+3 / ( area * 86400. * 365. ) ! convert in Kg/m3/s = mm/s 122 132 !!gm ! !!bug 365d year … … 125 135 ENDIF 126 136 ! 127 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN ! correct the freshwater fluxes 128 emp (:,:) = emp (:,:) + fwfold 129 emps(:,:) = emps(:,:) + fwfold 130 ENDIF 131 ! 132 IF( kt == nitend .AND. lwp ) THEN ! save fwfold value in a file 137 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN ! correct the freshwater fluxes 138 zcoef = fwfold * rcp 139 emp(:,:) = emp(:,:) + fwfold 140 qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) ! account for change to the heat budget due to fw correction 141 ENDIF 142 ! 143 IF( kt == nitend .AND. lwp ) THEN ! save fwfold value in a file 133 144 CALL ctl_opn( inum, 'EMPave.dat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., narea ) 134 145 WRITE( inum, "(24X,I8,2ES24.16)" ) nyear, a_fwb_b, a_fwb … … 143 154 ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 144 155 ! 145 zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) ) 156 zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) ) ! Area filled by <0 and >0 erp 146 157 zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) ) 147 ! ! fwf global mean 148 z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) ) ) / area158 ! ! fwf global mean (excluding ocean to ice/snow exchanges) 159 z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) - snwice_fmass(:,:) ) ) / area 149 160 ! 150 161 IF( z_fwf < 0._wp ) THEN ! spread out over >0 erp area to increase evaporation … … 160 171 z_fwf_nsrf = zsum_fwf / ( zsurf_tospread + rsmall ) 161 172 ! ! weight to respect erp field 2D structure 162 zsum_erp = glob_sum( ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) )173 zsum_erp = glob_sum( ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) ) 163 174 z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( zsum_erp + rsmall ) 164 175 ! ! final correction term to apply … … 168 179 CALL lbc_lnk( zerp_cor, 'T', 1. ) 169 180 ! 170 emp (:,:) = emp(:,:) + zerp_cor(:,:)171 emps(:,:) = emps(:,:) + zerp_cor(:,:)172 erp (:,:) = erp(:,:) + zerp_cor(:,:)181 emp(:,:) = emp(:,:) + zerp_cor(:,:) 182 qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:) ! account for change to the heat budget due to fw correction 183 erp(:,:) = erp(:,:) + zerp_cor(:,:) 173 184 ! 174 185 IF( nprint == 1 .AND. lwp ) THEN ! control print -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r3294 r3625 15 15 USE dom_oce ! ocean space and time domain 16 16 USE domvvl 17 USE phycst, only : rcp, rau0 17 USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic 18 18 USE in_out_manager ! I/O manager 19 19 USE lib_mpp ! distributed memory computing library … … 37 37 USE ice_gather_scatter 38 38 USE ice_calendar, only: dt 39 USE ice_state, only: aice,aicen,uvel,vvel,vsno n,vicen39 USE ice_state, only: aice,aicen,uvel,vvel,vsno,vsnon,vice,vicen 40 40 USE ice_flux, only: strax,stray,strocnx,strocny,frain,fsnow, & 41 41 sst,sss,uocn,vocn,ss_tltx,ss_tlty,fsalt_gbm, & … … 59 59 PUBLIC cice_sbc_final ! routine called by sbc_final 60 60 PUBLIC sbc_ice_cice ! routine called by sbc 61 62 INTEGER , PARAMETER :: ji_off = INT ( (jpiglo - nx_global) / 2 ) 63 INTEGER , PARAMETER :: jj_off = INT ( (jpjglo - ny_global) / 2 ) 61 64 62 65 INTEGER , PARAMETER :: jpfld = 13 ! maximum number of files to read … … 107 110 !! ** Action : - time evolution of the CICE sea-ice model 108 111 !! - update all sbc variables below sea-ice: 109 !! utau, vtau, qns , qsr, emp , emps112 !! utau, vtau, qns , qsr, emp , sfx 110 113 !!--------------------------------------------------------------------- 111 114 INTEGER, INTENT(in) :: kt ! ocean time step … … 143 146 !! ** Purpose: Initialise ice related fields for NEMO and coupling 144 147 !! 145 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 146 !!--------------------------------------------------------------------- 147 148 INTEGER :: ji, jj, jpl ! dummy loop indices 148 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 149 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 150 REAL(wp) :: zcoefu, zcoefv, zcoeff ! local scalar 151 INTEGER :: ji, jj, jl ! dummy loop indices 152 !!--------------------------------------------------------------------- 149 153 150 154 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_init') 155 ! 156 CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 151 157 ! 152 158 IF(lwp) WRITE(numout,*)'cice_sbc_init' … … 182 188 CALL cice2nemo(aice,fr_i, 'T', 1. ) 183 189 IF ( (nsbc == 2).OR.(nsbc == 5) ) THEN 184 DO j pl=1,ncat185 CALL cice2nemo(aicen(:,:,j pl,:),a_i(:,:,jpl), 'T', 1. )190 DO jl=1,ncat 191 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 186 192 ENDDO 187 193 ENDIF … … 198 204 CALL lbc_lnk ( fr_iu , 'U', 1. ) 199 205 CALL lbc_lnk ( fr_iv , 'V', 1. ) 206 207 ! ! embedded sea ice 208 IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 209 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 210 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 211 snwice_mass (:,:) = ( rhosn * ztmp1(:,:) + rhoic * ztmp2(:,:) ) 212 snwice_mass_b(:,:) = snwice_mass(:,:) 213 ELSE 214 snwice_mass (:,:) = 0.0_wp ! no mass exchanges 215 snwice_mass_b(:,:) = 0.0_wp ! no mass exchanges 216 ENDIF 217 IF( nn_ice_embd == 2 .AND. & ! full embedment (case 2) & no restart : 218 & .NOT.ln_rstart ) THEN ! deplete the initial ssh belew sea-ice area 219 sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 220 sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 221 ! 222 ! Note: Changed the initial values of sshb and sshn=> need to recompute ssh[u,v,f]_[b,n] 223 ! which were previously set in domvvl 224 IF ( lk_vvl ) THEN ! Is this necessary? embd 2 should be restricted to vvl only??? 225 DO jj = 1, jpjm1 226 DO ji = 1, jpim1 ! caution: use of Vector Opt. not possible 227 zcoefu = 0.5 * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) ) 228 zcoefv = 0.5 * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) ) 229 zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1) 230 sshu_b(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshb(ji ,jj) & 231 & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) ) 232 sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshb(ji,jj ) & 233 & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) ) 234 sshu_n(ji,jj) = zcoefu * ( e1t(ji ,jj) * e2t(ji ,jj) * sshn(ji ,jj) & 235 & + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) ) 236 sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj ) * e2t(ji,jj ) * sshn(ji,jj ) & 237 & + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) ) 238 END DO 239 END DO 240 CALL lbc_lnk( sshu_b, 'U', 1. ) ; CALL lbc_lnk( sshu_n, 'U', 1. ) 241 CALL lbc_lnk( sshv_b, 'V', 1. ) ; CALL lbc_lnk( sshv_n, 'V', 1. ) 242 DO jj = 1, jpjm1 243 DO ji = 1, jpim1 ! NO Vector Opt. 244 sshf_n(ji,jj) = 0.5 * umask(ji,jj,1) * umask(ji,jj+1,1) & 245 & / ( e1f(ji,jj ) * e2f(ji,jj ) ) & 246 & * ( e1u(ji,jj ) * e2u(ji,jj ) * sshu_n(ji,jj ) & 247 & + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) ) 248 END DO 249 END DO 250 CALL lbc_lnk( sshf_n, 'F', 1. ) 251 ENDIF 252 ENDIF 253 254 CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 200 255 ! 201 256 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_init') … … 212 267 INTEGER, INTENT(in ) :: nsbc ! surface forcing type 213 268 214 INTEGER :: ji, jj, j pl ! dummy loop indices215 REAL(wp), DIMENSION(:,:), POINTER :: ztmp 269 INTEGER :: ji, jj, jl ! dummy loop indices 270 REAL(wp), DIMENSION(:,:), POINTER :: ztmp, zpice 216 271 REAL(wp), DIMENSION(:,:,:), POINTER :: ztmpn 272 REAL(wp) :: zintb, zintn ! dummy argument 217 273 !!--------------------------------------------------------------------- 218 274 219 275 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_in') 220 276 ! 221 CALL wrk_alloc( jpi,jpj, ztmp )277 CALL wrk_alloc( jpi,jpj, ztmp, zpice ) 222 278 CALL wrk_alloc( jpi,jpj,ncat, ztmpn ) 223 279 … … 259 315 ! Surface downward latent heat flux (CI_5) 260 316 IF (nsbc == 2) THEN 261 DO j pl=1,ncat262 ztmpn(:,:,j pl)=qla_ice(:,:,1)*a_i(:,:,jpl)317 DO jl=1,ncat 318 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) 263 319 ENDDO 264 320 ELSE … … 269 325 DO ji=1,jpi 270 326 IF (fr_i(ji,jj).eq.0.0) THEN 271 DO j pl=1,ncat272 ztmpn(ji,jj,j pl)=0.0327 DO jl=1,ncat 328 ztmpn(ji,jj,jl)=0.0 273 329 ENDDO 274 330 ! This will then be conserved in CICE 275 331 ztmpn(ji,jj,1)=qla_ice(ji,jj,1) 276 332 ELSE 277 DO j pl=1,ncat278 ztmpn(ji,jj,j pl)=qla_ice(ji,jj,1)*a_i(ji,jj,jpl)/fr_i(ji,jj)333 DO jl=1,ncat 334 ztmpn(ji,jj,jl)=qla_ice(ji,jj,1)*a_i(ji,jj,jl)/fr_i(ji,jj) 279 335 ENDDO 280 336 ENDIF … … 282 338 ENDDO 283 339 ENDIF 284 DO j pl=1,ncat285 CALL nemo2cice(ztmpn(:,:,j pl),flatn_f(:,:,jpl,:),'T', 1. )340 DO jl=1,ncat 341 CALL nemo2cice(ztmpn(:,:,jl),flatn_f(:,:,jl,:),'T', 1. ) 286 342 287 343 ! GBM conductive flux through ice (CI_6) 288 344 ! Convert to GBM 289 345 IF (nsbc == 2) THEN 290 ztmp(:,:) = botmelt(:,:,j pl)*a_i(:,:,jpl)346 ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 291 347 ELSE 292 ztmp(:,:) = botmelt(:,:,j pl)348 ztmp(:,:) = botmelt(:,:,jl) 293 349 ENDIF 294 CALL nemo2cice(ztmp,fcondtopn_f(:,:,j pl,:),'T', 1. )350 CALL nemo2cice(ztmp,fcondtopn_f(:,:,jl,:),'T', 1. ) 295 351 296 352 ! GBM surface heat flux (CI_7) 297 353 ! Convert to GBM 298 354 IF (nsbc == 2) THEN 299 ztmp(:,:) = (topmelt(:,:,j pl)+botmelt(:,:,jpl))*a_i(:,:,jpl)355 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 300 356 ELSE 301 ztmp(:,:) = (topmelt(:,:,j pl)+botmelt(:,:,jpl))357 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl)) 302 358 ENDIF 303 CALL nemo2cice(ztmp,fsurfn_f(:,:,j pl,:),'T', 1. )359 CALL nemo2cice(ztmp,fsurfn_f(:,:,jl,:),'T', 1. ) 304 360 ENDDO 305 361 … … 383 439 CALL nemo2cice(ztmp,vocn,'F', -1. ) 384 440 441 IF( nn_ice_embd == 2 ) THEN !== embedded sea ice: compute representative ice top surface ==! 442 ! 443 ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 444 ! = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1} 445 zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp 446 ! 447 ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1} 448 ! = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1}) 449 zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 450 ! 451 zpice(:,:) = ssh_m(:,:) + ( zintn * snwice_mass(:,:) + zintb * snwice_mass_b(:,:) ) * r1_rau0 452 ! 453 ! 454 ELSE !== non-embedded sea ice: use ocean surface for slope calculation ==! 455 zpice(:,:) = ssh_m(:,:) 456 ENDIF 457 385 458 ! x comp and y comp of sea surface slope (on F points) 386 459 ! T point to F point 387 460 DO jj=1,jpjm1 388 461 DO ji=1,jpim1 389 ztmp(ji,jj)=0.5 * ( ( ssh_m(ji+1,jj )-ssh_m(ji,jj ))/e1u(ji,jj ) &390 + ( ssh_m(ji+1,jj+1)-ssh_m(ji,jj+1))/e1u(ji,jj+1) ) &462 ztmp(ji,jj)=0.5 * ( (zpice(ji+1,jj )-zpice(ji,jj ))/e1u(ji,jj ) & 463 + (zpice(ji+1,jj+1)-zpice(ji,jj+1))/e1u(ji,jj+1) ) & 391 464 * fmask(ji,jj,1) 392 465 ENDDO … … 397 470 DO jj=1,jpjm1 398 471 DO ji=1,jpim1 399 ztmp(ji,jj)=0.5 * ( ( ssh_m(ji ,jj+1)-ssh_m(ji ,jj))/e2v(ji ,jj) &400 + ( ssh_m(ji+1,jj+1)-ssh_m(ji+1,jj))/e2v(ji+1,jj) ) &472 ztmp(ji,jj)=0.5 * ( (zpice(ji ,jj+1)-zpice(ji ,jj))/e2v(ji ,jj) & 473 + (zpice(ji+1,jj+1)-zpice(ji+1,jj))/e2v(ji+1,jj) ) & 401 474 * fmask(ji,jj,1) 402 475 ENDDO … … 420 493 INTEGER, INTENT( in ) :: nsbc ! surface forcing type 421 494 422 INTEGER :: ji, jj, j pl ! dummy loop indices423 REAL(wp), DIMENSION(:,:), POINTER :: ztmp 495 INTEGER :: ji, jj, jl ! dummy loop indices 496 REAL(wp), DIMENSION(:,:), POINTER :: ztmp1, ztmp2 424 497 !!--------------------------------------------------------------------- 425 498 426 499 IF( nn_timing == 1 ) CALL timing_start('cice_sbc_out') 427 500 ! 428 CALL wrk_alloc( jpi,jpj, ztmp )501 CALL wrk_alloc( jpi,jpj, ztmp1, ztmp2 ) 429 502 430 503 IF( kt == nit000 ) THEN … … 433 506 434 507 ! x comp of ocean-ice stress 435 CALL cice2nemo(strocnx,ztmp ,'F', -1. )508 CALL cice2nemo(strocnx,ztmp1,'F', -1. ) 436 509 ss_iou(:,:)=0.0 437 510 ! F point to U point 438 511 DO jj=2,jpjm1 439 512 DO ji=2,jpim1 440 ss_iou(ji,jj) = 0.5 * ( ztmp (ji,jj-1) + ztmp(ji,jj) ) * umask(ji,jj,1)513 ss_iou(ji,jj) = 0.5 * ( ztmp1(ji,jj-1) + ztmp1(ji,jj) ) * umask(ji,jj,1) 441 514 ENDDO 442 515 ENDDO … … 444 517 445 518 ! y comp of ocean-ice stress 446 CALL cice2nemo(strocny,ztmp ,'F', -1. )519 CALL cice2nemo(strocny,ztmp1,'F', -1. ) 447 520 ss_iov(:,:)=0.0 448 521 ! F point to V point … … 450 523 DO jj=1,jpjm1 451 524 DO ji=2,jpim1 452 ss_iov(ji,jj) = 0.5 * ( ztmp (ji-1,jj) + ztmp(ji,jj) ) * vmask(ji,jj,1)525 ss_iov(ji,jj) = 0.5 * ( ztmp1(ji-1,jj) + ztmp1(ji,jj) ) * vmask(ji,jj,1) 453 526 ENDDO 454 527 ENDDO … … 473 546 emp(:,:) = (1.0-fr_i(:,:))*emp(:,:) 474 547 ELSE IF (nsbc ==5) THEN 475 ! emp_tot is set in sbc_cpl_ice_flx (call from cice_sbc_in above) 548 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 549 ! This is currently as required with the coupling fields from the UM atmosphere 476 550 emp(:,:) = emp_tot(:,:)+tprecip(:,:)*fr_i(:,:) 477 551 ENDIF 478 552 479 ! Subtract fluxes from CICE to get freshwater equivalent flux used in 480 ! salinity calculation 481 CALL cice2nemo(fresh_gbm,ztmp,'T', 1. ) 482 emps(:,:)=emp(:,:)-ztmp(:,:) 483 ! Note the 1000.0 is to convert from kg salt to g salt (needed for PSU) 484 CALL cice2nemo(fsalt_gbm,ztmp,'T', 1. ) 485 DO jj=1,jpj 486 DO ji=1,jpi 487 IF (sss_m(ji,jj).gt.0.0) THEN 488 emps(ji,jj)=emps(ji,jj)+ztmp(ji,jj)*1000.0/sss_m(ji,jj) 489 ENDIF 490 ENDDO 491 ENDDO 492 493 ! No longer remove precip over ice from free surface calculation on basis that the 494 ! weight of the precip will affect the free surface even if it falls on the ice 495 ! (same to the argument that freezing / melting of ice doesn't change the free surface) 496 ! Sublimation from the ice is treated in a similar way (included in emp but not emps) 497 ! 498 ! This should not be done in the variable volume case 499 500 IF (.NOT. lk_vvl) THEN 501 502 emp(:,:) = emp(:,:) - tprecip(:,:)*fr_i(:,:) 503 504 ! Take sublimation into account 505 IF (nsbc == 5 ) THEN 506 emp(:,:) = emp(:,:) + ( emp_ice(:,:) + sprecip(:,:) ) 507 ELSE IF (nsbc == 2 ) THEN 508 emp(:,:) = emp(:,:) - qla_ice(:,:,1) / Lsub 509 ENDIF 510 511 ENDIF 512 553 CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. ) 554 CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. ) 555 556 ! Check to avoid unphysical expression when ice is forming (ztmp1 negative) 557 ! Otherwise we are effectively allowing ice of higher salinity than the ocean to form 558 ! which has to be compensated for by the ocean salinity potentially going negative 559 ! This check breaks conservation but seems reasonable until we have prognostic ice salinity 560 ! Note the 1000.0 below is to convert from kg salt to g salt (needed for PSU) 561 WHERE (ztmp1(:,:).lt.0.0) ztmp2(:,:)=MAX(ztmp2(:,:),ztmp1(:,:)*sss_m(:,:)/1000.0) 562 sfx(:,:)=ztmp2(:,:)*1000.0 563 emp(:,:)=emp(:,:)-ztmp1(:,:) 564 513 565 CALL lbc_lnk( emp , 'T', 1. ) 514 CALL lbc_lnk( emps, 'T', 1. )566 CALL lbc_lnk( sfx , 'T', 1. ) 515 567 516 568 ! Solar penetrative radiation and non solar surface heat flux … … 532 584 ! Now add in ice / snow related terms 533 585 ! [fswthru will be zero unless running with calc_Tsfc=T in CICE] 534 CALL cice2nemo(fswthru_gbm,ztmp ,'T', 1. )535 qsr(:,:)=qsr(:,:)+ztmp (:,:)586 CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. ) 587 qsr(:,:)=qsr(:,:)+ztmp1(:,:) 536 588 CALL lbc_lnk( qsr , 'T', 1. ) 537 589 … … 542 594 ENDDO 543 595 544 CALL cice2nemo(fhocn_gbm,ztmp ,'T', 1. )545 qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp (:,:)596 CALL cice2nemo(fhocn_gbm,ztmp1,'T', 1. ) 597 qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:) 546 598 547 599 CALL lbc_lnk( qns , 'T', 1. ) … … 551 603 CALL cice2nemo(aice,fr_i,'T', 1. ) 552 604 IF ( (nsbc == 2).OR.(nsbc == 5) ) THEN 553 DO j pl=1,ncat554 CALL cice2nemo(aicen(:,:,j pl,:),a_i(:,:,jpl), 'T', 1. )605 DO jl=1,ncat 606 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) 555 607 ENDDO 556 608 ENDIF … … 568 620 CALL lbc_lnk ( fr_iv , 'V', 1. ) 569 621 622 ! ! embedded sea ice 623 IF( nn_ice_embd /= 0 ) THEN ! mass exchanges between ice and ocean (case 1 or 2) set the snow+ice mass 624 CALL cice2nemo(vsno(:,:,:),ztmp1,'T', 1. ) 625 CALL cice2nemo(vice(:,:,:),ztmp2,'T', 1. ) 626 snwice_mass (:,:) = ( rhosn * ztmp1(:,:) + rhoic * ztmp2(:,:) ) 627 snwice_mass_b(:,:) = snwice_mass(:,:) 628 snwice_fmass (:,:) = ( snwice_mass(:,:) - snwice_mass_b(:,:) ) / dt 629 ENDIF 630 570 631 ! Release work space 571 632 572 CALL wrk_dealloc( jpi,jpj, ztmp )633 CALL wrk_dealloc( jpi,jpj, ztmp1, ztmp2 ) 573 634 ! 574 635 IF( nn_timing == 1 ) CALL timing_stop('cice_sbc_out') … … 587 648 !!--------------------------------------------------------------------- 588 649 589 INTEGER :: j pl ! dummy loop index650 INTEGER :: jl ! dummy loop index 590 651 INTEGER :: ierror 591 652 … … 610 671 ! Snow and ice thicknesses (CO_2 and CO_3) 611 672 612 DO j pl = 1,ncat613 CALL cice2nemo(vsnon(:,:,j pl,:),ht_s(:,:,jpl),'T', 1. )614 CALL cice2nemo(vicen(:,:,j pl,:),ht_i(:,:,jpl),'T', 1. )673 DO jl = 1,ncat 674 CALL cice2nemo(vsnon(:,:,jl,:),ht_s(:,:,jl),'T', 1. ) 675 CALL cice2nemo(vicen(:,:,jl,:),ht_i(:,:,jl),'T', 1. ) 615 676 ENDDO 616 677 ! … … 780 841 REAL(wp), DIMENSION(jpi,jpj) :: pn 781 842 #if !defined key_nemocice_decomp 843 REAL(wp), DIMENSION(jpiglo,jpjglo) :: png2 782 844 REAL (kind=dbl_kind), dimension(nx_global,ny_global) :: pcg 783 845 #endif … … 798 860 ! Copy local domain data from NEMO to CICE field 799 861 pc(:,:,1)=0.0 800 DO jj=2,ny_block 801 DO ji=2,nx_block 802 pc(ji,jj,1)=pn(ji ,jj-1)862 DO jj=2,ny_block-1 863 DO ji=2,nx_block-1 864 pc(ji,jj,1)=pn(ji-1+ji_off,jj-1+jj_off) 803 865 ENDDO 804 866 ENDDO … … 824 886 ! pcg(:,:)=0.0 825 887 DO jn=1,jpnij 826 DO jj= 1,nlcjt(jn)-1827 DO ji= 2,nlcit(jn)-1828 p cg(ji+nimppt(jn)-2,jj+njmppt(jn)-1)=png(ji,jj,jn)888 DO jj=nldjt(jn),nlejt(jn) 889 DO ji=nldit(jn),nleit(jn) 890 png2(ji+nimppt(jn)-1,jj+njmppt(jn)-1)=png(ji,jj,jn) 829 891 ENDDO 892 ENDDO 893 ENDDO 894 DO jj=1,ny_global 895 DO ji=1,nx_global 896 pcg(ji,jj)=png2(ji+ji_off,jj+jj_off) 830 897 ENDDO 831 898 ENDDO … … 922 989 DO jj=1,jpjm1 923 990 DO ji=1,jpim1 924 pn(ji,jj)=pc(ji ,jj+1,1)991 pn(ji,jj)=pc(ji+1-ji_off,jj+1-jj_off,1) 925 992 ENDDO 926 993 ENDDO … … 936 1003 ! Need to make sure this is robust to changes in NEMO halo rows.... 937 1004 ! (may be OK but not spent much time thinking about it) 1005 ! Note that non-existent pcg elements may be used below, but 1006 ! the lbclnk call on pn will replace these with sensible values 938 1007 939 1008 IF (nproc==0) THEN 940 1009 png(:,:,:)=0.0 941 1010 DO jn=1,jpnij 942 DO jj= 1,nlcjt(jn)-1943 DO ji= 2,nlcit(jn)-1944 png(ji,jj,jn)=pcg(ji+nimppt(jn)- 2,jj+njmppt(jn)-1)1011 DO jj=nldjt(jn),nlejt(jn) 1012 DO ji=nldit(jn),nleit(jn) 1013 png(ji,jj,jn)=pcg(ji+nimppt(jn)-1-ji_off,jj+njmppt(jn)-1-jj_off) 945 1014 ENDDO 946 1015 ENDDO -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90
r3294 r3625 5 5 !! covered area using ice-if model 6 6 !!====================================================================== 7 !! History : 3.0 7 !! History : 3.0 ! 2006-06 (G. Madec) Original code 8 8 !!---------------------------------------------------------------------- 9 9 10 10 !!---------------------------------------------------------------------- 11 !! sbc_ice_if 11 !! sbc_ice_if : update sbc in ice-covered area 12 12 !!---------------------------------------------------------------------- 13 USE oce 14 USE dom_oce 15 USE phycst 16 USE eosbn2 17 USE sbc_oce 13 USE oce ! ocean dynamics and tracers 14 USE dom_oce ! ocean space and time domain 15 USE phycst ! physical constants 16 USE eosbn2 ! equation of state 17 USE sbc_oce ! surface boundary condition: ocean fields 18 18 USE sbccpl 19 USE fldread ! read input field 20 USE iom ! I/O manager library 21 USE in_out_manager ! I/O manager 22 USE lib_mpp ! MPP library 19 USE fldread ! read input field 20 USE iom ! I/O manager library 21 USE in_out_manager ! I/O manager 22 USE lib_mpp ! MPP library 23 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 23 24 24 25 IMPLICIT NONE … … 51 52 !! taum, wndm : remain unchanged 52 53 !! qns, qsr : update heat flux below sea-ice 53 !! emp, emps: update freshwater flux below sea-ice54 !! emp, sfx : update freshwater flux below sea-ice 54 55 !! fr_i : update the ice fraction 55 56 !!--------------------------------------------------------------------- -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r3294 r3625 10 10 !! - ! 2008-04 (G. Madec) sltyle and lim_ctl routine 11 11 !! 3.3 ! 2010-11 (G. Madec) ice-ocean stress always computed at each ocean time-step 12 !! 4.0! 2011-01 (A Porter) dynamical allocation12 !! 3.4 ! 2011-01 (A Porter) dynamical allocation 13 13 !!---------------------------------------------------------------------- 14 14 #if defined key_lim3 … … 88 88 !! ** Action : - time evolution of the LIM sea-ice model 89 89 !! - update all sbc variables below sea-ice: 90 !! utau, vtau, taum, wndm, qns , qsr, emp , emps90 !! utau, vtau, taum, wndm, qns , qsr, emp , sfx 91 91 !!--------------------------------------------------------------------- 92 92 INTEGER, INTENT(in) :: kt ! ocean time step … … 170 170 171 171 ! ! intialisation to zero !!gm is it truly necessary ??? 172 d_a_i_thd (:,:,:) = 0. e0 ; d_a_i_trp (:,:,:) = 0.e0173 d_v_i_thd (:,:,:) = 0. e0 ; d_v_i_trp (:,:,:) = 0.e0174 d_e_i_thd (:,:,:,:) = 0. e0 ; d_e_i_trp (:,:,:,:) = 0.e0175 d_v_s_thd (:,:,:) = 0. e0 ; d_v_s_trp (:,:,:) = 0.e0176 d_e_s_thd (:,:,:,:) = 0. e0 ; d_e_s_trp (:,:,:,:) = 0.e0177 d_smv_i_thd(:,:,:) = 0. e0 ; d_smv_i_trp(:,:,:) = 0.e0178 d_oa_i_thd (:,:,:) = 0. e0 ; d_oa_i_trp (:,:,:) = 0.e0179 ! 180 fseqv (:,:) = 0.e0181 fsbri (:,:) = 0.e0 ; fsalt_res(:,:) = 0.e0182 f salt_rpo(:,:) = 0.e0183 fhmec (:,:) = 0.e0 ; fhbri (:,:) = 0.e0184 fmmec (:,:) = 0.e0 ; fheat_res(:,:) = 0.e0185 f heat_rpo(:,:) = 0.e0 ; focea2D (:,:) = 0.e0186 fsup2D (:,:) = 0.e0172 d_a_i_thd (:,:,:) = 0._wp ; d_a_i_trp (:,:,:) = 0._wp 173 d_v_i_thd (:,:,:) = 0._wp ; d_v_i_trp (:,:,:) = 0._wp 174 d_e_i_thd (:,:,:,:) = 0._wp ; d_e_i_trp (:,:,:,:) = 0._wp 175 d_v_s_thd (:,:,:) = 0._wp ; d_v_s_trp (:,:,:) = 0._wp 176 d_e_s_thd (:,:,:,:) = 0._wp ; d_e_s_trp (:,:,:,:) = 0._wp 177 d_smv_i_thd(:,:,:) = 0._wp ; d_smv_i_trp(:,:,:) = 0._wp 178 d_oa_i_thd (:,:,:) = 0._wp ; d_oa_i_trp (:,:,:) = 0._wp 179 ! 180 sfx (:,:) = 0._wp 181 sfx_bri(:,:) = 0._wp ; sfx_mec (:,:) = 0._wp ; sfx_res (:,:) = 0._wp 182 fhbri (:,:) = 0._wp ; fheat_mec(:,:) = 0._wp ; fheat_res(:,:) = 0._wp 183 fhmec (:,:) = 0._wp ; 184 fmmec (:,:) = 0._wp 185 focea2D(:,:) = 0._wp 186 fsup2D (:,:) = 0._wp 187 187 ! 188 diag_sni_gr(:,:) = 0. e0 ; diag_lat_gr(:,:) = 0.e0189 diag_bot_gr(:,:) = 0. e0 ; diag_dyn_gr(:,:) = 0.e0190 diag_bot_me(:,:) = 0. e0 ; diag_sur_me(:,:) = 0.e0188 diag_sni_gr(:,:) = 0._wp ; diag_lat_gr(:,:) = 0._wp 189 diag_bot_gr(:,:) = 0._wp ; diag_dyn_gr(:,:) = 0._wp 190 diag_bot_me(:,:) = 0._wp ; diag_sur_me(:,:) = 0._wp 191 191 ! dynamical invariants 192 delta_i(:,:) = 0. e0 ; divu_i(:,:) = 0.e0 ; shear_i(:,:) = 0.e0192 delta_i(:,:) = 0._wp ; divu_i(:,:) = 0._wp ; shear_i(:,:) = 0._wp 193 193 194 194 CALL lim_rst_opn( kt ) ! Open Ice restart file … … 196 196 IF( ln_nicep ) CALL lim_prt_state( jiindx, jjindx, 1, ' - Beginning the time step - ' ) ! control print 197 197 ! 198 IF( .NOT. lk_c1d ) THEN 199 ! Ice dynamics & transport (not in 1D case) 198 IF( .NOT. lk_c1d ) THEN ! Ice dynamics & transport (except in 1D case) 200 199 CALL lim_dyn( kt ) ! Ice dynamics ( rheology/dynamics ) 201 200 CALL lim_trp( kt ) ! Ice transport ( Advection/diffusion ) … … 210 209 CALL lim_var_bv ! bulk brine volume (diag) 211 210 CALL lim_thd( kt ) ! Ice thermodynamics 212 zcoef = rdt_ice / 86400.e0! Ice natural aging211 zcoef = rdt_ice /rday ! Ice natural aging 213 212 oa_i(:,:,:) = oa_i(:,:,:) + a_i(:,:,:) * zcoef 214 213 CALL lim_var_glo2eqv ! this CALL is maybe not necessary (Martin) … … 268 267 269 268 inb_altests = 10 270 inb_alp(:) = 0269 inb_alp(:) = 0 271 270 272 271 ! Alert if incompatible volume and concentration … … 277 276 DO jj = 1, jpj 278 277 DO ji = 1, jpi 279 IF( v_i(ji,jj,jl) /= 0. e0 .AND. a_i(ji,jj,jl) == 0.e0) THEN278 IF( v_i(ji,jj,jl) /= 0._wp .AND. a_i(ji,jj,jl) == 0._wp ) THEN 280 279 WRITE(numout,*) ' ALERTE 2 : Incompatible volume and concentration ' 281 280 WRITE(numout,*) ' at_i ', at_i(ji,jj) … … 297 296 DO jj = 1, jpj 298 297 DO ji = 1, jpi 299 IF( ht_i(ji,jj,jl) .GT. 50.0) THEN298 IF( ht_i(ji,jj,jl) > 50._wp ) THEN 300 299 CALL lim_prt_state( ji, jj, 2, ' ALERTE 3 : Very thick ice ' ) 301 300 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 … … 309 308 DO jj = 1, jpj 310 309 DO ji = 1, jpi 311 IF( MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) .GT.0.5 .AND. &312 & at_i(ji,jj) .GT. 0.e0) THEN310 IF( MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) > 0.5 .AND. & 311 & at_i(ji,jj) > 0._wp ) THEN 313 312 CALL lim_prt_state( ji, jj, 1, ' ALERTE 4 : Very fast ice ' ) 314 313 WRITE(numout,*) ' ice strength : ', strength(ji,jj) … … 332 331 DO jj = 1, jpj 333 332 DO ji = 1, jpi 334 IF( tms(ji,jj) .LE. 0.0 .AND. at_i(ji,jj) .GT. 0.e0) THEN333 IF( tms(ji,jj) <= 0._wp .AND. at_i(ji,jj) > 0._wp ) THEN 335 334 CALL lim_prt_state( ji, jj, 1, ' ALERTE 6 : Ice on continents ' ) 336 335 WRITE(numout,*) ' masks s, u, v : ', tms(ji,jj), tmu(ji,jj), tmv(ji,jj) … … 356 355 DO ji = 1, jpi 357 356 !!gm test twice sm_i ... ???? bug? 358 IF( ( ( ABS( sm_i(ji,jj,jl) ) .LT. 0.50) .OR.&359 ( ABS( sm_i(ji,jj,jl) ) .LT. 0.50) ) .AND. &360 ( a_i(ji,jj,jl) .GT. 0.e0) ) THEN357 IF( ( ( ABS( sm_i(ji,jj,jl) ) < 0.5 ) .OR. & 358 ( ABS( sm_i(ji,jj,jl) ) < 0.5 ) ) .AND. & 359 ( a_i(ji,jj,jl) > 0._wp ) ) THEN 361 360 ! CALL lim_prt_state(ji,jj,1, ' ALERTE 7 : Very fresh ice ' ) 362 361 ! WRITE(numout,*) ' sst : ', sst_m(ji,jj) … … 377 376 DO jj = 1, jpj 378 377 DO ji = 1, jpi 379 IF ( ( ( ABS( o_i(ji,jj,jl) ) .GT.rdt_ice ) .OR. &380 ( ABS( o_i(ji,jj,jl) ) .LT. 0.00) ) .AND. &381 ( a_i(ji,jj,jl) .GT. 0.0) ) THEN378 IF ( ( ( ABS( o_i(ji,jj,jl) ) > rdt_ice ) .OR. & 379 ( ABS( o_i(ji,jj,jl) ) < 0._wp) ) .AND. & 380 ( a_i(ji,jj,jl) > 0._wp ) ) THEN 382 381 CALL lim_prt_state( ji, jj, 1, ' ALERTE 9 : Wrong ice age ') 383 382 inb_alp(ialert_id) = inb_alp(ialert_id) + 1 … … 392 391 DO jj = 1, jpj 393 392 DO ji = 1, jpi 394 IF( ABS( emps(ji,jj) ) .GT. 1.0e-2 ) THEN393 IF( ABS( sfx (ji,jj) ) .GT. 1.0e-2 ) THEN 395 394 CALL lim_prt_state( ji, jj, 3, ' ALERTE 5 : High salt flux ' ) 396 395 DO jl = 1, jpl … … 412 411 DO jj = 1, jpj 413 412 DO ji = 1, jpi 414 IF( ABS( qns(ji,jj) ) .GT. 1500.0 .AND. ( at_i(ji,jj) .GT. 0.0 )) THEN413 IF( ABS( qns(ji,jj) ) > 1500._wp .AND. at_i(ji,jj) > 0._wp ) THEN 415 414 ! 416 415 WRITE(numout,*) ' ALERTE 8 : Very high non-solar heat flux' … … 429 428 WRITE(numout,*) ' fdtcn : ', fdtcn(ji,jj) 430 429 WRITE(numout,*) ' fhmec : ', fhmec(ji,jj) 431 WRITE(numout,*) ' fheat_ rpo : ', fheat_rpo(ji,jj)430 WRITE(numout,*) ' fheat_mec : ', fheat_mec(ji,jj) 432 431 WRITE(numout,*) ' fheat_res : ', fheat_res(ji,jj) 433 432 WRITE(numout,*) ' fhbri : ', fhbri(ji,jj) … … 450 449 DO ji = 1, jpi 451 450 ztmelts = -tmut * s_i(ji,jj,jk,jl) + rtt 452 IF( t_i(ji,jj,jk,jl) .GE. ztmelts .AND. v_i(ji,jj,jl) .GT.1.e-6 &453 & .AND. a_i(ji,jj,jl) .GT. 0.e0) THEN451 IF( t_i(ji,jj,jk,jl) >= ztmelts .AND. v_i(ji,jj,jl) > 1.e-6 & 452 & .AND. a_i(ji,jj,jl) > 0._wp ) THEN 454 453 WRITE(numout,*) ' ALERTE 10 : Very warm ice' 455 454 WRITE(numout,*) ' ji, jj, jk, jl : ', ji, jj, jk, jl … … 606 605 WRITE(numout,*) ' - Heat / FW fluxes ' 607 606 WRITE(numout,*) ' ~~~~~~~~~~~~~~~~ ' 608 ! WRITE(numout,*) ' fsbri : ', fsbri(ki,kj)609 ! WRITE(numout,*) ' fseqv : ', fseqv(ki,kj)607 ! WRITE(numout,*) ' sfx_bri : ', sfx_bri (ki,kj) 608 ! WRITE(numout,*) ' sfx : ', sfx (ki,kj) 610 609 ! WRITE(numout,*) ' fsalt_res : ', fsalt_res(ki,kj) 611 WRITE(numout,*) ' fmmec : ', fmmec (ki,kj)612 WRITE(numout,*) ' fhmec : ', fhmec (ki,kj)613 WRITE(numout,*) ' fhbri : ', fhbri (ki,kj)614 WRITE(numout,*) ' fheat_ rpo : ', fheat_rpo(ki,kj)610 WRITE(numout,*) ' fmmec : ', fmmec (ki,kj) 611 WRITE(numout,*) ' fhmec : ', fhmec (ki,kj) 612 WRITE(numout,*) ' fhbri : ', fhbri (ki,kj) 613 WRITE(numout,*) ' fheat_mec : ', fheat_mec(ki,kj) 615 614 WRITE(numout,*) 616 615 WRITE(numout,*) ' sst : ', sst_m(ki,kj) … … 621 620 WRITE(numout,*) ' utau_ice : ', utau_ice(ki,kj) 622 621 WRITE(numout,*) ' vtau_ice : ', vtau_ice(ki,kj) 623 WRITE(numout,*) ' utau : ', utau (ki,kj)624 WRITE(numout,*) ' vtau : ', vtau (ki,kj)625 WRITE(numout,*) ' oc. vel. u : ', u_oce (ki,kj)626 WRITE(numout,*) ' oc. vel. v : ', v_oce (ki,kj)622 WRITE(numout,*) ' utau : ', utau (ki,kj) 623 WRITE(numout,*) ' vtau : ', vtau (ki,kj) 624 WRITE(numout,*) ' oc. vel. u : ', u_oce (ki,kj) 625 WRITE(numout,*) ' oc. vel. v : ', v_oce (ki,kj) 627 626 ENDIF 628 627 … … 640 639 WRITE(numout,*) 641 640 WRITE(numout,*) ' - Heat fluxes at bottom interface ***' 642 WRITE(numout,*) ' qsr 643 WRITE(numout,*) ' qns 641 WRITE(numout,*) ' qsr : ', qsr(ki,kj) 642 WRITE(numout,*) ' qns : ', qns(ki,kj) 644 643 WRITE(numout,*) 645 644 WRITE(numout,*) ' - Salt fluxes at bottom interface ***' 646 WRITE(numout,*) ' emps : ', emps(ki,kj) 647 WRITE(numout,*) ' emp : ', emp(ki,kj) 648 WRITE(numout,*) ' fsbri : ', fsbri(ki,kj) 649 WRITE(numout,*) ' fseqv : ', fseqv(ki,kj) 650 WRITE(numout,*) ' fsalt_res : ', fsalt_res(ki,kj) 651 WRITE(numout,*) ' fsalt_rpo : ', fsalt_rpo(ki,kj) 645 WRITE(numout,*) ' emp : ', emp (ki,kj) 646 WRITE(numout,*) ' sfx_bri : ', sfx_bri(ki,kj) 647 WRITE(numout,*) ' sfx : ', sfx (ki,kj) 648 WRITE(numout,*) ' sfx_res : ', sfx_res(ki,kj) 649 WRITE(numout,*) ' sfx_mec : ', sfx_mec(ki,kj) 652 650 WRITE(numout,*) ' - Heat fluxes at bottom interface ***' 653 WRITE(numout,*) ' fheat_res 651 WRITE(numout,*) ' fheat_res : ', fheat_res(ki,kj) 654 652 WRITE(numout,*) 655 653 WRITE(numout,*) ' - Momentum fluxes ' -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
r3294 r3625 82 82 !! ** Action : - time evolution of the LIM sea-ice model 83 83 !! - update all sbc variables below sea-ice: 84 !! utau, vtau, taum, wndm, qns , qsr, emp , emps84 !! utau, vtau, taum, wndm, qns , qsr, emp , sfx 85 85 !!--------------------------------------------------------------------- 86 86 INTEGER, INTENT(in) :: kt ! ocean time step -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r3609 r3625 12 12 !! - ! 2010-10 (J. Chanut, C. Bricaud, G. Madec) add the surface pressure forcing 13 13 !! 3.4 ! 2011-11 (C. Harris) CICE added as an option 14 !! 3.5 ! 2012-11 (A. Coward, G. Madec) Rethink of heat, mass and salt surface fluxes 14 15 !!---------------------------------------------------------------------- 15 16 … … 84 85 INTEGER :: icpt ! local integer 85 86 !! 86 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx , ln_blk_clio, ln_blk_core, ln_cpl, & 87 & ln_blk_mfs, ln_apr_dyn, nn_ice , ln_dm2dc, ln_rnf, ln_ssr , nn_fwb, ln_cdgw 87 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx, ln_blk_clio, ln_blk_core, ln_cpl, & 88 & ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc , ln_rnf, & 89 & ln_ssr , nn_fwb , ln_cdgw 88 90 !!---------------------------------------------------------------------- 89 91 … … 121 123 WRITE(numout,*) ' Patm gradient added in ocean & ice Eqs. ln_apr_dyn = ', ln_apr_dyn 122 124 WRITE(numout,*) ' ice management in the sbc (=0/1/2/3) nn_ice = ', nn_ice 125 WRITE(numout,*) ' ice-ocean embedded/levitating (=0/1/2) nn_ice_embd = ', nn_ice_embd 123 126 WRITE(numout,*) ' daily mean to diurnal cycle qsr ln_dm2dc = ', ln_dm2dc 124 127 WRITE(numout,*) ' runoff / runoff mouths ln_rnf = ', ln_rnf … … 136 139 IF( sbc_rnf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_rnf arrays' ) 137 140 nkrnf = 0 138 rnf (:,:) = 0. e0139 rnfmsk (:,:) = 0. e0140 rnfmsk_z(:) = 0. e0141 rnf (:,:) = 0.0_wp 142 rnfmsk (:,:) = 0.0_wp 143 rnfmsk_z(:) = 0.0_wp 141 144 ENDIF 142 145 IF( nn_ice == 0 ) fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 146 147 sfx(:,:) = 0.0_wp ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero) 148 ! only if sea-ice is present 143 149 144 150 ! ! restartability … … 157 163 IF( nn_ice == 4 .AND. .NOT.( ln_blk_core .OR. lk_cpl ) ) & 158 164 & CALL ctl_stop( 'CICE sea-ice model requires ln_blk_core or lk_cpl' ) 159 IF( nn_ice == 4 .AND. ( .NOT. ( cp_cfg == 'orca' ) .OR. lk_agrif ) ) & 160 & CALL ctl_stop( 'CICE sea-ice model currently only available in a global ORCA configuration without AGRIF' ) 165 IF( nn_ice == 4 .AND. lk_agrif ) & 166 & CALL ctl_stop( 'CICE sea-ice model not currently available with AGRIF' ) 167 IF( ( nn_ice == 3 .OR. nn_ice == 4 ) .AND. nn_ice_embd == 0 ) & 168 & CALL ctl_stop( 'LIM3 and CICE sea-ice models require nn_ice_embd = 2 or 3' ) 161 169 162 170 IF( ln_dm2dc ) nday_qsr = -1 ! initialisation flag … … 226 234 !! ** Action : - set the ocean surface boundary condition at before and now 227 235 !! time step, i.e. 228 !! utau_b, vtau_b, qns_b, qsr_b, emp_n, emps_b, qrp_b, erp_b229 !! utau , vtau , qns , qsr , emp , emps, qrp , erp236 !! utau_b, vtau_b, qns_b, qsr_b, emp_n, sfx_b, qrp_b, erp_b 237 !! utau , vtau , qns , qsr , emp , sfx , qrp , erp 230 238 !! - updte the ice fraction : fr_i 231 239 !!---------------------------------------------------------------------- … … 243 251 ! The 3D heat content due to qsr forcing is treated in traqsr 244 252 ! qsr_b (:,:) = qsr (:,:) 245 emp_b (:,:) = emp(:,:)246 emps_b(:,:) = emps(:,:)253 emp_b(:,:) = emp(:,:) 254 sfx_b(:,:) = sfx(:,:) 247 255 ENDIF 248 256 ! ! ---------------------------------------- ! … … 262 270 263 271 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 264 ! ! (i.e. utau,vtau, qns, qsr, emp, emps)272 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) 265 273 CASE( 0 ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration 266 274 CASE( 1 ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc … … 314 322 CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b ) ! before non solar heat flux (T-point) 315 323 ! The 3D heat content due to qsr forcing is treated in traqsr 316 ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b ) ! before solar heat flux (T-point) 317 CALL iom_get( numror, jpdom_autoglo, 'emp_b' , emp_b ) ! before freshwater flux (T-point) 318 CALL iom_get( numror, jpdom_autoglo, 'emps_b', emps_b ) ! before C/D freshwater flux (T-point) 324 ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b ) ! before solar heat flux (T-point) 325 CALL iom_get( numror, jpdom_autoglo, 'emp_b', emp_b ) ! before freshwater flux (T-point) 326 ! To ensure restart capability with 3.3x/3.4 restart files !! to be removed in v3.6 327 IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 328 CALL iom_get( numror, jpdom_autoglo, 'sfx_b', sfx_b ) ! before salt flux (T-point) 329 ELSE 330 sfx_b (:,:) = sfx(:,:) 331 ENDIF 319 332 ELSE !* no restart: set from nit000 values 320 333 IF(lwp) WRITE(numout,*) ' nit000-1 surface forcing fields set to nit000' … … 322 335 vtau_b(:,:) = vtau(:,:) 323 336 qns_b (:,:) = qns (:,:) 324 ! qsr_b (:,:) = qsr (:,:) 325 emp_b (:,:) = emp (:,:) 326 emps_b(:,:) = emps(:,:) 337 emp_b (:,:) = emp(:,:) 338 sfx_b (:,:) = sfx(:,:) 327 339 ENDIF 328 340 ENDIF … … 340 352 ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b' , qsr ) 341 353 CALL iom_rstput( kt, nitrst, numrow, 'emp_b' , emp ) 342 CALL iom_rstput( kt, nitrst, numrow, ' emps_b' , emps)354 CALL iom_rstput( kt, nitrst, numrow, 'sfx_b' , sfx ) 343 355 ENDIF 344 356 … … 348 360 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 349 361 CALL iom_put( "empmr" , emp - rnf ) ! upward water flux 350 CALL iom_put( "empsmr", emps - rnf ) ! c/d water flux 362 CALL iom_put( "saltflx", sfx ) ! downward salt flux 363 ! (includes virtual salt flux beneath ice 364 ! in linear free surface case) 351 365 CALL iom_put( "qt" , qns + qsr ) ! total heat flux 352 366 CALL iom_put( "qns" , qns ) ! solar heat flux … … 365 379 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 366 380 CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 ) 367 CALL prt_ctl(tab2d_1=( emps-rnf) , clinfo1=' emps-rnf- : ', mask1=tmask, ovlap=1 )381 CALL prt_ctl(tab2d_1=(sfx-rnf) , clinfo1=' sfx-rnf - : ', mask1=tmask, ovlap=1 ) 368 382 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask, ovlap=1 ) 369 383 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1 ) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r3294 r3625 56 56 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: rnf_tsc_b, rnf_tsc !: before and now T & S runoff contents [K.m/s & PSU.m/s] 57 57 58 REAL(wp) :: r1_rau0 ! = 1 / rau059 58 60 59 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf_rnf ! structure: river runoff (file information, fields read) … … 83 82 END FUNCTION sbc_rnf_alloc 84 83 84 85 85 SUBROUTINE sbc_rnf( kt ) 86 86 !!---------------------------------------------------------------------- … … 96 96 !!---------------------------------------------------------------------- 97 97 INTEGER, INTENT(in) :: kt ! ocean time step 98 ! !98 ! 99 99 INTEGER :: ji, jj ! dummy loop indices 100 100 !!---------------------------------------------------------------------- … … 127 127 ! 128 128 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 129 rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) )130 129 ! 131 r1_rau0 = 1._wp / rau0 130 rnf(:,:) = rn_rfact * ( sf_rnf(1)%fnow(:,:,1) ) ! updated runoff value at time step kt 131 ! 132 132 ! ! set temperature & salinity content of runoffs 133 133 IF( ln_rnf_tem ) THEN ! use runoffs temperature data … … 199 199 !! 200 200 INTEGER :: ji, jj, jk ! dummy loop indices 201 REAL(wp) :: r1_rau0 ! local scalar202 201 REAL(wp) :: zfact ! local scalar 203 202 !!---------------------------------------------------------------------- … … 205 204 zfact = 0.5_wp 206 205 ! 207 r1_rau0 = 1._wp / rau0208 206 IF( ln_rnf_depth ) THEN !== runoff distributed over several levels ==! 209 207 IF( lk_vvl ) THEN ! variable volume case … … 252 250 INTEGER :: ji, jj, jk ! dummy loop indices 253 251 INTEGER :: ierror, inum ! temporary integer 254 ! !252 ! 255 253 NAMELIST/namsbc_rnf/ cn_dir, ln_rnf_emp, ln_rnf_depth, ln_rnf_tem, ln_rnf_sal, & 256 254 & sn_rnf, sn_cnf , sn_s_rnf , sn_t_rnf , sn_dep_rnf, & 257 255 & ln_rnf_mouth , rn_hrnf , rn_avt_rnf, rn_rfact 258 256 !!---------------------------------------------------------------------- 259 257 ! 260 258 ! ! ============ 261 259 ! ! Namelist … … 273 271 REWIND ( numnam ) ! Read Namelist namsbc_rnf 274 272 READ ( numnam, namsbc_rnf ) 275 273 ! 276 274 ! ! Control print 277 275 IF(lwp) THEN … … 286 284 WRITE(numout,*) ' multiplicative factor for runoff rn_rfact = ', rn_rfact 287 285 ENDIF 288 286 ! 289 287 ! ! ================== 290 288 ! ! Type of runoff … … 395 393 nkrnf = 2 396 394 DO WHILE( nkrnf /= jpkm1 .AND. gdepw_0(nkrnf+1) < rn_hrnf ) ; nkrnf = nkrnf + 1 ; END DO 397 IF( ln_sco ) & 398 CALL ctl_warn( 'sbc_rnf: number of levels over which Kz is increased is computed for zco...' ) 395 IF( ln_sco ) CALL ctl_warn( 'sbc_rnf: number of levels over which Kz is increased is computed for zco...' ) 399 396 ENDIF 400 397 IF(lwp) WRITE(numout,*) … … 414 411 nkrnf = 0 415 412 ENDIF 416 413 ! 417 414 END SUBROUTINE sbc_rnf_init 418 415 … … 438 435 !! rnfmsk_z vertical structure 439 436 !!---------------------------------------------------------------------- 440 !441 437 INTEGER :: inum ! temporary integers 442 438 CHARACTER(len=140) :: cl_rnfile ! runoff file name … … 446 442 IF(lwp) WRITE(numout,*) 'rnf_mouth : river mouth mask' 447 443 IF(lwp) WRITE(numout,*) '~~~~~~~~~ ' 448 444 ! 449 445 cl_rnfile = TRIM( cn_dir )//TRIM( sn_cnf%clname ) 450 446 IF( .NOT. sn_cnf%ln_clim ) THEN ; WRITE(cl_rnfile, '(a,"_y",i4)' ) TRIM( cl_rnfile ), nyear ! add year 451 447 IF( sn_cnf%cltype == 'monthly' ) WRITE(cl_rnfile, '(a,"m",i2)' ) TRIM( cl_rnfile ), nmonth ! add month 452 448 ENDIF 453 449 ! 454 450 ! horizontal mask (read in NetCDF file) 455 451 CALL iom_open ( cl_rnfile, inum ) ! open file 456 452 CALL iom_get ( inum, jpdom_data, sn_cnf%clvar, rnfmsk ) ! read the river mouth array 457 453 CALL iom_close( inum ) ! close file 458 454 ! 459 455 IF( nclosea == 1 ) CALL clo_rnf( rnfmsk ) ! closed sea inflow set as ruver mouth 460 456 ! 461 457 rnfmsk_z(:) = 0._wp ! vertical structure 462 458 rnfmsk_z(1) = 1.0 -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
r3294 r3625 9 9 10 10 !!---------------------------------------------------------------------- 11 !! sbc_ssr : add to sbc a restoring term toward SST/SSS climatology 12 !!---------------------------------------------------------------------- 13 USE oce ! ocean dynamics and tracers 14 USE dom_oce ! ocean space and time domain 15 USE sbc_oce ! surface boundary condition 16 USE phycst ! physical constants 17 USE sbcrnf ! surface boundary condition : runoffs 18 USE fldread ! read input fields 19 USE iom ! I/O manager 20 USE in_out_manager ! I/O manager 21 USE lib_mpp ! distribued memory computing library 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE timing ! Timing 11 !! sbc_ssr : add to sbc a restoring term toward SST/SSS climatology 12 !!---------------------------------------------------------------------- 13 USE oce ! ocean dynamics and tracers 14 USE dom_oce ! ocean space and time domain 15 USE sbc_oce ! surface boundary condition 16 USE phycst ! physical constants 17 USE sbcrnf ! surface boundary condition : runoffs 18 USE fldread ! read input fields 19 USE iom ! I/O manager 20 USE in_out_manager ! I/O manager 21 USE lib_mpp ! distribued memory computing library 22 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 23 USE timing ! Timing 24 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 24 25 25 26 IMPLICIT NONE … … 63 64 !! - at each nscb time step 64 65 !! add a retroaction term on qns (nn_sstr = 1) 65 !! add a damping term on emps(nn_sssr = 1)66 !! add a damping term on emp & emps(nn_sssr = 2)66 !! add a damping term on sfx (nn_sssr = 1) 67 !! add a damping term on emp (nn_sssr = 2) 67 68 !!--------------------------------------------------------------------- 68 69 INTEGER, INTENT(in ) :: kt ! ocean time step … … 156 157 ! ! ========================= ! 157 158 ! 158 IF( nn_sstr == 1 ) THEN !* Temperature restoring term159 IF( nn_sstr == 1 ) THEN !* Temperature restoring term 159 160 !CDIR COLLAPSE 160 161 DO jj = 1, jpj … … 168 169 ENDIF 169 170 ! 170 IF( nn_sssr == 1 ) THEN !* Salinity damping term (salt flux, emps only)171 IF( nn_sssr == 1 ) THEN !* Salinity damping term (salt flux only (sfx)) 171 172 zsrp = rn_deds / rday ! from [mm/day] to [kg/m2/s] 172 173 !CDIR COLLAPSE … … 174 175 DO ji = 1, jpi 175 176 zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) ) & ! No damping in vicinity of river mouths 176 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) & 177 & / ( sss_m(ji,jj) + 1.e-20 ) 178 emps(ji,jj) = emps(ji,jj) + zerp 179 erp( ji,jj) = zerp 177 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) 178 sfx(ji,jj) = sfx(ji,jj) + zerp ! salt flux 179 erp(ji,jj) = zerp / MAX( sss_m(ji,jj), 1.e-20 ) ! converted into an equivalent volume flux (diagnostic only) 180 180 END DO 181 181 END DO 182 182 CALL iom_put( "erp", erp ) ! freshwater flux damping 183 183 ! 184 ELSEIF( nn_sssr == 2 ) THEN !* Salinity damping term (volume flux, emp and emps)184 ELSEIF( nn_sssr == 2 ) THEN !* Salinity damping term (volume flux (emp) and associated heat flux (qns) 185 185 zsrp = rn_deds / rday ! from [mm/day] to [kg/m2/s] 186 186 zerp_bnd = rn_sssr_bnd / rday ! - - … … 190 190 zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) ) & ! No damping in vicinity of river mouths 191 191 & * ( sss_m(ji,jj) - sf_sss(1)%fnow(ji,jj,1) ) & 192 & / ( sss_m(ji,jj) +1.e-20 )192 & / MAX( sss_m(ji,jj), 1.e-20 ) 193 193 IF( ln_sssr_bnd ) zerp = SIGN( 1., zerp ) * MIN( zerp_bnd, ABS(zerp) ) 194 emp 195 emps(ji,jj) = emps(ji,jj) + zerp196 erp 194 emp(ji,jj) = emp (ji,jj) + zerp 195 qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj) 196 erp(ji,jj) = zerp 197 197 END DO 198 198 END DO -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
r3294 r3625 121 121 REAL(wp) :: zd , zc , zaw, za ! - - 122 122 REAL(wp) :: zb1, za1, zkw, zk0 ! - - 123 REAL(wp) :: zrau0r ! - -124 123 REAL(wp), POINTER, DIMENSION(:,:,:) :: zws 125 124 !!---------------------------------------------------------------------- … … 133 132 ! 134 133 CASE( 0 ) !== Jackett and McDougall (1994) formulation ==! 135 zrau0r = 1.e0 / rau0136 134 !CDIR NOVERRCHK 137 135 zws(:,:,:) = SQRT( ABS( pts(:,:,:,jp_sal) ) ) … … 174 172 ! masked in situ density anomaly 175 173 prd(ji,jj,jk) = ( zrhop / ( 1.0_wp - zh / ( zk0 - zh * ( za - zh * zb ) ) ) & 176 & - rau0 ) * zrau0r* tmask(ji,jj,jk)174 & - rau0 ) * r1_rau0 * tmask(ji,jj,jk) 177 175 END DO 178 176 END DO … … 254 252 INTEGER :: ji, jj, jk ! dummy loop indices 255 253 REAL(wp) :: zt, zs, zh, zsr, zr1, zr2, zr3, zr4, zrhop, ze, zbw ! local scalars 256 REAL(wp) :: zb, zd, zc, zaw, za, zb1, za1, zkw, zk0 , zrau0r! - -254 REAL(wp) :: zb, zd, zc, zaw, za, zb1, za1, zkw, zk0 ! - - 257 255 REAL(wp), POINTER, DIMENSION(:,:,:) :: zws 258 256 !!---------------------------------------------------------------------- … … 265 263 ! 266 264 CASE( 0 ) !== Jackett and McDougall (1994) formulation ==! 267 zrau0r = 1.e0 / rau0268 265 !CDIR NOVERRCHK 269 266 zws(:,:,:) = SQRT( ABS( pts(:,:,:,jp_sal) ) ) … … 309 306 ! masked in situ density anomaly 310 307 prd(ji,jj,jk) = ( zrhop / ( 1.0_wp - zh / ( zk0 - zh * ( za - zh * zb ) ) ) & 311 & - rau0 ) * zrau0r* tmask(ji,jj,jk)308 & - rau0 ) * r1_rau0 * tmask(ji,jj,jk) 312 309 END DO 313 310 END DO -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
r3294 r3625 14 14 !! and vertical advection trends using MUSCL scheme 15 15 !!---------------------------------------------------------------------- 16 USE oce ! ocean dynamics and active tracers 17 USE dom_oce ! ocean space and time domain 18 USE trdmod_oce ! tracers trends 19 USE trdtra ! tracers trends 20 USE in_out_manager ! I/O manager 21 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 22 USE trabbl ! tracers: bottom boundary layer 23 USE lib_mpp ! distribued memory computing 24 USE lbclnk ! ocean lateral boundary condition (or mpp link) 25 USE diaptr ! poleward transport diagnostics 26 USE trc_oce ! share passive tracers/Ocean variables 27 USE wrk_nemo ! Memory Allocation 28 USE timing ! Timing 16 USE oce ! ocean dynamics and active tracers 17 USE dom_oce ! ocean space and time domain 18 USE trdmod_oce ! tracers trends 19 USE trdtra ! tracers trends 20 USE in_out_manager ! I/O manager 21 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 22 USE trabbl ! tracers: bottom boundary layer 23 USE lib_mpp ! distribued memory computing 24 USE lbclnk ! ocean lateral boundary condition (or mpp link) 25 USE diaptr ! poleward transport diagnostics 26 USE trc_oce ! share passive tracers/Ocean variables 27 USE wrk_nemo ! Memory Allocation 28 USE timing ! Timing 29 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 29 30 30 31 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
r3294 r3625 25 25 USE wrk_nemo ! Memory Allocation 26 26 USE timing ! Timing 27 27 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 28 28 29 29 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
r3301 r3625 28 28 USE wrk_nemo ! Memory Allocation 29 29 USE timing ! Timing 30 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 30 31 31 32 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
r3294 r3625 17 17 18 18 !!---------------------------------------------------------------------- 19 !! tra_adv_tvd : update the tracer trend with the horizontal 20 !! and vertical advection trends using a TVD scheme 21 !! nonosc : compute monotonic tracer fluxes by a nonoscillatory 22 !! algorithm 23 !!---------------------------------------------------------------------- 24 USE oce ! ocean dynamics and active tracers 25 USE dom_oce ! ocean space and time domain 26 USE trdmod_oce ! tracers trends 27 USE trdtra ! tracers trends 28 USE in_out_manager ! I/O manager 29 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 30 USE lib_mpp ! MPP library 31 USE lbclnk ! ocean lateral boundary condition (or mpp link) 32 USE diaptr ! poleward transport diagnostics 33 USE trc_oce ! share passive tracers/Ocean variables 34 USE wrk_nemo ! Memory Allocation 35 USE timing ! Timing 19 !! tra_adv_tvd : update the tracer trend with the 3D advection trends using a TVD scheme 20 !! nonosc : compute monotonic tracer fluxes by a non-oscillatory algorithm 21 !!---------------------------------------------------------------------- 22 USE oce ! ocean dynamics and active tracers 23 USE dom_oce ! ocean space and time domain 24 USE trdmod_oce ! tracers trends 25 USE trdtra ! tracers trends 26 USE in_out_manager ! I/O manager 27 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 28 USE lib_mpp ! MPP library 29 USE lbclnk ! ocean lateral boundary condition (or mpp link) 30 USE diaptr ! poleward transport diagnostics 31 USE trc_oce ! share passive tracers/Ocean variables 32 USE wrk_nemo ! Memory Allocation 33 USE timing ! Timing 34 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 36 35 37 36 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
r3294 r3625 12 12 !! advection trends using a third order biaised scheme 13 13 !!---------------------------------------------------------------------- 14 USE oce 15 USE dom_oce 16 USE trdmod_oce 14 USE oce ! ocean dynamics and active tracers 15 USE dom_oce ! ocean space and time domain 16 USE trdmod_oce ! ocean space and time domain 17 17 USE trdtra 18 18 USE lib_mpp 19 USE lbclnk ! ocean lateral boundary condition (or mpp link) 20 USE in_out_manager ! I/O manager 21 USE diaptr ! poleward transport diagnostics 22 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 23 USE trc_oce ! share passive tracers/Ocean variables 24 USE wrk_nemo ! Memory Allocation 25 USE timing ! Timing 19 USE lbclnk ! ocean lateral boundary condition (or mpp link) 20 USE in_out_manager ! I/O manager 21 USE diaptr ! poleward transport diagnostics 22 USE dynspg_oce ! choice/control of key cpp for surface pressure gradient 23 USE trc_oce ! share passive tracers/Ocean variables 24 USE wrk_nemo ! Memory Allocation 25 USE timing ! Timing 26 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 26 27 27 28 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90
r3294 r3625 155 155 CASE ( 1 ) !* constant flux 156 156 IF(lwp) WRITE(numout,*) ' *** constant heat flux = ', rn_geoflx_cst 157 qgh_trd0(:,:) = r o0cpr* rn_geoflx_cst157 qgh_trd0(:,:) = r1_rau0_rcp * rn_geoflx_cst 158 158 ! 159 159 CASE ( 2 ) !* variable geothermal heat flux : read the geothermal fluxes in mW/m2 … … 162 162 CALL iom_get ( inum, jpdom_data, 'heatflow', qgh_trd0 ) 163 163 CALL iom_close( inum ) 164 qgh_trd0(:,:) = r o0cpr* qgh_trd0(:,:) * 1.e-3 ! conversion in W/m2164 qgh_trd0(:,:) = r1_rau0_rcp * qgh_trd0(:,:) * 1.e-3 ! conversion in W/m2 165 165 ! 166 166 CASE DEFAULT -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
r3294 r3625 147 147 ! ! ============================================== ! 148 148 DO jk = 1, jpkm1 149 qsr_hc(:,:,jk) = r o0cpr* ( etot3(:,:,jk) - etot3(:,:,jk+1) )149 qsr_hc(:,:,jk) = r1_rau0_rcp * ( etot3(:,:,jk) - etot3(:,:,jk+1) ) 150 150 END DO 151 151 ! Add to the general trend … … 219 219 ! 220 220 DO jk = 1, nksr ! compute and add qsr trend to ta 221 qsr_hc(:,:,jk) = r o0cpr* ( zea(:,:,jk) - zea(:,:,jk+1) )221 qsr_hc(:,:,jk) = r1_rau0_rcp * ( zea(:,:,jk) - zea(:,:,jk+1) ) 222 222 END DO 223 223 zea(:,:,nksr+1:jpk) = 0.e0 ! below 400m set to zero … … 236 236 ! 237 237 IF( lk_vvl ) THEN !* variable volume 238 zz0 = rn_abs * r o0cpr239 zz1 = ( 1. - rn_abs ) * r o0cpr238 zz0 = rn_abs * r1_rau0_rcp 239 zz1 = ( 1. - rn_abs ) * r1_rau0_rcp 240 240 DO jk = 1, nksr ! solar heat absorbed at T-point in the top 400m 241 241 DO jj = 1, jpj … … 463 463 ! 464 464 DO jk = 1, nksr 465 etot3(:,:,jk) = r o0cpr* ( zea(:,:,jk) - zea(:,:,jk+1) )465 etot3(:,:,jk) = r1_rau0_rcp * ( zea(:,:,jk) - zea(:,:,jk+1) ) 466 466 END DO 467 467 etot3(:,:,nksr+1:jpk) = 0.e0 ! below 400m set to zero … … 484 484 IF(lwp) WRITE(numout,*) ' key_vvl: light distribution will be computed at each time step' 485 485 ELSE ! constant volume: computes one for all 486 zz0 = rn_abs * r o0cpr487 zz1 = ( 1. - rn_abs ) * r o0cpr486 zz0 = rn_abs * r1_rau0_rcp 487 zz1 = ( 1. - rn_abs ) * r1_rau0_rcp 488 488 DO jk = 1, nksr !* solar heat absorbed at T-point computed once for all 489 489 DO jj = 1, jpj ! top 400 meters -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
r3294 r3625 60 60 !! at the surface by evaporation, precipitations and runoff (E-P-R); 61 61 !! (3) Fwe, tracer carried with the water that is exchanged. 62 !! - salinity : salt flux only due to freezing/melting 63 !! sa = sa + sfx / rau0 / e3t for k=1 62 64 !! 63 65 !! Fext, flux through the air-sea interface for temperature and salt: … … 84 86 !! (Tp P - Te E) + SST (P-E) = 0 when Tp=Te=SST 85 87 !! - salinity : evaporation, precipitation and runoff 86 !! water has a zero salinity (Fwe=0), thus only Fwi remains: 87 !! sa = sa + emp * sn / e3t for k=1 88 !! water has a zero salinity but there is a salt flux due to 89 !! freezing/melting, thus: 90 !! sa = sa + emp * sn / rau0 / e3t for k=1 91 !! + sfx / rau0 / e3t 88 92 !! where emp, the surface freshwater budget (evaporation minus 89 93 !! precipitation minus runoff) given in kg/m2/s is divided 90 !! by 1035 kg/m3 (density of ocena water) to obtain m/s.94 !! by rau0 = 1020 kg/m3 (density of sea water) to obtain m/s. 91 95 !! Note: even though Fwe does not appear explicitly for 92 96 !! temperature in this routine, the heat carried by the water … … 109 113 !! 110 114 INTEGER :: ji, jj, jk, jn ! dummy loop indices 111 REAL(wp) :: zfact, z1_e3t, z srau, zdep115 REAL(wp) :: zfact, z1_e3t, zdep 112 116 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdt, ztrds 113 117 !!---------------------------------------------------------------------- … … 120 124 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 121 125 ENDIF 122 123 zsrau = 1. / rau0 ! initialization124 126 125 127 IF( l_trdtra ) THEN !* Save ta and sa trends … … 163 165 ! evaporation, precipitation and qns, but not river runoff 164 166 165 IF( lk_vvl ) THEN ! Variable Volume case 167 IF( lk_vvl ) THEN ! Variable Volume case ==>> heat content of mass flux is in qns 166 168 DO jj = 1, jpj 167 169 DO ji = 1, jpi 168 ! temperature : heat flux + cooling/heating effet of EMP flux 169 sbc_tsc(ji,jj,jp_tem) = ro0cpr * qns(ji,jj) - zsrau * emp(ji,jj) * tsn(ji,jj,1,jp_tem) 170 ! concent./dilut. effect due to sea-ice melt/formation and (possibly) SSS restoration 171 sbc_tsc(ji,jj,jp_sal) = ( emps(ji,jj) - emp(ji,jj) ) * zsrau * tsn(ji,jj,1,jp_sal) 170 sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj) ! non solar heat flux 171 sbc_tsc(ji,jj,jp_sal) = r1_rau0 * sfx(ji,jj) ! salt flux due to freezing/melting 172 172 END DO 173 173 END DO 174 ELSE ! Constant Volume case 174 ELSE ! Constant Volume case ==>> Concentration dilution effect 175 175 DO jj = 2, jpj 176 176 DO ji = fs_2, fs_jpim1 ! vector opt. 177 177 ! temperature : heat flux 178 sbc_tsc(ji,jj,jp_tem) = ro0cpr * qns(ji,jj) 179 ! salinity : salt flux + concent./dilut. effect (both in emps) 180 sbc_tsc(ji,jj,jp_sal) = zsrau * emps(ji,jj) * tsn(ji,jj,1,jp_sal) 178 sbc_tsc(ji,jj,jp_tem) = r1_rau0_rcp * qns(ji,jj) & ! non solar heat flux 179 & + r1_rau0 * emp(ji,jj) * tsn(ji,jj,1,jp_tem) ! concent./dilut. effect 180 ! salinity : salt flux + concent./dilut. effect (both in sfx) 181 sbc_tsc(ji,jj,jp_sal) = r1_rau0 * ( sfx(ji,jj) & ! salt flux (freezing/melting) 182 & + emp(ji,jj) * tsn(ji,jj,1,jp_sal) ) ! concent./dilut. effect 181 183 END DO 182 184 END DO 185 CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) ) ! c/d term on sst 186 CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) ) ! c/d term on sss 183 187 ENDIF 184 188 ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
r3294 r3625 12 12 !! 'key_zdfgls' Generic Length Scale vertical physics 13 13 !!---------------------------------------------------------------------- 14 !! zdf_gls : update momentum and tracer Kz from a gls scheme15 !! zdf_gls_init : initialization, namelist read, and parameters control16 !! gls_rst : read/write gls restart in ocean restart file14 !! zdf_gls : update momentum and tracer Kz from a gls scheme 15 !! zdf_gls_init : initialization, namelist read, and parameters control 16 !! gls_rst : read/write gls restart in ocean restart file 17 17 !!---------------------------------------------------------------------- 18 18 USE oce ! ocean dynamics and active tracers … … 31 31 USE iom ! I/O manager library 32 32 USE timing ! Timing 33 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 33 34 34 35 IMPLICIT NONE … … 167 168 ! 168 169 ! surface friction 169 ustars2(ji,jj) = r au0r* taum(ji,jj) * tmask(ji,jj,1)170 ustars2(ji,jj) = r1_rau0 * taum(ji,jj) * tmask(ji,jj,1) 170 171 ! 171 172 ! bottom friction (explicit before friction) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
r3294 r3625 15 15 !! 'key_zdfkpp' KPP scheme 16 16 !!---------------------------------------------------------------------- 17 !! zdf_kpp : update momentum and tracer Kz from a kpp scheme18 !! zdf_kpp_init : initialization, namelist read, and parameters control19 !! tra_kpp : compute and add to the T & S trend the non-local flux20 !! trc_kpp : compute and add to the passive tracer trend the non-local flux (lk_top=T)17 !! zdf_kpp : update momentum and tracer Kz from a kpp scheme 18 !! zdf_kpp_init : initialization, namelist read, and parameters control 19 !! tra_kpp : compute and add to the T & S trend the non-local flux 20 !! trc_kpp : compute and add to the passive tracer trend the non-local flux (lk_top=T) 21 21 !!---------------------------------------------------------------------- 22 USE oce ! ocean dynamics and active tracers 23 USE dom_oce ! ocean space and time domain 24 USE zdf_oce ! ocean vertical physics 25 USE sbc_oce ! surface boundary condition: ocean 26 USE phycst ! physical constants 27 USE eosbn2 ! equation of state 28 USE zdfddm ! double diffusion mixing 29 USE in_out_manager ! I/O manager 30 USE lib_mpp ! MPP library 31 USE wrk_nemo ! work arrays 32 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 33 USE prtctl ! Print control 34 USE trdmod_oce ! ocean trends definition 35 USE trdtra ! tracers trends 36 USE timing ! Timing 22 USE oce ! ocean dynamics and active tracers 23 USE dom_oce ! ocean space and time domain 24 USE zdf_oce ! ocean vertical physics 25 USE sbc_oce ! surface boundary condition: ocean 26 USE phycst ! physical constants 27 USE eosbn2 ! equation of state 28 USE zdfddm ! double diffusion mixing 29 USE in_out_manager ! I/O manager 30 USE lib_mpp ! MPP library 31 USE wrk_nemo ! work arrays 32 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 33 USE prtctl ! Print control 34 USE trdmod_oce ! ocean trends definition 35 USE trdtra ! tracers trends 36 USE timing ! Timing 37 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 37 38 38 39 IMPLICIT NONE … … 426 427 zBosol(ji,jj) = grav * zthermal * qsr(ji,jj) 427 428 ! Non radiative surface buoyancy force 428 zBo (ji,jj) = grav * zthermal * qns(ji,jj) - grav * zhalin * ( emps(ji,jj)-rnf(ji,jj) ) 429 zBo (ji,jj) = grav * zthermal * qns(ji,jj) - grav * zhalin * ( emp(ji,jj)-rnf(ji,jj) ) & 430 & - grav * rbeta * rcs * sfx(ji,jj) 429 431 ! Surface Temperature flux for non-local term 430 wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* r o0cpr* tmask(ji,jj,1)432 wt0(ji,jj) = - ( qsr(ji,jj) + qns(ji,jj) )* r1_rau0_rcp * tmask(ji,jj,1) 431 433 ! Surface salinity flux for non-local term 432 ws0(ji,jj) = - ( ( emps(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal) * rcs ) * tmask(ji,jj,1) 434 ws0(ji,jj) = - ( ( emp(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal) & 435 & + sfx(ji,jj) ) * rcs * tmask(ji,jj,1) 433 436 ENDDO 434 437 ENDDO … … 1324 1327 DO ji = fs_2, fs_jpim1 1325 1328 ! Surface tracer flux for non-local term 1326 zflx = - ( emps(ji,jj) * tra(ji,jj,1,jn) * rcs ) * tmask(ji,jj,1)1329 zflx = - ( sfx (ji,jj) * tra(ji,jj,1,jn) * rcs ) * tmask(ji,jj,1) 1327 1330 ! compute the trend 1328 1331 ztra = - ( ghats(ji,jj,jk ) * fsavs(ji,jj,jk ) & -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
r3294 r3625 17 17 !! 'key_zdfric' Kz = f(Ri) 18 18 !!---------------------------------------------------------------------- 19 !! zdf_ric : update momentum and tracer Kz from the Richardson19 !! zdf_ric : update momentum and tracer Kz from the Richardson 20 20 !! number computation 21 !! zdf_ric_init : initialization, namelist read, & parameters control 22 !!---------------------------------------------------------------------- 23 USE oce ! ocean dynamics and tracers variables 24 USE dom_oce ! ocean space and time domain variables 25 USE zdf_oce ! ocean vertical physics 26 USE in_out_manager ! I/O manager 27 USE lbclnk ! ocean lateral boundary condition (or mpp link) 28 USE lib_mpp ! MPP library 29 USE wrk_nemo ! work arrays 30 USE timing ! Timing 21 !! zdf_ric_init : initialization, namelist read, & parameters control 22 !!---------------------------------------------------------------------- 23 USE oce ! ocean dynamics and tracers variables 24 USE dom_oce ! ocean space and time domain variables 25 USE zdf_oce ! ocean vertical physics 26 USE in_out_manager ! I/O manager 27 USE lbclnk ! ocean lateral boundary condition (or mpp link) 28 USE lib_mpp ! MPP library 29 USE wrk_nemo ! work arrays 30 USE timing ! Timing 31 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 31 32 32 33 USE eosbn2, ONLY : nn_eos -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r3294 r3625 31 31 !! 'key_zdftke' TKE vertical physics 32 32 !!---------------------------------------------------------------------- 33 !! zdf_tke : update momentum and tracer Kz from a tke scheme34 !! tke_tke : tke time stepping: update tke at now time step (en)35 !! tke_avn : compute mixing length scale and deduce avm and avt36 !! zdf_tke_init : initialization, namelist read, and parameters control37 !! tke_rst : read/write tke restart in ocean restart file33 !! zdf_tke : update momentum and tracer Kz from a tke scheme 34 !! tke_tke : tke time stepping: update tke at now time step (en) 35 !! tke_avn : compute mixing length scale and deduce avm and avt 36 !! zdf_tke_init : initialization, namelist read, and parameters control 37 !! tke_rst : read/write tke restart in ocean restart file 38 38 !!---------------------------------------------------------------------- 39 39 USE oce ! ocean: dynamics and active tracers variables … … 52 52 USE wrk_nemo ! work arrays 53 53 USE timing ! Timing 54 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 54 55 55 56 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
r3294 r3625 12 12 !! 'key_zdftmx' Tidal vertical mixing 13 13 !!---------------------------------------------------------------------- 14 !! zdf_tmx : global momentum & tracer Kz with tidal induced Kz 15 !! tmx_itf : Indonesian momentum & tracer Kz with tidal induced Kz 16 !!---------------------------------------------------------------------- 17 USE oce ! ocean dynamics and tracers variables 18 USE dom_oce ! ocean space and time domain variables 19 USE zdf_oce ! ocean vertical physics variables 20 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 21 USE eosbn2 ! ocean equation of state 22 USE phycst ! physical constants 23 USE prtctl ! Print control 24 USE in_out_manager ! I/O manager 25 USE iom ! I/O Manager 26 USE lib_mpp ! MPP library 27 USE wrk_nemo ! work arrays 28 USE timing ! Timing 14 !! zdf_tmx : global momentum & tracer Kz with tidal induced Kz 15 !! tmx_itf : Indonesian momentum & tracer Kz with tidal induced Kz 16 !!---------------------------------------------------------------------- 17 USE oce ! ocean dynamics and tracers variables 18 USE dom_oce ! ocean space and time domain variables 19 USE zdf_oce ! ocean vertical physics variables 20 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 21 USE eosbn2 ! ocean equation of state 22 USE phycst ! physical constants 23 USE prtctl ! Print control 24 USE in_out_manager ! I/O manager 25 USE iom ! I/O Manager 26 USE lib_mpp ! MPP library 27 USE wrk_nemo ! work arrays 28 USE timing ! Timing 29 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 29 30 30 31 IMPLICIT NONE -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r3610 r3625 46 46 USE mppini ! shared/distributed memory setting (mpp_init routine) 47 47 USE domain ! domain initialization (dom_init routine) 48 #if defined key_nemocice_decomp 49 USE ice_domain_size, only: nx_global, ny_global 50 #endif 48 51 USE obcini ! open boundary cond. initialization (obc_ini routine) 49 52 USE bdyini ! open boundary cond. initialization (bdy_init routine) … … 259 262 ! than variables 260 263 IF( Agrif_Root() ) THEN 264 #if defined key_nemocice_decomp 265 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 266 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 267 #else 261 268 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 262 #if defined key_nemocice_decomp263 jpj = ( jpjglo+1-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim.264 #else265 269 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 266 270 #endif … … 322 326 IF( lk_bdy ) CALL tide_init ! Open boundaries initialisation of tidal harmonic forcing 323 327 324 CALL flush(numout)325 328 CALL dyn_nept_init ! simplified form of Neptune effect 326 CALL flush(numout)327 329 328 330 CALL istate_init ! ocean initial state (Dynamics and tracers) -
branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/oce.F90
r3294 r3625 47 47 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: gru , grv !: horizontal gradient of rd at bottom u-point 48 48 49 !! arrays relating to embedding ice in the ocean. These arrays need to be declared 50 !! even if no ice model is required. In the no ice model or traditional levitating 51 !! ice cases they contain only zeros 52 !! --------------------- 53 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass !: mass of snow and ice at current ice time step [Kg/m2] 54 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_mass_b !: mass of snow and ice at previous ice time step [Kg/m2] 55 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: snwice_fmass !: time evolution of mass of snow+ice [Kg/m2/s] 56 49 57 !!---------------------------------------------------------------------- 50 58 !! NEMO/OPA 4.0 , NEMO Consortium (2011) … … 58 66 !! *** FUNCTION oce_alloc *** 59 67 !!---------------------------------------------------------------------- 60 INTEGER :: ierr( 2)68 INTEGER :: ierr(3) 61 69 !!---------------------------------------------------------------------- 62 70 ! … … 69 77 & rn2b (jpi,jpj,jpk) , rn2 (jpi,jpj,jpk) , STAT=ierr(1) ) 70 78 ! 71 ALLOCATE(rhd (jpi,jpj,jpk) , & 72 & rhop(jpi,jpj,jpk) , & 73 & sshb (jpi,jpj) , sshn (jpi,jpj) , ssha (jpi,jpj) , & 74 & sshu_b(jpi,jpj) , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) , & 75 & sshv_b(jpi,jpj) , sshv_n(jpi,jpj) , sshv_a(jpi,jpj) , & 76 & sshf_n(jpi,jpj) , & 77 & spgu (jpi,jpj) , spgv(jpi,jpj) , & 78 & gtsu(jpi,jpj,jpts), gtsv(jpi,jpj,jpts), & 79 & gru(jpi,jpj) , grv(jpi,jpj) , STAT=ierr(2) ) 79 ALLOCATE( rhd (jpi,jpj,jpk) , & 80 & rhop(jpi,jpj,jpk) , & 81 & sshb (jpi,jpj) , sshn (jpi,jpj) , ssha (jpi,jpj) , & 82 & sshu_b(jpi,jpj) , sshu_n(jpi,jpj) , sshu_a(jpi,jpj) , & 83 & sshv_b(jpi,jpj) , sshv_n(jpi,jpj) , sshv_a(jpi,jpj) , & 84 & sshf_n(jpi,jpj) , & 85 & spgu (jpi,jpj) , spgv(jpi,jpj) , & 86 & gtsu(jpi,jpj,jpts), gtsv(jpi,jpj,jpts), & 87 & gru(jpi,jpj) , grv(jpi,jpj) , STAT=ierr(2) ) 88 ! 89 ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), & 90 & snwice_fmass(jpi,jpj), STAT= ierr(3) ) 80 91 ! 81 92 oce_alloc = MAXVAL( ierr )
Note: See TracChangeset
for help on using the changeset viewer.