Skip to content

Commit

Permalink
Setup for PIO #34
Browse files Browse the repository at this point in the history
  • Loading branch information
nichannah committed Sep 23, 2019
1 parent 1a12961 commit 56500e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bld/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ setenv NICECAT 5 # number of ice thickness categories
if ( $AusCOM == 'yes' ) then
setenv CPLLIBDIR $LIBACCESSOM2_ROOT/build/lib
setenv CPLLIBS '-L$(CPLLIBDIR)/ -laccessom2 -L$(SRCDIR)/pio-2.4.3/usr/lib/ -lpiof'
setenv CPLLIBS '-L$(CPLLIBDIR)/ -laccessom2 -L$(SRCDIR)/pio-2.4.4/usr/lib/ -lpiof'
setenv CPLINCDIR $LIBACCESSOM2_ROOT/build
setenv OASISDIR $CPLINCDIR/oasis3-mct-prefix/src/oasis3-mct/Linux/build/lib/
setenv CPL_INCS '-I$(CPLINCDIR)/include -I$(OASISDIR)/psmile.MPI1 -I$(OASISDIR)/mct -I$(SRCDIR)/pio-2.4.3/usr/include/'
setenv CPL_INCS '-I$(CPLINCDIR)/include -I$(OASISDIR)/psmile.MPI1 -I$(OASISDIR)/mct -I$(SRCDIR)/pio-2.4.4/usr/include/'
endif
### Setup the version string, this is the git hash of the commit used to build
Expand Down
4 changes: 2 additions & 2 deletions io_pio/ice_pio.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module ice_pio

subroutine ice_pio_init(mode, filename, File, clobber, cdf64)

use shr_pio_mod, only: shr_pio_getiosys, shr_pio_getiotype
use pio_types, only: pio_iotype_netcdf4p

implicit none
character(len=*) , intent(in), optional :: mode
Expand All @@ -65,7 +65,7 @@ subroutine ice_pio_init(mode, filename, File, clobber, cdf64)
logical, save :: first_call = .true.

ice_pio_subsystem => shr_pio_getiosys(inst_name)
pio_iotype = shr_pio_getiotype(inst_name)
pio_iotype = pio_iotype_netcdf4p

if (present(mode) .and. present(filename) .and. present(File)) then

Expand Down
4 changes: 2 additions & 2 deletions io_pio/ice_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module ice_restart
use ice_kinds_mod
use ice_restart_shared, only: &
restart, restart_ext, restart_dir, restart_file, pointer_file, &
runid, runtype, use_restart_time, restart_format, lcdf64, lenstr
runid, runtype, use_restart_time, restart_format, lenstr
use ice_pio
use pio

Expand Down Expand Up @@ -180,7 +180,7 @@ subroutine init_restart_write(filename_spec)

File%fh=-1
call ice_pio_init(mode='write',filename=trim(filename), File=File, &
clobber=.true., cdf64=lcdf64 )
clobber=.true.)

status = pio_put_att(File,pio_global,'istep1',istep1)
status = pio_put_att(File,pio_global,'time',time)
Expand Down
1 change: 1 addition & 0 deletions source/ice_read_write.F90
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module ice_read_write
use ice_blocks, only: nx_block, ny_block, nghost
use ice_exit, only: abort_ice

#define ncdf
#ifdef ncdf
use netcdf
#endif
Expand Down

0 comments on commit 56500e4

Please sign in to comment.