- Timestamp:
- 2011-07-18T17:05:52+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
r2727 r2804 84 84 # if ! defined key_offline 85 85 CALL Agrif_InitValues_cont 86 # endif 86 # if defined key_lim2 87 ! CALL Agrif_InitValues_cont_lim2 88 # endif 89 # endif 87 90 # if defined key_top 88 91 CALL Agrif_InitValues_cont_top … … 279 282 280 283 END SUBROUTINE agrif_declare_var 284 285 286 # if defined key_lim2 287 SUBROUTINE Agrif_InitValues_cont_lim2 288 !!---------------------------------------------------------------------- 289 !! *** ROUTINE Agrif_InitValues_cont_lim2 *** 290 !! 291 !! ** Purpose :: Initialisation of variables to be interpolated for LIM2 292 !!---------------------------------------------------------------------- 293 USE Agrif_Util 294 USE ice_2 295 USE in_out_manager 296 USE agrif_lim2_update 297 USE agrif_lim2_interp 298 USE lib_mpp 299 ! 300 IMPLICIT NONE 301 ! 302 REAL(wp), DIMENSION(:,:) , ALLOCATABLE :: zvel 303 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zadv, zsadv 304 !!---------------------------------------------------------------------- 305 306 ALLOCATE( zvel(jpi,jpj), zadv(jpi,jpj,7), zsadv(jpi,jpj,42) ) 307 308 ! 1. Declaration of the type of variable which have to be interpolated 309 !--------------------------------------------------------------------- 310 CALL agrif_declare_var_lim2 311 312 ! 2. First interpolations of potentially non zero fields 313 !------------------------------------------------------- 314 Agrif_SpecialValue=-9999. 315 Agrif_UseSpecialValue = .TRUE. 316 Call Agrif_Bc_variable(zadv ,adv_ice_id ,calledweight=1.,procname=interp_adv_ice ) 317 Call Agrif_Bc_variable(zsadv,sadv_ice_id,calledweight=1.,procname=interp_sadv_ice) 318 Call Agrif_Bc_variable(zvel ,u_ice_id ,calledweight=1.,procname=interp_u_ice ) 319 Call Agrif_Bc_variable(zvel ,v_ice_id ,calledweight=1.,procname=interp_v_ice ) 320 Agrif_SpecialValue=0. 321 Agrif_UseSpecialValue = .FALSE. 322 323 ! 3. Some controls 324 !----------------- 325 326 # if ! defined key_lim2_vp 327 childfreq = 1. 328 CALL agrif_dyn_lim(0 ,1 , 'V') 329 CALL agrif_dyn_lim(0 ,1 , 'U') 330 childfreq = 0. 331 # endif 332 !RB mandatory but why ??? 333 IF( nbclineupdate /= nn_fsbc .AND. nn_ice == 2 )THEN 334 CALL ctl_warn ('With ice model on child grid, nbclineupdate is set to nn_fsbc') 335 nbclineupdate = nn_fsbc 336 ENDIF 337 CALL Agrif_Update_lim2(0) 338 ! 339 DEALLOCATE( zvel, zadv, zsadv ) 340 ! 341 END SUBROUTINE Agrif_InitValues_cont_lim2 342 343 344 SUBROUTINE agrif_declare_var_lim2 345 !!---------------------------------------------------------------------- 346 !! *** ROUTINE agrif_declare_var_lim2 *** 347 !! 348 !! ** Purpose :: Declaration of variables to be interpolated for LIM2 349 !!---------------------------------------------------------------------- 350 USE agrif_util 351 USE ice_2 352 353 IMPLICIT NONE 354 !!---------------------------------------------------------------------- 355 356 ! 1. Declaration of the type of variable which have to be interpolated 357 !--------------------------------------------------------------------- 358 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj, 7/),adv_ice_id ) 359 CALL agrif_declare_variable((/2,2,0/),(/3,3,0/),(/'x','y','N'/),(/1,1,1/),(/jpi,jpj,42/),sadv_ice_id) 360 # if defined key_lim2_vp 361 CALL agrif_declare_variable((/1,1/),(/3,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),u_ice_id) 362 CALL agrif_declare_variable((/1,1/),(/3,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),v_ice_id) 363 # else 364 CALL agrif_declare_variable((/1,2/),(/2,3/),(/'x','y'/),(/1,1/),(/jpi,jpj/),u_ice_id) 365 CALL agrif_declare_variable((/2,1/),(/3,2/),(/'x','y'/),(/1,1/),(/jpi,jpj/),v_ice_id) 366 # endif 367 368 ! 2. Type of interpolation 369 !------------------------- 370 CALL Agrif_Set_bcinterp(adv_ice_id ,interp=AGRIF_linear) 371 CALL Agrif_Set_bcinterp(sadv_ice_id,interp=AGRIF_linear) 372 Call Agrif_Set_bcinterp(u_ice_id,interp1=Agrif_linear,interp2=AGRIF_ppm) 373 Call Agrif_Set_bcinterp(v_ice_id,interp1=AGRIF_ppm,interp2=Agrif_linear) 374 375 ! 3. Location of interpolation 376 !----------------------------- 377 Call Agrif_Set_bc(adv_ice_id ,(/0,1/)) 378 Call Agrif_Set_bc(sadv_ice_id,(/0,1/)) 379 Call Agrif_Set_bc(u_ice_id,(/0,1/)) 380 Call Agrif_Set_bc(v_ice_id,(/0,1/)) 381 382 ! 5. Update type 383 !--------------- 384 Call Agrif_Set_Updatetype(adv_ice_id , update = AGRIF_Update_Average) 385 Call Agrif_Set_Updatetype(sadv_ice_id, update = AGRIF_Update_Average) 386 Call Agrif_Set_Updatetype(u_ice_id,update1 = Agrif_Update_Copy, update2 = Agrif_Update_Average) 387 Call Agrif_Set_Updatetype(v_ice_id,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy) 388 389 END SUBROUTINE agrif_declare_var_lim2 390 # endif 281 391 # endif 282 392 … … 459 569 !!---------------------------------------------------------------------- 460 570 USE agrif_oce 571 USE agrif_ice 461 572 USE in_out_manager 462 573 USE lib_mpp … … 486 597 visc_dyn = rn_sponge_dyn 487 598 ! 488 IF( agrif_oce_alloc() > 0 ) CALL ctl_warn('agrif sol_oce_alloc: allocation of arrays failed') 599 IF( agrif_oce_alloc() > 0 ) CALL ctl_stop('agrif agrif_oce_alloc: allocation of arrays failed') 600 # if defined key_lim2 601 IF( agrif_ice_alloc() > 0 ) CALL ctl_stop('agrif agrif_ice_alloc: allocation of arrays failed') 602 # endif 489 603 ! 490 604 END SUBROUTINE agrif_nemo_init
Note: See TracChangeset
for help on using the changeset viewer.