!!---------------------------------------------------------------------- !! *** tau_coupled.h90 *** !!---------------------------------------------------------------------- !!---------------------------------------------------------------------- !! tau : update the surface stress - coupled ocean-atmosphere !! case, without sea-ice !!---------------------------------------------------------------------- !! * Modules used USE ioipsl ! NetCDF library !!---------------------------------------------------------------------- !! OPA 9.0 , LODYC-IPSL (2003) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE tau( kt ) !!--------------------------------------------------------------------- !! *** ROUTINE tau *** !! !! ** Purpose : provide to the ocean the stress at each time step !! !! ** Method : Read wind stress from a coupled Atmospheric model !! - horizontal interpolation is done !! They are given in the geographic referential !! (zonal and meridional components at both U- and V-points) !! CAUTION: never mask the surface stress field ! !! !! ** Action : update at each time-step the two components of the !! surface stress in both (i,j) and geographical referencial !! !! References : The OASIS User Guide, Version 2.0, CERFACS/TR 95/46 !! !! History : !! 7.0 ! 94-03 (L. Terray) Original code !! ! 96-07 (Laurent TERRAY) OASIS 2 Version !! ! 96-11 (Eric Guilyardi) horizontal interpolation !! ! 98-04 (M.A Foujols, S. Valcke, M. Imbard) OASIS2.2 !! 8.5 ! 02-11 (G. Madec) F90: Free form and module !!---------------------------------------------------------------------- !! * Arguments INTEGER, INTENT( in ) :: kt ! ocean time step !! * Local declarations INTEGER :: ji,jj,jf INTEGER :: itm1,isize,iflag,icpliter,info,inuread,index REAL(wp), DIMENSION(jpidta,jpjdta) :: & ztaux , ztauxv, & ! ??? ztauy , ztauyu ! REAL(wp), DIMENSION(jpi,jpj) :: & ztauxg, ztauyg ! ??? ! Addition for SIPC CASE CHARACTER (len=3) :: clmodinf ! Header or not CHARACTER (len=3) :: cljobnam_r ! Experiment name in the field brick, if any INTEGER ,DIMENSION(3) :: infos ! infos in the field brick, if any !!--------------------------------------------------------------------- ! 0. Initialization ! ----------------- isize = jpiglo * jpjglo itm1 = ( kt - nit000 + 1 ) - 1 ! 1. Reading wind stress from coupler ! ----------------------------------- IF( MOD(kt,nexco) == 1 )THEN ! Test what kind of message passing we are using IF (cchan == 'PIPE') THEN ! UNIT number for fields inuread = 99 ! exchanges from to atmosphere=CPL to ocean DO jf = 1, ntauc2o ! CALL PIPE_Model_Recv(cpl_readtau(jf), icpliter, numout) OPEN (inuread, FILE=cpl_f_readtau(jf), FORM='UNFORMATTED') IF( jf == 1 ) CALL locread( cpl_readtau(jf), ztaux , isize, inuread, iflag, numout ) IF( jf == 2 ) CALL locread( cpl_readtau(jf), ztauxv, isize, inuread, iflag, numout ) IF( jf == 3 ) CALL locread( cpl_readtau(jf), ztauy , isize, inuread, iflag, numout ) IF( jf == 4 ) CALL locread( cpl_readtau(jf), ztauyu, isize, inuread, iflag, numout ) CLOSE (inuread) END DO ELSE IF( cchan == 'SIPC' ) THEN ! Define IF a header must be encapsulated within the field brick : clmodinf = 'NOT' ! as $MODINFO in namcouple ! ! reading of input field zonal wind stress SOZOTAUX index = 1 ! CALL SIPC_Read_Model(index, isize, clmodinf, cljobnam_r, infos, ztaux) ! reading of input field meridional wind stress SOZOTAU2 (at v point) index = 2 ! CALL SIPC_Read_Model(index, isize, clmodinf, cljobnam_r, infos, ztaux2) ! reading of input field zonal wind stress SOMETAUY index = 3 ! CALL SIPC_Read_Model(index, isize, clmodinf, cljobnam_r, infos, ztauy) ! reading of input field meridional wind stress SOMETAU2 (at u point) index = 4 ! CALL SIPC_Read_Model(index, isize, clmodinf, cljobnam_r, infos, ztauy2) ! ELSE IF( cchan == 'CLIM' ) THEN ! ! exchanges from atmosphere=CPL to ocean DO jf = 1, ntauc2o IF (jf == 1) CALL CLIM_Import ( cpl_readtau(jf), itm1, ztaux , info ) IF (jf == 2) CALL CLIM_Import ( cpl_readtau(jf), itm1, ztauxv, info ) IF (jf == 3) CALL CLIM_Import ( cpl_readtau(jf), itm1, ztauy , info ) IF (jf == 4) CALL CLIM_Import ( cpl_readtau(jf), itm1, ztauyu, info ) IF ( info /= CLIM_Ok) THEN WRITE(numout,*)'Pb in reading ', cpl_readtau(jf), jf WRITE(numout,*)'Couplage itm1 is = ',itm1 WRITE(numout,*)'CLIM error code is = ', info WRITE(numout,*)'STOP in Fromcpl' STOP 'tau.coupled.h' ENDIF END DO ENDIF ! 2. CHANGING DATA GRID COORDINATES --> GLOBAL GRID COORDINATES ! ------------------------------------------------------------- DO jj = 1, jpj DO ji = 1, jpi tauxg (ji,jj) = ztaux ( mig(ji), mjg(jj) ) tauyg (ji,jj) = ztauy ( mig(ji), mjg(jj) ) ztauxg(ji,jj) = ztauxv( mig(ji), mjg(jj) ) ztauyg(ji,jj) = ztauyu( mig(ji), mjg(jj) ) END DO END DO CALL repcmo( tauxg, ztauyg, ztauxg, tauyg, taux, tauy, kt ) ENDIF END SUBROUTINE flx