Opened 7 years ago
Closed 5 years ago
#1871 closed Bug (fixed)
NESTING TOOLS AGRIF read mbathy and NOT bathy_level for agrif_create_restart
Reported by: | jharlass | Owned by: | sciliberti |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | AGRIF | Version: | v3.6 |
Severity: | minor | Keywords: | AGRIF bathymetry nesting |
Cc: | sciliberti |
Description
Context
- agrif_create_restart reads bathymetry on levels from mesh_mash.nc to create all masks. In the old code it is looking for Bathy_Level, which no longer exists. Use mbathy instead.
- add support for partial step (exisiting routines)
Fix
-
(a) Revision vs. (b) Working
a b 555 556 SUBROUTINE Init_mask(name,Grid,jpiglo,jpjglo) 556 557 ! 557 558 USE io_netcdf 558 559 ! 559 560 CHARACTER(*) name 560 561 INTEGER :: nx,ny,k,i,j,jpiglo,jpjglo 561 562 TYPE(Coordinates) :: Grid 562 563 REAL*8, POINTER, DIMENSION(:,:) ::zwf => NULL() 563 564 ! 565 ! cjh, no Bathy_level -> mbathy from (1_)mesh_mask.nc 564 566 IF(jpiglo == 1 .AND. jpjglo == 1) THEN 565 CALL Read_Ncdf_var('Bathy_level',name,Grid%Bathy_level)567 CALL Read_Ncdf_var('mbathy' ,name ,Grid%Bathy_level) 566 568 ELSE 567 CALL Read_Ncdf_var('Bathy_level',name,Grid%Bathy_level,(/jpizoom,jpjzoom/),(/jpiglo,jpjglo/) )569 CALL Read_Ncdf_var('mbathy',name,Grid%Bathy_level,(/jpizoom,jpjzoom/),(/jpiglo,jpjglo/) ) 568 570 ENDIF 569 571 ! 570 572 WRITE(*,*) 'Init masks in T,U,V,F points' 571 573 ! 572 574 nx = SIZE(Grid%Bathy_level,1) 573 575 ny = SIZE(Grid%Bathy_level,2) 574 576 ! 575 577 ALLOCATE(Grid%tmask(nx,ny,N), & 576 578 Grid%umask(nx,ny,N), & 577 579 Grid%vmask(nx,ny,N), & 578 580 Grid%fmask(nx,ny,N)) 581 582 ! cjh, important for correct mbathy and masks calculation 583 IF(partial_steps) THEN 584 CALL get_partial_steps(Grid) 585 END IF 586 587 ! checks for all levels for landpoints 579 588 DO k = 1,N 580 ! 581 WHERE(Grid%Bathy_level(:,:) <= k-1 ) 589 ! nemo syntax 590 WHERE( Grid%Bathy_level(:,:) - k + 0.1 >= 0 ) 591 Grid%tmask(:,:,k) = 1 592 ELSEWHERE 582 593 Grid%tmask(:,:,k) = 0 583 ELSEWHERE584 Grid%tmask(:,:,k) = 1585 594 END WHERE 586 !587 595 END DO 588 596 ! 589 597 Grid%umask(1:nx-1,:,:) = Grid%tmask(1:nx-1,:,:)*Grid%tmask(2:nx,:,:)
Commit History (0)
(No commits)
Change History (7)
comment:1 Changed 7 years ago by jharlass
comment:2 Changed 7 years ago by nemo
- Keywords nesting added; NESTING removed
comment:3 Changed 7 years ago by jchanut
- Component changed from OPA to AGRIF
comment:4 Changed 7 years ago by clevy
- Owner changed from nemo to sciliberti
comment:5 Changed 7 years ago by clevy
- Cc sciliberti added
- Status changed from new to assigned
comment:6 Changed 7 years ago by clevy
- Priority changed from critical to major
comment:7 Changed 5 years ago by jchanut
- Resolution set to fixed
- Severity set to minor
- Status changed from assigned to closed
Use the very last NESTING tool version (no correction made to the one provided with NEMO 3.6_STABLE)
Note: See
TracTickets for help on using
tickets.
Addendum:
Subroutine Init_mask in file: agrif_readwrite.f90
Called from agrif_create_restart.f90