Skip to content
Snippets Groups Projects
Commit ede93a1e authored by GUEZ Lionel's avatar GUEZ Lionel
Browse files

Move definition of `single_grid_uv` later

Move definition of `single_grid_uv` after call to
`read_grid_inst_eddies`. Preparing to move `stag_[uv]` to
`read_grid_inst_eddies`.
parent e14c1952
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,6 @@ contains ...@@ -63,7 +63,6 @@ contains
periodic = .false. ! default value periodic = .false. ! default value
print *, "input_ssh: Enter input_ssh_nml:" print *, "input_ssh: Enter input_ssh_nml:"
read(unit = *, nml = input_ssh_nml) read(unit = *, nml = input_ssh_nml)
single_grid_uv = all(stag_u == stag_v)
call nf95_open(ssh_fname, nf95_nowrite, ncid) call nf95_open(ssh_fname, nf95_nowrite, ncid)
call read_grid_inst_eddies(periodic, stag_u, stag_v, ncid, leave_trace) call read_grid_inst_eddies(periodic, stag_u, stag_v, ncid, leave_trace)
if (periodic) call assert(4 * max_radius(1) < nlon, "input_ssh: max_radius") if (periodic) call assert(4 * max_radius(1) < nlon, "input_ssh: max_radius")
...@@ -71,6 +70,7 @@ contains ...@@ -71,6 +70,7 @@ contains
allocate(ssh(1 - copy:nlon + copy, nlat), u(1 - copy:nlon + copy, nlat), & allocate(ssh(1 - copy:nlon + copy, nlat), u(1 - copy:nlon + copy, nlat), &
v(1 - copy:nlon + copy, nlat)) v(1 - copy:nlon + copy, nlat))
corner_u = [1. - copy + stag_u(1), 1. + stag_u(2)] corner_u = [1. - copy + stag_u(1), 1. + stag_u(2)]
single_grid_uv = all(stag_u == stag_v)
if (.not. single_grid_uv) corner_v = [1. - copy + stag_v(1), 1. + stag_v(2)] if (.not. single_grid_uv) corner_v = [1. - copy + stag_v(1), 1. + stag_v(2)]
! Read ssh, u and v: ! Read ssh, u and v:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment