Changeset 7378 for branches/2016/dev_CNRS_2016/NEMOGCM
- Timestamp:
- 2016-11-30T11:15:30+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r7277 r7378 39 39 jpkm1 = jpk-1 40 40 jpij = jpi*jpj 41 !SF jpidta = jpiglo42 !SF jpjdta = jpjglo43 41 nperio = 0 44 42 jperio = 0 … … 239 237 WRITE(cl_check2,*) NINT(rdt) 240 238 WRITE(cl_check3,*) NINT(Agrif_Parent(rdt)/Agrif_Rhot()) 241 CALL ctl_ warn( 'incompatible time step between grids', &239 CALL ctl_stop( 'incompatible time step between ocean grids', & 242 240 & 'parent grid value : '//cl_check1 , & 243 241 & 'child grid value : '//cl_check2 , & 244 & 'value on child grid will be changed to : '//cl_check3 ) 245 rdt=Agrif_Parent(rdt)/Agrif_Rhot() 242 & 'value on child grid should be changed to : '//cl_check3 ) 246 243 ENDIF 247 244 … … 566 563 # endif 567 564 565 #if defined key_lim3 566 SUBROUTINE Agrif_InitValues_cont_lim3 567 !!---------------------------------------------------------------------- 568 !! *** ROUTINE Agrif_InitValues_cont_lim3 *** 569 !! 570 !! ** Purpose :: Initialisation of variables to be interpolated for LIM3 571 !!---------------------------------------------------------------------- 572 USE Agrif_Util 573 USE sbc_oce, ONLY : nn_fsbc ! clem: necessary otherwise Agrif_Parent(nn_fsbc) = nn_fsbc 574 USE ice 575 USE agrif_ice 576 USE in_out_manager 577 USE agrif_lim3_update 578 USE agrif_lim3_interp 579 USE lib_mpp 580 ! 581 IMPLICIT NONE 582 !!---------------------------------------------------------------------- 583 ! 584 ! Declaration of the type of variable which have to be interpolated (parent=>child) 585 !---------------------------------------------------------------------------------- 586 CALL agrif_declare_var_lim3 587 588 ! Controls (clem) 589 ! stop if rhot * nn_fsbc(parent) /= N * nn_fsbc(child) with N being integer 590 IF( MOD( Agrif_irhot() * Agrif_Parent(nn_fsbc), nn_fsbc ) /= 0 ) THEN 591 CALL ctl_stop('rhot * nn_fsbc(parent) /= N * nn_fsbc(child), therefore nn_fsbc(child) should be set to 1 or nn_fsbc(parent)') 592 ENDIF 593 594 ! stop if update frequency is different from nn_fsbc 595 IF( nbclineupdate > nn_fsbc ) CALL ctl_stop('With ice model on child grid, nn_cln_update should be set to 1 or nn_fsbc') 596 597 598 ! First Interpolations (using "after" ice subtime step => lim_nbstep=1) 599 !---------------------------------------------------------------------- 600 lim_nbstep = 1 601 CALL agrif_interp_lim3('U') ! interpolation of ice velocities 602 CALL agrif_interp_lim3('V') ! interpolation of ice velocities 603 CALL agrif_interp_lim3('T') ! interpolation of ice tracers 604 lim_nbstep = 0 605 606 ! Update in case 2 ways 607 !---------------------- 608 CALL agrif_update_lim3(0) 609 610 ! 611 END SUBROUTINE Agrif_InitValues_cont_lim3 612 613 SUBROUTINE agrif_declare_var_lim3 614 !!---------------------------------------------------------------------- 615 !! *** ROUTINE agrif_declare_var_lim3 *** 616 !! 617 !! ** Purpose :: Declaration of variables to be interpolated for LIM3 618 !!---------------------------------------------------------------------- 619 USE Agrif_Util 620 USE ice 621 622 IMPLICIT NONE 623 !!---------------------------------------------------------------------- 624 ! 625 ! 1. Declaration of the type of variable which have to be interpolated (parent=>child) 626 ! agrif_declare_variable(position,1st point index,--,--,dimensions,name) 627 !------------------------------------------------------------------------------------- 628 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpl*(5+nlay_s+nlay_i)/),tra_ice_id ) 629 CALL agrif_declare_variable((/1,2/) ,(/2,3/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_ice_id ) 630 CALL agrif_declare_variable((/2,1/) ,(/3,2/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_ice_id ) 631 632 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) 633 !----------------------------------- 634 CALL Agrif_Set_bcinterp(tra_ice_id, interp = AGRIF_linear) 635 CALL Agrif_Set_bcinterp(u_ice_id , interp1 = Agrif_linear,interp2 = AGRIF_ppm ) 636 CALL Agrif_Set_bcinterp(v_ice_id , interp1 = AGRIF_ppm ,interp2 = Agrif_linear) 637 638 ! 3. Set location of interpolations 639 !---------------------------------- 640 CALL Agrif_Set_bc(tra_ice_id,(/0,1/)) 641 CALL Agrif_Set_bc(u_ice_id ,(/0,1/)) 642 CALL Agrif_Set_bc(v_ice_id ,(/0,1/)) 643 644 ! 4. Set update type in case 2 ways (child=>parent) (normal & tangent to the grid cell for velocities) 645 !-------------------------------------------------- 646 CALL Agrif_Set_Updatetype(tra_ice_id, update = AGRIF_Update_Average) ! clem je comprends pas average/copy 647 CALL Agrif_Set_Updatetype(u_ice_id ,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) 648 CALL Agrif_Set_Updatetype(v_ice_id ,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy ) 649 650 END SUBROUTINE agrif_declare_var_lim3 651 #endif 652 568 653 569 654 # if defined key_top … … 622 707 WRITE(cl_check2,*) rdt 623 708 WRITE(cl_check3,*) rdt*Agrif_Rhot() 624 CALL ctl_ warn( 'incompatible time step between grids', &709 CALL ctl_stop( 'incompatible time step between grids', & 625 710 & 'parent grid value : '//cl_check1 , & 626 711 & 'child grid value : '//cl_check2 , & 627 & 'value on child grid willbe changed to &712 & 'value on child grid should be changed to & 628 713 & :'//cl_check3 ) 629 rdt=rdt*Agrif_Rhot()630 714 ENDIF 631 715 … … 779 863 IF( agrif_oce_alloc() > 0 ) CALL ctl_warn('agrif agrif_oce_alloc: allocation of arrays failed') 780 864 # if defined key_lim2 781 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') 865 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') ! only for LIM2 (not LIM3) 782 866 # endif 783 867 !
Note: See TracChangeset
for help on using the changeset viewer.