Changeset 13351
- Timestamp:
- 2020-07-28T17:20:03+02:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/cfgs/SHARED/namelist_ref
r13337 r13351 645 645 ln_agrif_2way = .true. ! activate two way nesting 646 646 ln_init_chfrpar = .false. ! initialize child grids from parent 647 ln_v remap= .false. ! use vertical remapping647 ln_vert_remap = .false. ! use vertical remapping 648 648 ln_chk_bathy = .false. ! =T check the parent bathymetry 649 649 ln_spc_dyn = .true. ! use 0 as special value for dynamics -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_oce.F90
r13337 r13351 23 23 LOGICAL , PUBLIC :: ln_spc_dyn = .FALSE. !: use zeros (.false.) or not (.true.) in 24 24 !: bdys dynamical fields interpolation 25 LOGICAL , PUBLIC :: ln_v remap= .FALSE. !: use vertical remapping25 LOGICAL , PUBLIC :: ln_vert_remap = .FALSE. !: use vertical remapping 26 26 REAL(wp), PUBLIC :: rn_sponge_tra = 0.002 !: sponge coeff. for tracers 27 27 REAL(wp), PUBLIC :: rn_sponge_dyn = 0.002 !: sponge coeff. for dynamics … … 55 55 INTEGER, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: mbkt_parent, mbku_parent, mbkv_parent 56 56 57 INTEGER, PUBLIC :: ts n_id! AGRIF profile for tracers interpolation and update57 INTEGER, PUBLIC :: ts_interp_id, ts_update_id ! AGRIF profile for tracers interpolation and update 58 58 INTEGER, PUBLIC :: un_interp_id, vn_interp_id ! AGRIF profiles for interpolations 59 59 INTEGER, PUBLIC :: un_update_id, vn_update_id ! AGRIF profiles for udpates 60 INTEGER, PUBLIC :: ts n_sponge_id, un_sponge_id, vn_sponge_id! AGRIF profiles for sponge layers60 INTEGER, PUBLIC :: ts_sponge_id, un_sponge_id, vn_sponge_id ! AGRIF profiles for sponge layers 61 61 INTEGER, PUBLIC :: tsini_id, uini_id, vini_id, sshini_id ! AGRIF profile for initialization 62 62 # if defined key_top … … 75 75 !$AGRIF_DO_NOT_TREAT 76 76 LOGICAL, PUBLIC :: use_sign_north 77 REAL, PUBLIC :: sign_north77 REAL, PUBLIC :: sign_north 78 78 LOGICAL, PUBLIC :: l_ini_child = .FALSE. 79 79 LOGICAL, PUBLIC :: l_vremap = .FALSE. -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_oce_interp.F90
r13337 r13351 169 169 Agrif_SpecialValue = 0._wp 170 170 Agrif_UseSpecialValue = .TRUE. 171 l_vremap = ln_v remap172 ! 173 CALL Agrif_Bc_variable( ts n_id, procname=interptsn )171 l_vremap = ln_vert_remap 172 ! 173 CALL Agrif_Bc_variable( ts_interp_id, procname=interptsn ) 174 174 ! 175 175 Agrif_UseSpecialValue = .FALSE. … … 194 194 Agrif_SpecialValue = 0.0_wp 195 195 Agrif_UseSpecialValue = ln_spc_dyn 196 l_vremap = ln_v remap196 l_vremap = ln_vert_remap 197 197 ! 198 198 use_sign_north = .TRUE. … … 785 785 Agrif_SpecialValue = 0.e0 786 786 Agrif_UseSpecialValue = .TRUE. 787 l_vremap = ln_v remap787 l_vremap = ln_vert_remap 788 788 ! 789 789 CALL Agrif_Bc_variable( avm_id, calledweight=zalpha, procname=interpavm ) … … 828 828 END DO 829 829 830 IF( l_vremap .OR. l_ini_child ) THEN830 IF( l_vremap .OR. l_ini_child ) THEN 831 831 ! Interpolate thicknesses 832 832 ! Warning: these are masked, hence extrapolated prior interpolation. … … 1588 1588 ! --- West --- ! 1589 1589 IF(lk_west) THEN 1590 ispon = nn_sponge_len * Agrif_irhox() + 11590 ispon = nn_sponge_len * Agrif_irhox() 1591 1591 istart = nn_hls + 2 ! halo + land + 1 1592 1592 iend = nn_hls + 1 + nbghostcells + ispon ! halo + land + nbghostcells + sponge … … 1610 1610 ! --- East --- ! 1611 1611 IF(lk_east) THEN 1612 ispon = nn_sponge_len * Agrif_irhox() + 11612 ispon = nn_sponge_len * Agrif_irhox() 1613 1613 istart = jpiglo - ( nn_hls + nbghostcells + ispon ) ! halo + land + nbghostcells + sponge - 1 1614 1614 iend = jpiglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 … … 1632 1632 ! --- South --- ! 1633 1633 IF(lk_south) THEN 1634 ispon = nn_sponge_len * Agrif_irhoy() + 11634 ispon = nn_sponge_len * Agrif_irhoy() 1635 1635 jstart = nn_hls + 2 ! halo + land + 1 1636 1636 jend = nn_hls + 1 + nbghostcells + ispon ! halo + land + nbghostcells + sponge … … 1654 1654 ! --- North --- ! 1655 1655 IF(lk_north) THEN 1656 ispon = nn_sponge_len * Agrif_irhoy() + 11656 ispon = nn_sponge_len * Agrif_irhoy() 1657 1657 jstart = jpjglo - ( nn_hls + nbghostcells + ispon) ! halo + land + nbghostcells +sponge - 1 1658 1658 jend = jpjglo - ( nn_hls + 1 ) ! halo + land + 1 - 1 -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_oce_sponge.F90
r13337 r13351 55 55 Agrif_SpecialValue = 0._wp 56 56 Agrif_UseSpecialValue = .TRUE. 57 l_vremap = ln_v remap57 l_vremap = ln_vert_remap 58 58 tabspongedone_tsn = .FALSE. 59 59 ! 60 CALL Agrif_Bc_Variable( ts n_sponge_id, calledweight=zcoef, procname=interptsn_sponge )60 CALL Agrif_Bc_Variable( ts_sponge_id, calledweight=zcoef, procname=interptsn_sponge ) 61 61 ! 62 62 Agrif_UseSpecialValue = .FALSE. … … 82 82 Agrif_SpecialValue = 0._wp 83 83 Agrif_UseSpecialValue = ln_spc_dyn 84 l_vremap = ln_v remap84 l_vremap = ln_vert_remap 85 85 use_sign_north = .TRUE. 86 86 sign_north = -1._wp -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_oce_update.F90
r13337 r13351 52 52 Agrif_UseSpecialValueInUpdate = .NOT.l_vremap 53 53 Agrif_SpecialValueFineGrid = 0._wp 54 l_vremap = ln_v remap54 l_vremap = ln_vert_remap 55 55 ! 56 56 # if ! defined DECAL_FEEDBACK 57 CALL Agrif_Update_Variable(ts n_id, procname=updateTS)57 CALL Agrif_Update_Variable(ts_update_id, procname=updateTS) 58 58 ! near boundary update: 59 ! CALL Agrif_Update_Variable(ts n_id,locupdate=(/0,2/), procname=updateTS)59 ! CALL Agrif_Update_Variable(ts_update_id,locupdate=(/0,2/), procname=updateTS) 60 60 # else 61 CALL Agrif_Update_Variable(ts n_id, locupdate=(/1,0/),procname=updateTS)61 CALL Agrif_Update_Variable(ts_update_id, locupdate=(/1,0/),procname=updateTS) 62 62 ! near boundary update: 63 ! CALL Agrif_Update_Variable(ts n_id,locupdate=(/1,2/), procname=updateTS)63 ! CALL Agrif_Update_Variable(ts_update_id,locupdate=(/1,2/), procname=updateTS) 64 64 # endif 65 65 ! … … 81 81 Agrif_UseSpecialValueInUpdate = .FALSE. 82 82 Agrif_SpecialValueFineGrid = 0._wp 83 l_vremap = ln_v remap83 l_vremap = ln_vert_remap 84 84 use_sign_north = .TRUE. 85 85 sign_north = -1._wp … … 128 128 ! 129 129 use_sign_north = .FALSE. 130 l n_vremap = .FALSE.130 l_vremap = .FALSE. 131 131 ! 132 132 END SUBROUTINE Agrif_Update_Dyn … … 428 428 IF ((l_1st_euler).AND.(Agrif_Nb_Step()==0) ) THEN 429 429 ts(i1:i2,j1:j2,1:jpkm1,1:jpts,Kbb_a) = ts(i1:i2,j1:j2,1:jpkm1,1:jpts,Kmm_a) 430 ENDIF 430 ENDIF 431 431 ENDIF 432 432 ! -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_top_interp.F90
r13337 r13351 43 43 Agrif_SpecialValue = 0._wp 44 44 Agrif_UseSpecialValue = .TRUE. 45 l_vremap = ln_v remap45 l_vremap = ln_vert_remap 46 46 ! 47 47 CALL Agrif_Bc_variable( trn_id, procname=interptrn ) 48 ! 48 49 Agrif_UseSpecialValue = .FALSE. 49 l_vremap = .FALSE.50 l_vremap = .FALSE. 50 51 ! 51 52 END SUBROUTINE Agrif_trc -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/src/NST/agrif_user.F90
r13337 r13351 230 230 ! 231 231 kindic_agr = 0 232 IF( .NOT. ln_v remap ) THEN232 IF( .NOT. ln_vert_remap ) THEN 233 233 ! 234 234 ! check if tmask and vertical scale factors agree with parent in sponge area: … … 251 251 ENDIF 252 252 253 IF( ln_v remap ) THEN253 IF( ln_vert_remap ) THEN 254 254 ! Additional constrain that should be removed someday: 255 255 IF ( Agrif_Parent(jpk).GT.jpk ) THEN 256 CALL ctl_stop( ' With ln_v remap, child grids must have jpk greater or equal to the parent value' )256 CALL ctl_stop( ' With ln_vert_remap, child grids must have jpk greater or equal to the parent value' ) 257 257 ENDIF 258 258 ENDIF … … 294 294 Agrif_SpecialValue = 0._wp 295 295 Agrif_UseSpecialValue = .TRUE. 296 l_vremap = ln_v remap297 298 CALL Agrif_Bc_variable( tsn_id,calledweight=1.,procname=interptsn)296 l_vremap = ln_vert_remap 297 298 CALL Agrif_Bc_variable(ts_interp_id,calledweight=1.,procname=interptsn) 299 299 CALL Agrif_Sponge 300 300 tabspongedone_tsn = .FALSE. 301 CALL Agrif_Bc_variable(ts n_sponge_id,calledweight=1.,procname=interptsn_sponge)301 CALL Agrif_Bc_variable(ts_sponge_id,calledweight=1.,procname=interptsn_sponge) 302 302 ! reset tsa to zero 303 303 ts(:,:,:,:,Krhs_a) = 0._wp … … 394 394 ind3 = nn_hls + 2 + nbghostcells_y_s 395 395 396 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/) ,(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_id) 397 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/) ,(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),tsn_sponge_id) 396 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/) ,(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),ts_interp_id) 397 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/) ,(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),ts_update_id) 398 CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/) ,(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jpts+1/),ts_sponge_id) 398 399 CALL agrif_declare_variable((/1,2,0,0/),(/ind2-1,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),un_interp_id) 399 400 CALL agrif_declare_variable((/2,1,0,0/),(/ind2,ind3-1,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,2/),vn_interp_id) … … 423 424 ! 2. Type of interpolation 424 425 !------------------------- 425 CALL Agrif_Set_bcinterp( tsn_id,interp =AGRIF_linear)426 CALL Agrif_Set_bcinterp( ts_interp_id,interp =AGRIF_linear) 426 427 CALL Agrif_Set_bcinterp( un_interp_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 427 428 CALL Agrif_Set_bcinterp( vn_interp_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) 428 429 429 CALL Agrif_Set_bcinterp( tsn_sponge_id,interp =AGRIF_linear)430 CALL Agrif_Set_bcinterp( ts_sponge_id,interp =AGRIF_linear) 430 431 CALL Agrif_Set_bcinterp( un_sponge_id,interp1=Agrif_linear,interp2=AGRIF_ppm ) 431 432 CALL Agrif_Set_bcinterp( vn_sponge_id,interp1=AGRIF_ppm ,interp2=Agrif_linear) … … 453 454 ! 3. Location of interpolation 454 455 !----------------------------- 455 CALL Agrif_Set_bc( tsn_id, (/0,ind1-1/) ) ! if west, rhox=3 and nbghost=3: columns 2 to 4456 CALL Agrif_Set_bc( ts_interp_id, (/0,ind1-1/) ) ! if west, rhox=3 and nbghost=3: columns 2 to 4 456 457 CALL Agrif_Set_bc( un_interp_id, (/0,ind1-1/) ) 457 458 CALL Agrif_Set_bc( vn_interp_id, (/0,ind1-1/) ) 458 459 459 CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) ! if west, rhox=3, nn_sponge_len=2460 CALL Agrif_Set_bc( ts_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) ! if west, rhox=3, nn_sponge_len=2 460 461 CALL Agrif_Set_bc( un_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) ! and nbghost=3: 461 462 CALL Agrif_Set_bc( vn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) ) ! columns 4 to 11 … … 475 476 476 477 # if defined UPD_HIGH 477 CALL Agrif_Set_Updatetype( tsn_id,update = Agrif_Update_Full_Weighting)478 CALL Agrif_Set_Updatetype(ts_interp_id,update = Agrif_Update_Full_Weighting) 478 479 CALL Agrif_Set_Updatetype(un_update_id,update1 = Agrif_Update_Average , update2 = Agrif_Update_Full_Weighting) 479 480 CALL Agrif_Set_Updatetype(vn_update_id,update1 = Agrif_Update_Full_Weighting, update2 = Agrif_Update_Average ) … … 491 492 492 493 #else 493 CALL Agrif_Set_Updatetype( tsn_id,update = AGRIF_Update_Average)494 CALL Agrif_Set_Updatetype(un_update_id ,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average)495 CALL Agrif_Set_Updatetype(vn_update_id ,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy )494 CALL Agrif_Set_Updatetype(ts_update_id ,update = AGRIF_Update_Average) 495 CALL Agrif_Set_Updatetype(un_update_id ,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) 496 CALL Agrif_Set_Updatetype(vn_update_id ,update1 = Agrif_Update_Average, update2 = Agrif_Update_Copy ) 496 497 497 498 CALL Agrif_Set_Updatetype(ub2b_update_id,update1 = Agrif_Update_Copy , update2 = Agrif_Update_Average) … … 766 767 INTEGER :: ios ! Local integer output status for namelist read 767 768 NAMELIST/namagrif/ ln_agrif_2way, ln_init_chfrpar, rn_sponge_tra, rn_sponge_dyn, rn_trelax_tra, rn_trelax_dyn, & 768 & ln_spc_dyn, ln_v remap, ln_chk_bathy769 & ln_spc_dyn, ln_vert_remap, ln_chk_bathy 769 770 !!-------------------------------------------------------------------------------------- 770 771 ! … … 787 788 WRITE(numout,*) ' ad. time relaxation for dynamics rn_trelax_dyn = ', rn_trelax_dyn 788 789 WRITE(numout,*) ' use special values for dynamics ln_spc_dyn = ', ln_spc_dyn 789 WRITE(numout,*) ' vertical remapping ln_v remap = ', ln_vremap790 WRITE(numout,*) ' vertical remapping ln_vert_remap = ', ln_vert_remap 790 791 WRITE(numout,*) ' check bathymetry ln_chk_bathy = ', ln_chk_bathy 791 792 ENDIF -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/VORTEX/MY_SRC/usrdef_nam.F90
r13286 r13351 71 71 rn_dx = Agrif_Parent(rn_dx)/Agrif_Rhox() 72 72 rn_dy = Agrif_Parent(rn_dy)/Agrif_Rhoy() 73 rn_dz = Agrif_Parent(rn_dz)73 ! rn_dz = Agrif_Parent(rn_dz) 74 74 rn_ppgphi0 = Agrif_Parent(rn_ppgphi0) 75 75 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.