Changeset 711 for trunk/NEMO/OPA_SRC
- Timestamp:
- 2007-10-10T17:40:18+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DIA/diafwb.F90
r708 r711 4 4 !! Ocean diagnostics: freshwater budget 5 5 !!====================================================================== 6 !! History : 8.2 ! 01-02 (E. Durand) Original code 7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 9 !!---------------------------------------------------------------------- 6 10 #if ( defined key_orca_r2 || defined key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled 7 11 !!---------------------------------------------------------------------- 8 12 !! NOT "key_dynspg_rl" and "key_orca_r2 or 4" 9 13 !!---------------------------------------------------------------------- 14 !!---------------------------------------------------------------------- 10 15 !! dia_fwb : freshwater budget for global ocean configurations 11 16 !!---------------------------------------------------------------------- 12 !! * Modules used13 17 USE oce ! ocean dynamics and tracers 14 18 USE dom_oce ! ocean space and time domain 15 USE sbc_oce ! surface boundary condition: ocean 19 USE phycst ! physical constants 20 USE sbc_oce ! ??? 16 21 USE zdf_oce ! ocean vertical physics 17 USE phycst ! physical constants18 22 USE in_out_manager ! I/O manager 19 23 USE lib_mpp ! distributed memory computing library … … 22 26 PRIVATE 23 27 24 !! * Routine accessibility25 28 PUBLIC dia_fwb ! routine called by step.F90 26 29 27 !! * Shared module variables28 30 LOGICAL, PUBLIC, PARAMETER :: lk_diafwb = .TRUE. !: fresh water budget flag 29 31 30 !! * Module variables 31 REAL(wp) :: & 32 a_emp , a_precip, a_rnf, & 33 a_sshb, a_sshn, a_salb, a_saln, & 34 a_aminus, a_aplus 35 REAL(wp), DIMENSION(4) :: & 36 a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 32 REAL(wp) :: a_emp , & 33 & a_sshb, a_sshn, a_salb, a_saln 34 REAL(wp), DIMENSION(4) :: a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 37 35 38 36 !! * Substitutions … … 40 38 # include "vectopt_loop_substitute.h90" 41 39 !!---------------------------------------------------------------------- 42 !! OPA 9.0 , LOCEAN-IPSL (200 5)43 !! $ Id$44 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt40 !! OPA 9.0 , LOCEAN-IPSL (2006) 41 !! $Header: $ 42 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 45 43 !!---------------------------------------------------------------------- 46 44 … … 52 50 !! 53 51 !! ** Purpose : 54 !!55 !! ** Method :56 !!57 !! History :58 !! 8.2 ! 01-02 (E. Durand) Original code59 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module60 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization61 52 !!---------------------------------------------------------------------- 62 !! * Arguments63 53 INTEGER, INTENT( in ) :: kt ! ocean time-step index 64 65 !! * Local declarations 66 CHARACTER (len=32) :: clname 54 !! 67 55 INTEGER :: inum ! temporary logical unit 68 56 INTEGER :: ji, jj, jk, jt ! dummy loop indices … … 82 70 83 71 a_emp = 0.e0 84 a_precip = 0.e085 a_rnf = 0.e086 72 a_sshb = 0.e0 ! valeur de ssh au debut de la simulation 87 73 a_salb = 0.e0 ! valeur de sal au debut de la simulation 88 a_aminus = 0.e089 a_aplus = 0.e090 74 ! sshb used because diafwb called after tranxt (i.e. after the swap) 91 75 a_sshb = SUM( e1t(:,:) * e2t(:,:) * sshb(:,:) * tmask_i(:,:) ) … … 105 89 a_emp = SUM( e1t(:,:) * e2t(:,:) * emp (:,:) * tmask_i(:,:) ) 106 90 IF( lk_mpp ) CALL mpp_sum( a_emp ) ! sum over the global domain 107 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily108 a_precip = SUM( e1t(:,:) * e2t(:,:) * watm (:,:) * tmask_i(:,:) )109 IF( lk_mpp ) CALL mpp_sum( a_precip ) ! sum over the global domain110 #endif111 a_rnf = SUM( e1t(:,:) * e2t(:,:) * runoff(:,:) * tmask_i(:,:) )112 IF( lk_mpp ) CALL mpp_sum( a_rnf ) ! sum over the global domain113 114 IF( aminus /= 0.e0 ) a_aminus = a_aminus + ( MIN( aplus, aminus ) / aminus )115 IF( aplus /= 0.e0 ) a_aplus = a_aplus + ( MIN( aplus, aminus ) / aplus )116 91 117 92 IF( kt == nitend ) THEN … … 139 114 IF( lk_mpp ) CALL mpp_sum( zvol ) ! sum over the global domain 140 115 141 a_aminus = a_aminus / ( nitend - nit000 + 1 )142 a_aplus = a_aplus / ( nitend - nit000 + 1 )143 144 116 ! Conversion in m3 145 117 a_emp = a_emp * rdttra(1) * 1.e-3 146 a_precip = a_precip * rdttra(1) * 1.e-3 / rday147 a_rnf = a_rnf * rdttra(1) * 1.e-3148 118 149 ! Alpha1=Alpha0-Rest/(Precip+runoff) 150 ! C A U T I O N : precipitations are negative !! 151 119 ! emp correction to bring back the mean ssh to zero 152 120 zempnew = a_sshn / ( ( nitend - nit000 + 1 ) * rdt ) * 1.e3 / zarea 153 121 … … 386 354 IF ( kt == nitend .AND. cp_cfg == "orca" ) THEN 387 355 388 clname = 'STRAIT.dat' 389 CALL ctlopn( inum, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 356 CALL ctlopn( inum, 'STRAIT.dat', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 390 357 & 1, numout, lwp, 1 ) 391 358 WRITE(inum,*) 392 359 WRITE(inum,*) 'Net freshwater budget ' 393 360 WRITE(inum,9010) ' emp = ',a_emp, ' m3 =', a_emp /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 394 WRITE(inum,9010) ' precip = ',a_precip,' m3 =', a_precip/(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv'395 WRITE(inum,9010) ' a_rnf = ',a_rnf, ' m3 =', a_rnf /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv'396 361 WRITE(inum,*) 397 362 WRITE(inum,9010) ' zarea =',zarea … … 414 379 WRITE(inum,9020) ' diff =',(a_saln-a_salb)/zvol,' psu' 415 380 WRITE(inum,9020) ' S-SLevitus=',a_saln/zvol,' psu' 416 WRITE(inum,*)417 WRITE(inum,*) 'Coeff : '418 WRITE(inum,9030) ' Alpha+ = ', a_aplus419 WRITE(inum,9030) ' Alpha- = ', a_aminus420 WRITE(inum,*)421 381 WRITE(inum,*) 422 382 WRITE(inum,*) 'Gibraltar : '
Note: See TracChangeset
for help on using the changeset viewer.