Skip to content

Commit

Permalink
Use MOM_read_data in RGC_initialization
Browse files Browse the repository at this point in the history
  Use MOM_read_data in place of read_data in RGC_initialization to match the
routines used in other modules and facilitate migration to FMS2.  All answers
are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Jan 3, 2021
1 parent 9b0b8db commit 6111327
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/user/RGC_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ module RGC_initialization
use MOM_file_parser, only : get_param, log_version, param_file_type
use MOM_get_input, only : directories
use MOM_grid, only : ocean_grid_type
use MOM_io, only : file_exists, read_data
use MOM_io, only : slasher
use MOM_io, only : file_exists, MOM_read_data, slasher
use MOM_sponge, only : sponge_CS, set_up_sponge_field, initialize_sponge
use MOM_sponge, only : set_up_sponge_ML_density
use MOM_unit_scaling, only : unit_scale_type
Expand Down Expand Up @@ -173,12 +172,12 @@ subroutine RGC_initialize_sponges(G, GV, US, tv, u, v, PF, use_ALE, CSp, ACSp)
filename = trim(inputdir)//trim(state_file)
if (.not.file_exists(filename, G%Domain)) &
call MOM_error(FATAL, " RGC_initialize_sponges: Unable to open "//trim(filename))
call read_data(filename,temp_var,T(:,:,:), domain=G%Domain%mpp_domain)
call read_data(filename,salt_var,S(:,:,:), domain=G%Domain%mpp_domain)
call MOM_read_data(filename, temp_var, T(:,:,:), G%Domain)
call MOM_read_data(filename, salt_var, S(:,:,:), G%Domain)

if (use_ALE) then

call read_data(filename,h_var,h(:,:,:), domain=G%Domain%mpp_domain)
call MOM_read_data(filename, h_var, h(:,:,:), G%Domain)
call pass_var(h, G%domain)

!call initialize_ALE_sponge(Idamp, h, nz, G, PF, ACSp)
Expand All @@ -201,7 +200,7 @@ subroutine RGC_initialize_sponges(G, GV, US, tv, u, v, PF, use_ALE, CSp, ACSp)
else ! layer mode

!read eta
call read_data(filename,eta_var,eta(:,:,:), domain=G%Domain%mpp_domain)
call MOM_read_data(filename, eta_var, eta(:,:,:), G%Domain)

! Set the inverse damping rates so that the model will know where to
! apply the sponges, along with the interface heights.
Expand Down

0 comments on commit 6111327

Please sign in to comment.