- Timestamp:
- 2016-06-19T11:36:47+02:00 (8 years ago)
- Location:
- branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 5 added
- 3 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/DIU/cool_skin.F90
r6493 r6723 10 10 11 11 !!---------------------------------------------------------------------- 12 !! diurnal_sst_coolskin_step : time-step the cool skin corrections 12 !! diurnal_sst_coolskin_init : initialisation of the cool skin 13 !! diurnal_sst_coolskin_step : time-stepping of the cool skin corrections 13 14 !!---------------------------------------------------------------------- 14 15 USE par_kind … … 21 22 22 23 IMPLICIT NONE 23 24 PRIVATE 25 24 26 ! Namelist parameters 25 27 … … 37 39 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: x_csthick ! Cool skin thickness 38 40 39 PRIVATE40 41 PUBLIC diurnal_sst_coolskin_step, diurnal_sst_coolskin_init 41 42 42 43 !! * Substitutions 43 44 # include "vectopt_loop_substitute.h90" 44 45 !!---------------------------------------------------------------------- 46 !! NEMO/OPA 4.0 , NEMO-consortium (2016) 47 !! $Id: $ 48 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 49 !!---------------------------------------------------------------------- 45 50 CONTAINS 46 51 … … 56 61 !! 57 62 !!---------------------------------------------------------------------- 58 59 IMPLICIT NONE60 61 63 ALLOCATE( x_csdsst(jpi,jpj), x_csthick(jpi,jpj) ) 62 64 x_csdsst = 0. 63 65 x_csthick = 0. 64 66 ! 65 67 END SUBROUTINE diurnal_sst_coolskin_init 66 68 69 67 70 SUBROUTINE diurnal_sst_coolskin_step(psqflux, pstauflux, psrho, rdt) 68 71 !!---------------------------------------------------------------------- … … 75 78 !! ** Reference : 76 79 !!---------------------------------------------------------------------- 77 78 IMPLICIT NONE79 80 80 ! Dummy variables 81 81 REAL(wp), INTENT(IN), DIMENSION(jpi,jpj) :: psqflux ! Heat (non-solar)(Watts) … … 94 94 95 95 INTEGER :: ji,jj 96 97 IF ( .NOT. ln_blk_core ) THEN 98 CALL ctl_stop("cool_skin.f90: diurnal flux processing only implemented"//& 99 & " for core bulk forcing") 100 ENDIF 101 96 !!---------------------------------------------------------------------- 97 ! 98 IF( .NOT. ln_blk ) CALL ctl_stop("cool_skin.f90: diurnal flux processing only implemented for bulk forcing") 99 ! 102 100 DO jj = 1,jpj 103 101 DO ji = 1,jpi 104 102 ! 105 103 ! Calcualte wind speed from wind stress and friction velocity 106 104 IF( tmask(ji,jj,1) == 1. .AND. pstauflux(ji,jj) /= 0 .AND. psrho(ji,jj) /=0 ) THEN … … 111 109 z_wspd(ji,jj) = 0. 112 110 ENDIF 113 114 111 ! 115 112 ! Calculate gamma function which is dependent upon wind speed 116 113 IF( tmask(ji,jj,1) == 1. ) THEN … … 119 116 IF( ( z_wspd(ji,jj) >= 10. ) ) z_gamma(ji,jj) = 6. 120 117 ENDIF 121 122 118 ! 123 119 ! Calculate lamda function 124 120 IF( tmask(ji,jj,1) == 1. .AND. z_fv(ji,jj) /= 0 ) THEN … … 127 123 z_lamda(ji,jj) = 0. 128 124 ENDIF 129 130 131 125 ! 132 126 ! Calculate the cool skin thickness - only when heat flux is out of the ocean 133 127 IF( tmask(ji,jj,1) == 1. .AND. z_fv(ji,jj) /= 0 .AND. psqflux(ji,jj) < 0 ) THEN 134 128 x_csthick(ji,jj) = ( z_lamda(ji,jj) * pp_v ) / z_fv(ji,jj) 135 129 ELSE 136 130 x_csthick(ji,jj) = 0. 137 131 ENDIF 138 139 140 132 ! 141 133 ! Calculate the cool skin correction - only when the heat flux is out of the ocean 142 134 IF( tmask(ji,jj,1) == 1. .AND. x_csthick(ji,jj) /= 0. .AND. psqflux(ji,jj) < 0. ) THEN … … 145 137 x_csdsst(ji,jj) = 0. 146 138 ENDIF 147 148 END DO149 END DO150 139 ! 140 END DO 141 END DO 142 ! 151 143 END SUBROUTINE diurnal_sst_coolskin_step 152 144 153 145 !!====================================================================== 154 146 END MODULE cool_skin -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/DIU/step_diu.F90
r6017 r6723 64 64 65 65 ! Cool skin 66 IF ( .NOT.ln_diurnal ) CALL ctl_stop( "stp_diurnal: ln_diurnal not set")66 IF( .NOT.ln_diurnal ) CALL ctl_stop( "stp_diurnal: ln_diurnal not set" ) 67 67 68 IF ( .NOT. ln_blk_core ) THEN 69 CALL ctl_stop("step.f90: diurnal flux processing only implemented"//& 70 & " for core forcing") 71 ENDIF 68 IF( .NOT. ln_blk ) CALL ctl_stop( "stp_diurnal: diurnal flux processing only implemented for bulk forcing" ) 72 69 73 70 CALL diurnal_sst_coolskin_step( qns, taum, rhop(:,:,1), rdt) -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/cyclone.F90
r5215 r6723 27 27 PRIVATE 28 28 29 PUBLIC wnd_cyc ! routine called in sbcblk _core.F90 module29 PUBLIC wnd_cyc ! routine called in sbcblk.F90 module 30 30 31 31 INTEGER , PARAMETER :: jp_is1 = 1 ! index of presence 1 or absence 0 of a TC record … … 102 102 sn_tc = FLD_N( 'tc_track', 6 , 'tc' , .true. , .false. , 'yearly' , '' , '' , '' ) 103 103 ! 104 ! Namelist is read in namsbc_ core104 ! Namelist is read in namsbc_blk 105 105 ! set sf structure 106 106 ALLOCATE( sf(1), STAT=ierror ) -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r6140 r6723 924 924 WRITE(numout,*) TRIM( cdcaller )//' : '//TRIM( cdtitle ) 925 925 WRITE(numout,*) (/ ('~', jf = 1, LEN_TRIM( cdcaller ) ) /) 926 WRITE(numout,*) ' '//TRIM( cdnam )//' Namelist'927 WRITE(numout,*) ' 926 WRITE(numout,*) ' Namelist '//TRIM( cdnam ) 927 WRITE(numout,*) ' list of files and frequency (>0: in hours ; <0 in months)' 928 928 DO jf = 1, SIZE(sdf) 929 WRITE(numout,*) ' root filename: ' , TRIM( sdf(jf)%clrootname ), & 930 & ' variable name: ' , TRIM( sdf(jf)%clvar ) 931 WRITE(numout,*) ' frequency: ' , sdf(jf)%nfreqh , & 932 & ' time interp: ' , sdf(jf)%ln_tint , & 933 & ' climatology: ' , sdf(jf)%ln_clim , & 934 & ' weights : ' , TRIM( sdf(jf)%wgtname ), & 935 & ' pairing : ' , TRIM( sdf(jf)%vcomp ), & 936 & ' data type: ' , sdf(jf)%cltype , & 937 & ' land/sea mask:' , TRIM( sdf(jf)%lsmname ) 929 WRITE(numout,*) ' root filename: ' , TRIM( sdf(jf)%clrootname ), ' variable name: ', TRIM( sdf(jf)%clvar) 930 WRITE(numout,*) ' frequency: ' , sdf(jf)%nfreqh , & 931 & ' time interp: ' , sdf(jf)%ln_tint , & 932 & ' climatology: ' , sdf(jf)%ln_clim 933 WRITE(numout,*) ' weights: ' , TRIM( sdf(jf)%wgtname ), & 934 & ' pairing: ' , TRIM( sdf(jf)%vcomp ), & 935 & ' data type: ' , sdf(jf)%cltype , & 936 & ' land/sea mask:' , TRIM( sdf(jf)%lsmname ) 938 937 call flush(numout) 939 938 END DO -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
r6140 r6723 10 10 !! 3.3 ! 2010-10 (J. Chanut, C. Bricaud) add the surface pressure forcing 11 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 12 !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) 12 13 !!---------------------------------------------------------------------- 13 14 … … 32 33 LOGICAL , PUBLIC :: ln_ana !: analytical boundary condition flag 33 34 LOGICAL , PUBLIC :: ln_flx !: flux formulation 34 LOGICAL , PUBLIC :: ln_blk_clio !: CLIO bulk formulation 35 LOGICAL , PUBLIC :: ln_blk_core !: CORE bulk formulation 36 LOGICAL , PUBLIC :: ln_blk_mfs !: MFS bulk formulation 35 LOGICAL , PUBLIC :: ln_blk !: bulk formulation 37 36 #if defined key_oasis3 38 37 LOGICAL , PUBLIC :: lk_oasis = .TRUE. !: OASIS used … … 75 74 INTEGER , PUBLIC, PARAMETER :: jp_ana = 1 !: analytical formulation 76 75 INTEGER , PUBLIC, PARAMETER :: jp_flx = 2 !: flux formulation 77 INTEGER , PUBLIC, PARAMETER :: jp_clio = 3 !: CLIO bulk formulation 78 INTEGER , PUBLIC, PARAMETER :: jp_core = 4 !: CORE bulk formulation 76 INTEGER , PUBLIC, PARAMETER :: jp_blk = 4 !: bulk formulation 79 77 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 5 !: Pure ocean-atmosphere Coupled formulation 80 INTEGER , PUBLIC, PARAMETER :: jp_mfs = 6 !: MFS bulk formulation81 78 INTEGER , PUBLIC, PARAMETER :: jp_none = 7 !: for OPA when doing coupling via SAS module 82 79 -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
r6140 r6723 24 24 USE sbc_oce ! Surface boundary condition: ocean fields 25 25 USE sbc_ice ! Surface boundary condition: ice fields 26 USE sbcblk _core ! Surface boundary condition: COREbulk26 USE sbcblk ! Surface boundary condition: bulk 27 27 USE sbccpl 28 28 … … 191 191 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=F and calc_Tsfc=F in ice_in' ) 192 192 ENDIF 193 ELSEIF (ksbc == jp_ core) THEN193 ELSEIF (ksbc == jp_blk) THEN 194 194 IF ( .NOT. (calc_strair .AND. calc_Tsfc) ) THEN 195 195 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=T and calc_Tsfc=T in ice_in' ) … … 392 392 ENDDO 393 393 394 ELSE IF (ksbc == jp_ core) THEN395 396 ! Pass COREforcing fields to CICE (which will calculate heat fluxes etc itself)394 ELSE IF (ksbc == jp_blk) THEN 395 396 ! Pass bulk forcing fields to CICE (which will calculate heat fluxes etc itself) 397 397 ! x comp and y comp of atmosphere surface wind (CICE expects on T points) 398 398 ztmp(:,:) = wndi_ice(:,:) … … 585 585 ! Better to use evap and tprecip? (but for now don't read in evap in this case) 586 586 emp(:,:) = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 587 ELSE IF (ksbc == jp_ core) THEN587 ELSE IF (ksbc == jp_blk) THEN 588 588 emp(:,:) = (1.0-fr_i(:,:))*emp(:,:) 589 589 ELSE IF (ksbc == jp_purecpl) THEN … … 618 618 ! Scale qsr and qns according to ice fraction (bulk formulae only) 619 619 620 IF (ksbc == jp_ core) THEN620 IF (ksbc == jp_blk) THEN 621 621 qsr(:,:)=qsr(:,:)*(1.0-fr_i(:,:)) 622 622 qns(:,:)=qns(:,:)*(1.0-fr_i(:,:)) -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r6416 r6723 13 13 !! - ! 2012-10 (C. Rousset) add lim_diahsb 14 14 !! 3.6 ! 2014-07 (M. Vancoppenolle, G. Madec, O. Marti) revise coupled interface 15 !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) 15 16 !!---------------------------------------------------------------------- 16 17 #if defined key_lim3 … … 28 29 USE sbc_oce ! Surface boundary condition: ocean fields 29 30 USE sbc_ice ! Surface boundary condition: ice fields 30 USE sbcblk_core ! Surface boundary condition: CORE bulk 31 USE sbcblk_clio ! Surface boundary condition: CLIO bulk 31 USE sbcblk ! Surface boundary condition: bulk 32 32 USE sbccpl ! Surface boundary condition: coupled interface 33 33 USE albedo ! ocean & ice albedo … … 47 47 USE limupdate2 ! update of global variables 48 48 USE limvar ! Ice variables switch 49 USE limctl ! 49 USE limctl ! 50 50 USE limmsh ! LIM mesh 51 51 USE limistate ! LIM initial state … … 56 56 USE iom ! I/O manager library 57 57 USE prtctl ! Print control 58 USE lib_fortran ! 58 USE lib_fortran ! 59 59 USE lbclnk ! lateral boundary condition - MPP link 60 60 USE lib_mpp ! MPP library … … 62 62 USE timing ! Timing 63 63 64 #if defined key_bdy 64 #if defined key_bdy 65 65 USE bdyice_lim ! unstructured open boundary data (bdy_ice_lim routine) 66 66 #endif … … 71 71 PUBLIC sbc_ice_lim ! routine called by sbcmod.F90 72 72 PUBLIC sbc_lim_init ! routine called by sbcmod.F90 73 73 74 74 !! * Substitutions 75 75 # include "vectopt_loop_substitute.h90" … … 84 84 !!--------------------------------------------------------------------- 85 85 !! *** ROUTINE sbc_ice_lim *** 86 !! 87 !! ** Purpose : update the ocean surface boundary condition via the 88 !! Louvain la Neuve Sea Ice Model time stepping 86 !! 87 !! ** Purpose : update the ocean surface boundary condition via the 88 !! Louvain la Neuve Sea Ice Model time stepping 89 89 !! 90 90 !! ** Method : ice model time stepping 91 !! - call the ice dynamics routine 92 !! - call the ice advection/diffusion routine 93 !! - call the ice thermodynamics routine 94 !! - call the routine that computes mass and 91 !! - call the ice dynamics routine 92 !! - call the ice advection/diffusion routine 93 !! - call the ice thermodynamics routine 94 !! - call the routine that computes mass and 95 95 !! heat fluxes at the ice/ocean interface 96 !! - save the outputs 96 !! - save the outputs 97 97 !! - save the outputs for restart when necessary 98 98 !! 99 99 !! ** Action : - time evolution of the LIM sea-ice model 100 100 !! - update all sbc variables below sea-ice: 101 !! utau, vtau, taum, wndm, qns , qsr, emp , sfx 101 !! utau, vtau, taum, wndm, qns , qsr, emp , sfx 102 102 !!--------------------------------------------------------------------- 103 103 INTEGER, INTENT(in) :: kt ! ocean time step 104 INTEGER, INTENT(in) :: kblk ! type of bulk (= 3 CLIO, =4 CORE, =5 COUPLED)104 INTEGER, INTENT(in) :: kblk ! type of bulk (=4 BULK, =5 COUPLED) 105 105 !! 106 106 INTEGER :: jl ! dummy loop index 107 107 REAL(wp), POINTER, DIMENSION(:,:,:) :: zalb_os, zalb_cs ! ice albedo under overcast/clear sky 108 REAL(wp), POINTER, DIMENSION(:,: ) :: zutau_ice, zvtau_ice 108 REAL(wp), POINTER, DIMENSION(:,: ) :: zutau_ice, zvtau_ice 109 109 !!---------------------------------------------------------------------- 110 110 … … 119 119 u_oce(:,:) = ssu_m(:,:) * umask(:,:,1) 120 120 v_oce(:,:) = ssv_m(:,:) * vmask(:,:,1) 121 121 122 122 ! masked sea surface freezing temperature [Kelvin] (set to rt0 over land) 123 123 CALL eos_fzp( sss_m(:,:) , t_bo(:,:) ) 124 124 t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) + rt0 * ( 1._wp - tmask(:,:,1) ) 125 125 126 126 ! Mask sea ice surface temperature (set to rt0 over land) 127 127 DO jl = 1, jpl 128 128 t_su(:,:,jl) = t_su(:,:,jl) * tmask(:,:,1) + rt0 * ( 1._wp - tmask(:,:,1) ) 129 END DO 130 ! 131 !------------------------------------------------! 132 ! --- Dynamical coupling with the atmosphere --- ! 129 END DO 130 ! 131 !------------------------------------------------! 132 ! --- Dynamical coupling with the atmosphere --- ! 133 133 !------------------------------------------------! 134 134 ! It provides the following fields: … … 136 136 !----------------------------------------------------------------- 137 137 SELECT CASE( kblk ) 138 CASE( jp_clio ) ; CALL blk_ice_clio_tau ! CLIO bulk formulation 139 CASE( jp_core ) ; CALL blk_ice_core_tau ! CORE bulk formulation 138 CASE( jp_blk ) ; CALL blk_ice_tau ! Bulk formulation 140 139 CASE( jp_purecpl ) ; CALL sbc_cpl_ice_tau( utau_ice , vtau_ice ) ! Coupled formulation 141 140 END SELECT 142 141 143 142 IF( ln_mixcpl) THEN ! Case of a mixed Bulk/Coupled formulation 144 143 CALL wrk_alloc( jpi,jpj , zutau_ice, zvtau_ice) … … 153 152 !-------------------------------------------------------! 154 153 numit = numit + nn_fsbc ! Ice model time step 155 ! 154 ! 156 155 CALL sbc_lim_bef ! Store previous ice values 157 156 CALL sbc_lim_diag0 ! set diag of mass, heat and salt fluxes to 0 … … 160 159 IF( .NOT. lk_c1d ) THEN 161 160 ! 162 CALL lim_dyn( kt ) ! Ice dynamics ( rheology/dynamics ) 161 CALL lim_dyn( kt ) ! Ice dynamics ( rheology/dynamics ) 163 162 ! 164 163 CALL lim_trp( kt ) ! Ice transport ( Advection/diffusion ) … … 167 166 ! 168 167 #if defined key_bdy 169 CALL bdy_ice_lim( kt ) ! bdy ice thermo 168 CALL bdy_ice_lim( kt ) ! bdy ice thermo 170 169 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 171 170 #endif … … 174 173 ! 175 174 ENDIF 176 175 177 176 ! previous lead fraction and ice volume for flux calculations 178 CALL sbc_lim_bef 177 CALL sbc_lim_bef 179 178 CALL lim_var_glo2eqv ! ht_i and ht_s for ice albedo calculation 180 CALL lim_var_agg(1) ! at_i for coupling (via pfrld) 179 CALL lim_var_agg(1) ! at_i for coupling (via pfrld) 181 180 pfrld(:,:) = 1._wp - at_i(:,:) 182 181 phicif(:,:) = vt_i(:,:) 183 184 !------------------------------------------------------! 185 ! --- Thermodynamical coupling with the atmosphere --- ! 182 183 !------------------------------------------------------! 184 ! --- Thermodynamical coupling with the atmosphere --- ! 186 185 !------------------------------------------------------! 187 186 ! It provides the following fields: … … 196 195 197 196 SELECT CASE( kblk ) 198 CASE( jp_clio ) ! CLIO bulk formulation 199 ! In CLIO the cloud fraction is read in the climatology and the all-sky albedo 200 ! (alb_ice) is computed within the bulk routine 201 CALL blk_ice_clio_flx( t_su, zalb_cs, zalb_os, alb_ice ) 202 IF( ln_mixcpl ) CALL sbc_cpl_ice_flx( p_frld=pfrld, palbi=alb_ice, psst=sst_m, pist=t_su ) 203 IF( nn_limflx /= 2 ) CALL ice_lim_flx( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx ) 204 CASE( jp_core ) ! CORE bulk formulation 197 CASE( jp_blk ) ! bulk formulation 205 198 ! albedo depends on cloud fraction because of non-linear spectral effects 206 199 alb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) 207 CALL blk_ice_ core_flx( t_su, alb_ice )200 CALL blk_ice_flx( t_su, alb_ice ) 208 201 IF( ln_mixcpl ) CALL sbc_cpl_ice_flx( p_frld=pfrld, palbi=alb_ice, psst=sst_m, pist=t_su ) 209 202 IF( nn_limflx /= 2 ) CALL ice_lim_flx( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx ) … … 219 212 ! --- ice thermodynamics --- ! 220 213 !----------------------------! 221 CALL lim_thd( kt ) ! Ice thermodynamics 214 CALL lim_thd( kt ) ! Ice thermodynamics 222 215 ! 223 216 CALL lim_update2( kt ) ! Corrections … … 225 218 CALL lim_sbc_flx( kt ) ! Update surface ocean mass, heat and salt fluxes 226 219 ! 227 IF(ln_limdiaout) CALL lim_diahsb ! Diagnostics and outputs 228 ! 229 CALL lim_wri( 1 ) ! Ice outputs 220 IF(ln_limdiaout) CALL lim_diahsb ! Diagnostics and outputs 221 ! 222 CALL lim_wri( 1 ) ! Ice outputs 230 223 ! 231 224 IF( kt == nit000 .AND. ln_rstart ) & 232 225 & CALL iom_close( numrir ) ! close input ice restart file 233 226 ! 234 IF( lrst_ice ) CALL lim_rst_write( kt ) ! Ice restart file 227 IF( lrst_ice ) CALL lim_rst_write( kt ) ! Ice restart file 235 228 ! 236 229 IF( ln_icectl ) CALL lim_ctl( kt ) ! alerts in case of model crash … … 248 241 ! 249 242 END SUBROUTINE sbc_ice_lim 250 243 251 244 252 245 SUBROUTINE sbc_lim_init … … 259 252 !!---------------------------------------------------------------------- 260 253 IF(lwp) WRITE(numout,*) 261 IF(lwp) WRITE(numout,*) 'sbc_ice_lim : update ocean surface boudary condition' 254 IF(lwp) WRITE(numout,*) 'sbc_ice_lim : update ocean surface boudary condition' 262 255 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ via Louvain la Neuve Ice Model (LIM-3) time stepping' 263 256 ! 264 ! ! Open the reference and configuration namelist files and namelist output file 265 CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 257 ! ! Open the reference and configuration namelist files and namelist output file 258 CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 266 259 CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 267 260 IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) … … 308 301 CALL lim_var_glo2eqv 309 302 ! 310 CALL lim_sbc_init ! ice surface boundary condition 303 CALL lim_sbc_init ! ice surface boundary condition 311 304 ! 312 305 fr_i(:,:) = at_i(:,:) ! initialisation of sea-ice fraction … … 318 311 ELSE ; rn_amax_2d(ji,jj) = rn_amax_s ! SH 319 312 ENDIF 320 ENDDO321 END DO322 ! 323 nstart = numit + nn_fsbc 324 nitrun = nitend - nit000 + 1 325 nlast = numit + nitrun 313 END DO 314 END DO 315 ! 316 nstart = numit + nn_fsbc 317 nitrun = nitend - nit000 + 1 318 nlast = numit + nitrun 326 319 ! 327 320 IF( nstock == 0 ) nstock = nlast + 1 … … 333 326 !!------------------------------------------------------------------- 334 327 !! *** ROUTINE ice_run *** 335 !! 328 !! 336 329 !! ** Purpose : Definition some run parameter for ice model 337 330 !! 338 !! ** Method : Read the namicerun namelist and check the parameter 331 !! ** Method : Read the namicerun namelist and check the parameter 339 332 !! values called at the first timestep (nit000) 340 333 !! … … 343 336 INTEGER :: ios ! Local integer output status for namelist read 344 337 NAMELIST/namicerun/ jpl, nlay_i, nlay_s, cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir, & 345 & ln_limdyn, rn_amax_n, rn_amax_s, ln_limdiahsb, ln_limdiaout, ln_icectl, iiceprt, jiceprt 338 & ln_limdyn, rn_amax_n, rn_amax_s, ln_limdiahsb, ln_limdiaout, ln_icectl, iiceprt, jiceprt 346 339 !!------------------------------------------------------------------- 347 ! 340 ! 348 341 REWIND( numnam_ice_ref ) ! Namelist namicerun in reference namelist : Parameters for ice 349 342 READ ( numnam_ice_ref, namicerun, IOSTAT = ios, ERR = 901) … … 363 356 WRITE(numout,*) ' number of snow layers = ', nlay_s 364 357 WRITE(numout,*) ' switch for ice dynamics (1) or not (0) ln_limdyn = ', ln_limdyn 365 WRITE(numout,*) ' maximum ice concentration for NH = ', rn_amax_n 358 WRITE(numout,*) ' maximum ice concentration for NH = ', rn_amax_n 366 359 WRITE(numout,*) ' maximum ice concentration for SH = ', rn_amax_s 367 360 WRITE(numout,*) ' Diagnose heat/salt budget or not ln_limdiahsb = ', ln_limdiahsb … … 373 366 ! 374 367 ! sea-ice timestep and inverse 375 rdt_ice = nn_fsbc * rdt 376 r1_rdtice = 1._wp / rdt_ice 368 rdt_ice = nn_fsbc * rdt 369 r1_rdtice = 1._wp / rdt_ice 377 370 378 371 ! inverse of nlay_i and nlay_s … … 421 414 ! 422 415 !---------------------------------- 423 !- Thickness categories boundaries 416 !- Thickness categories boundaries 424 417 !---------------------------------- 425 418 IF(lwp) WRITE(numout,*) … … 443 436 zalpha = 0.05_wp 444 437 zhmax = 3._wp * rn_himean 445 DO jl = 1, jpl 438 DO jl = 1, jpl 446 439 znum = jpl * ( zhmax+1 )**zalpha 447 440 zden = REAL( jpl-jl , wp ) * ( zhmax + 1._wp )**zalpha + REAL( jl , wp ) … … 462 455 END SUBROUTINE lim_itd_init 463 456 464 457 465 458 SUBROUTINE ice_lim_flx( ptn_ice , palb_ice, pqns_ice , & 466 459 & pqsr_ice, pdqn_ice, pevap_ice, pdevap_ice, k_limflx ) 467 460 !!--------------------------------------------------------------------- 468 461 !! *** ROUTINE ice_lim_flx *** 469 !! 462 !! 470 463 !! ** Purpose : update the ice surface boundary condition by averaging and / or 471 !! redistributing fluxes on ice categories 472 !! 473 !! ** Method : average then redistribute 474 !! 475 !! ** Action : 464 !! redistributing fluxes on ice categories 465 !! 466 !! ** Method : average then redistribute 467 !! 468 !! ** Action : 476 469 !!--------------------------------------------------------------------- 477 INTEGER , INTENT(in ) :: k_limflx ! =-1 do nothing; =0 average ; 478 ! ! = 1 average and redistribute ; =2 redistribute479 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: ptn_ice ! ice surface temperature 470 INTEGER , INTENT(in ) :: k_limflx ! =-1 do nothing; =0 average ; 471 ! ! = 1 average and redistribute ; =2 redistribute 472 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: ptn_ice ! ice surface temperature 480 473 REAL(wp), DIMENSION(:,:,:), INTENT(in ) :: palb_ice ! ice albedo 481 474 REAL(wp), DIMENSION(:,:,:), INTENT(inout) :: pqns_ice ! non solar flux … … 526 519 CALL wrk_alloc( jpi,jpj, zalb_m, ztem_m ) 527 520 ! 528 zalb_m(:,:) = fice_ice_ave ( palb_ice (:,:,:) ) 529 ztem_m(:,:) = fice_ice_ave ( ptn_ice (:,:,:) ) 521 zalb_m(:,:) = fice_ice_ave ( palb_ice (:,:,:) ) 522 ztem_m(:,:) = fice_ice_ave ( ptn_ice (:,:,:) ) 530 523 DO jl = 1, jpl 531 524 pqns_ice (:,:,jl) = pqns_ice (:,:,jl) + pdqn_ice (:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) ) 532 525 pevap_ice(:,:,jl) = pevap_ice(:,:,jl) + pdevap_ice(:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) ) 533 pqsr_ice (:,:,jl) = pqsr_ice (:,:,jl) * ( 1._wp - palb_ice(:,:,jl) ) / ( 1._wp - zalb_m(:,:) ) 526 pqsr_ice (:,:,jl) = pqsr_ice (:,:,jl) * ( 1._wp - palb_ice(:,:,jl) ) / ( 1._wp - zalb_m(:,:) ) 534 527 END DO 535 528 ! … … 546 539 !! *** ROUTINE sbc_lim_bef *** 547 540 !! 548 !! ** purpose : store ice variables at "before" time step 541 !! ** purpose : store ice variables at "before" time step 549 542 !!---------------------------------------------------------------------- 550 543 a_i_b (:,:,:) = a_i (:,:,:) ! ice area 551 544 e_i_b (:,:,:,:) = e_i (:,:,:,:) ! ice thermal energy 552 545 v_i_b (:,:,:) = v_i (:,:,:) ! ice volume 553 v_s_b (:,:,:) = v_s (:,:,:) ! snow volume 546 v_s_b (:,:,:) = v_s (:,:,:) ! snow volume 554 547 e_s_b (:,:,:,:) = e_s (:,:,:,:) ! snow thermal energy 555 548 smv_i_b(:,:,:) = smv_i(:,:,:) ! salt content … … 557 550 u_ice_b(:,:) = u_ice(:,:) 558 551 v_ice_b(:,:) = v_ice(:,:) 559 ! 552 ! 560 553 END SUBROUTINE sbc_lim_bef 561 554 … … 569 562 !!---------------------------------------------------------------------- 570 563 sfx (:,:) = 0._wp ; 571 sfx_bri(:,:) = 0._wp ; 564 sfx_bri(:,:) = 0._wp ; 572 565 sfx_sni(:,:) = 0._wp ; sfx_opw(:,:) = 0._wp 573 566 sfx_bog(:,:) = 0._wp ; sfx_dyn(:,:) = 0._wp … … 580 573 wfx_bom(:,:) = 0._wp ; wfx_sum(:,:) = 0._wp 581 574 wfx_res(:,:) = 0._wp ; wfx_sub(:,:) = 0._wp 582 wfx_spr(:,:) = 0._wp ; 583 ! 584 hfx_thd(:,:) = 0._wp ; 575 wfx_spr(:,:) = 0._wp ; 576 ! 577 hfx_thd(:,:) = 0._wp ; 585 578 hfx_snw(:,:) = 0._wp ; hfx_opw(:,:) = 0._wp 586 579 hfx_bog(:,:) = 0._wp ; hfx_dyn(:,:) = 0._wp 587 580 hfx_bom(:,:) = 0._wp ; hfx_sum(:,:) = 0._wp 588 581 hfx_res(:,:) = 0._wp ; hfx_sub(:,:) = 0._wp 589 hfx_spr(:,:) = 0._wp ; hfx_dif(:,:) = 0._wp 582 hfx_spr(:,:) = 0._wp ; hfx_dif(:,:) = 0._wp 590 583 hfx_err(:,:) = 0._wp ; hfx_err_rem(:,:) = 0._wp 591 584 hfx_err_dif(:,:) = 0._wp … … 600 593 END SUBROUTINE sbc_lim_diag0 601 594 602 595 603 596 FUNCTION fice_cell_ave ( ptab ) 604 597 !!-------------------------------------------------------------------------- … … 608 601 REAL (wp), DIMENSION (jpi,jpj,jpl), INTENT (in) :: ptab 609 602 INTEGER :: jl ! Dummy loop index 610 611 fice_cell_ave (:,:) = 0. 0_wp603 604 fice_cell_ave (:,:) = 0._wp 612 605 DO jl = 1, jpl 613 606 fice_cell_ave (:,:) = fice_cell_ave (:,:) + a_i (:,:,jl) * ptab (:,:,jl) 614 607 END DO 615 608 616 609 END FUNCTION fice_cell_ave 617 618 610 611 619 612 FUNCTION fice_ice_ave ( ptab ) 620 613 !!-------------------------------------------------------------------------- -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
r6140 r6723 24 24 USE sbc_oce ! Surface boundary condition: ocean fields 25 25 USE sbc_ice ! Surface boundary condition: ice fields 26 USE sbcblk_core ! Surface boundary condition: CORE bulk 27 USE sbcblk_clio ! Surface boundary condition: CLIO bulk 26 USE sbcblk ! Surface boundary condition: bulk 28 27 USE sbccpl ! Surface boundary condition: coupled interface 29 28 USE albedo … … 93 92 !!--------------------------------------------------------------------- 94 93 INTEGER, INTENT(in) :: kt ! ocean time step 95 INTEGER, INTENT(in) :: ksbc ! type of sbc ( = 3 CLIO bulk ; =4 COREbulk ; =5 coupled )94 INTEGER, INTENT(in) :: ksbc ! type of sbc ( =4 bulk ; =5 coupled ) 96 95 !! 97 96 INTEGER :: ji, jj ! dummy loop indices … … 161 160 162 161 SELECT CASE( ksbc ) 163 CASE( jp_ core , jp_purecpl ) ! COREand COUPLED bulk formulations162 CASE( jp_blk , jp_purecpl ) ! BULK and COUPLED bulk formulations 164 163 165 164 ! albedo depends on cloud fraction because of non-linear spectral effects 166 165 zalb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) 167 ! In CLIO the cloud fraction is read in the climatology and the all-sky albedo168 ! (zalb_ice) is computed within the bulk routine169 166 170 167 END SELECT … … 184 181 ! 185 182 SELECT CASE( ksbc ) 186 CASE( jp_clio ) ! CLIO bulk formulation 187 ! CALL blk_ice_clio( zsist, zalb_cs , zalb_os , zalb_ice , & 188 ! & utau_ice , vtau_ice , qns_ice , qsr_ice, & 189 ! & qla_ice , dqns_ice , dqla_ice , & 190 ! & tprecip , sprecip , & 191 ! & fr1_i0 , fr2_i0 , cp_ice_msh , jpl ) 192 CALL blk_ice_clio_tau 193 CALL blk_ice_clio_flx( zsist, zalb_cs, zalb_os, zalb_ice ) 194 195 CASE( jp_core ) ! CORE bulk formulation 196 CALL blk_ice_core_tau 197 CALL blk_ice_core_flx( zsist, zalb_ice ) 198 183 ! 184 CASE( jp_blk ) ! Bulk formulation 185 CALL blk_ice_tau 186 CALL blk_ice_flx( zsist, zalb_ice ) 187 ! 199 188 CASE( jp_purecpl ) ! Coupled formulation : atmosphere-ice stress only (fluxes provided after ice dynamics) 200 189 CALL sbc_cpl_ice_tau( utau_ice , vtau_ice ) 190 ! 201 191 END SELECT 202 192 -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r6460 r6723 13 13 !! 3.4 ! 2011-11 (C. Harris) CICE added as an option 14 14 !! 3.5 ! 2012-11 (A. Coward, G. Madec) Rethink of heat, mass and salt surface fluxes 15 !! 3.6 ! 2014-11 (P. Mathiot, C. Harris) add ice shelves melting 15 !! 3.6 ! 2014-11 (P. Mathiot, C. Harris) add ice shelves melting 16 !! 4.0 ! 2016-06 (L. Brodeau) new general bulk formulation 16 17 !!---------------------------------------------------------------------- 17 18 … … 30 31 USE sbcana ! surface boundary condition: analytical formulation 31 32 USE sbcflx ! surface boundary condition: flux formulation 32 USE sbcblk_clio ! surface boundary condition: bulk formulation : CLIO 33 USE sbcblk_core ! surface boundary condition: bulk formulation : CORE 34 USE sbcblk_mfs ! surface boundary condition: bulk formulation : MFS 33 USE sbcblk ! surface boundary condition: bulk formulation 35 34 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 36 35 USE sbcice_lim ! surface boundary condition: LIM 3.0 sea-ice model … … 55 54 USE timing ! Timing 56 55 57 USE diurnal_bulk, ONLY: & 58 & ln_diurnal_only 56 USE diurnal_bulk, ONLY: ln_diurnal_only 59 57 60 58 IMPLICIT NONE … … 63 61 PUBLIC sbc ! routine called by step.F90 64 62 PUBLIC sbc_init ! routine called by opa.F90 65 63 66 64 INTEGER :: nsbc ! type of surface boundary condition (deduced from namsbc informations) 67 65 68 66 !!---------------------------------------------------------------------- 69 !! NEMO/OPA 4.0 , NEMO-consortium (201 1)67 !! NEMO/OPA 4.0 , NEMO-consortium (2016) 70 68 !! $Id$ 71 69 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 87 85 INTEGER :: icpt ! local integer 88 86 !! 89 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx, ln_blk _clio, ln_blk_core, ln_blk_mfs,&90 & ln_cpl , ln_mixcpl, nn_components , nn_limflx ,&91 & ln_traqsr, ln_dm2dc , &92 & nn_ice , nn_ice_embd, 93 & ln_rnf , ln_ssr , ln_isf , nn_fwb , ln_apr_dyn, 94 & ln_wave , 95 & nn_lsm 87 NAMELIST/namsbc/ nn_fsbc , ln_ana , ln_flx, ln_blk, ln_cpl , ln_mixcpl, & 88 & nn_components , nn_limflx , & 89 & ln_traqsr, ln_dm2dc , & 90 & nn_ice , nn_ice_embd, & 91 & ln_rnf , ln_ssr , ln_isf , nn_fwb , ln_apr_dyn, & 92 & ln_wave , & 93 & nn_lsm 96 94 INTEGER :: ios 97 95 INTEGER :: ierr, ierr0, ierr1, ierr2, ierr3, jpm … … 116 114 ! ! overwrite namelist parameter using CPP key information 117 115 IF( Agrif_Root() ) THEN ! AGRIF zoom 118 IF( lk_lim2 ) nn_ice = 2119 IF( lk_lim3 ) nn_ice = 3120 IF( lk_cice ) nn_ice = 4116 IF( lk_lim2 ) nn_ice = 2 117 IF( lk_lim3 ) nn_ice = 3 118 IF( lk_cice ) nn_ice = 4 121 119 ENDIF 122 120 IF( cp_cfg == 'gyre' ) THEN ! GYRE configuration 123 ln_ana = .TRUE.124 121 ln_ana = .TRUE. 122 nn_ice = 0 125 123 ENDIF 126 124 ! … … 131 129 WRITE(numout,*) ' analytical formulation ln_ana = ', ln_ana 132 130 WRITE(numout,*) ' flux formulation ln_flx = ', ln_flx 133 WRITE(numout,*) ' CLIO bulk formulation ln_blk_clio = ', ln_blk_clio 134 WRITE(numout,*) ' CORE bulk formulation ln_blk_core = ', ln_blk_core 135 WRITE(numout,*) ' MFS bulk formulation ln_blk_mfs = ', ln_blk_mfs 131 WRITE(numout,*) ' bulk formulation ln_blk = ', ln_blk 136 132 WRITE(numout,*) ' Type of coupling (Ocean/Ice/Atmosphere) : ' 137 133 WRITE(numout,*) ' ocean-atmosphere coupled formulation ln_cpl = ', ln_cpl … … 141 137 WRITE(numout,*) ' Multicategory heat flux formulation (LIM3) nn_limflx = ', nn_limflx 142 138 WRITE(numout,*) ' Sea-ice : ' 143 WRITE(numout,*) ' ice management in the sbc (=0/1/2/3) nn_ice = ', nn_ice 139 WRITE(numout,*) ' ice management in the sbc (=0/1/2/3) nn_ice = ', nn_ice 144 140 WRITE(numout,*) ' ice-ocean embedded/levitating (=0/1/2) nn_ice_embd = ', nn_ice_embd 145 141 WRITE(numout,*) ' Misc. options of sbc : ' 146 142 WRITE(numout,*) ' Light penetration in temperature Eq. ln_traqsr = ', ln_traqsr 147 WRITE(numout,*) ' daily mean to diurnal cycle qsr ln_dm2dc = ', ln_dm2dc 143 WRITE(numout,*) ' daily mean to diurnal cycle qsr ln_dm2dc = ', ln_dm2dc 148 144 WRITE(numout,*) ' Sea Surface Restoring on SST and/or SSS ln_ssr = ', ln_ssr 149 145 WRITE(numout,*) ' FreshWater Budget control (=0/1/2) nn_fwb = ', nn_fwb … … 153 149 WRITE(numout,*) ' closed sea (=0/1) (set in namdom) nn_closea = ', nn_closea 154 150 WRITE(numout,*) ' nb of iterations if land-sea-mask applied nn_lsm = ', nn_lsm 155 WRITE(numout,*) ' surface wave ln_wave = ', ln_wave 151 WRITE(numout,*) ' surface wave ln_wave = ', ln_wave 156 152 ENDIF 157 153 ! … … 160 156 SELECT CASE ( nn_limflx ) ! LIM3 Multi-category heat flux formulation 161 157 CASE ( -1 ) ; WRITE(numout,*) ' LIM3: use per-category fluxes (nn_limflx = -1) ' 162 CASE ( 0 ) ; WRITE(numout,*) ' LIM3: use average per-category fluxes (nn_limflx = 0) ' 158 CASE ( 0 ) ; WRITE(numout,*) ' LIM3: use average per-category fluxes (nn_limflx = 0) ' 163 159 CASE ( 1 ) ; WRITE(numout,*) ' LIM3: use average then redistribute per-category fluxes (nn_limflx = 1) ' 164 160 CASE ( 2 ) ; WRITE(numout,*) ' LIM3: Redistribute a single flux over categories (nn_limflx = 2) ' … … 185 181 186 182 ! ! Checks: 187 IF( .NOT. ln_isf ) THEN ! variable initialisation if no ice shelf 183 IF( .NOT. ln_isf ) THEN ! variable initialisation if no ice shelf 188 184 IF( sbc_isf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_isf arrays' ) 189 185 fwfisf (:,:) = 0.0_wp ; fwfisf_b (:,:) = 0.0_wp … … 192 188 IF( nn_ice == 0 .AND. nn_components /= jp_iam_opa ) fr_i(:,:) = 0._wp ! no ice in the domain, ice fraction is always zero 193 189 194 sfx(:,:) = 0._wp ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero) 195 196 190 sfx(:,:) = 0._wp ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero) 191 ! ! only if sea-ice is present 192 197 193 fmmflx(:,:) = 0._wp ! freezing-melting array initialisation 198 194 199 195 taum(:,:) = 0._wp ! Initialise taum for use in gls in case of reduced restart 200 196 201 ! ! restartability 202 IF( ( nn_ice == 2 .OR. nn_ice ==3 ) .AND. .NOT.( ln_blk _clio .OR. ln_blk_core.OR. ln_cpl ) ) &197 ! ! restartability 198 IF( ( nn_ice == 2 .OR. nn_ice ==3 ) .AND. .NOT.( ln_blk .OR. ln_cpl ) ) & 203 199 & CALL ctl_stop( 'LIM sea-ice model requires a bulk formulation or coupled configuration' ) 204 IF( nn_ice == 4 .AND. .NOT.( ln_blk _core.OR. ln_cpl ) ) &205 & CALL ctl_stop( 'CICE sea-ice model requires ln_blk _coreor ln_cpl' )200 IF( nn_ice == 4 .AND. .NOT.( ln_blk .OR. ln_cpl ) ) & 201 & CALL ctl_stop( 'CICE sea-ice model requires ln_blk or ln_cpl' ) 206 202 IF( nn_ice == 4 .AND. lk_agrif ) & 207 203 & CALL ctl_stop( 'CICE sea-ice model not currently available with AGRIF' ) … … 217 213 IF( ln_dm2dc ) nday_qsr = -1 ! initialisation flag 218 214 219 IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk _core) .AND. nn_components /= jp_iam_opa ) &220 & CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' )221 215 IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk ) .AND. nn_components /= jp_iam_opa ) & 216 & CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or the bulk formulation' ) 217 222 218 ! ! Choice of the Surface Boudary Condition (set nsbc) 223 219 ll_purecpl = ln_cpl .AND. .NOT. ln_mixcpl … … 226 222 IF( ln_ana ) THEN ; nsbc = jp_ana ; icpt = icpt + 1 ; ENDIF ! analytical formulation 227 223 IF( ln_flx ) THEN ; nsbc = jp_flx ; icpt = icpt + 1 ; ENDIF ! flux formulation 228 IF( ln_blk_clio ) THEN ; nsbc = jp_clio ; icpt = icpt + 1 ; ENDIF ! CLIO bulk formulation 229 IF( ln_blk_core ) THEN ; nsbc = jp_core ; icpt = icpt + 1 ; ENDIF ! CORE bulk formulation 230 IF( ln_blk_mfs ) THEN ; nsbc = jp_mfs ; icpt = icpt + 1 ; ENDIF ! MFS bulk formulation 224 IF( ln_blk ) THEN ; nsbc = jp_blk ; icpt = icpt + 1 ; ENDIF ! bulk formulation 231 225 IF( ll_purecpl ) THEN ; nsbc = jp_purecpl ; icpt = icpt + 1 ; ENDIF ! Pure Coupled formulation 232 226 IF( cp_cfg == 'gyre') THEN ; nsbc = jp_gyre ; ENDIF ! GYRE analytical formulation … … 242 236 CASE( jp_ana ) ; WRITE(numout,*) ' analytical formulation' 243 237 CASE( jp_flx ) ; WRITE(numout,*) ' flux formulation' 244 CASE( jp_clio ) ; WRITE(numout,*) ' CLIO bulk formulation' 245 CASE( jp_core ) ; WRITE(numout,*) ' CORE bulk formulation' 238 CASE( jp_blk ) ; WRITE(numout,*) ' bulk formulation' 246 239 CASE( jp_purecpl ) ; WRITE(numout,*) ' pure coupled formulation' 247 CASE( jp_mfs ) ; WRITE(numout,*) ' MFS Bulk formulation'248 240 CASE( jp_none ) ; WRITE(numout,*) ' OPA coupled to SAS via oasis' 249 241 IF( ln_mixcpl ) WRITE(numout,*) ' + forced-coupled mixed formulation' … … 269 261 ! 270 262 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR. & 271 MOD( nstock , nn_fsbc) /= 0 ) THEN 263 MOD( nstock , nn_fsbc) /= 0 ) THEN 272 264 WRITE(ctmp1,*) 'experiment length (', nitend - nit000 + 1, ') or nstock (', nstock, & 273 265 & ' is NOT a multiple of nn_fsbc (', nn_fsbc, ')' … … 297 289 !!--------------------------------------------------------------------- 298 290 !! *** ROUTINE sbc *** 299 !! 291 !! 300 292 !! ** Purpose : provide at each time-step the ocean surface boundary 301 293 !! condition (momentum, heat and freshwater fluxes) 302 294 !! 303 !! ** Method : blah blah to be written ????????? 295 !! ** Method : blah blah to be written ????????? 304 296 !! CAUTION : never mask the surface stress field (tke sbc) 305 297 !! 306 !! ** Action : - set the ocean surface boundary condition at before and now 307 !! time step, i.e. 298 !! ** Action : - set the ocean surface boundary condition at before and now 299 !! time step, i.e. 308 300 !! utau_b, vtau_b, qns_b, qsr_b, emp_n, sfx_b, qrp_b, erp_b 309 301 !! utau , vtau , qns , qsr , emp , sfx , qrp , erp 310 302 !! - updte the ice fraction : fr_i 311 303 !!---------------------------------------------------------------------- 312 INTEGER, INTENT(in) :: kt ! ocean time step 304 INTEGER, INTENT(in) :: kt ! ocean time step 305 ! 306 LOGICAL :: ll_sas, ll_opa ! local logical 313 307 !!--------------------------------------------------------------------- 314 308 ! … … 332 326 ! ! ---------------------------------------- ! 333 327 ! 334 IF( nn_components /= jp_iam_sas ) CALL sbc_ssm ( kt ) ! ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 335 ! ! averaged over nf_sbc time-step 336 IF( ln_wave ) CALL sbc_wave( kt ) ! surface waves 337 338 339 !== sbc formulation ==! 340 328 ll_sas = nn_components == jp_iam_sas ! component flags 329 ll_opa = nn_components == jp_iam_opa 330 ! 331 IF( .NOT.ll_sas ) CALL sbc_ssm ( kt ) ! mean ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 332 IF( ln_wave ) CALL sbc_wave( kt ) ! surface waves 333 334 ! 335 ! !== sbc formulation ==! 336 ! 341 337 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 342 338 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) 343 CASE( jp_gyre ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration 344 CASE( jp_ana ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc 345 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation 346 CASE( jp_clio ) ; CALL sbc_blk_clio( kt ) ! bulk formulation : CLIO for the ocean 347 CASE( jp_core ) 348 IF( nn_components == jp_iam_sas ) & 349 & CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: SAS receiving fields from OPA 350 CALL sbc_blk_core( kt ) ! bulk formulation : CORE for the ocean 351 ! from oce: sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 352 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! pure coupled formulation 353 ! 354 CASE( jp_mfs ) ; CALL sbc_blk_mfs ( kt ) ! bulk formulation : MFS for the ocean 355 CASE( jp_none ) 356 IF( nn_components == jp_iam_opa ) & 357 & CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: OPA receiving fields from SAS 339 CASE( jp_gyre ) ; CALL sbc_gyre ( kt ) ! analytical formulation : GYRE configuration 340 CASE( jp_ana ) ; CALL sbc_ana ( kt ) ! analytical formulation : uniform sbc 341 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation 342 CASE( jp_blk ) 343 IF( ll_sas ) CALL sbc_cpl_rcv( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: SAS receiving fields from OPA 344 CALL sbc_blk ( kt ) ! bulk formulation for the ocean 345 ! 346 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv( kt, nn_fsbc, nn_ice ) ! pure coupled formulation 347 CASE( jp_none ) 348 IF( ll_opa ) CALL sbc_cpl_rcv( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: OPA receiving fields from SAS 358 349 END SELECT 359 350 360 IF( ln_mixcpl ) CALL sbc_cpl_rcv( kt, nn_fsbc, nn_ice ) ! forced-coupled mixed formulation after forcing351 IF( ln_mixcpl ) CALL sbc_cpl_rcv( kt, nn_fsbc, nn_ice ) ! forced-coupled mixed formulation after forcing 361 352 362 353 ! … … 368 359 CASE( 3 ) ; CALL sbc_ice_lim ( kt, nsbc ) ! LIM-3 ice model 369 360 CASE( 4 ) ; CALL sbc_ice_cice ( kt, nsbc ) ! CICE ice model 370 END SELECT 361 END SELECT 371 362 372 363 IF( ln_icebergs ) CALL icb_stp( kt ) ! compute icebergs … … 375 366 376 367 IF( ln_rnf ) CALL sbc_rnf( kt ) ! add runoffs to fresh water fluxes 377 368 378 369 IF( ln_ssr ) CALL sbc_ssr( kt ) ! add SST/SSS damping term 379 370 380 371 IF( nn_fwb /= 0 ) CALL sbc_fwb( kt, nn_fwb, nn_fsbc ) ! control the freshwater budget 381 372 382 ! treatment of closed sea in the model domain 383 ! (update freshwater fluxes) 373 ! treatment of closed sea in the model domain (update freshwater fluxes) 384 374 ! Should not be ran if ln_diurnal_only 385 IF( .NOT.(ln_diurnal_only) .AND. (nn_closea == 1) ) CALL sbc_clo( kt ) 375 IF( .NOT.(ln_diurnal_only) .AND. (nn_closea == 1) ) CALL sbc_clo( kt ) 386 376 387 377 !RBbug do not understand why see ticket 667 … … 392 382 ! ! ---------------------------------------- ! 393 383 IF( ln_rstart .AND. & !* Restart: read in restart file 394 & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 384 & iom_varid( numror, 'utau_b', ldstop = .FALSE. ) > 0 ) THEN 395 385 IF(lwp) WRITE(numout,*) ' nit000-1 surface forcing fields red in the restart file' 396 386 CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b ) ! before i-stress (U-point) … … 408 398 ELSE !* no restart: set from nit000 values 409 399 IF(lwp) WRITE(numout,*) ' nit000-1 surface forcing fields set to nit000' 410 utau_b(:,:) = utau(:,:) 400 utau_b(:,:) = utau(:,:) 411 401 vtau_b(:,:) = vtau(:,:) 412 402 qns_b (:,:) = qns (:,:) 413 emp_b (:,:) = emp (:,:)414 sfx_b (:,:) = sfx (:,:)403 emp_b (:,:) = emp (:,:) 404 sfx_b (:,:) = sfx (:,:) 415 405 ENDIF 416 406 ENDIF … … 436 426 CALL iom_put( "empmr" , emp - rnf ) ! upward water flux 437 427 CALL iom_put( "empbmr" , emp_b - rnf ) ! before upward water flux ( needed to recalculate the time evolution of ssh in offline ) 438 CALL iom_put( "saltflx", sfx ) ! downward salt flux 439 ! (includes virtual salt flux beneath ice 440 ! in linear free surface case) 428 CALL iom_put( "saltflx", sfx ) ! downward salt flux (includes virtual salt flux beneath ice in linear free surface case) 441 429 CALL iom_put( "fmmflx", fmmflx ) ! Freezing-melting water flux 442 CALL iom_put( "qt" , qns + qsr ) ! total heat flux 430 CALL iom_put( "qt" , qns + qsr ) ! total heat flux 443 431 CALL iom_put( "qns" , qns ) ! solar heat flux 444 432 CALL iom_put( "qsr" , qsr ) ! solar heat flux 445 IF( nn_ice > 0 .OR. nn_components == jp_iam_opa ) CALL iom_put( "ice_cover", fr_i ) ! ice fraction446 CALL iom_put( "taum" , taum ) ! wind stress module 433 IF( nn_ice > 0 .OR. ll_opa ) CALL iom_put( "ice_cover", fr_i ) ! ice fraction 434 CALL iom_put( "taum" , taum ) ! wind stress module 447 435 CALL iom_put( "wspd" , wndm ) ! wind speed module over free ocean or leads in presence of sea-ice 448 436 ENDIF 449 437 ! 450 CALL iom_put( "utau", utau ) ! i-wind stress (stress can be updated at 451 CALL iom_put( "vtau", vtau ) ! j-wind stress each time step in sea-ice)438 CALL iom_put( "utau", utau ) ! i-wind stress (stress can be updated at each time step in sea-ice) 439 CALL iom_put( "vtau", vtau ) ! j-wind stress 452 440 ! 453 441 IF(ln_ctl) THEN ! print mean trends (used for debugging) -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r6489 r6723 88 88 ! ! ----------------------------------------------- ! 89 89 IF(lwp) WRITE(numout,*) 90 IF(lwp) WRITE(numout,*) '~~~~~~~ mean fields initialised to instantaneous values' 90 IF(lwp) WRITE(numout,*) 'sbc_ssm : mean fields initialised to instantaneous values' 91 IF(lwp) WRITE(numout,*) '~~~~~~~ ' 91 92 zcoef = REAL( nn_fsbc - 1, wp ) 92 93 ssu_m(:,:) = zcoef * ub(:,:,1) … … 194 195 ! 195 196 IF(lwp) WRITE(numout,*) 196 IF(lwp) WRITE(numout,*) 'sbc_ssm : sea surface mean fields, nn_fsbc=1 : instantaneous values'197 IF(lwp) WRITE(numout,*) '~~~~~~~ '197 IF(lwp) WRITE(numout,*) 'sbc_ssm_init : sea surface mean fields, nn_fsbc=1 : instantaneous values' 198 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~ ' 198 199 ! 199 200 ELSE 200 201 ! 201 202 IF(lwp) WRITE(numout,*) 202 IF(lwp) WRITE(numout,*) 'sbc_ssm : sea surface mean fields'203 IF(lwp) WRITE(numout,*) '~~~~~~~ '203 IF(lwp) WRITE(numout,*) 'sbc_ssm_init : sea surface mean fields' 204 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~ ' 204 205 ! 205 206 IF( ln_rstart .AND. iom_varid( numror, 'nn_fsbc', ldstop = .FALSE. ) > 0 ) THEN -
branches/2016/dev_r6711_SIMPLIF_6_aerobulk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
r6140 r6723 25 25 PRIVATE 26 26 27 PUBLIC sbc_wave ! routine called in sbc_blk _core or sbc_blk_mfs27 PUBLIC sbc_wave ! routine called in sbc_blk 28 28 29 29 INTEGER , PARAMETER :: jpfld = 3 ! maximum number of files to read for srokes drift … … 94 94 IF( .NOT.( ln_cdgw .OR. ln_sdw ) ) & 95 95 & CALL ctl_warn( 'ln_sbcwave=T but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' ) 96 IF( ln_cdgw .AND. .NOT. (ln_blk_mfs .OR. ln_blk_core)) &97 & CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core')96 IF( ln_cdgw .AND. .NOT.ln_blk ) & 97 & CALL ctl_stop( 'drag coefficient read from wave model definable only with bulk formulae') 98 98 ! 99 99 IF( ln_cdgw ) THEN
Note: See TracChangeset
for help on using the changeset viewer.