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

Promote `dimid_lon` and `dimid_lat`

To arguments of `read_grid_inst_eddies`. Because we are going to need
them to check the order of dimensions in SSH variable.
parent a0c2d149
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ program test_local_extrema
implicit none
integer ncid, varid
integer ncid, varid, dimid_lon, dimid_lat
integer i, unit
character(len = :), allocatable:: filename
......@@ -44,7 +44,7 @@ program test_local_extrema
print *, "Reading from ", filename, "..."
call nf95_open(filename, nf95_nowrite, ncid)
call config(leave_trace = .false.)
call read_grid_inst_eddies(ncid, leave_trace = .false.)
call read_grid_inst_eddies(dimid_lon, dimid_lat, ncid, leave_trace = .false.)
copy = merge(1, 0, periodic)
allocate(ssh(1 - copy:nlon + copy, nlat), &
extr_map(1 - copy:nlon + copy, nlat))
......
......@@ -30,7 +30,7 @@ contains
! Local:
integer ncid
integer ncid, dimid_lon, dimid_lat
integer:: nc_time = 1
! Index, 1-based, in the NetCDF time coordinate, if any, of the
......@@ -46,7 +46,7 @@ contains
print *, "input_ssh: Enter input_ssh_nml:"
read(unit = *, nml = input_ssh_nml)
call nf95_open(ssh_fname, nf95_nowrite, ncid)
call read_grid_inst_eddies(ncid, leave_trace)
call read_grid_inst_eddies(dimid_lon, dimid_lat, ncid, leave_trace)
allocate(ssh(1 - copy_max_radius:nlon + copy_max_radius, nlat), &
u(1 - copy_max_radius:nlon + copy_max_radius, nlat), &
v(1 - copy_max_radius:nlon + copy_max_radius, nlat))
......
......@@ -42,7 +42,8 @@ module read_grid_inst_eddies_m
contains
subroutine read_grid_inst_eddies(ncid, leave_trace)
subroutine read_grid_inst_eddies(dimid_lon, dimid_lat, ncid, &
leave_trace)
! Libraries:
use jumble, only: deg_to_rad, new_unit, assert, ediff1d
......@@ -51,6 +52,7 @@ contains
use config_m, only: max_radius
integer, intent(out):: dimid_lon, dimid_lat ! dimids in SSH file
integer, intent(in):: ncid
logical, intent(in):: leave_trace
......@@ -69,7 +71,7 @@ contains
uniform_lon_lat, stag_u, stag_v
namelist /read_grid_inst_eddies_nml/ periodic, uniform_lon_lat, stag_u, &
stag_v
integer dimid_lon, dimid_lat, varid_lon, varid_lat, unit
integer varid_lon, varid_lat, unit
real lon_max, lat_max ! longitude and latitude, in degrees
!----------------------------------------------------------------------
......
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