Changeset 6584
- Timestamp:
- 2016-05-20T11:54:18+02:00 (8 years ago)
- Location:
- branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
r5888 r6584 40 40 #if defined key_agrif && defined key_lim2 41 41 USE agrif_lim2_interp 42 #endif 43 #if defined key_agrif && defined key_lim3 44 USE agrif_lim3_interp 42 45 #endif 43 46 #if defined key_bdy … … 174 177 CALL agrif_rhg_lim2_load ! First interpolation of coarse values 175 178 #endif 179 #if defined key_agrif && defined key_lim3 180 CALL agrif_interp_lim3('U') ! First interpolation of coarse values 181 CALL agrif_interp_lim3('V') ! First interpolation of coarse values 182 #endif 176 183 ! 177 184 !------------------------------------------------------------------------------! … … 460 467 CALL agrif_rhg_lim2( jter, nn_nevp, 'U' ) 461 468 #endif 469 #if defined key_agrif && defined key_lim3 470 CALL agrif_interp_lim3( 'U' ) 471 #endif 462 472 #if defined key_bdy 463 473 CALL bdy_ice_lim_dyn( 'U' ) … … 486 496 CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) 487 497 #endif 498 #if defined key_agrif && defined key_lim3 499 CALL agrif_interp_lim3( 'V' ) 500 #endif 488 501 #if defined key_bdy 489 502 CALL bdy_ice_lim_dyn( 'V' ) … … 513 526 CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) 514 527 #endif 528 #if defined key_agrif && defined key_lim3 529 CALL agrif_interp_lim3( 'V' ) 530 #endif 515 531 #if defined key_bdy 516 532 CALL bdy_ice_lim_dyn( 'V' ) … … 537 553 #if defined key_agrif && defined key_lim2 538 554 CALL agrif_rhg_lim2( jter, nn_nevp, 'U' ) 555 #endif 556 #if defined key_agrif && defined key_lim3 557 CALL agrif_interp_lim3( 'U' ) 539 558 #endif 540 559 #if defined key_bdy … … 576 595 CALL agrif_rhg_lim2( nn_nevp , nn_nevp, 'U' ) 577 596 CALL agrif_rhg_lim2( nn_nevp , nn_nevp, 'V' ) 597 #endif 598 #if defined key_agrif && defined key_lim3 599 CALL agrif_interp_lim3( 'U' ) 600 CALL agrif_interp_lim3( 'V' ) 578 601 #endif 579 602 #if defined key_bdy -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
r6515 r6584 102 102 ENDIF 103 103 104 CALL lim_var_agg( 1 ) ! integrated values + ato_i 105 104 106 !-------------------------------------! 105 107 ! Advection of sea ice properties ! … … 113 115 zvsold = v_s 114 116 zsmvold(:,:) = SUM( smv_i(:,:,:), dim=3 ) 115 zeiold (:,:) = SUM( SUM( e_i(:,:,1:nlay_i,:), dim=4 ), dim=3 )116 zesold (:,:) = SUM( SUM( e_s(:,:,1:nlay_s,:), dim=4 ), dim=3 )117 zeiold (:,:) = et_i 118 zesold (:,:) = et_s 117 119 118 120 !--- Thickness correction init. --- ! 119 zatold(:,:) = SUM( a_i(:,:,:), dim=3 )121 zatold(:,:) = at_i 120 122 DO jl = 1, jpl 121 123 DO jj = 1, jpj -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90
r6515 r6584 89 89 vt_s (:,:) = SUM( v_s, dim=3 ) 90 90 at_i (:,:) = SUM( a_i, dim=3 ) 91 et_s(:,:) = SUM( SUM( e_s(:,:,:,:), dim=4 ), dim=3 ) 92 et_i(:,:) = SUM( SUM( e_i(:,:,:,:), dim=4 ), dim=3 ) 91 93 92 94 ! open water fraction … … 98 100 99 101 IF( kn > 1 ) THEN 100 et_s(:,:) = SUM( SUM( e_s(:,:,:,:), dim=4 ), dim=3 ) ! snow heat content101 et_i(:,:) = SUM( SUM( e_i(:,:,:,:), dim=4 ), dim=3 ) ! ice heat content102 102 103 103 ! mean ice/snow thickness -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_ice.F90
r3680 r6584 5 5 !!---------------------------------------------------------------------- 6 6 !! History : 3.4 ! 2012-08 (R. Benshila) Original code 7 !! 3.6 ! 2016-05 (C. Rousset) Add LIM3 compatibility 7 8 !!---------------------------------------------------------------------- 8 9 #if defined key_agrif && defined key_lim2 … … 60 61 61 62 #endif 63 64 #if defined key_agrif && defined key_lim3 65 !!---------------------------------------------------------------------- 66 !! 'key_agrif' AGRIF zoom 67 !!---------------------------------------------------------------------- 68 IMPLICIT NONE 69 PRIVATE 70 71 INTEGER, PUBLIC :: u_ice_id, v_ice_id, tra_ice_id 72 INTEGER, PUBLIC :: lim_nbstep = 0 ! child time position in sea-ice model 73 74 !!---------------------------------------------------------------------- 75 !! NEMO/NST 3.6 , NEMO Consortium (2016) 76 !! $Id$ 77 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 78 !!---------------------------------------------------------------------- 79 80 #endif 62 81 !!====================================================================== 63 82 END MODULE agrif_ice -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r6204 r6584 554 554 # endif 555 555 556 #if defined key_lim3 557 SUBROUTINE Agrif_InitValues_cont_lim3 558 !!---------------------------------------------------------------------- 559 !! *** ROUTINE Agrif_InitValues_cont_lim3 *** 560 !! 561 !! ** Purpose :: Initialisation of variables to be interpolated for LIM3 562 !!---------------------------------------------------------------------- 563 USE Agrif_Util 564 USE ice 565 USE agrif_ice 566 USE in_out_manager 567 USE agrif_lim3_update 568 USE agrif_lim3_interp 569 USE lib_mpp 570 ! 571 IMPLICIT NONE 572 !!---------------------------------------------------------------------- 573 ! 574 ! Declaration of the type of variable which have to be interpolated (parent=>child) 575 !---------------------------------------------------------------------------------- 576 CALL agrif_declare_var_lim3 577 578 ! clem: reset nn_fsbc(child) to rhot if rhot * nn_fsbc(parent) /= N * nn_fsbc(child) with N being integer 579 IF( MOD( Agrif_irhot() * Agrif_Parent(nn_fsbc), nn_fsbc ) /= 0 ) THEN 580 nn_fsbc = Agrif_irhot() 581 CALL ctl_warn ('rhot * nn_fsbc(parent) /= N * nn_fsbc(child), therefore nn_fsbc(child) is set to rhot') 582 WRITE(*,*) 'New nn_fsbc(child) = ', nn_fsbc 583 ENDIF 584 585 ! clem: reset update frequency if different from nn_fsbc 586 IF( nbclineupdate /= nn_fsbc ) THEN 587 nbclineupdate = nn_fsbc 588 CALL ctl_warn ('With ice model on child grid, nc_cln_update is set to nn_fsbc') 589 ENDIF 590 591 ! First Interpolations (using "after" ice subtime step => lim_nbstep=1) 592 !---------------------------------------------------------------------- 593 lim_nbstep = 1 594 CALL agrif_interp_lim3('U') ! interpolation of ice velocities 595 CALL agrif_interp_lim3('V') ! interpolation of ice velocities 596 CALL agrif_interp_lim3('T') ! interpolation of ice tracers 597 lim_nbstep = 0 598 599 ! Update in case 2 ways 600 !---------------------- 601 CALL agrif_update_lim3(0) 602 ! 603 END SUBROUTINE Agrif_InitValues_cont_lim3 604 605 SUBROUTINE agrif_declare_var_lim3 606 !!---------------------------------------------------------------------- 607 !! *** ROUTINE agrif_declare_var_lim3 *** 608 !! 609 !! ** Purpose :: Declaration of variables to be interpolated for LIM3 610 !!---------------------------------------------------------------------- 611 USE agrif_util 612 USE ice 613 614 IMPLICIT NONE 615 !!---------------------------------------------------------------------- 616 ! 617 ! 1. Declaration of the type of variable which have to be interpolated (parent=>child) 618 ! agrif_declare_variable(position,1st point index,--,--,dimensions,name) 619 !------------------------------------------------------------------------------------- 620 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/), & 621 & (/jpi,jpj,jpl,jpl*(5+nlay_s+nlay_i)/), tra_ice_id ) 622 CALL agrif_declare_variable((/1,2/) ,(/2,3/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,u_ice_id ) 623 CALL agrif_declare_variable((/2,1/) ,(/3,2/) ,(/'x','y'/) ,(/1,1/) ,(/jpi,jpj/) ,v_ice_id ) 624 625 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) 626 !----------------------------------- 627 CALL Agrif_Set_bcinterp(tra_ice_id, interp = AGRIF_linear) 628 CALL Agrif_Set_bcinterp(u_ice_id , interp1 = Agrif_linear,interp2 = AGRIF_ppm ) 629 CALL Agrif_Set_bcinterp(v_ice_id , interp1 = AGRIF_ppm ,interp2 = Agrif_linear) 630 631 ! 3. Set location of interpolations 632 !---------------------------------- 633 CALL Agrif_Set_bc(tra_ice_id,(/0,1/)) 634 CALL Agrif_Set_bc(u_ice_id ,(/0,1/)) 635 CALL Agrif_Set_bc(v_ice_id ,(/0,1/)) 636 637 ! 4. Set update type in case 2 ways (child=>parent) (normal & tangent to the grid cell for velocities) 638 !-------------------------------------------------- 639 CALL Agrif_Set_Updatetype(tra_ice_id, update = AGRIF_Update_Average) ! clem je comprends pas average/copy 640 CALL Agrif_Set_Updatetype(u_ice_id ,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) 641 CALL Agrif_Set_Updatetype(v_ice_id ,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy ) 642 643 END SUBROUTINE agrif_declare_var_lim3 644 #endif 645 556 646 557 647 # if defined key_top … … 720 810 !!---------------------------------------------------------------------- 721 811 !! *** ROUTINE agrif_init *** 812 !! Read by Child model only 722 813 !!---------------------------------------------------------------------- 723 814 USE agrif_oce … … 766 857 IF( agrif_oce_alloc() > 0 ) CALL ctl_warn('agrif agrif_oce_alloc: allocation of arrays failed') 767 858 # if defined key_lim2 768 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') 859 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') ! only for LIM2 (not LIM3) 769 860 # endif 770 861 ! -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
r6399 r6584 1567 1567 1568 1568 ! --- heat flux associated with emp (W/m2) --- ! 1569 zqemp_oce(:,:) = - zevap(:,:) * p_frld(:,:) * zcptn(:,:) & ! evap1570 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptn(:,:) & ! liquid precip1571 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptn(:,:) - lfus ) ! solid precip over ocean1569 zqemp_oce(:,:) = - zevap(:,:) * p_frld(:,:) * zcptn(:,:) & ! evap 1570 & + ( ztprecip(:,:) - zsprecip(:,:) ) * zcptn(:,:) & ! liquid precip 1571 & + zsprecip(:,:) * ( 1._wp - zsnw ) * ( zcptn(:,:) - lfus ) ! solid precip over ocean + snow melting 1572 1572 ! zqemp_ice(:,:) = - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) * zcptn(:,:) & ! ice evap 1573 1573 ! & + zsprecip(:,:) * zsnw * ( zcptn(:,:) - lfus ) ! solid precip over ice 1574 1574 zqemp_ice(:,:) = zsprecip(:,:) * zsnw * ( zcptn(:,:) - lfus ) ! solid precip over ice (only) 1575 ! qevap_ice=0 since we consider Tice=0 °C1575 ! qevap_ice=0 since we consider Tice=0degC 1576 1576 1577 ! --- heat content ofprecip over ice in J/m3 (to be used in 1D-thermo) --- !1577 ! --- enthalpy of snow precip over ice in J/m3 (to be used in 1D-thermo) --- ! 1578 1578 zqprec_ice(:,:) = rhosn * ( zcptn(:,:) - lfus ) 1579 1579 1580 1580 ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- ! 1581 1581 DO jl = 1, jpl 1582 zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic ) but we do not have Tice, so we consider Tice=0 °C1582 zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic ) but we do not have Tice, so we consider Tice=0degC 1583 1583 END DO 1584 1584 -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
r6515 r6584 66 66 USE bdyice_lim ! unstructured open boundary data (bdy_ice_lim routine) 67 67 #endif 68 # if defined key_agrif 69 USE agrif_ice 70 USE agrif_lim3_update 71 USE agrif_lim3_interp 72 # endif 68 73 69 74 IMPLICIT NONE … … 119 124 !-----------------------! 120 125 IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN 126 127 # if defined key_agrif 128 IF( .NOT. Agrif_Root() ) THEN 129 lim_nbstep = MOD( lim_nbstep, Agrif_irhot() * Agrif_Parent(nn_fsbc) / nn_fsbc ) + 1 130 ENDIF 131 # endif 121 132 122 133 ! mean surface ocean current at ice velocity point (C-grid dynamics : U- & V-points as the ocean) … … 162 173 CALL lim_rst_opn( kt ) ! Open Ice restart file 163 174 ! 175 #if defined key_agrif 176 IF( .NOT. Agrif_Root() ) CALL agrif_interp_lim3('T') 177 #endif 164 178 ! --- zap this if no ice dynamics --- ! 165 179 IF( .NOT. lk_c1d .AND. ln_limdyn ) THEN … … 178 192 ENDIF 179 193 ! --- 194 #if defined key_agrif 195 IF( .NOT. Agrif_Root() ) CALL agrif_interp_lim3('T') 196 #endif 180 197 #if defined key_bdy 181 IF( ln_limthd ) CALL bdy_ice_lim( kt ) ! bdy ice thermo198 IF( ln_limthd ) CALL bdy_ice_lim( kt ) ! -- bdy ice thermo 182 199 IF( ln_icectl ) CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 183 200 #endif … … 237 254 IF( ln_limthd ) CALL lim_update2( kt ) ! -- Corrections 238 255 ! --- 256 # if defined key_agrif 257 IF( .NOT. Agrif_Root() ) CALL agrif_update_lim3( kt ) 258 # endif 239 259 CALL lim_var_glo2eqv ! necessary calls (at least for coupling) 240 260 CALL lim_var_agg( 2 ) ! necessary calls (at least for coupling) … … 345 365 ! 346 366 IF( nstock == 0 ) nstock = nlast + 1 367 ! 368 # if defined key_agrif 369 IF( .NOT. Agrif_Root() ) CALL Agrif_InitValues_cont_lim3 370 # endif 347 371 ! 348 372 END SUBROUTINE sbc_lim_init -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r6204 r6584 133 133 # endif 134 134 # if defined key_lim2 135 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM 135 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM2 136 # endif 137 # if defined key_lim3 138 CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 136 139 # endif 137 140 #endif -
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r6204 r6584 111 111 # endif 112 112 # if defined key_lim2 113 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM 113 CALL Agrif_Declare_Var_lim2 ! " " " " " LIM2 114 # endif 115 # if defined key_lim3 116 CALL Agrif_Declare_Var_lim3 ! " " " " " LIM3 114 117 # endif 115 118 #endif
Note: See TracChangeset
for help on using the changeset viewer.