!!---------------------------------------------------------------------- !! *** flx_forced_daily *** !!---------------------------------------------------------------------- !!---------------------------------------------------------------------- !! flx : define the thermohaline fluxes for the ocean !! in forced mode using flux formulation (not bulk) !! (read in NetCDF file) !!---------------------------------------------------------------------- !! * Modules used C A U T I O N already defined in flxmod.F90 !! * Module variables INTEGER :: & numflx, & ! logical unit for surface fluxes data ndayflx ! new day for ecmwf flx forcing REAL(wp), DIMENSION(jpi,jpj,3) :: & flxdta ! 3 consecutive daily fluxes !!---------------------------------------------------------------------- !! OPA 9.0 , LOCEAN-IPSL (2005) !! $Header$ !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt !!---------------------------------------------------------------------- CONTAINS SUBROUTINE flx( kt ) !!--------------------------------------------------------------------- !! *** ROUTINE flx *** !! !! ** Purpose : provide the thermohaline fluxes (heat and freshwater) !! to the ocean at each time step. !! !! ** Method : READ daily flux file in NetCDF files !! the net downward radiative flux qsr 1 (watt/m2) !! the net downward heat flux q 2 (watt/m2) !! the net upward water emp 3 (kg/m2/s) !! (evaporation - precipitation) !! !! History : !! ! 90-03 (O. Marti and P. Dandin) Original code !! ! 92-07 (M. Imbard) !! ! 96-11 (E. Guilyardi) Daily AGCM input files !! ! 99-11 (M. Imbard) NetCDF FORMAT with io-ipsl !! ! 00-10 (J.-P. Boulanger) adjusted for reading any !! daily wind stress data including a climatology !! ! 01-09 (A. Lazar and C. Levy) config with no ice model !! 8.5 ! 03-07 (G. Madec) F90: Free form and module !!---------------------------------------------------------------------- !! * Modules used USE iom USE flx_oce !! * arguments INTEGER, INTENT( in ) :: kt ! ocean time step !!--------------------------------------------------------------------- ! First call kt=nit000 ! -------------------- IF( kt == nit000 ) THEN ndayflx = 0 ! Initialization ! open the file IF(lwp) THEN WRITE(numout,*) ' ' WRITE(numout,*) ' **** Routine flx_forced_daily.h90' WRITE(numout,*) ' ' WRITE(numout,*) ' daily fluxes Q, Qsr, EmP' ENDIF CALL iom_open ( 'flx_1d.nc', numflx ) ENDIF ! Read daily fluxes in flxdta(1,1,jm) ! 1. Qtot (w/m2) ! 2. Qsr (w/m2) ! 3. emp (kg/m2/s) IF( ndayflx /= nday ) THEN ndayflx = nday ! read Qtot CALL iom_get ( numflx, jpdom_data, 'sohefldo', flxdta(:,:,1), nday_year ) ! read qsr CALL iom_get ( numflx, jpdom_data, 'soshfldo', flxdta(:,:,2), nday_year ) ! read emp CALL iom_get ( numflx, jpdom_data, 'sowaflup', flxdta(:,:,3), nday_year ) IF(lwp) WRITE (numout,*)'Lecture flx record :',nday IF( nit000 == 1 ) THEN IF( kt == nit000 ) THEN IF(lwp) THEN WRITE(numout,*) WRITE(numout,*) ' read daily fluxes ok' WRITE(numout,*) WRITE(numout,*) ' Q * .1, day: ',ndastp CALL prihre( flxdta(:,:,1),jpi,jpj,1,jpi,20,1,jpj,10,.1,numout ) WRITE(numout,*) WRITE(numout,*) ' QSR * .1, day: ',ndastp CALL prihre( flxdta(:,:,2),jpi,jpj,1,jpi,20,1,jpj,10,.1,numout ) WRITE(numout,*) WRITE(numout,*) ' E-P *86400, day: ',ndastp CALL prihre( flxdta(:,:,3),jpi,jpj,1,jpi,20,1,jpj,10,86400.,numout ) WRITE(numout,*) ' ' ENDIF ENDIF ENDIF ENDIF p_qt (:,:) = flxdta(:,:,1) p_qsr(:,:) = flxdta(:,:,2) p_emp(:,:) = flxdta(:,:,3) ! Closing all files ! ----------------- IF( kt == nitend ) CALL iom_close ( numflx ) END SUBROUTINE flx