Skip to content

Commit

Permalink
Adjust longitude convention of rotated lat/lon grids
Browse files Browse the repository at this point in the history
in output netcdf file.
  • Loading branch information
GeorgeGayno-NOAA committed Feb 4, 2022
1 parent d00235e commit 474401f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sorc/chgres_cube.fd/model_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,12 @@ subroutine define_input_grid_grib2_gg(localpet,npets)
print*,'after gdswzd lat/lon corner ni/nj', rlat_corner(ip1_input,jp1_input),rlon_corner(ip1_input,jp1_input)
print*,'after gdswzd lat/lon corner mid ', rlat_corner(i_input/2,j_input/2),rlon_corner(i_input/2,j_input/2)
print*,'after gdswzd max/min corner ',maxval(rlat_corner),minval(rlat_corner),maxval(rlon_corner),minval(rlon_corner)

if (gfld%igdtnum == 32769) then
where(rlon > 180.0) rlon = rlon - 360.0
where(rlon_corner > 180.0) rlon_corner = rlon_corner - 360.0
endif

ncid = 34
error = nf90_create("./latlon.nc", IOR(NF90_NETCDF4,NF90_CLASSIC_MODEL), &
ncid, initialsize=0, chunksize=fsize)
Expand Down

0 comments on commit 474401f

Please sign in to comment.