Skip to content

Commit

Permalink
Some small CESM updates. (#812)
Browse files Browse the repository at this point in the history
* Fix OMP setup

* Update meshgrid

* Small updates for CESM

* Add change for UFS
  • Loading branch information
dabail10 committed Feb 1, 2023
1 parent 28fdbeb commit b946a95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion cicecore/cicedyn/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ subroutine init_grid2
! Diagnose OpenMP thread schedule, force order in output
!-----------------------------------------------------------------

! This code does not work in CESM. Needs to be investigated further.
#if defined (_OPENMP)
!$OMP PARALLEL DO ORDERED PRIVATE(iblk) SCHEDULE(runtime)
do iblk = 1, nblocks
Expand Down
6 changes: 6 additions & 0 deletions cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,9 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, &
! if (ndim3 == ncat .and. ncat>1) then
if (ndim3 == ncat .and. ndims == 3) then
call pio_read_darray(File, vardesc, iodesc3d_ncat, work, status)
#ifdef CESMCOUPLED
where (work == PIO_FILL_DOUBLE) work = c0
#endif
if (present(field_loc)) then
do n=1,ndim3
call ice_HaloUpdate (work(:,:,n,:), halo_info, &
Expand All @@ -758,6 +761,9 @@ subroutine read_restart_field(nu,nrec,work,atype,vname,ndim3,diag, &
! elseif (ndim3 == 1) then
elseif (ndim3 == 1 .and. ndims == 2) then
call pio_read_darray(File, vardesc, iodesc2d, work, status)
#ifdef CESMCOUPLED
where (work == PIO_FILL_DOUBLE) work = c0
#endif
if (present(field_loc)) then
call ice_HaloUpdate (work(:,:,1,:), halo_info, &
field_loc, field_type)
Expand Down
2 changes: 0 additions & 2 deletions cicecore/shared/ice_fileunits.F90
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ module ice_fileunits
integer (kind=int_kind), public :: &
nu_diag = ice_stdout ! diagnostics output file, unit number may be overwritten

#ifdef CESMCOUPLED
logical (kind=log_kind), public :: &
nu_diag_set = .false. ! flag to indicate whether nu_diag is already set
#endif

integer (kind=int_kind), public :: &
ice_IOUnitsMinUnit = 11, & ! do not use unit numbers below
Expand Down

0 comments on commit b946a95

Please sign in to comment.