Changeset 719 for trunk/NEMO/OPA_SRC/DIA/diafwb.F90
- Timestamp:
- 2007-10-16T16:59:56+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DIA/diafwb.F90
- Property svn:keywords changed from Id to Author Date Id Revision
r711 r719 4 4 !! Ocean diagnostics: freshwater budget 5 5 !!====================================================================== 6 !! History : 8.2 ! 01-02 (E. Durand) Original code7 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module8 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization9 !!----------------------------------------------------------------------10 6 #if ( defined key_orca_r2 || defined key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled 11 7 !!---------------------------------------------------------------------- 12 8 !! NOT "key_dynspg_rl" and "key_orca_r2 or 4" 13 9 !!---------------------------------------------------------------------- 14 !!----------------------------------------------------------------------15 10 !! dia_fwb : freshwater budget for global ocean configurations 16 11 !!---------------------------------------------------------------------- 12 !! * Modules used 17 13 USE oce ! ocean dynamics and tracers 18 14 USE dom_oce ! ocean space and time domain 19 15 USE phycst ! physical constants 20 USE sbc_oce ! ???21 16 USE zdf_oce ! ocean vertical physics 22 17 USE in_out_manager ! I/O manager 18 USE flxrnf ! ??? 19 USE ocesbc ! ??? 20 USE blk_oce ! ??? 21 USE flxblk ! atmospheric surface quantity 23 22 USE lib_mpp ! distributed memory computing library 24 23 … … 26 25 PRIVATE 27 26 27 !! * Routine accessibility 28 28 PUBLIC dia_fwb ! routine called by step.F90 29 29 30 !! * Shared module variables 30 31 LOGICAL, PUBLIC, PARAMETER :: lk_diafwb = .TRUE. !: fresh water budget flag 31 32 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 33 !! * Module variables 34 REAL(wp) :: & 35 a_emp , a_precip, a_rnf, & 36 a_sshb, a_sshn, a_salb, a_saln, & 37 a_aminus, a_aplus 38 REAL(wp), DIMENSION(4) :: & 39 a_flxi, a_flxo, a_temi, a_temo, a_sali, a_salo 35 40 36 41 !! * Substitutions … … 38 43 # include "vectopt_loop_substitute.h90" 39 44 !!---------------------------------------------------------------------- 40 !! OPA 9.0 , LOCEAN-IPSL (200 6)41 !! $Header: $42 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)45 !! OPA 9.0 , LOCEAN-IPSL (2005) 46 !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/DIA/diafwb.F90,v 1.11 2007/06/29 17:01:51 opalod Exp $ 47 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 43 48 !!---------------------------------------------------------------------- 44 49 … … 50 55 !! 51 56 !! ** Purpose : 57 !! 58 !! ** Method : 59 !! 60 !! History : 61 !! 8.2 ! 01-02 (E. Durand) Original code 62 !! 8.5 ! 02-06 (G. Madec) F90: Free form and module 63 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 52 64 !!---------------------------------------------------------------------- 65 !! * Arguments 53 66 INTEGER, INTENT( in ) :: kt ! ocean time-step index 54 !! 67 68 !! * Local declarations 69 CHARACTER (len=32) :: clname 55 70 INTEGER :: inum ! temporary logical unit 56 71 INTEGER :: ji, jj, jk, jt ! dummy loop indices … … 70 85 71 86 a_emp = 0.e0 87 a_precip = 0.e0 88 a_rnf = 0.e0 72 89 a_sshb = 0.e0 ! valeur de ssh au debut de la simulation 73 90 a_salb = 0.e0 ! valeur de sal au debut de la simulation 91 a_aminus = 0.e0 92 a_aplus = 0.e0 74 93 ! sshb used because diafwb called after tranxt (i.e. after the swap) 75 94 a_sshb = SUM( e1t(:,:) * e2t(:,:) * sshb(:,:) * tmask_i(:,:) ) … … 89 108 a_emp = SUM( e1t(:,:) * e2t(:,:) * emp (:,:) * tmask_i(:,:) ) 90 109 IF( lk_mpp ) CALL mpp_sum( a_emp ) ! sum over the global domain 110 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 111 a_precip = SUM( e1t(:,:) * e2t(:,:) * watm (:,:) * tmask_i(:,:) ) 112 IF( lk_mpp ) CALL mpp_sum( a_precip ) ! sum over the global domain 113 #endif 114 a_rnf = SUM( e1t(:,:) * e2t(:,:) * runoff(:,:) * tmask_i(:,:) ) 115 IF( lk_mpp ) CALL mpp_sum( a_rnf ) ! sum over the global domain 116 117 IF( aminus /= 0.e0 ) a_aminus = a_aminus + ( MIN( aplus, aminus ) / aminus ) 118 IF( aplus /= 0.e0 ) a_aplus = a_aplus + ( MIN( aplus, aminus ) / aplus ) 91 119 92 120 IF( kt == nitend ) THEN … … 114 142 IF( lk_mpp ) CALL mpp_sum( zvol ) ! sum over the global domain 115 143 144 a_aminus = a_aminus / ( nitend - nit000 + 1 ) 145 a_aplus = a_aplus / ( nitend - nit000 + 1 ) 146 116 147 ! Conversion in m3 117 148 a_emp = a_emp * rdttra(1) * 1.e-3 149 a_precip = a_precip * rdttra(1) * 1.e-3 / rday 150 a_rnf = a_rnf * rdttra(1) * 1.e-3 118 151 119 ! emp correction to bring back the mean ssh to zero 152 ! Alpha1=Alpha0-Rest/(Precip+runoff) 153 ! C A U T I O N : precipitations are negative !! 154 120 155 zempnew = a_sshn / ( ( nitend - nit000 + 1 ) * rdt ) * 1.e3 / zarea 121 156 … … 354 389 IF ( kt == nitend .AND. cp_cfg == "orca" ) THEN 355 390 356 CALL ctlopn( inum, 'STRAIT.dat', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 391 clname = 'STRAIT.dat' 392 CALL ctlopn( inum, clname, 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', & 357 393 & 1, numout, lwp, 1 ) 358 394 WRITE(inum,*) 359 395 WRITE(inum,*) 'Net freshwater budget ' 360 396 WRITE(inum,9010) ' emp = ',a_emp, ' m3 =', a_emp /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 397 WRITE(inum,9010) ' precip = ',a_precip,' m3 =', a_precip/(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 398 WRITE(inum,9010) ' a_rnf = ',a_rnf, ' m3 =', a_rnf /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 361 399 WRITE(inum,*) 362 400 WRITE(inum,9010) ' zarea =',zarea … … 379 417 WRITE(inum,9020) ' diff =',(a_saln-a_salb)/zvol,' psu' 380 418 WRITE(inum,9020) ' S-SLevitus=',a_saln/zvol,' psu' 419 WRITE(inum,*) 420 WRITE(inum,*) 'Coeff : ' 421 WRITE(inum,9030) ' Alpha+ = ', a_aplus 422 WRITE(inum,9030) ' Alpha- = ', a_aminus 423 WRITE(inum,*) 381 424 WRITE(inum,*) 382 425 WRITE(inum,*) 'Gibraltar : '
Note: See TracChangeset
for help on using the changeset viewer.