diff --git a/Inst_eddies/inst_eddies.f90 b/Inst_eddies/inst_eddies.f90 index f7b9cfdaca72e7b0b5477d170da7a1c019f294f2..a5602f7ab0431bd5dd5b18dc930ac1e1449b8b08 100644 --- a/Inst_eddies/inst_eddies.f90 +++ b/Inst_eddies/inst_eddies.f90 @@ -41,7 +41,7 @@ program inst_eddies ! the grid is global real lon_max, lat_max ! longitudes and latitudes, in degrees - real step(2) ! longitude and latitude steps, in rad + real step_deg(2), step(2) ! longitude and latitude steps, in degrees and rad logical periodic ! grid is periodic in longitude real time @@ -77,7 +77,7 @@ program inst_eddies character(len = 200) iomsg namelist /main_nml/ min_amp, max_radius, min_radius - namelist /grid_nml/ corner_deg, nlon, nlat + namelist /grid_nml/ corner_deg, step_deg, nlon, nlat !-------------------------------------------------------------- @@ -127,8 +127,9 @@ program inst_eddies call assert(lon_max > corner_deg(1) .and. lat_max > corner_deg(2), & "inst_eddies coordinate order") - step = [(lon_max - corner_deg(1)) / (nlon - 1), & - (lat_max - corner_deg(2)) / (nlat - 1)] * deg_to_rad + step_deg = [(lon_max - corner_deg(1)) / (nlon - 1), & + (lat_max - corner_deg(2)) / (nlat - 1)] + step = step_deg * deg_to_rad ! As we are requiring the grid spacing to be uniform, the value of ! "periodic" may be deduced from the values of step(1) and nlon: