- Timestamp:
- 2017-12-13T15:58:53+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r7761 r9019 1 1 #if defined key_agrif 2 2 !!---------------------------------------------------------------------- 3 !! NEMO/NST 3.7 , NEMO Consortium (2016)3 !! NEMO/NST 4.0 , NEMO Consortium (2017) 4 4 !! $Id$ 5 5 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 28 28 jpiglo = nbcellsx + 2 + 2*nbghostcells 29 29 jpjglo = nbcellsy + 2 + 2*nbghostcells 30 jpi = ( jpiglo-2* jpreci + (jpni-1+0) ) / jpni + 2*jpreci31 jpj = ( jpjglo-2* jprecj + (jpnj-1+0) ) / jpnj + 2*jprecj30 jpi = ( jpiglo-2*nn_hls + (jpni-1+0) ) / jpni + 2*nn_hls 31 jpj = ( jpjglo-2*nn_hls + (jpnj-1+0) ) / jpnj + 2*nn_hls 32 32 ! JC: change to allow for different vertical levels 33 33 ! jpk is already set … … 105 105 USE agrif_opa_interp 106 106 USE agrif_opa_sponge 107 ! !107 ! 108 108 IMPLICIT NONE 109 109 !!---------------------------------------------------------------------- … … 125 125 USE par_oce 126 126 USE oce 127 !! 128 IMPLICIT NONE 127 ! 128 IMPLICIT NONE 129 ! 130 INTEGER :: ind1, ind2, ind3 129 131 !!---------------------------------------------------------------------- 130 132 131 133 ! 1. Declaration of the type of variable which have to be interpolated 132 134 !--------------------------------------------------------------------- 133 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e1u_id) 134 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e2v_id) 135 ind1 = nbghostcells 136 ind2 = 1 + nbghostcells 137 ind3 = 2 + nbghostcells 138 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e1u_id) 139 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),e2v_id) 135 140 136 141 ! 2. Type of interpolation 137 142 !------------------------- 138 CALL Agrif_Set_bcinterp( e1u_id,interp1=Agrif_linear,interp2=AGRIF_ppm)139 CALL Agrif_Set_bcinterp( e2v_id,interp1=AGRIF_ppm,interp2=Agrif_linear)143 CALL Agrif_Set_bcinterp( e1u_id, interp1=Agrif_linear, interp2=AGRIF_ppm ) 144 CALL Agrif_Set_bcinterp( e2v_id, interp1=AGRIF_ppm , interp2=Agrif_linear ) 140 145 141 146 ! 3. Location of interpolation 142 147 !----------------------------- 143 CALL Agrif_Set_bc(e1u_id,(/0, 0/))144 CALL Agrif_Set_bc(e2v_id,(/0, 0/))148 CALL Agrif_Set_bc(e1u_id,(/0,ind1-1/)) 149 CALL Agrif_Set_bc(e2v_id,(/0,ind1-1/)) 145 150 146 151 ! 5. Update type 147 152 !--------------- 148 CALL Agrif_Set_Updatetype( e1u_id,update1 = Agrif_Update_Copy, update2=Agrif_Update_Average)149 CALL Agrif_Set_Updatetype( e2v_id,update1 = Agrif_Update_Average, update2=Agrif_Update_Copy)153 CALL Agrif_Set_Updatetype( e1u_id, update1=Agrif_Update_Copy , update2=Agrif_Update_Average ) 154 CALL Agrif_Set_Updatetype( e2v_id, update1=Agrif_Update_Average, update2=Agrif_Update_Copy ) 150 155 151 156 ! High order updates 152 ! CALL Agrif_Set_Updatetype( e1u_id,update1 = Agrif_Update_Average, update2=Agrif_Update_Full_Weighting)153 ! CALL Agrif_Set_Updatetype( e2v_id,update1 = Agrif_Update_Full_Weighting, update2=Agrif_Update_Average)157 ! CALL Agrif_Set_Updatetype( e1u_id, update1=Agrif_Update_Average , update2=Agrif_Update_Full_Weighting ) 158 ! CALL Agrif_Set_Updatetype( e2v_id, update1=Agrif_Update_Full_Weighting, update2=Agrif_Update_Average ) 154 159 ! 155 160 END SUBROUTINE agrif_declare_var_dom … … 162 167 !! ** Purpose :: Declaration of variables to be interpolated 163 168 !!---------------------------------------------------------------------- 169 USE agrif_opa_update 170 USE agrif_opa_interp 171 USE agrif_opa_sponge 164 172 USE Agrif_Util 165 173 USE oce 166 174 USE dom_oce 175 USE zdf_oce 167 176 USE nemogcm 177 ! 168 178 USE lib_mpp 169 179 USE in_out_manager 170 USE agrif_opa_update 171 USE agrif_opa_interp 172 USE agrif_opa_sponge 173 !! 180 ! 174 181 IMPLICIT NONE 175 182 ! … … 184 191 ! 2. First interpolations of potentially non zero fields 185 192 !------------------------------------------------------- 186 Agrif_SpecialValue =0.193 Agrif_SpecialValue = 0._wp 187 194 Agrif_UseSpecialValue = .TRUE. 188 195 CALL Agrif_Bc_variable(tsn_id,calledweight=1.,procname=interptsn) … … 319 326 ENDIF 320 327 ! 321 # if defined key_zdftke322 CALL Agrif_Update_tke(0)323 # endif324 !325 328 Agrif_UseSpecialValueInUpdate = .FALSE. 326 329 nbcline = 0 … … 337 340 !!---------------------------------------------------------------------- 338 341 USE agrif_util 339 USE par_oce ! ONLY : jpts 342 USE agrif_oce 343 USE par_oce ! ocean parameters 344 USE zdf_oce ! vertical physics 340 345 USE oce 341 USE agrif_oce 342 !! 343 IMPLICIT NONE 346 ! 347 IMPLICIT NONE 348 ! 349 INTEGER :: ind1, ind2, ind3 344 350 !!---------------------------------------------------------------------- 345 351 346 352 ! 1. Declaration of the type of variable which have to be interpolated 347 353 !--------------------------------------------------------------------- 348 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jpts/),tsn_id) 349 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jpts/),tsn_sponge_id) 350 351 CALL agrif_declare_variable((/1,2,0/),(/2,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_interp_id) 352 CALL agrif_declare_variable((/2,1,0/),(/3,2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_interp_id) 353 CALL agrif_declare_variable((/1,2,0/),(/2,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_update_id) 354 CALL agrif_declare_variable((/2,1,0/),(/3,2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_update_id) 355 CALL agrif_declare_variable((/1,2,0/),(/2,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_sponge_id) 356 CALL agrif_declare_variable((/2,1,0/),(/3,2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_sponge_id) 357 358 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),e3t_id) 359 CALL agrif_declare_variable((/1,2,0/),(/2,3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),umsk_id) 360 CALL agrif_declare_variable((/2,1,0/),(/3,2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vmsk_id) 361 362 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,3/),scales_t_id) 363 364 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),unb_id) 365 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vnb_id) 366 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_interp_id) 367 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_interp_id) 368 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_update_id) 369 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_update_id) 370 371 CALL agrif_declare_variable((/2,2/),(/3,3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),sshn_id) 372 373 # if defined key_zdftke 374 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/), en_id) 375 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avt_id) 376 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avm_id) 377 # endif 354 ind1 = nbghostcells 355 ind2 = 1 + nbghostcells 356 ind3 = 2 + nbghostcells 357 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jpts/),tsn_id) 358 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jpts/),tsn_sponge_id) 359 360 CALL agrif_declare_variable((/1,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_interp_id) 361 CALL agrif_declare_variable((/2,1,0/),(/ind3,ind2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_interp_id) 362 CALL agrif_declare_variable((/1,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_update_id) 363 CALL agrif_declare_variable((/2,1,0/),(/ind3,ind2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_update_id) 364 CALL agrif_declare_variable((/1,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),un_sponge_id) 365 CALL agrif_declare_variable((/2,1,0/),(/ind3,ind2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vn_sponge_id) 366 367 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),e3t_id) 368 CALL agrif_declare_variable((/1,2,0/),(/ind2,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),umsk_id) 369 CALL agrif_declare_variable((/2,1,0/),(/ind3,ind2,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpk/),vmsk_id) 370 371 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,3/),scales_t_id) 372 373 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),unb_id) 374 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vnb_id) 375 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_interp_id) 376 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_interp_id) 377 CALL agrif_declare_variable((/1,2/),(/ind2,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),ub2b_update_id) 378 CALL agrif_declare_variable((/2,1/),(/ind3,ind2/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),vb2b_update_id) 379 380 CALL agrif_declare_variable((/2,2/),(/ind3,ind3/),(/'x','y'/),(/1,1/),(/nlci,nlcj/),sshn_id) 381 382 IF( ln_zdftke ) THEN 383 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/), en_id) 384 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avt_id) 385 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,jpk/),avm_id) 386 ENDIF 378 387 379 388 ! 2. Type of interpolation … … 400 409 CALL Agrif_Set_bcinterp(vmsk_id,interp=AGRIF_constant) 401 410 402 # if defined key_zdftke 403 CALL Agrif_Set_bcinterp(avm_id ,interp=AGRIF_linear) 404 # endif 405 411 IF( ln_zdftke ) CALL Agrif_Set_bcinterp( avm_id, interp=AGRIF_linear ) 406 412 407 413 ! 3. Location of interpolation 408 414 !----------------------------- 409 CALL Agrif_Set_bc(tsn_id,(/0,1/)) 410 CALL Agrif_Set_bc(un_interp_id,(/0,1/)) 411 CALL Agrif_Set_bc(vn_interp_id,(/0,1/)) 412 413 ! CALL Agrif_Set_bc(tsn_sponge_id,(/-3*Agrif_irhox(),0/)) 414 ! CALL Agrif_Set_bc(un_sponge_id,(/-2*Agrif_irhox()-1,0/)) 415 ! CALL Agrif_Set_bc(vn_sponge_id,(/-2*Agrif_irhox()-1,0/)) 416 CALL Agrif_Set_bc(tsn_sponge_id,(/-nn_sponge_len*Agrif_irhox()-1,0/)) 417 CALL Agrif_Set_bc(un_sponge_id ,(/-nn_sponge_len*Agrif_irhox()-1,0/)) 418 CALL Agrif_Set_bc(vn_sponge_id ,(/-nn_sponge_len*Agrif_irhox()-1,0/)) 419 420 CALL Agrif_Set_bc(sshn_id,(/0,0/)) 421 CALL Agrif_Set_bc(unb_id ,(/0,0/)) 422 CALL Agrif_Set_bc(vnb_id ,(/0,0/)) 423 CALL Agrif_Set_bc(ub2b_interp_id,(/0,0/)) 424 CALL Agrif_Set_bc(vb2b_interp_id,(/0,0/)) 425 426 CALL Agrif_Set_bc(e3t_id,(/-2*Agrif_irhox()-1,0/)) ! if west and rhox=3: column 2 to 9 427 CALL Agrif_Set_bc(umsk_id,(/0,0/)) 428 CALL Agrif_Set_bc(vmsk_id,(/0,0/)) 429 430 # if defined key_zdftke 431 CALL Agrif_Set_bc(avm_id ,(/0,1/)) 432 # endif 415 CALL Agrif_Set_bc( tsn_id, (/0,ind1/) ) 416 CALL Agrif_Set_bc( un_interp_id, (/0,ind1/) ) 417 CALL Agrif_Set_bc( vn_interp_id, (/0,ind1/) ) 418 419 CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) ! if west and rhox=3 and sponge=2 and ghost=1: columns 2 to 9 420 CALL Agrif_Set_bc( un_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) 421 CALL Agrif_Set_bc( vn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) 422 423 CALL Agrif_Set_bc( sshn_id, (/0,ind1-1/) ) 424 CALL Agrif_Set_bc( unb_id, (/0,ind1-1/) ) 425 CALL Agrif_Set_bc( vnb_id, (/0,ind1-1/) ) 426 CALL Agrif_Set_bc( ub2b_interp_id, (/0,ind1-1/) ) 427 CALL Agrif_Set_bc( vb2b_interp_id, (/0,ind1-1/) ) 428 429 CALL Agrif_Set_bc( e3t_id, (/-2*Agrif_irhox()-1,ind1-1/) ) ! if west and rhox=3 and ghost=1: column 2 to 9 430 CALL Agrif_Set_bc( umsk_id, (/0,ind1-1/) ) 431 CALL Agrif_Set_bc( vmsk_id, (/0,ind1-1/) ) 432 433 IF( ln_zdftke ) CALL Agrif_Set_bc( avm_id, (/0,ind1/) ) 433 434 434 435 ! 5. Update type … … 446 447 CALL Agrif_Set_Updatetype(vb2b_update_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy) 447 448 448 # if defined key_zdftke 449 CALL Agrif_Set_Updatetype( en_id, update = AGRIF_Update_Average)450 CALL Agrif_Set_Updatetype(avt_id, update = AGRIF_Update_Average)451 CALL Agrif_Set_Updatetype(avm_id, update = AGRIF_Update_Average)452 # endif 449 IF( ln_zdftke) THEN 450 CALL Agrif_Set_Updatetype( en_id, update = AGRIF_Update_Average) 451 CALL Agrif_Set_Updatetype(avt_id, update = AGRIF_Update_Average) 452 CALL Agrif_Set_Updatetype(avm_id, update = AGRIF_Update_Average) 453 ENDIF 453 454 454 455 ! High order updates … … 463 464 ! 464 465 END SUBROUTINE agrif_declare_var 465 466 # if defined key_lim2467 SUBROUTINE Agrif_InitValues_cont_lim2468 !!----------------------------------------------------------------------469 !! *** ROUTINE Agrif_InitValues_cont_lim2 ***470 !!471 !! ** Purpose :: Initialisation of variables to be interpolated for LIM2472 !!----------------------------------------------------------------------473 USE Agrif_Util474 USE ice_2475 USE agrif_ice476 USE in_out_manager477 USE agrif_lim2_update478 USE agrif_lim2_interp479 USE lib_mpp480 !!481 IMPLICIT NONE482 !!----------------------------------------------------------------------483 484 ! 1. Declaration of the type of variable which have to be interpolated485 !---------------------------------------------------------------------486 CALL agrif_declare_var_lim2487 488 ! 2. First interpolations of potentially non zero fields489 !-------------------------------------------------------490 Agrif_SpecialValue=-9999.491 Agrif_UseSpecialValue = .TRUE.492 ! Call Agrif_Bc_variable(zadv ,adv_ice_id ,calledweight=1.,procname=interp_adv_ice )493 ! Call Agrif_Bc_variable(zvel ,u_ice_id ,calledweight=1.,procname=interp_u_ice )494 ! Call Agrif_Bc_variable(zvel ,v_ice_id ,calledweight=1.,procname=interp_v_ice )495 Agrif_SpecialValue=0.496 Agrif_UseSpecialValue = .FALSE.497 498 ! 3. Some controls499 !-----------------500 501 # if ! defined key_lim2_vp502 lim_nbstep = 1.503 CALL agrif_rhg_lim2_load504 CALL agrif_trp_lim2_load505 lim_nbstep = 0.506 # endif507 !RB mandatory but why ???508 ! IF( nbclineupdate /= nn_fsbc .AND. nn_ice == 2 )THEN509 ! CALL ctl_warn ('With ice model on child grid, nbclineupdate is set to nn_fsbc')510 ! nbclineupdate = nn_fsbc511 ! ENDIF512 CALL Agrif_Update_lim2(0)513 !514 END SUBROUTINE Agrif_InitValues_cont_lim2515 516 517 SUBROUTINE agrif_declare_var_lim2518 !!----------------------------------------------------------------------519 !! *** ROUTINE agrif_declare_var_lim2 ***520 !!521 !! ** Purpose :: Declaration of variables to be interpolated for LIM2522 !!----------------------------------------------------------------------523 USE agrif_util524 USE ice_2525 !!526 IMPLICIT NONE527 !!----------------------------------------------------------------------528 529 ! 1. Declaration of the type of variable which have to be interpolated530 !---------------------------------------------------------------------531 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj, 7/),adv_ice_id )532 # if defined key_lim2_vp533 CALL agrif_declare_variable((/1,1/),(/3,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),u_ice_id)534 CALL agrif_declare_variable((/1,1/),(/3,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),v_ice_id)535 # else536 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),u_ice_id)537 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),v_ice_id)538 # endif539 540 ! 2. Type of interpolation541 !-------------------------542 CALL Agrif_Set_bcinterp(adv_ice_id ,interp=AGRIF_linear)543 CALL Agrif_Set_bcinterp(u_ice_id,interp1=Agrif_linear,interp2=AGRIF_ppm)544 CALL Agrif_Set_bcinterp(v_ice_id,interp1=AGRIF_ppm,interp2=Agrif_linear)545 546 ! 3. Location of interpolation547 !-----------------------------548 CALL Agrif_Set_bc(adv_ice_id ,(/0,1/))549 CALL Agrif_Set_bc(u_ice_id,(/0,1/))550 CALL Agrif_Set_bc(v_ice_id,(/0,1/))551 552 ! 5. Update type553 !---------------554 CALL Agrif_Set_Updatetype(adv_ice_id , update = AGRIF_Update_Average)555 CALL Agrif_Set_Updatetype(u_ice_id,update1 = Agrif_Update_Copy, update2 = Agrif_Update_Average)556 CALL Agrif_Set_Updatetype(v_ice_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy)557 !558 END SUBROUTINE agrif_declare_var_lim2559 # endif560 466 561 467 #if defined key_lim3 … … 623 529 USE Agrif_Util 624 530 USE ice 625 626 IMPLICIT NONE 531 USE par_oce, ONLY : nbghostcells 532 ! 533 IMPLICIT NONE 534 ! 535 INTEGER :: ind1, ind2, ind3 627 536 !!---------------------------------------------------------------------- 628 537 ! … … 634 543 ! 2,2 = two ghost lines 635 544 !------------------------------------------------------------------------------------- 636 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 ) 637 CALL agrif_declare_variable((/1,2/) ,(/2,3/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_ice_id ) 638 CALL agrif_declare_variable((/2,1/) ,(/3,2/),(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_ice_id ) 545 ind1 = nbghostcells 546 ind2 = 1 + nbghostcells 547 ind3 = 2 + nbghostcells 548 CALL agrif_declare_variable((/2,2,0/),(/ind3,ind3,0/),(/'x','y','N'/),(/1,1,1/),(/nlci,nlcj,jpl*(5+nlay_s+nlay_i)/),tra_ice_id ) 549 CALL agrif_declare_variable((/1,2/) ,(/ind2,ind3/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,u_ice_id ) 550 CALL agrif_declare_variable((/2,1/) ,(/ind3,ind2/) ,(/'x','y'/) ,(/1,1/) ,(/nlci,nlcj/) ,v_ice_id ) 639 551 640 552 ! 2. Set interpolations (normal & tangent to the grid cell for velocities) … … 646 558 ! 3. Set location of interpolations 647 559 !---------------------------------- 648 CALL Agrif_Set_bc(tra_ice_id,(/0, 1/))649 CALL Agrif_Set_bc(u_ice_id ,(/0, 1/))650 CALL Agrif_Set_bc(v_ice_id ,(/0, 1/))560 CALL Agrif_Set_bc(tra_ice_id,(/0,ind1/)) 561 CALL Agrif_Set_bc(u_ice_id ,(/0,ind1/)) 562 CALL Agrif_Set_bc(v_ice_id ,(/0,ind1/)) 651 563 652 564 ! 4. Set update type in case 2 ways (child=>parent) (normal & tangent to the grid cell for velocities) … … 777 689 !! 778 690 IMPLICIT NONE 691 ! 692 INTEGER :: ind1, ind2, ind3 779 693 !!---------------------------------------------------------------------- 780 694 781 695 ! 1. Declaration of the type of variable which have to be interpolated 782 696 !--------------------------------------------------------------------- 783 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jptra/),trn_id) 784 CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jptra/),trn_sponge_id) 697 ind1 = nbghostcells 698 ind2 = 1 + nbghostcells 699 ind3 = 2 + nbghostcells 700 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jptra/),trn_id) 701 CALL agrif_declare_variable((/2,2,0,0/),(/ind3,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/nlci,nlcj,jpk,jptra/),trn_sponge_id) 785 702 786 703 ! 2. Type of interpolation … … 791 708 ! 3. Location of interpolation 792 709 !----------------------------- 793 CALL Agrif_Set_bc(trn_id,(/0,1/)) 794 ! CALL Agrif_Set_bc(trn_sponge_id,(/-3*Agrif_irhox(),0/)) 710 CALL Agrif_Set_bc(trn_id,(/0,ind1/)) 795 711 CALL Agrif_Set_bc(trn_sponge_id,(/-nn_sponge_len*Agrif_irhox()-1,0/)) 796 712 … … 868 784 ! 869 785 IF( agrif_oce_alloc() > 0 ) CALL ctl_warn('agrif agrif_oce_alloc: allocation of arrays failed') 870 # if defined key_lim2871 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') ! only for LIM2 (not LIM3)872 # endif873 786 ! 874 787 END SUBROUTINE agrif_nemo_init
Note: See TracChangeset
for help on using the changeset viewer.