Changeset 11931
- Timestamp:
- 2019-11-19T18:30:57+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/ENHANCE-02_ISF_nemo
- Files:
-
- 21 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynnxt.F90
r11541 r11931 26 26 !!------------------------------------------------------------------------- 27 27 USE oce ! ocean dynamics and tracers 28 USE isf29 28 USE dom_oce ! ocean space and time domain 30 29 USE sbc_oce ! Surface boundary condition: ocean fields 31 30 USE sbcrnf ! river runoffs 32 USE isfnxt33 31 USE phycst ! physical constants 34 32 USE dynadv ! dynamics: vector invariant versus flux form … … 42 40 USE trddyn ! trend manager: dynamics 43 41 USE trdken ! trend manager: kinetic energy 42 USE isf , ONLY: ln_isf ! ice shelf 43 USE isfdynnxt , ONLY: isf_dynnxt ! ice shelf 44 44 ! 45 45 USE in_out_manager ! I/O manager … … 243 243 END IF 244 244 ! 245 ! ice shelf melting 245 ! ice shelf melting (deal separatly as it can be in depth) 246 ! PM: we could probably define a generic subroutine to do the in depth correction 247 ! to manage rnf, isf and possibly in the futur icb, tide water glacier (...) 246 248 IF ( ln_isf ) CALL isf_dynnxt( kt, atfp * rdt ) 247 249 ! -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/sshwzv.F90
r11541 r11931 260 260 & + fwfisf_cav_b(:,:) - fwfisf_cav(:,:) & 261 261 & + fwfisf_par_b(:,:) - fwfisf_par(:,:) ) * ssmask(:,:) 262 263 ! ice sheet coupling 264 IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) sshb(:,:) = sshb(:,:) - atfp * rdt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 265 262 266 ENDIF 263 264 ! ice sheet coupling265 IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) sshb(:,:) = sshb(:,:) - atfp * rdt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:)266 267 267 268 sshn(:,:) = ssha(:,:) ! now <-- after -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90
r11876 r11931 14 14 !!---------------------------------------------------------------------- 15 15 16 USE in_out_manager, ONLY: wp, jpi,jpj, jpk, jpts ! I/O manager 16 USE par_oce , ONLY: jpi, jpj, jpk 17 USE in_out_manager, ONLY: wp, jpts ! I/O manager 17 18 USE lib_mpp , ONLY: ctl_stop, mpp_sum ! MPP library 18 19 USE fldread ! read input fields -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90
r11852 r11931 23 23 ! 24 24 USE oce , ONLY: tsn ! ocean tracers 25 USE dom_oce , ONLY: jpi,jpj ! ocean space and time domain25 USE par_oce , ONLY: jpi,jpj ! ocean space and time domain 26 26 USE phycst , ONLY: grav,rau0,r1_rau0_rcp ! physical constants 27 27 USE eosbn2 , ONLY: l_useCT ! l_useCT … … 90 90 DO WHILE ( lit ) ! maybe just a constant number of iteration as in blk_core is fine 91 91 ! 92 ! compute gammat every 92 ! compute gammat everywhere (2d) 93 93 ! useless if melt specified 94 94 IF ( TRIM(cn_isfcav_mlt) .NE. 'spe' ) THEN … … 101 101 & zqhc , zqoce, pqfwf ) 102 102 ! 103 ! define if we need to iterate (nn_gammablk 0/1 do not need iteration)103 ! define if we need to iterate 104 104 SELECT CASE ( cn_gammablk ) 105 105 CASE ( 'spe','ad15' ) … … 123 123 END DO 124 124 ! 125 ! compute heat and water flux (change signe directly in the melt subroutine)125 ! compute heat and water flux ( > 0 out ) 126 126 pqfwf(:,:) = pqfwf(:,:) * mskisf_cav(:,:) 127 127 zqoce(:,:) = zqoce(:,:) * mskisf_cav(:,:) 128 128 zqhc (:,:) = zqhc(:,:) * mskisf_cav(:,:) 129 129 ! 130 ! compute heat content flux 131 zqlat(:,:) = - pqfwf(:,:) * rLfusisf ! 2d latent heat flux (W/m2) ( > 0 out )130 ! compute heat content flux ( > 0 out ) 131 zqlat(:,:) = - pqfwf(:,:) * rLfusisf ! 2d latent heat flux (W/m2) 132 132 ! 133 133 ! total heat flux ( >0 out ) … … 163 163 INTEGER :: ierr 164 164 !!--------------------------------------------------------------------- 165 165 ! 166 !============== 166 167 ! 0: allocation 168 !============== 167 169 ! 168 170 CALL isf_alloc_cav() 169 171 ! 172 !================== 170 173 ! 1: initialisation 174 !================== 171 175 ! 172 176 ! top and bottom level of the 'top boundary layer' … … 179 183 mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:) 180 184 ! 185 !================ 181 186 ! 2: read restart 187 !================ 182 188 ! 183 189 ! read cav variable from restart 184 190 IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 185 191 ! 192 !========================================== 186 193 ! 3: specific allocation and initialisation (depending of scheme choice) 194 !========================================== 187 195 ! 188 196 SELECT CASE ( TRIM(cn_isfcav_mlt) ) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90
r11852 r11931 57 57 !!--------------------------------------------------------------------- 58 58 ! 59 ! compute velocity in the tbl if needed 59 !========================================== 60 ! 1.: compute velocity in the tbl if needed 61 !========================================== 62 ! 60 63 SELECT CASE ( cn_gammablk ) 61 64 CASE ( 'spe' ) … … 78 81 END SELECT 79 82 ! 80 ! compute gamma 83 !========================================== 84 ! 2.: compute gamma 85 !========================================== 86 ! 81 87 SELECT CASE ( cn_gammablk ) 82 88 CASE ( 'spe' ) ! gamma is constant (specified in namelist) … … 91 97 END SELECT 92 98 ! 93 ! ouput exchange coeficient and tbl velocity 99 !========================================== 100 ! 3.: output and debug 101 !========================================== 102 ! 94 103 CALL iom_put('isfgammat', pgt(:,:)) 95 104 CALL iom_put('isfgammas', pgs(:,:)) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90
r11876 r11931 3 3 !! *** MODULE isfcavmlt *** 4 4 !! ice shelf module : update surface ocean boundary condition under ice 5 !! shel f5 !! shelves 6 6 !!====================================================================== 7 7 !! History : 4.0 ! 2019-09 (P. Mathiot) Original code … … 9 9 10 10 !!---------------------------------------------------------------------- 11 !! isfcav_mlt : update surface ocean boundary condition under ice shelf11 !! isfcav_mlt : compute or read ice shelf fwf/heat fluxes in the ice shelf cavity 12 12 !!---------------------------------------------------------------------- 13 13 … … 23 23 USE in_out_manager ! I/O manager 24 24 USE iom , ONLY: iom_put ! I/O library 25 USE fldread , ONLY: fld_read !25 USE fldread , ONLY: fld_read, FLD, FLD_N ! 26 26 USE lib_fortran, ONLY: glob_sum ! 27 27 USE lib_mpp , ONLY: ctl_stop ! … … 51 51 !! ** Purpose : compute or read ice shelf fwf/heat fluxes in the ice shelf cavity 52 52 !! 53 !!---------------------------------------------------------------------54 53 !!-------------------------- OUT ------------------------------------- 55 54 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pqhc, pqoce, pqfwf ! heat and fwf fluxes … … 58 57 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pgt , pgs ! gamma t and gamma s 59 58 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: pttbl, pstbl ! top boundary layer tracer 60 !!---------------------------------------------------------------------61 59 !!--------------------------------------------------------------------- 62 60 ! … … 110 108 !!-------------------------------------------------------------------- 111 109 ! 112 ! C alculate freezing temperature110 ! Compute freezing temperature 113 111 CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) ) 114 112 ! … … 131 129 !!---------------------------------------------------------------------- 132 130 !! 133 !! *** ROUTINE isfcav_mlt_ spe***131 !! *** ROUTINE isfcav_mlt_2eq *** 134 132 !! 135 133 !! ** Purpose : Compute ice shelf fwf/heqt fluxes using ISOMIP formulation (Hunter et al., 2006) … … 144 142 !! Tech. Rep. June, Antarctic Climate & Ecosystems Cooperative Research Centre, available at: 145 143 !! http://staff.acecrc.org.au/~bkgalton/ISOMIP/test_cavities.pdf (last access: 21 July 2016), 2006. 146 !! ---------------------------------------------------------------------144 !! 147 145 !!-------------------------- OUT ------------------------------------- 148 146 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pqhc, pqoce, pqfwf ! hean content, ocean-ice heat and fwf fluxes … … 192 190 !! MISMIP v. 3 (MISMIP +), ISOMIP v. 2 (ISOMIP +) and MISOMIP v. 1 (MISOMIP1), 193 191 !! Geosci. Model Dev., 9, 2471-2497, https://doi.org/10.5194/gmd-9-2471-2016, 2016. 194 !! ---------------------------------------------------------------------192 !! 195 193 !!-------------------------- OUT ------------------------------------- 196 194 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pqhc, pqoce, pqfwf ! latent heat and fwf fluxes … … 308 306 ! 309 307 CALL iom_put('isftfrz_cav', ztfrz * mskisf_cav(:,:) ) 308 ! 310 309 END SUBROUTINE isfcav_mlt_oasis 311 310 -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcpl.F90
r11908 r11931 12 12 !! isfrst : read/write iceshelf variables in/from restart 13 13 !!---------------------------------------------------------------------- 14 USE isf ! ice shelf variable14 USE isf ! ice shelf variable 15 15 USE isfutils, ONLY : debug 16 USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine17 USE domvvl , ONLY: dom_vvl_zgr ! vertical scale factor interpolation16 USE lib_mpp , ONLY: mpp_sum, mpp_max ! mpp routine 17 USE domvvl , ONLY: dom_vvl_zgr ! vertical scale factor interpolation 18 18 ! 19 19 USE oce ! ocean dynamics and tracers … … 113 113 SUBROUTINE isfcpl_rst_write(kt) 114 114 !!--------------------------------------------------------------------- 115 !! isfrst_cpl_write : write icesheet coupling variables in restart 116 !!--------------------------------------------------------------------- 117 !!-------------------------- OUT -------------------------------------- 115 !! *** ROUTINE iscpl_rst_write *** 116 !! 117 !! ** Purpose : write icesheet coupling variables in restart 118 !! 118 119 !!-------------------------- IN -------------------------------------- 119 120 INTEGER, INTENT(in) :: kt 120 !!----------------------------------------------------------------------121 121 !!---------------------------------------------------------------------- 122 122 ! … … 136 136 !! *** ROUTINE iscpl_ssh *** 137 137 !! 138 !! ** Purpose : basic guess of ssh in new wet cell during coupling step138 !! ** Purpose : basic guess of ssh in new wet cell 139 139 !! 140 140 !! ** Method : basic extrapolation from neigbourg cells 141 141 !! 142 !!----------------------------------------------------------------------143 !!-------------------------- OUT --------------------------------------144 !!-------------------------- IN --------------------------------------145 142 !!---------------------------------------------------------------------- 146 143 !! … … 344 341 tsn(:,:,:,jp_sal) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 345 342 ! 346 tsb(:,:,:,:) = tsn(:,:,:,:)347 !348 343 ! sanity check 349 344 ! ----------------------------------------------------------------------------------------- … … 366 361 !! *** ROUTINE iscpl_vol *** 367 362 !! 368 !! ** Purpose : 369 !! 370 !! 371 !! ** Method : 363 !! ** Purpose : compute the correction of the local divergence to apply 364 !! during the first time step after the coupling. 365 !! 366 !! ** Method : - compute horizontal vol div. before/after coupling 367 !! - compute vertical input 368 !! - compute correction 372 369 !! 373 370 !!---------------------------------------------------------------------- … … 376 373 INTEGER :: ikb, ikt 377 374 !! 378 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zqvolb, zqvoln 379 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z tmask_b380 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z e3u_b, ze3v_b381 !!---------------------------------------------------------------------- 382 ! 383 CALL iom_get( numror, jpdom_autoglo, 'tmask' , ztmask_b, ldxios = lrxios ) ! need to extrapolate T/S375 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zqvolb, zqvoln ! vol flux div. before/after coupling 376 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3u_b, ze3v_b ! vertical scale factor before/after coupling 377 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztmask_b ! mask before coupling 378 !!---------------------------------------------------------------------- 379 ! 380 CALL iom_get( numror, jpdom_autoglo, 'tmask' , ztmask_b, ldxios = lrxios ) 384 381 CALL iom_get( numror, jpdom_autoglo, 'e3u_n' , ze3u_b , ldxios = lrxios ) 385 382 CALL iom_get( numror, jpdom_autoglo, 'e3v_n' , ze3v_b , ldxios = lrxios ) 386 383 ! 387 ! get volume flux before coupling (>0 out) 384 ! 1.0: compute horizontal volume flux divergence difference before-after coupling 385 ! 388 386 DO jk = 1, jpk ! Horizontal slab 387 ! 1.1: get volume flux before coupling (>0 out) 389 388 DO jj = 2, jpjm1 390 389 DO ji = 2, jpim1 … … 395 394 ENDDO 396 395 ! 396 ! 1.2: get volume flux after coupling (>0 out) 397 397 ! properly mask velocity 398 398 ! (velocity are still mask with old mask at this stage) 399 399 un(:,:,jk) = un(:,:,jk) * umask(:,:,jk) 400 400 vn(:,:,jk) = vn(:,:,jk) * vmask(:,:,jk) 401 ! 402 ! get volume flux after coupling (>0 out) 401 ! compute volume flux divergence after coupling 403 402 DO jj = 2, jpjm1 404 403 DO ji = 2, jpim1 … … 409 408 ENDDO 410 409 ! 411 ! get 3d volume flux difference (before - after cpl) (>0 out)412 ! correction to add is _b - _n410 ! 1.3: get 3d volume flux difference (before - after cpl) (>0 out) 411 ! correction to add is _b - _n 413 412 risfcpl_vol(:,:,jk) = zqvolb(:,:,jk) - zqvoln(:,:,jk) 414 413 END DO 415 414 ! 416 ! include the contribution of the vertical velocity in the volume flux correction 415 ! 2.0: include the contribution of the vertical velocity in the volume flux correction 416 ! 417 417 DO jj = 2, jpjm1 418 418 DO ji = 2, jpim1 … … 426 426 ENDDO 427 427 ! 428 ! mask volume flux divergence correction 428 CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. ) 429 ! 430 ! 3.0: set total correction (div, tra, ssh) 431 ! 432 ! 3.1: mask volume flux divergence correction 429 433 risfcpl_vol(:,:,:) = risfcpl_vol(:,:,:) * tmask(:,:,:) 430 434 ! 431 CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. ) 432 ! 433 ! get 3d tra increment to apply at the first time step 435 ! 3.2: get 3d tra increment to apply at the first time step 434 436 ! temperature and salt content flux computed using local tsn 435 437 ! (very simple advection scheme) … … 438 440 risfcpl_tsc(:,:,:,jp_sal) = -risfcpl_vol(:,:,:) * tsn(:,:,:,jp_sal) 439 441 ! 440 ! ssh correction (for dynspg_ts)442 ! 3.3: ssh correction (for dynspg_ts) 441 443 risfcpl_ssh(:,:) = 0.0 442 444 DO jk = 1,jpk … … 459 461 !!---------------------------------------------------------------------- 460 462 ! 461 TYPE(isfcons), DIMENSION(:),ALLOCATABLE :: zisfpts 462 ! 463 INTEGER :: ji , jj , jk ! loop index 464 INTEGER :: jip1 , jim1, jjp1, jjm1 465 INTEGER :: iig , ijg, ik 466 INTEGER :: istart, iend, jisf 467 INTEGER :: nisfg , ingb, ifind 468 INTEGER, DIMENSION(jpnij) :: nisfl 463 TYPE(isfcons), DIMENSION(:),ALLOCATABLE :: zisfpts ! list of point receiving a correction 464 ! 465 INTEGER :: ji , jj , jk , jproc ! loop index 466 INTEGER :: jip1 , jim1, jjp1, jjm1 ! dummy indices 467 INTEGER :: iig , ijg, ik ! dummy indices 468 INTEGER :: jisf ! start, end and current position in the increment array 469 INTEGER :: ingb, ifind ! 0/1 target found or need to be found 470 INTEGER :: ingb, ifind, nisfl_area ! global number of cell concerned by the wet->dry case 471 INTEGER, DIMENSION(jpnij) :: nisfl ! local number of cell concerned by the wet->dry case 469 472 ! 470 473 REAL(wp) :: z1_sum, z1_rdtiscpl 471 REAL(wp) :: zdtem, zdsal, zdvol, zratio 472 REAL(wp) :: zlon , zlat 473 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztmask_b !! mask before 474 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t_b !! scale factor before 475 !!---------------------------------------------------------------------- 474 REAL(wp) :: zdtem, zdsal, zdvol, zratio ! tem, sal, vol increment 475 REAL(wp) :: zlon , zlat ! target location 476 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztmask_b ! mask before 477 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t_b ! scale factor before 478 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zt_b ! scale factor before 479 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zs_b ! scale factor before 480 !!---------------------------------------------------------------------- 481 482 !============================================================================== 483 ! 1.0: initialisation 484 !============================================================================== 476 485 477 486 ! get restart variable 478 CALL iom_get( numror, jpdom_autoglo, 'tmask' , ztmask_b, ldxios = lrxios ) ! need to extrapolate T/S 479 CALL iom_get( numror, jpdom_autoglo, 'e3t_n' , ze3t_b(:,:,:), ldxios = lrxios ) 487 CALL iom_get( numror, jpdom_autoglo, 'tmask' , ztmask_b(:,:,:), ldxios = lrxios ) ! need to extrapolate T/S 488 CALL iom_get( numror, jpdom_autoglo, 'e3t_n' , ze3t_b(:,:,:) , ldxios = lrxios ) 489 CALL iom_get( numror, jpdom_autoglo, 'tn' , zt_b(:,:,:) , ldxios = lrxios ) 490 CALL iom_get( numror, jpdom_autoglo, 'sn' , zs_b(:,:,:) , ldxios = lrxios ) 480 491 481 492 ! compute run length … … 483 494 rdt_iscpl = nstp_iscpl * rn_rdt 484 495 z1_rdtiscpl = 1._wp / rdt_iscpl 496 485 497 IF (lwp) WRITE(numout,*) ' nb of stp for cons = ', nstp_iscpl 486 498 IF (lwp) WRITE(numout,*) ' coupling time step = ', rdt_iscpl 487 499 488 ! mask tsn and tsb 489 tsb(:,:,:,jp_tem) = tsb(:,:,:,jp_tem) * ztmask_b(:,:,:) 490 tsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem) * tmask (:,:,:) 491 tsb(:,:,:,jp_sal) = tsb(:,:,:,jp_sal) * ztmask_b(:,:,:) 492 tsn(:,:,:,jp_sal) = tsn(:,:,:,jp_sal) * tmask (:,:,:) 493 494 !============================================================================== 495 ! diagnose the heat, salt and volume input and compute the correction variable 496 !============================================================================== 497 500 ! initialisation correction 498 501 risfcpl_cons_vol = 0.0 499 502 risfcpl_cons_ssh = 0.0 500 503 risfcpl_cons_tsc = 0.0 501 504 505 !============================================================================== 506 ! 2.0: diagnose the heat, salt and volume input and compute the correction variable 507 ! for case where we wet a cell or cell still wet (no change in cell status) 508 !============================================================================== 509 502 510 DO jk = 1,jpk-1 503 511 DO jj = nldj,nlej … … 508 516 509 517 ! heat diff 510 zdtem = tsn (ji,jj,jk,jp_tem) * e3t_n(ji,jj,jk) &511 - tsb(ji,jj,jk,jp_tem) * ze3t_b(ji,jj,jk)518 zdtem = tsn (ji,jj,jk,jp_tem) * e3t_n(ji,jj,jk) * tmask (ji,jj,jk) & 519 - zt_b(ji,jj,jk) * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 512 520 513 521 ! salt diff 514 zdsal = tsn(ji,jj,jk,jp_sal) * e3t_n(ji,jj,jk) &515 - tsb(ji,jj,jk,jp_sal) * ze3t_b(ji,jj,jk)522 zdsal = tsn(ji,jj,jk,jp_sal) * e3t_n(ji,jj,jk) * tmask (ji,jj,jk) & 523 - zs_b(ji,jj,jk) * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 516 524 517 525 ! volume, heat and salt differences in each cell (>0 means correction is an outward flux) 518 risfcpl_cons_vol(ji,jj,jk) = zdvol * e1e2t(ji,jj) * z1_rdtiscpl 519 risfcpl_cons_tsc(ji,jj,jk,jp_sal) = - zdsal * e1e2t(ji,jj) * z1_rdtiscpl 520 risfcpl_cons_tsc(ji,jj,jk,jp_tem) = - zdtem * e1e2t(ji,jj) * z1_rdtiscpl 526 ! in addition to the geometry change unconservation, need to add the divergence correction as it is flux across the boundary 527 risfcpl_cons_vol(ji,jj,jk) = ( zdvol * e1e2t(ji,jj) + risfcpl_vol(ji,jj,jk) ) * z1_rdtiscpl 528 risfcpl_cons_tsc(ji,jj,jk,jp_sal) = ( - zdsal * e1e2t(ji,jj) + risfcpl_tsc(ji,jj,jk,jp_sal) ) * z1_rdtiscpl 529 risfcpl_cons_tsc(ji,jj,jk,jp_tem) = ( - zdtem * e1e2t(ji,jj) + risfcpl_tsc(ji,jj,jk,jp_tem) ) * z1_rdtiscpl 521 530 522 531 END DO … … 524 533 END DO 525 534 ! 526 ! redistribute on valid point the vol/heat/salt removed during the coupling (ie when we dry a cell) 527 ! where we dry a cell get the number of point 535 !============================================================================== 536 ! 3.0: diagnose the heat, salt and volume input and compute the correction variable 537 ! for case where we close a cell 538 !============================================================================== 539 ! 528 540 ! compute the total number of point receiving a correction increment for each processor 529 541 ! local 530 nisfl =0542 nisfl(:)=0 531 543 DO jk = 1,jpk-1 532 544 DO jj = nldj,nlej … … 539 551 ! 540 552 ! global 541 CALL mpp_sum('isfcpl',nisfl) 542 nisfg = SUM(nisfl ) 543 istart = SUM(nisfl(1:narea-1)) 544 iend = SUM(nisfl(1:narea )) 553 CALL mpp_sum('isfcpl',nisfl ) 545 554 ! 546 555 ! allocate list of point receiving correction 547 ALLOCATE(zisfpts(nisfg)) 556 ALLOCATE(zisfpts(nisfl(narea))) 557 ! 548 558 zisfpts(:) = isfcons(0,0,0,-HUGE(1.0), -HUGE(1.0), -HUGE(1.0), -HUGE(1.0), -HUGE(1.0), 0) 549 559 ! 550 560 ! start computing the correction and fill zisfpts 551 561 ! local 552 jisf = istart562 jisf = 0 553 563 DO jk = 1,jpk-1 554 564 DO jj = nldj,nlej … … 593 603 ! 594 604 ! share data among all processes because for some point we need to find the closest wet point (could be on other process) 595 DO jisf = 1,nisfg 596 ! 597 ! indices (conversion to global indices and sharing) 598 iig = zisfpts(jisf)%ii ; ijg = zisfpts(jisf)%jj ; ik = zisfpts(jisf)%kk 599 CALL mpp_max('isfcpl',iig) ; CALL mpp_max('isfcpl',ijg) ; CALL mpp_max('isfcpl',ik) 600 ! 601 ! data 602 zdvol = zisfpts(jisf)%dvol ; zdsal = zisfpts(jisf)%dsal ; zdtem = zisfpts(jisf)%dtem 603 CALL mpp_max('isfcpl',zdvol) ; CALL mpp_max('isfcpl',zdsal) ; CALL mpp_max('isfcpl',zdtem) 604 ! 605 ! location 606 zlat = zisfpts(jisf)%lat ; zlon = zisfpts(jisf)%lon 607 CALL mpp_max('isfcpl',zlat) ; CALL mpp_max('isfcpl',zlon) 608 ! 609 ! find flag 610 ingb = zisfpts(jisf)%ngb 611 CALL mpp_max('isfcpl',ingb) 612 ! 613 ! fill the 3d correction array 614 CALL get_correction(iig, ijg, ik, zlon, zlat, zdvol, zdsal, zdtem, ingb) 615 ! 616 END DO 605 DO jproc=1,jpnij 606 ! 607 ! share total number of isf point treated for proc jproc 608 IF (jproc==narea) THEN 609 nisfl_area=nisfl(jproc) 610 ELSE 611 nisfl_area=0 612 END IF 613 CALL mpp_max('isfcpl',nisfl_area) 614 ! 615 DO jisf = 1,nisfl_area 616 ! 617 IF (jproc==narea) THEN 618 ! indices (conversion to global indices and sharing) 619 iig = zisfpts(jisf)%ii ; ijg = zisfpts(jisf)%jj ; ik = zisfpts(jisf)%kk 620 ! 621 ! data 622 zdvol = zisfpts(jisf)%dvol ; zdsal = zisfpts(jisf)%dsal ; zdtem = zisfpts(jisf)%dtem 623 ! 624 ! location 625 zlat = zisfpts(jisf)%lat ; zlon = zisfpts(jisf)%lon 626 ! 627 ! find flag 628 ingb = zisfpts(jisf)%ngb 629 ELSE 630 iig =0 ; ijg =0 ; ik =0 631 zdvol=-HUGE(1.0) ; zdsal=-HUGE(1.0) ; zdtem=-HUGE(1.0) 632 zlat =-HUGE(1.0) ; zlon =-HUGE(1.0) 633 ingb = 0 634 END IF 635 ! 636 ! share data (need synchronisation of data as get_correction call a global com) 637 CALL mpp_max('isfcpl',iig) ; CALL mpp_max('isfcpl',ijg) ; CALL mpp_max('isfcpl',ik) 638 CALL mpp_max('isfcpl',zdvol) ; CALL mpp_max('isfcpl',zdsal) ; CALL mpp_max('isfcpl',zdtem) 639 CALL mpp_max('isfcpl',zlat) ; CALL mpp_max('isfcpl',zlon) 640 CALL mpp_max('isfcpl',ingb) 641 ! 642 ! fill the 3d correction array 643 CALL get_correction(iig, ijg, ik, zlon, zlat, zdvol, zdsal, zdtem, ingb) 644 END DO 645 END DO 646 ! 647 !============================================================================== 648 ! 4.0: finalisation and compute ssh equivalent of the volume correction 649 !============================================================================== 617 650 ! 618 651 ! mask (>0 out) … … 622 655 ! 623 656 ! add lbclnk 624 CALL lbc_lnk_multi( 'iscplrst', risfcpl_cons_tsc(:,:,:,jp_tem), 'T', 1., risfcpl_cons_tsc(:,:,:,jp_sal), 'T', 1., risfcpl_cons_vol, 'T', 1.) 657 CALL lbc_lnk_multi( 'iscplrst', risfcpl_cons_tsc(:,:,:,jp_tem), 'T', 1., risfcpl_cons_tsc(:,:,:,jp_sal), 'T', 1., & 658 & risfcpl_cons_vol(:,:,:) , 'T', 1.) 625 659 ! 626 660 ! ssh correction (for dynspg_ts) … … 643 677 !!---------------------------------------------------------------------- 644 678 TYPE(isfcons), DIMENSION(:), INTENT(inout) :: sisfpts 645 INTEGER, INTENT(inout) :: kpts 646 !!---------------------------------------------------------------------- 647 INTEGER, INTENT(in ) :: ki, kj, kk 648 INTEGER, INTENT(in ), OPTIONAL :: kfind 649 REAL(wp), INTENT(in ) :: pdvol, pdsal, pdtem, pratio 679 INTEGER, INTENT(inout) :: kpts 680 !!---------------------------------------------------------------------- 681 INTEGER, INTENT(in ) :: ki, kj, kk ! target location (kfind=0) 682 ! ! or source location (kfind=1) 683 INTEGER, INTENT(in ), OPTIONAL :: kfind ! 0 target cell already found 684 ! ! 1 target to be determined 685 REAL(wp), INTENT(in ) :: pdvol, pdsal, pdtem, pratio ! vol/sal/tem increment 686 ! ! and ratio in case increment span over multiple cells. 650 687 !!---------------------------------------------------------------------- 651 688 INTEGER :: ifind … … 667 704 END SUBROUTINE update_isfpts 668 705 ! 669 SUBROUTINE get_correction( ki, kj, kk, zlon, zlat, pvolinc, psalinc, pteminc, kfind)706 SUBROUTINE get_correction( ki, kj, kk, plon, plat, pvolinc, psalinc, pteminc, kfind) 670 707 !!--------------------------------------------------------------------- 671 708 !! *** ROUTINE get_correction *** … … 676 713 !! 677 714 !!---------------------------------------------------------------------- 678 INTEGER , INTENT(in) :: ki, kj, kk, kfind ! target point679 REAL(wp), INTENT(in) :: zlon, zlat680 REAL(wp), INTENT(in) 715 INTEGER , INTENT(in) :: ki, kj, kk, kfind ! target point indices 716 REAL(wp), INTENT(in) :: plon, plat ! target point lon/lat 717 REAL(wp), INTENT(in) :: pvolinc, pteminc,psalinc ! correction increment for vol/temp/salt 681 718 !!---------------------------------------------------------------------- 682 719 INTEGER :: jj, ji, iig, ijg … … 685 722 ! define global indice of correction location 686 723 iig = ki ; ijg = kj 687 IF ( kfind == 1 ) CALL dom_ngb( zlon, zlat, iig, ijg,'T', kk)724 IF ( kfind == 1 ) CALL dom_ngb( plon, plat, iig, ijg,'T', kk) 688 725 ! 689 726 ! fill the correction array 690 727 DO jj = mj0(ijg),mj1(ijg) 691 728 DO ji = mi0(iig),mi1(iig) 692 ! correct the vol_flx in the closest cell729 ! correct the vol_flx and corresponding heat/salt flx in the closest cell 693 730 risfcpl_cons_vol(ji,jj,kk) = risfcpl_cons_vol(ji,jj,kk ) + pvolinc 694 731 risfcpl_cons_tsc(ji,jj,kk,jp_sal) = risfcpl_cons_tsc(ji,jj,kk,jp_sal) + psalinc -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfdiags.F90
r11521 r11931 46 46 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac ! thickness of the tbl and fraction of last cell affected by the tbl 47 47 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqfwf, pqoce, pqlat, pqhc ! 2d var to map in 3d 48 CHARACTER(LEN= 256), INTENT(in) :: cdisf! parametrisation or interactive melt48 CHARACTER(LEN=3), INTENT(in) :: cdisf ! parametrisation or interactive melt 49 49 !!--------------------------------------------------------------------- 50 50 CHARACTER(LEN=256) :: cvarqfwf , cvarqoce , cvarqlat , cvarqhc -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfdynnxt.F90
r11852 r11931 1 MODULE isf nxt1 MODULE isfdynnxt 2 2 !!========================================================================= 3 3 !! *** MODULE isfnxt *** … … 32 32 !! ** Purpose : compute the ice shelf volume filter correction for cavity, param, ice sheet coupling case 33 33 !! 34 !!--------------------------------------------------------------------35 34 !!-------------------------- OUT ------------------------------------- 36 35 INTEGER , INTENT(in ) :: kt 37 36 ! 38 37 REAL(wp), INTENT(in ) :: pcoef ! atfp * rdt * r1_rau0 39 !!-------------------------- IN -------------------------------------40 38 !!-------------------------------------------------------------------- 41 39 INTEGER :: jk ! loop index … … 62 60 !! ** Purpose : compute the ice shelf volume filter correction for cavity or param 63 61 !! 64 !!--------------------------------------------------------------------65 !!-------------------------- OUT -------------------------------------66 62 !!-------------------------- IN ------------------------------------- 67 63 INTEGER , DIMENSION(jpi,jpj), INTENT(in ) :: ktop , kbot ! top and bottom level of tbl … … 92 88 END SUBROUTINE isf_dynnxt_mlt 93 89 94 END MODULE isf nxt90 END MODULE isfdynnxt -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90
r11902 r11931 46 46 ! conservation option 47 47 IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 48 !49 IF ( ln_isfdebug ) THEN50 CALL debug('isfdiv: phdiv' ,phdiv(:,:,:))51 CALL debug('isfdiv: risfcpl_vol',risfcpl_vol(:,:,:))52 CALL debug('isfdiv: fwfisf ',fwfisf_cav(:,:)+fwfisf_cav_b(:,:))53 END IF54 48 ! 55 49 END IF -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfpar.F90
r11876 r11931 14 14 !! isfpar : compute ice shelf melt using a prametrisation of ice shelf cavities 15 15 !!---------------------------------------------------------------------- 16 !USE oce ! ocean dynamics and tracers17 16 USE isf ! ice shelf 18 17 ! … … 23 22 USE isfdiags , ONLY: isf_diags_flx ! ice shelf diags subroutine 24 23 ! 25 USE dom_oce , ONLY: jpi,jpj, bathy ! ocean space and time domain 24 USE dom_oce , ONLY: bathy ! ocean space and time domain 25 USE par_oce , ONLY: jpi,jpj ! ocean space and time domain 26 26 USE phycst , ONLY: r1_rau0_rcp ! physical constants 27 27 ! … … 62 62 CALL isfpar_mlt( kt, zqhc, zqoce, pqfwf ) 63 63 ! 64 ! compute heat and water flux (change signe directly in the melt subroutine)64 ! compute heat and water flux ( > 0 out ) 65 65 pqfwf(:,:) = pqfwf(:,:) * mskisf_par(:,:) 66 66 zqoce(:,:) = zqoce(:,:) * mskisf_par(:,:) 67 67 zqhc (:,:) = zqhc(:,:) * mskisf_par(:,:) 68 68 ! 69 ! compute heat content flux 69 ! compute heat content flux ( > 0 out ) 70 70 zqlat(:,:) = pqfwf(:,:) * rLfusisf ! 2d latent heat flux (W/m2) 71 71 ! 72 ! total heat flux 72 ! total heat flux ( > 0 out ) 73 73 zqh(:,:) = ( zqhc (:,:) + zqoce(:,:) ) 74 74 ! … … 107 107 CALL isf_alloc_par() 108 108 ! 109 ! par109 ! initialisation 110 110 misfkt_par(:,:) = 1 ; misfkb_par(:,:) = 1 111 111 rhisf_tbl_par(:,:) = 1e-20 ; rfrac_tbl_par(:,:) = 0.0_wp -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfparmlt.F90
r11876 r11931 18 18 USE in_out_manager ! I/O manager 19 19 USE iom , ONLY: iom_put ! I/O library 20 USE fldread , ONLY: fld_read !20 USE fldread , ONLY: fld_read, FLD, FLD_N ! 21 21 USE lib_fortran, ONLY: glob_sum ! 22 22 USE lib_mpp , ONLY: ctl_stop ! … … 49 49 !! 1 : Specified melt flux 50 50 !! 2 : Beckmann & Goose parameterization 51 !! ----------------------------------------------------------------------51 !! 52 52 !!-------------------------- OUT ------------------------------------- 53 53 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pqfwf, pqoce, pqhc ! fresh water, ice-ocean heat and heat content fluxes … … 81 81 !! data read into a forcing files. 82 82 !! 83 !!----------------------------------------------------------------------84 83 !!-------------------------- OUT ------------------------------------- 85 84 REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pqhc, pqfwf, pqoce ! fresh water and ice-ocean heat fluxes … … 105 104 pqoce(:,:) = pqfwf(:,:) * rLfusisf ! ocean/ice shelf flux assume to be equal to latent heat flux 106 105 pqhc (:,:) = pqfwf(:,:) * ztfrz(:,:) * rcp ! heat content flux 106 ! 107 107 CALL iom_put('isftfrz_par', ztfrz ) 108 108 ! … … 155 155 ! output thermal driving 156 156 CALL iom_put('isfthermald_par',( ztfrz(:,:) - ztavg(:,:) ) * mskisf_par(:,:)) 157 ! 158 ! output freezing point used to define the thermal driving and heat content fluxes 157 159 CALL iom_put('isftfrz_par', ztfrz ) 158 160 ! … … 206 208 zfwf(:,:) = zfwf(:,:) * zfwf_oasis / zfwf_fld 207 209 ! 208 ! i3. -----------Define fwf and qoce210 ! 3. -----------Define fwf and qoce 209 211 ! ocean heat flux is assume to be equal to the latent heat 210 212 pqfwf(:,:) = zfwf(:,:) ! fwf ( >0 out ) -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfrst.F90
r11852 r11931 11 11 !!---------------------------------------------------------------------- 12 12 ! 13 USE dom_oce, ONLY: jpi,jpj,jpk,jpts ! time and space domain13 USE par_oce, ONLY: jpi,jpj,jpk,jpts ! time and space domain 14 14 ! 15 15 USE in_out_manager ! I/O manager … … 31 31 SUBROUTINE isfrst_read(cdisf, ptsc, pfwf, ptsc_b, pfwf_b ) 32 32 !!--------------------------------------------------------------------- 33 !! 33 34 !! isfrst_read : read iceshelf variables from restart 34 !! ---------------------------------------------------------------------35 !! 35 36 !!-------------------------- OUT -------------------------------------- 36 37 REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pfwf_b 37 38 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT( out) :: ptsc_b 38 39 !!-------------------------- IN -------------------------------------- 39 CHARACTER(LEN= 256), INTENT(in ) :: cdisf40 CHARACTER(LEN=3) , INTENT(in ) :: cdisf 40 41 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pfwf 41 42 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc … … 66 67 ENDIF 67 68 68 CALL FLUSH(numout)69 70 69 END SUBROUTINE isfrst_read 71 70 ! 72 71 SUBROUTINE isfrst_write(kt, cdisf, ptsc, pfwf ) 73 72 !!--------------------------------------------------------------------- 73 !! 74 74 !! isfrst_write : write iceshelf variables in restart 75 !!--------------------------------------------------------------------- 76 !!-------------------------- OUT -------------------------------------- 75 !! 77 76 !!-------------------------- IN -------------------------------------- 78 77 INTEGER , INTENT(in ) :: kt 79 CHARACTER(LEN= 256), INTENT(in ) :: cdisf78 CHARACTER(LEN=3) , INTENT(in ) :: cdisf 80 79 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: pfwf 81 80 REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90
r11876 r11931 26 26 ! 27 27 USE lib_mpp, ONLY: ctl_stop, ctl_nam 28 USE fldread, ONLY: FLD, FLD_N 28 29 USE in_out_manager ! I/O manager 29 30 USE timing … … 62 63 IF( ln_timing ) CALL timing_start('isf') 63 64 ! 65 !======================================================================= 66 ! 1.: compute melt and associated heat fluxes in the ice shelf cavities 67 !======================================================================= 68 ! 64 69 IF ( ln_isfcav_mlt ) THEN 65 70 ! 66 ! before time step71 ! 1.1: before time step 67 72 IF ( kt /= nit000 ) THEN 68 73 risf_cav_tsc_b (:,:,:) = risf_cav_tsc (:,:,:) … … 70 75 END IF 71 76 ! 72 ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl)77 ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 73 78 rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 74 79 CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 75 80 ! 76 ! compute ice shelf melt81 ! 1.3: compute ice shelf melt 77 82 CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav) 78 83 ! 79 84 END IF 80 85 ! 86 !================================================================================= 87 ! 2.: compute melt and associated heat fluxes for not resolved ice shelf cavities 88 !================================================================================= 89 ! 81 90 IF ( ln_isfpar_mlt ) THEN 82 91 ! 83 ! before time step92 ! 2.1: before time step 84 93 IF ( kt /= nit000 ) THEN 85 94 risf_par_tsc_b(:,:,:) = risf_par_tsc(:,:,:) … … 87 96 END IF 88 97 ! 89 ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl)90 ! by simplicity, we assume the top level where param applied do not change with time 98 ! 2.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 99 ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 91 100 rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 92 101 CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 93 102 ! 94 ! compute ice shelf melt103 ! 2.3: compute ice shelf melt 95 104 CALL isf_par( kt, risf_par_tsc, fwfisf_par) 96 105 ! 97 106 END IF 107 ! 108 !================================================================================== 109 ! 3.: output specific restart variable in case of coupling with an ice sheet model 110 !================================================================================== 98 111 ! 99 112 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) … … 230 243 IF ( l_isfoasis .AND. ln_isf ) THEN 231 244 ! 232 CALL ctl_stop( ' ln_ctland ice shelf not tested' )245 CALL ctl_stop( ' OASIS and ice shelf not tested' ) 233 246 ! 234 247 ! NEMO coupled to ATMO model with isf cavity need oasis method for melt computation -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90
r11876 r11931 37 37 !! https://doi.org/10.1029/2007JC004368 , 2008 38 38 !! 39 !!--------------------------------------------------------------------40 39 !!-------------------------- OUT ------------------------------------- 41 40 REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pvarout ! 2d average of pvarin … … 115 114 !! over a thickness phtbl. The bottom level is partially counted (pfrac). 116 115 !! 117 !!--------------------------------------------------------------------118 116 !!-------------------------- OUT ------------------------------------- 119 117 REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pvarout ! tbl property averaged over phtbl between level ktop and kbot … … 154 152 !! - fraction of the bottom level affected by the tbl 155 153 !! 156 !!---------------------------------------------------------------------157 154 !!-------------------------- OUT -------------------------------------- 158 155 INTEGER, DIMENSION(jpi,jpj) , INTENT( out) :: kbot ! bottom level of the top boundary layer … … 209 206 !! ** Purpose : compute bottom level of the isf top boundary layer 210 207 !! 211 !!--------------------------------------------------------------------212 208 !!-------------------------- OUT ------------------------------------- 213 209 INTEGER, DIMENSION(jpi,jpj) , INTENT( out) :: kbot ! bottom level of the top boundary layer … … 246 242 !! ** Purpose : compute top level of the isf top boundary layer in case of an ice shelf parametrisation 247 243 !! 248 !!--------------------------------------------------------------------249 244 !!-------------------------- OUT ------------------------------------- 250 245 INTEGER, DIMENSION(jpi,jpj), INTENT( out) :: ktop ! top level affected by the ice shelf parametrisation -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfutils.F90
r11852 r11931 14 14 USE iom , ONLY: iom_open, iom_get, iom_close, jpdom_data ! read input file 15 15 USE lib_fortran , ONLY: glob_sum, glob_min, glob_max ! compute global value 16 USE dom_oce , ONLY: jpi,jpj,jpk ! domain size16 USE par_oce , ONLY: jpi,jpj,jpk ! domain size 17 17 USE in_out_manager, ONLY: wp, lwp, numout ! miscelenious 18 18 … … 35 35 !! ** Purpose : read input file 36 36 !! 37 !!--------------------------------------------------------------------38 37 !!-------------------------- OUT ------------------------------------- 39 38 REAL(wp), DIMENSION(jpi,jpj), INTENT( out) :: pvar ! output variable … … 57 56 !! ** Purpose : add debug print 58 57 !! 59 !!--------------------------------------------------------------------60 !!-------------------------- OUT -------------------------------------61 58 !!-------------------------- IN ------------------------------------- 62 59 CHARACTER(LEN=256) , INTENT(in ) :: cdtxt … … 82 79 !! ** Purpose : add debug print 83 80 !! 84 !!--------------------------------------------------------------------85 !!-------------------------- OUT -------------------------------------86 81 !!-------------------------- IN ------------------------------------- 87 82 CHARACTER(LEN=256) , INTENT(in ) :: cdtxt -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90
r11908 r11931 68 68 ! ensure 0 trend due to unconservation of the ice shelf coupling 69 69 IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 70 71 IF ( ln_isfdebug ) THEN72 CALL debug('tra_isf: risfcpl_tsc T',risfcpl_tsc(:,:,1))73 CALL debug('tra_isf: risfcpl_tsc S',risfcpl_tsc(:,:,2))74 END IF75 70 ! 76 71 END IF 77 72 ! 78 73 IF ( ln_isfdebug ) THEN 79 CALL debug('tra_isf: tsa T' ,tsa(:,:,:,1))80 CALL debug('tra_isf: tsa S' ,tsa(:,:,:,2))74 CALL debug('tra_isf: tsa T', tsa(:,:,:,1)) 75 CALL debug('tra_isf: tsa S', tsa(:,:,:,2)) 81 76 END IF 82 77 ! -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/tranxt.F90
r11541 r11931 341 341 IF( ll_isf ) THEN 342 342 ! 343 ! melt in the cavity 343 344 IF ( ln_isfcav_mlt ) THEN 344 345 ! level fully include in the Losch_2008 ice shelf boundary layer … … 357 358 END IF 358 359 END IF 360 ! 361 ! parametrised melt (cavity closed) 359 362 IF ( ln_isfpar_mlt ) THEN 360 363 ! level fully include in the Losch_2008 ice shelf boundary layer … … 374 377 END IF 375 378 ! 376 IF (ln_isfcpl .AND. ln_rstart .AND. kt == nit000+1 ) THEN ! risfcpl_vol_n = 0 and risfcpl_vol_b = risfcpl_vol 377 ztc_f = ztc_f + zfact1 * risfcpl_tsc(ji,jj,jk,jn) * r1_e1e2t(ji,jj) 378 ze3t_f = ze3t_f - zfact1 * risfcpl_vol(ji,jj,jk ) * r1_e1e2t(ji,jj) 379 ! ice sheet coupling correction 380 IF ( ln_isfcpl ) THEN 381 ! 382 ! at kt = nit000, risfcpl_vol_n = 0 and risfcpl_vol_b = risfcpl_vol so contribution nul 383 IF ( ln_rstart .AND. kt == nit000+1 ) THEN 384 ztc_f = ztc_f + zfact1 * risfcpl_tsc(ji,jj,jk,jn) * r1_e1e2t(ji,jj) 385 ze3t_f = ze3t_f - zfact1 * risfcpl_vol(ji,jj,jk ) * r1_e1e2t(ji,jj) 386 END IF 387 ! 379 388 END IF 380 389 ! -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/step.F90
r11895 r11931 241 241 CALL tra_sbc ( kstp ) ! surface boundary condition 242 242 IF( ln_traqsr ) CALL tra_qsr ( kstp ) ! penetrative solar radiation qsr 243 IF( ln_isf ) CALL tra_isf( kstp ) ! ice shelf heat flux243 IF( ln_isf ) CALL tra_isf ( kstp ) ! ice shelf heat flux 244 244 IF( ln_trabbc ) CALL tra_bbc ( kstp ) ! bottom heat flux 245 245 IF( ln_trabbl ) CALL tra_bbl ( kstp ) ! advective (and/or diffusive) bottom boundary layer scheme -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/isf.F90
r11889 r11931 22 22 PRIVATE 23 23 24 PUBLIC isf_alloc, isf_alloc_par, isf_alloc_cav, isf_alloc_cpl 24 PUBLIC isf_alloc, isf_alloc_par, isf_alloc_cav, isf_alloc_cpl, isf_dealloc_cpl 25 25 ! 26 26 !------------------------------------------------------- … … 175 175 !! *** ROUTINE isf_alloc_cpl *** 176 176 !! 177 !! ** Purpose : 178 !! 179 !! ** Method : 177 !! ** Purpose : allocate array use for the ice sheet coupling 180 178 !! 181 179 !!---------------------------------------------------------------------- … … 202 200 END SUBROUTINE isf_alloc_cpl 203 201 202 SUBROUTINE isf_dealloc_cpl() 203 !!--------------------------------------------------------------------- 204 !! *** ROUTINE isf_dealloc_cpl *** 205 !! 206 !! ** Purpose : de-allocate useless public 3d array used for ice sheet coupling 207 !! 208 !!---------------------------------------------------------------------- 209 INTEGER :: ierr, ialloc 210 !!---------------------------------------------------------------------- 211 ierr = 0 212 ! 213 DEALLOCATE( risfcpl_ssh, risfcpl_tsc, risfcpl_vol, STAT=ialloc ) 214 ierr = ierr + ialloc 215 ! 216 CALL mpp_sum ( 'isf', ierr ) 217 IF( ierr /= 0 ) CALL ctl_stop('STOP','isfcpl: failed to deallocate arrays.') 218 ! 219 END SUBROUTINE isf_dealloc_cpl 220 204 221 SUBROUTINE isf_alloc() 205 222 !!--------------------------------------------------------------------- 206 223 !! *** ROUTINE isf_alloc *** 207 224 !! 208 !! ** Purpose : 209 !! 210 !! ** Method : 225 !! ** Purpose : allocate array used for the ice shelf cavity (cav and par) 211 226 !! 212 227 !!---------------------------------------------------------------------- -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/isfstp.F90
r11908 r11931 97 97 END IF 98 98 ! 99 IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) 99 IF ( ln_isfcpl ) THEN 100 ! after step nit000 + 2 we do not need anymore the risfcpl_ arrays 101 IF ( kt == nit000 + 2 ) CALL isf_dealloc_cpl() 102 103 IF ( lrst_oce ) CALL isfcpl_rst_write(kt) 104 END IF 100 105 ! 101 106 IF( ln_timing ) CALL timing_stop('isf') -
NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/sbcfwb.F90
r11908 r11931 118 118 IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 119 119 z_fwf = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 120 ! 121 ! correction for ice sheet coupling testing (ie remove the excess through the surface) 122 ! test impact on the melt as conservation correction made in depth 123 ! test conservation level as sbcfwb is conserving 124 ! avoid the model to blow up for large ssh drop (isomip OCEAN3 with melt switch off and uniform T/S) 125 IF (ln_isfcpl .AND. ln_isfcpl_cons) THEN 126 z_fwf = z_fwf + glob_sum( 'sbcfwb', e1e2t(:,:) * risfcpl_cons_ssh(:,:) * rau0 ) 127 END IF 128 ! 120 129 z_fwf = z_fwf / area 121 130 zcoef = z_fwf * rcp 122 emp(:,:) = emp(:,:) - z_fwf * tmask(:,:,1) ! (Eq. 34 AD2015)123 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't wantany bouyancy fluxes124 sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't wantany bouyancy fluxes131 emp(:,:) = emp(:,:) - z_fwf * tmask(:,:,1) ! (Eq. 34 AD2015) 132 qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! use sst_m to avoid generation of any bouyancy fluxes 133 sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! use sss_m to avoid generation of any bouyancy fluxes 125 134 !qns(:,:) = qns(:,:) + zcoef * ( -1.9 ) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't want any bouyancy fluxes 126 135 !sfx(:,:) = sfx(:,:) + z_fwf * ( 33.8 ) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't want any bouyancy fluxes 136 !qns(:,:) = qns(:,:) + zcoef * ( -1.0 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 137 !sfx(:,:) = sfx(:,:) + z_fwf * ( 34.2 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 127 138 ENDIF 128 139 !
Note: See TracChangeset
for help on using the changeset viewer.