- Timestamp:
- 2020-09-14T17:40:34+02:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS
- Property svn:externals
-
old new 3 3 ^/utils/build/mk@HEAD mk 4 4 ^/utils/tools@HEAD tools 5 ^/vendors/AGRIF/dev @HEADext/AGRIF5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS ext/AGRIF 6 6 ^/vendors/FCM@HEAD ext/FCM 7 7 ^/vendors/IOIPSL@HEAD ext/IOIPSL 8 9 # SETTE 10 ^/utils/CI/sette@13382 sette
-
- Property svn:externals
-
NEMO/branches/2019/dev_r11351_fldread_with_XIOS/src/OCE/SBC/sbcmod.F90
r11405 r13463 15 15 !! 3.6 ! 2014-11 (P. Mathiot, C. Harris) add ice shelves melting 16 16 !! 4.0 ! 2016-06 (L. Brodeau) new general bulk formulation 17 !! 4.0 ! 2019-03 (F. Lemarié & G. Samson) add ABL compatibility (ln_abl=TRUE) 17 18 !!---------------------------------------------------------------------- 18 19 … … 24 25 USE oce ! ocean dynamics and tracers 25 26 USE dom_oce ! ocean space and time domain 27 USE closea ! closed seas 26 28 USE phycst ! physical constants 27 29 USE sbc_oce ! Surface boundary condition: ocean fields … … 32 34 USE sbcflx ! surface boundary condition: flux formulation 33 35 USE sbcblk ! surface boundary condition: bulk formulation 36 USE sbcabl ! atmospheric boundary layer 34 37 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 35 38 #if defined key_si3 … … 37 40 #endif 38 41 USE sbcice_cice ! surface boundary condition: CICE sea-ice model 39 USE sbcisf ! surface boundary condition: ice-shelf40 42 USE sbccpl ! surface boundary condition: coupled formulation 41 43 USE cpl_oasis3 ! OASIS routines for coupling 44 USE sbcclo ! surface boundary condition: closed sea correction 42 45 USE sbcssr ! surface boundary condition: sea surface restoring 43 46 USE sbcrnf ! surface boundary condition: runoffs 44 47 USE sbcapr ! surface boundary condition: atmo pressure 45 USE sbcisf ! surface boundary condition: ice shelf46 48 USE sbcfwb ! surface boundary condition: freshwater budget 47 49 USE icbstp ! Icebergs … … 59 61 USE timing ! Timing 60 62 USE wet_dry 61 USE diu rnal_bulk, ONLY: ln_diurnal_only ! diurnal SST diagnostic63 USE diu_bulk, ONLY: ln_diurnal_only ! diurnal SST diagnostic 62 64 63 65 IMPLICIT NONE … … 76 78 CONTAINS 77 79 78 SUBROUTINE sbc_init 80 SUBROUTINE sbc_init( Kbb, Kmm, Kaa ) 79 81 !!--------------------------------------------------------------------- 80 82 !! *** ROUTINE sbc_init *** … … 88 90 !! - nsbc: type of sbc 89 91 !!---------------------------------------------------------------------- 92 INTEGER, INTENT(in) :: Kbb, Kmm, Kaa ! ocean time level indices 90 93 INTEGER :: ios, icpt ! local integer 91 94 LOGICAL :: ll_purecpl, ll_opa, ll_not_nemo ! local logical 92 95 !! 93 96 NAMELIST/namsbc/ nn_fsbc , & 94 & ln_usr , ln_flx , ln_blk ,&97 & ln_usr , ln_flx , ln_blk , ln_abl, & 95 98 & ln_cpl , ln_mixcpl, nn_components, & 96 99 & nn_ice , ln_ice_embd, & 97 100 & ln_traqsr, ln_dm2dc , & 98 & ln_rnf , nn_fwb , ln_ssr , ln_isf , ln_apr_dyn ,&99 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor 101 & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & 102 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor , & 100 103 & ln_tauw , nn_lsm, nn_sdrift 101 104 !!---------------------------------------------------------------------- … … 108 111 ! 109 112 ! !** read Surface Module namelist 110 REWIND( numnam_ref ) !* Namelist namsbc in reference namelist : Surface boundary111 113 READ ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 112 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist', lwp ) 113 REWIND( numnam_cfg ) !* Namelist namsbc in configuration namelist : Parameters of the run 114 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist' ) 114 115 READ ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 115 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist' , lwp)116 902 IF( ios > 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist' ) 116 117 IF(lwm) WRITE( numond, namsbc ) 117 118 ! … … 119 120 ncom_fsbc = nn_fsbc ! make nn_fsbc available for lib_mpp 120 121 #endif 121 ! !* overwrite namelist parameter using CPP key information 122 #if defined key_agrif 123 IF( Agrif_Root() ) THEN ! AGRIF zoom (cf r1242: possibility to run without ice in fine grid) 124 IF( lk_si3 ) nn_ice = 2 125 IF( lk_cice ) nn_ice = 3 126 ENDIF 127 #else 128 IF( lk_si3 ) nn_ice = 2 129 IF( lk_cice ) nn_ice = 3 130 #endif 122 ! 131 123 ! 132 124 IF(lwp) THEN !* Control print … … 137 129 WRITE(numout,*) ' flux formulation ln_flx = ', ln_flx 138 130 WRITE(numout,*) ' bulk formulation ln_blk = ', ln_blk 131 WRITE(numout,*) ' ABL formulation ln_abl = ', ln_abl 139 132 WRITE(numout,*) ' Type of coupling (Ocean/Ice/Atmosphere) : ' 140 133 WRITE(numout,*) ' ocean-atmosphere coupled formulation ln_cpl = ', ln_cpl … … 153 146 WRITE(numout,*) ' Patm gradient added in ocean & ice Eqs. ln_apr_dyn = ', ln_apr_dyn 154 147 WRITE(numout,*) ' runoff / runoff mouths ln_rnf = ', ln_rnf 155 WRITE(numout,*) ' iceshelf formulation ln_isf = ', ln_isf156 148 WRITE(numout,*) ' nb of iterations if land-sea-mask applied nn_lsm = ', nn_lsm 157 149 WRITE(numout,*) ' surface wave ln_wave = ', ln_wave … … 185 177 ! 186 178 IF( .NOT.ln_usr ) THEN ! the model calendar needs some specificities (except in user defined case) 187 IF( MOD( rday , r dt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' )179 IF( MOD( rday , rn_Dt ) /= 0. ) CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 188 180 IF( MOD( rday , 2. ) /= 0. ) CALL ctl_stop( 'the number of second of in a day must be an even number' ) 189 IF( MOD( r dt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' )181 IF( MOD( rn_Dt , 2. ) /= 0. ) CALL ctl_stop( 'the time step (in second) must be an even number' ) 190 182 ENDIF 191 183 ! !** check option consistency … … 225 217 CASE( 1 ) !- Ice-cover climatology ("Ice-if" model) 226 218 CASE( 2 ) !- SI3 ice model 219 IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) ) & 220 & CALL ctl_stop( 'sbc_init : SI3 sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 227 221 CASE( 3 ) !- CICE ice model 228 IF( .NOT.( ln_blk .OR. ln_cpl ) ) CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl = T' ) 229 IF( lk_agrif ) CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 222 IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) ) & 223 & CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 224 IF( lk_agrif ) & 225 & CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 230 226 CASE DEFAULT !- not supported 231 227 END SELECT 228 IF( ln_diurnal .AND. .NOT. ln_blk ) CALL ctl_stop( "sbc_init: diurnal flux processing only implemented for bulk forcing" ) 232 229 ! 233 230 ! !** allocate and set required variables … … 239 236 #endif 240 237 ! 241 IF( .NOT.ln_isf ) THEN !* No ice-shelf in the domain : allocate and set to zero 242 IF( sbc_isf_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_isf arrays' ) 243 fwfisf (:,:) = 0._wp ; risf_tsc (:,:,:) = 0._wp 244 fwfisf_b(:,:) = 0._wp ; risf_tsc_b(:,:,:) = 0._wp 245 END IF 238 ! 239 IF( sbc_ssr_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_ssr arrays' ) 240 IF( .NOT.ln_ssr ) THEN !* Initialize qrp and erp if no restoring 241 qrp(:,:) = 0._wp 242 erp(:,:) = 0._wp 243 ENDIF 244 ! 245 246 246 IF( nn_ice == 0 ) THEN !* No sea-ice in the domain : ice fraction is always zero 247 247 IF( nn_components /= jp_iam_opa ) fr_i(:,:) = 0._wp ! except for OPA in SAS-OPA coupled case … … 254 254 255 255 ! ! Choice of the Surface Boudary Condition (set nsbc) 256 nday_qsr = -1 ! allow initialization at the 1st call !LB: now warm-layer of COARE* calls "sbc_dcy_param" of sbcdcy.F90! 256 257 IF( ln_dm2dc ) THEN !* daily mean to diurnal cycle 257 nday_qsr = -1 ! allow initialization at the 1st call258 IF( .NOT.( ln_flx .OR. ln_blk ) .AND. nn_components /= jp_iam_opa ) &259 & CALL ctl_stop( 'qsr diurnal cycle from daily values requires a flux or bulkformulation' )258 !LB:nday_qsr = -1 ! allow initialization at the 1st call 259 IF( .NOT.( ln_flx .OR. ln_blk .OR. ln_abl ) .AND. nn_components /= jp_iam_opa ) & 260 & CALL ctl_stop( 'qsr diurnal cycle from daily values requires flux, bulk or abl formulation' ) 260 261 ENDIF 261 262 ! !* Choice of the Surface Boudary Condition … … 270 271 IF( ln_flx ) THEN ; nsbc = jp_flx ; icpt = icpt + 1 ; ENDIF ! flux formulation 271 272 IF( ln_blk ) THEN ; nsbc = jp_blk ; icpt = icpt + 1 ; ENDIF ! bulk formulation 273 IF( ln_abl ) THEN ; nsbc = jp_abl ; icpt = icpt + 1 ; ENDIF ! ABL formulation 272 274 IF( ll_purecpl ) THEN ; nsbc = jp_purecpl ; icpt = icpt + 1 ; ENDIF ! Pure Coupled formulation 273 275 IF( ll_opa ) THEN ; nsbc = jp_none ; icpt = icpt + 1 ; ENDIF ! opa coupling via SAS module … … 281 283 CASE( jp_flx ) ; WRITE(numout,*) ' ==>>> flux formulation' 282 284 CASE( jp_blk ) ; WRITE(numout,*) ' ==>>> bulk formulation' 285 CASE( jp_abl ) ; WRITE(numout,*) ' ==>>> ABL formulation' 283 286 CASE( jp_purecpl ) ; WRITE(numout,*) ' ==>>> pure coupled formulation' 284 287 !!gm abusive use of jp_none ?? ===>>> need to be check and changed by adding a jp_sas parameter … … 296 299 ! SAS time-step has to be declared in OASIS (mandatory) -> nn_fsbc has to be modified accordingly 297 300 IF( nn_components /= jp_iam_nemo ) THEN 298 IF( nn_components == jp_iam_opa ) nn_fsbc = cpl_freq('O_SFLX') / NINT(r dt)299 IF( nn_components == jp_iam_sas ) nn_fsbc = cpl_freq('I_SFLX') / NINT(r dt)301 IF( nn_components == jp_iam_opa ) nn_fsbc = cpl_freq('O_SFLX') / NINT(rn_Dt) 302 IF( nn_components == jp_iam_sas ) nn_fsbc = cpl_freq('I_SFLX') / NINT(rn_Dt) 300 303 ! 301 304 IF(lwp)THEN … … 307 310 ! 308 311 ! !* check consistency between model timeline and nn_fsbc 309 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR. & 310 MOD( nstock , nn_fsbc) /= 0 ) THEN 311 WRITE(ctmp1,*) 'sbc_init : experiment length (', nitend - nit000 + 1, ') or nstock (', nstock, & 312 & ' is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 313 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 314 ENDIF 315 ! 316 IF( MOD( rday, REAL(nn_fsbc, wp) * rdt ) /= 0 ) & 312 IF( ln_rst_list .OR. nn_stock /= -1 ) THEN ! we will do restart files 313 IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 ) THEN 314 WRITE(ctmp1,*) 'sbc_init : experiment length (', nitend - nit000 + 1, ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 315 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 316 ENDIF 317 IF( .NOT. ln_rst_list .AND. MOD( nn_stock, nn_fsbc) /= 0 ) THEN ! we don't use nn_stock if ln_rst_list 318 WRITE(ctmp1,*) 'sbc_init : nn_stock (', nn_stock, ') is NOT a multiple of nn_fsbc (', nn_fsbc, ')' 319 CALL ctl_stop( ctmp1, 'Impossible to properly do model restart' ) 320 ENDIF 321 ENDIF 322 ! 323 IF( MOD( rday, REAL(nn_fsbc, wp) * rn_Dt ) /= 0 ) & 317 324 & CALL ctl_warn( 'sbc_init : nn_fsbc is NOT a multiple of the number of time steps in a day' ) 318 325 ! 319 IF( ln_dm2dc .AND. NINT(rday) / ( nn_fsbc * NINT(r dt) ) < 8 ) &326 IF( ln_dm2dc .AND. NINT(rday) / ( nn_fsbc * NINT(rn_Dt) ) < 8 ) & 320 327 & CALL ctl_warn( 'sbc_init : diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 321 328 ! … … 323 330 ! !** associated modules : initialization 324 331 ! 325 CALL sbc_ssm_init ! Sea-surface mean fields initialization 332 CALL sbc_ssm_init ( Kbb, Kmm ) ! Sea-surface mean fields initialization 333 ! 334 IF( l_sbc_clo ) CALL sbc_clo_init ! closed sea surface initialisation 326 335 ! 327 336 IF( ln_blk ) CALL sbc_blk_init ! bulk formulae initialization 328 337 338 IF( ln_abl ) CALL sbc_abl_init ! Atmospheric Boundary Layer (ABL) 339 329 340 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialization 330 341 ! 331 IF( ln_isf ) CALL sbc_isf_init ! Compute iceshelves 332 ! 333 CALL sbc_rnf_init ! Runof initialization 334 ! 335 IF( ln_apr_dyn ) CALL sbc_apr_init ! Atmo Pressure Forcing initialization 342 ! 343 CALL sbc_rnf_init( Kmm ) ! Runof initialization 344 ! 345 IF( ln_apr_dyn ) CALL sbc_apr_init ! Atmo Pressure Forcing initialization 336 346 ! 337 347 #if defined key_si3 … … 339 349 IF( sbc_ice_alloc() /= 0 ) CALL ctl_stop('STOP', 'sbc_ice_alloc : unable to allocate arrays' ) 340 350 ELSEIF( nn_ice == 2 ) THEN 341 CALL ice_init 351 CALL ice_init( Kbb, Kmm, Kaa ) ! ICE initialization 342 352 ENDIF 343 353 #endif 344 IF( nn_ice == 3 ) CALL cice_sbc_init( nsbc ) ! CICE initialization345 ! 346 IF( ln_wave ) CALL sbc_wave_init ! surface wave initialisation354 IF( nn_ice == 3 ) CALL cice_sbc_init( nsbc, Kbb, Kmm ) ! CICE initialization 355 ! 356 IF( ln_wave ) CALL sbc_wave_init ! surface wave initialisation 347 357 ! 348 358 IF( lwxios ) THEN … … 359 369 360 370 361 SUBROUTINE sbc( kt )371 SUBROUTINE sbc( kt, Kbb, Kmm ) 362 372 !!--------------------------------------------------------------------- 363 373 !! *** ROUTINE sbc *** … … 376 386 !!---------------------------------------------------------------------- 377 387 INTEGER, INTENT(in) :: kt ! ocean time step 388 INTEGER, INTENT(in) :: Kbb, Kmm ! ocean time level indices 378 389 ! 379 390 LOGICAL :: ll_sas, ll_opa ! local logical … … 394 405 emp_b (:,:) = emp (:,:) 395 406 sfx_b (:,:) = sfx (:,:) 396 IF 407 IF( ln_rnf ) THEN 397 408 rnf_b (:,: ) = rnf (:,: ) 398 409 rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 399 410 ENDIF 400 IF( ln_isf ) THEN401 fwfisf_b (:,: ) = fwfisf (:,: )402 risf_tsc_b(:,:,:) = risf_tsc(:,:,:)403 ENDIF404 411 ! 405 412 ENDIF … … 411 418 ll_opa = nn_components == jp_iam_opa 412 419 ! 413 IF( .NOT.ll_sas ) CALL sbc_ssm ( kt )! mean ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m)414 IF( ln_wave ) CALL sbc_wave( kt )! surface waves420 IF( .NOT.ll_sas ) CALL sbc_ssm ( kt, Kbb, Kmm ) ! mean ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 421 IF( ln_wave ) CALL sbc_wave( kt, Kmm ) ! surface waves 415 422 416 423 ! … … 419 426 SELECT CASE( nsbc ) ! Compute ocean surface boundary condition 420 427 ! ! (i.e. utau,vtau, qns, qsr, emp, sfx) 421 CASE( jp_usr ) ; CALL usrdef_sbc_oce( kt )! user defined formulation422 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation428 CASE( jp_usr ) ; CALL usrdef_sbc_oce( kt, Kbb ) ! user defined formulation 429 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation 423 430 CASE( jp_blk ) 424 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! OPA-SAS coupling: SAS receiving fields from OPA431 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA 425 432 CALL sbc_blk ( kt ) ! bulk formulation for the ocean 426 433 ! 427 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice ) ! pure coupled formulation 434 CASE( jp_abl ) 435 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA 436 CALL sbc_abl ( kt ) ! ABL formulation for the ocean 437 ! 438 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! pure coupled formulation 428 439 CASE( jp_none ) 429 IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )! OPA-SAS coupling: OPA receiving fields from SAS440 IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: OPA receiving fields from SAS 430 441 END SELECT 431 442 ! 432 IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )! forced-coupled mixed formulation after forcing433 ! 434 IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( ) ! Wind stress provided by waves443 IF( ln_mixcpl ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! forced-coupled mixed formulation after forcing 444 ! 445 IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( ) ! Wind stress provided by waves 435 446 ! 436 447 ! !== Misc. Options ==! 437 448 ! 438 449 SELECT CASE( nn_ice ) ! Update heat and freshwater fluxes over sea-ice areas 439 CASE( 1 ) ; CALL sbc_ice_if ( kt )! Ice-cover climatology ("Ice-if" model)450 CASE( 1 ) ; CALL sbc_ice_if ( kt, Kbb, Kmm ) ! Ice-cover climatology ("Ice-if" model) 440 451 #if defined key_si3 441 CASE( 2 ) ; CALL ice_stp ( kt, nsbc )! SI3 ice model452 CASE( 2 ) ; CALL ice_stp ( kt, Kbb, Kmm, nsbc ) ! SI3 ice model 442 453 #endif 443 454 CASE( 3 ) ; CALL sbc_ice_cice ( kt, nsbc ) ! CICE ice model … … 446 457 IF( ln_icebergs ) THEN 447 458 CALL icb_stp( kt ) ! compute icebergs 448 ! icebergs may advect into haloes during the icb step and alter emp.449 ! A lbc_lnk is necessary here to ensure restartability (#2113)450 IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) ! ensure restartability with icebergs451 ENDIF452 453 IF( ln_isf ) CALL sbc_isf( kt ) ! compute iceshelves459 ! Icebergs do not melt over the haloes. 460 ! So emp values over the haloes are no more consistent with the inner domain values. 461 ! A lbc_lnk is therefore needed to ensure reproducibility and restartability. 462 ! see ticket #2113 for discussion about this lbc_lnk. 463 IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) ! ensure restartability with icebergs 464 ENDIF 454 465 455 466 IF( ln_rnf ) CALL sbc_rnf( kt ) ! add runoffs to fresh water fluxes 456 467 457 IF( ln_ssr ) CALL sbc_ssr( kt ) ! add SST/SSS damping term458 459 IF( nn_fwb /= 0 ) CALL sbc_fwb( kt, nn_fwb, nn_fsbc ) ! control the freshwater budget468 IF( ln_ssr ) CALL sbc_ssr( kt ) ! add SST/SSS damping term 469 470 IF( nn_fwb /= 0 ) CALL sbc_fwb( kt, nn_fwb, nn_fsbc, Kmm ) ! control the freshwater budget 460 471 461 472 ! Special treatment of freshwater fluxes over closed seas in the model domain 462 473 ! Should not be run if ln_diurnal_only 463 IF( l_sbc_clo .AND. (.NOT. ln_diurnal_only)) CALL sbc_clo( kt )474 IF( l_sbc_clo ) CALL sbc_clo( kt ) 464 475 465 476 !!$!RBbug do not understand why see ticket 667 466 477 !!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why. 467 !!$ CALL lbc_lnk( 'sbcmod', emp, 'T', 1. )468 IF 478 !!$ CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) 479 IF( ll_wd ) THEN ! If near WAD point limit the flux for now 469 480 zthscl = atanh(rn_wd_sbcfra) ! taper frac default is .999 470 zwdht(:,:) = ssh n(:,:) + ht_0(:,:) - rn_wdmin1 ! do this calc of water481 zwdht(:,:) = ssh(:,:,Kmm) + ht_0(:,:) - rn_wdmin1 ! do this calc of water 471 482 ! depth above wd limit once 472 483 WHERE( zwdht(:,:) <= 0.0 ) … … 497 508 IF(lwp) WRITE(numout,*) ' nit000-1 surface forcing fields red in the restart file' 498 509 IF(lrxios) CALL iom_swap( TRIM(crxios_context) ) 499 CALL iom_get( numror, jpdom_auto glo, 'utau_b', utau_b, ldxios = lrxios) ! before i-stress (U-point)500 CALL iom_get( numror, jpdom_auto glo, 'vtau_b', vtau_b, ldxios = lrxios) ! before j-stress (V-point)501 CALL iom_get( numror, jpdom_auto glo, 'qns_b' , qns_b, ldxios = lrxios) ! before non solar heat flux (T-point)510 CALL iom_get( numror, jpdom_auto, 'utau_b', utau_b, ldxios = lrxios, cd_type = 'U', psgn = -1._wp ) ! before i-stress (U-point) 511 CALL iom_get( numror, jpdom_auto, 'vtau_b', vtau_b, ldxios = lrxios, cd_type = 'V', psgn = -1._wp ) ! before j-stress (V-point) 512 CALL iom_get( numror, jpdom_auto, 'qns_b', qns_b, ldxios = lrxios ) ! before non solar heat flux (T-point) 502 513 ! The 3D heat content due to qsr forcing is treated in traqsr 503 ! CALL iom_get( numror, jpdom_auto glo, 'qsr_b' , qsr_b, ldxios = lrxios ) ! before solar heat flux (T-point)504 CALL iom_get( numror, jpdom_auto glo, 'emp_b', emp_b, ldxios = lrxios ) ! before freshwater flux (T-point)514 ! CALL iom_get( numror, jpdom_auto, 'qsr_b' , qsr_b, ldxios = lrxios ) ! before solar heat flux (T-point) 515 CALL iom_get( numror, jpdom_auto, 'emp_b', emp_b, ldxios = lrxios ) ! before freshwater flux (T-point) 505 516 ! To ensure restart capability with 3.3x/3.4 restart files !! to be removed in v3.6 506 517 IF( iom_varid( numror, 'sfx_b', ldstop = .FALSE. ) > 0 ) THEN 507 CALL iom_get( numror, jpdom_auto glo, 'sfx_b', sfx_b, ldxios = lrxios ) ! before salt flux (T-point)518 CALL iom_get( numror, jpdom_auto, 'sfx_b', sfx_b, ldxios = lrxios ) ! before salt flux (T-point) 508 519 ELSE 509 520 sfx_b (:,:) = sfx(:,:) … … 550 561 CALL iom_put( "taum" , taum ) ! wind stress module 551 562 CALL iom_put( "wspd" , wndm ) ! wind speed module over free ocean or leads in presence of sea-ice 563 CALL iom_put( "qrp", qrp ) ! heat flux damping 564 CALL iom_put( "erp", erp ) ! freshwater flux damping 552 565 ENDIF 553 566 ! … … 555 568 CALL iom_put( "vtau", vtau ) ! j-wind stress 556 569 ! 557 IF( ln_ctl) THEN! print mean trends (used for debugging)558 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i- : ', mask1=tmask )559 CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf), clinfo1=' emp-rnf- : ', mask1=tmask )560 CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf), clinfo1=' sfx-rnf- : ', mask1=tmask )570 IF(sn_cfctl%l_prtctl) THEN ! print mean trends (used for debugging) 571 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask ) 572 CALL prt_ctl(tab2d_1=(emp-rnf) , clinfo1=' emp-rnf - : ', mask1=tmask ) 573 CALL prt_ctl(tab2d_1=(sfx-rnf) , clinfo1=' sfx-rnf - : ', mask1=tmask ) 561 574 CALL prt_ctl(tab2d_1=qns , clinfo1=' qns - : ', mask1=tmask ) 562 575 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask ) 563 576 CALL prt_ctl(tab3d_1=tmask , clinfo1=' tmask - : ', mask1=tmask, kdim=jpk ) 564 CALL prt_ctl(tab3d_1=ts n(:,:,:,jp_tem), clinfo1=' sst - : ', mask1=tmask, kdim=1 )565 CALL prt_ctl(tab3d_1=ts n(:,:,:,jp_sal), clinfo1=' sss - : ', mask1=tmask, kdim=1 )566 CALL prt_ctl(tab2d_1=utau , clinfo1=' utau - : ', mask1=umask, &567 & tab2d_2=vtau , clinfo2=' vtau - : ', mask2=vmask )577 CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' sst - : ', mask1=tmask, kdim=1 ) 578 CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sss - : ', mask1=tmask, kdim=1 ) 579 CALL prt_ctl(tab2d_1=utau , clinfo1=' utau - : ', mask1=umask, & 580 & tab2d_2=vtau , clinfo2=' vtau - : ', mask2=vmask ) 568 581 ENDIF 569 582
Note: See TracChangeset
for help on using the changeset viewer.