#if ! defined(ARCHIVE_SELECT) subroutine archiv(n, kkout, iyear,iday,ihour, intvl,dtime0) ! Routine for dumping instantaneous fields into binary. ! Set frequency in blkdat.input (dsurfq) ! To just dump selected ice fields, use ARCHIVE_ICE_ONLY flag ! (changes from JB, added by TW) use mod_xc ! HYCOM communication interface use mod_za ! HYCOM I/O interface #if defined (NERSC_VERSION) use mod_year_info use mod_hycom_nersc use mod_common_ice #if defined (WAVES) use mod_common_wavesice, only: dfloe,mwd_out,swh_out,mwp_out #endif #endif implicit none c include 'common_blocks.h' c !inputs integer :: n, kkout, iyear,iday,ihour character :: intvl*3 real*8 :: dtime0 !! real :: dtime1 real :: sssc,sstc c include 'stmt_fns.h' c c --- write an archive file. c character(len=80) :: flnm_arc type(year_info) tt0,tt character*80 cformat character*6 ctime,ctime0 character*8 cdate,cdate0 character*2 cdm0,cmin0,csec0 character*2 cdm ,cmin ,csec integer imin,isec integer year0,mon0,dd0,year1,mon1,dd1 integer i,j,k,ktr,l,ldot,nop,nopa real coord,xmin,xmax #if defined (NERSC_VERSION) real fld(1-nbdy:idm+nbdy,1-nbdy:jdm+nbdy) character*3 cmem C --- JB if nersc version iday=iday-1 iday = iday-1 #endif if (time.01) out_mask = 1. fld = out_mask*fld call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'swh ',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = out_mask*mwp_out call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'mwp ',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = out_mask*mwd_out call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'mwd ',nstep,time,0,coord,xmin,xmax call flush(nop) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! write "effective" wave fields (limited no of dirns) !! - for diagnostics !! - wave outputs 0 if swh<1cm fld = swh_eff out_mask = 0. where (fld>.01) out_mask = 1. fld = out_mask*fld call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'swh_eff ',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = out_mask*mwp_eff call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'mwp_eff ',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = out_mask*mwd_eff call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'mwd_eff ',nstep,time,0,coord,xmin,xmax call flush(nop) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !wave stresses !-total on ice+ocean fld = taux_wav call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'taux_wav',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = tauy_wav call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'tauy_wav',nstep,time,0,coord,xmin,xmax call flush(nop) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !wave stresses !-ice fld = taux_wav_ice call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'taux_wvi',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = tauy_wav_ice call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'tauy_wvi',nstep,time,0,coord,xmin,xmax call flush(nop) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !wave stresses !-ocean fld = taux_wav_ocn call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'taux_wvo',nstep,time,0,coord,xmin,xmax call flush(nop) endif fld = tauy_wav_ocn call zaiowr(fld(1-nbdy,1-nbdy),ip,.true., & xmin,xmax, nopa, .false.) if (mnproc.eq.1) then write (nop,117) 'tauy_wvo',nstep,time,0,coord,xmin,xmax call flush(nop) endif !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! c 117 format (a8,' =',i11,f11.3,i3,f7.3,1p2e16.7) c c close (unit=nop) !!finished .b file call zaiocl(nopa) !!finished .a file c call xcsync(no_flush) c return end subroutine archiv_waves #endif/*WAVES*/ #endif/*NERSC_VERSION*/ c> Revision history c> c> Nov 2002 - additional surface data in .txt output c> Jun 2006 - dsur1p for .txt only surface output c> Jun 2006 - archi .txt output c> May 2007 - no diaflx output for K-profile based mixed layer models c> May 2007 - removed mixed layer fields and th3d from the archive file c> Feb 2008 - optionally added steric SSH to the archive file c> Jun 2008 - added archiv_tile for per-tile archive output c> Feb 2015 - added ARCHIVE_ICE_ONLY - only ice variables are dumped (TW from JB) c> Feb 2015 - added archive_waves (TW)