Changeset 2329
- Timestamp:
- 2010-10-28T12:21:58+02:00 (14 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r2287 r2329 4 4 !! Ocean diagnostics : write ocean output files 5 5 !!===================================================================== 6 7 !!---------------------------------------------------------------------- 8 !! * Modules used 6 !! History : OPA ! 1991-03 (M.-A. Foujols) Original code 7 !! 4.0 ! 1991-11 (G. Madec) 8 !! ! 1992-06 (M. Imbard) correction restart file 9 !! ! 1992-07 (M. Imbard) split into diawri and rstwri 10 !! ! 1993-03 (M. Imbard) suppress writibm 11 !! ! 1998-01 (C. Levy) NETCDF format using ioipsl INTERFACE 12 !! ! 1999-02 (E. Guilyardi) name of netCDF files + variables 13 !! 8.2 ! 2000-06 (M. Imbard) Original code (diabort.F) 14 !! NEMO 1.0 ! 2002-06 (A.Bozec, E. Durand) Original code (diainit.F) 15 !! - ! 2002-09 (G. Madec) F90: Free form and module 16 !! - ! 2002-12 (G. Madec) merge of diabort and diainit, F90 17 !! ! 2005-11 (V. Garnier) Surface pressure gradient organization 18 !! 3.2 ! 2008-11 (B. Lemaire) creation from old diawri 19 !!---------------------------------------------------------------------- 20 21 !!---------------------------------------------------------------------- 22 !! dia_wri : create the standart output files 23 !! dia_wri_state : create an output NetCDF file for a single instantaeous ocean state and forcing fields 24 !!---------------------------------------------------------------------- 9 25 USE oce ! ocean dynamics and tracers 10 26 USE dom_oce ! ocean space and time domain … … 36 52 PRIVATE 37 53 38 !! * Accessibility 39 PUBLIC dia_wri ! routines called by step.F90 40 PUBLIC dia_wri_state 41 42 !! * Module variables 43 INTEGER :: & 44 nid_T, nz_T, nh_T, ndim_T, ndim_hT, & ! grid_T file 45 nid_U, nz_U, nh_U, ndim_U, ndim_hU, & ! grid_U file 46 nid_V, nz_V, nh_V, ndim_V, ndim_hV, & ! grid_V file 47 nid_W, nz_W, nh_W, & ! grid_W file 48 ndex(1) ! ??? 49 INTEGER, DIMENSION(jpi*jpj) :: & 50 ndex_hT, ndex_hU, ndex_hV 51 INTEGER, DIMENSION(jpi*jpj*jpk) :: & 52 ndex_T, ndex_U, ndex_V 54 PUBLIC dia_wri ! routines called by step.F90 55 PUBLIC dia_wri_state 56 57 INTEGER :: nid_T, nz_T, nh_T, ndim_T, ndim_hT ! grid_T file 58 INTEGER :: nid_U, nz_U, nh_U, ndim_U, ndim_hU ! grid_U file 59 INTEGER :: nid_V, nz_V, nh_V, ndim_V, ndim_hV ! grid_V file 60 INTEGER :: nid_W, nz_W, nh_W ! grid_W file 61 INTEGER :: ndex(1) ! ??? 62 INTEGER, DIMENSION(jpi*jpj) :: ndex_hT, ndex_hU, ndex_hV 63 INTEGER, DIMENSION(jpi*jpj*jpk) :: ndex_T, ndex_U, ndex_V 53 64 54 65 !! * Substitutions … … 58 69 !!---------------------------------------------------------------------- 59 70 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 60 !! $Id$ 61 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 62 !!---------------------------------------------------------------------- 63 71 !! $Id $ 72 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 73 !!---------------------------------------------------------------------- 64 74 CONTAINS 65 75 66 76 #if defined key_dimgout 67 77 !!---------------------------------------------------------------------- 68 !! dia_wri : create the dimg direct access output file (mpp)78 !! 'key_dimgout' DIMG output file 69 79 !!---------------------------------------------------------------------- 70 80 # include "diawri_dimg.h90" … … 74 84 !! Default option NetCDF output file 75 85 !!---------------------------------------------------------------------- 76 !! dia_wri : create the standart NetCDF output files77 !! dia_wri_state : create an output NetCDF file for a single78 !! instantaeous ocean state and forcing fields79 !!----------------------------------------------------------------------80 86 # if defined key_iomput 87 !!---------------------------------------------------------------------- 88 !! 'key_iomput' use IOM library 89 !!---------------------------------------------------------------------- 81 90 SUBROUTINE dia_wri( kt ) 82 91 !!--------------------------------------------------------------------- … … 87 96 !! 88 97 !! ** Method : use iom_put 89 !!90 !! History :91 !! 3.2 ! 05-11 (B. Lemaire) creation from old diawri92 98 !!---------------------------------------------------------------------- 93 99 USE oce, ONLY : z3d => ta ! use ta as 3D workspace … … 168 174 CALL iom_put( "v_heattr", z2d ) ! heat transport in i-direction 169 175 ENDIF 170 176 ! 171 177 END SUBROUTINE dia_wri 172 178 173 179 #else 180 !!---------------------------------------------------------------------- 181 !! Default option use IOIPSL library 182 !!---------------------------------------------------------------------- 183 174 184 SUBROUTINE dia_wri( kt ) 175 185 !!--------------------------------------------------------------------- … … 183 193 !! At each time step call histdef to compute the mean if ncessary 184 194 !! Each nwrite time step, output the instantaneous or mean fields 195 !!---------------------------------------------------------------------- 196 INTEGER, INTENT( in ) :: kt ! ocean time-step index 185 197 !! 186 !! History : 187 !! ! 91-03 (M.-A. Foujols) Original code 188 !! ! 91-11 (G. Madec) 189 !! ! 92-06 (M. Imbard) correction restart file 190 !! ! 92-07 (M. Imbard) split into diawri and rstwri 191 !! ! 93-03 (M. Imbard) suppress writibm 192 !! ! 98-01 (C. Levy) NETCDF format using ioipsl INTERFACE 193 !! ! 99-02 (E. Guilyardi) name of netCDF files + variables 194 !! 8.5 ! 02-09 (G. Madec) F90: Free form and module 195 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 196 !!---------------------------------------------------------------------- 197 !! * Arguments 198 INTEGER, INTENT( in ) :: kt ! ocean time-step index 199 200 !! * Local declarations 201 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout 202 CHARACTER (len=40) :: & 203 clhstnam, clop, clmx ! temporary names 204 INTEGER :: inum = 11 ! temporary logical unit 205 INTEGER :: & 206 iimi, iima, ipk, it, itmod, & ! temporary integers 207 ijmi, ijma ! " " 208 REAL(wp) :: & 209 zsto, zout, zmax, & ! temporary scalars 210 zjulian, zdt ! " " 211 REAL(wp), DIMENSION(jpi,jpj) :: & 212 zw2d ! temporary workspace 198 LOGICAL :: ll_print = .FALSE. ! =T print and flush numout 199 CHARACTER (len=40) :: clhstnam, clop, clmx ! local names 200 INTEGER :: inum = 11 ! temporary logical unit 201 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 202 REAL(wp) :: zsto, zout, zmax, zjulian, zdt ! local scalars 203 REAL(wp), DIMENSION(jpi,jpj) :: zw2d ! 2D workspace 213 204 !!---------------------------------------------------------------------- 214 205 ! … … 386 377 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 387 378 CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping" , "Kg/m2/s", & ! erp * sn 388 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )389 #endif390 #if defined key_diaspr391 CALL histdef( nid_T, "sosurfps", "Surface Pressure" , "cm" , & ! sp392 379 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 393 380 #endif … … 524 511 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 525 512 #endif 526 #if defined key_diaspr 527 CALL histwrite( nid_T, "sosurfps", it, gps , ndim_hT, ndex_hT ) ! surface pressure 528 #endif 529 zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 513 zw2d(:,:) = FLOAT( nmln(:,:) ) * tmask(:,:,1) 530 514 CALL histwrite( nid_T, "sobowlin", it, zw2d , ndim_hT, ndex_hT ) ! ??? 531 515 … … 586 570 CALL histclo( nid_W ) 587 571 ENDIF 588 572 ! 589 573 END SUBROUTINE dia_wri 590 574 # endif … … 604 588 !! File 'output.init.nc' is created if ninist = 1 (namelist) 605 589 !! File 'output.abort.nc' is created in case of abnormal job end 606 !!607 !! History :608 !! 8.2 ! 00-06 (M. Imbard) Original code (diabort.F)609 !! 8.5 ! 02-06 (A.Bozec, E. Durand) Original code (diainit.F)610 !! 9.0 ! 02-12 (G. Madec) merge of diabort and diainit, F90611 !! " ! 05-11 (V. Garnier) Surface pressure gradient organization612 590 !!---------------------------------------------------------------------- 613 !! * Arguments614 591 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 615 592 INTEGER , INTENT( in ) :: kt ! ocean time-step index 616 617 !! * Local declarations 593 !! 618 594 CHARACTER (len=32) :: clname 619 595 CHARACTER (len=40) :: clop 620 INTEGER :: & 621 id_i , nz_i, nh_i 622 INTEGER, DIMENSION(1) :: & 623 idex ! temprary workspace 624 REAL(wp) :: & 625 zsto, zout, zmax, & 626 zjulian, zdt 596 INTEGER :: id_i , nz_i, nh_i 597 INTEGER, DIMENSION(1) :: idex ! local workspace 598 REAL(wp) :: zsto, zout, zmax, zjulian, zdt 627 599 !!---------------------------------------------------------------------- 628 600 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r2281 r2329 2 2 !! *** diawri_dimg.h90 *** 3 3 !!---------------------------------------------------------------------- 4 !! OPA 9.0 , LOCEAN-IPSL (2005)5 !! $Id $6 !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt4 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 5 !! $Id $ 6 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 7 7 !!---------------------------------------------------------------------- 8 8 9 SUBROUTINE dia_wri (kt)9 SUBROUTINE dia_wri( kt ) 10 10 !!---------------------------------------------------------------------- 11 11 !! *** routine dia_wri *** … … 60 60 !! level 20: spgv(:,:) the surface pressure gradient in Y direction. 61 61 !! 62 !! History 63 !! original : 91-03 () 64 !! additions : 91-11 (G. Madec) 65 !! additions : 92-06 (M. Imbard) correction restart file 66 !! additions : 92-07 (M. Imbard) split into diawri and rstwri 67 !! additions : 93-03 (M. Imbard) suppress writibm 68 !! additions : 94-12 (M. Imbard) acces direct files 69 !! additions : 97-2002 ( Clipper Group ) dimg files 70 !! dec 2003 ( J.M. Molines) f90, mpp output for OPA9.0 71 !! 9.0 ! 05-05 (S. Theetten) add emps fsalt move gps spgu spgv 2 lines below 72 !! 9.0 ! 05-11 (V. Garnier) Surface pressure gradient organization 62 !! History: OPA ! 1997-02 ( Clipper Group ) dimg files 63 !! - ! 2003-12 ( J.M. Molines) f90, mpp output for OPA9.0 64 !! NEMO 1.0 ! 2005-05 (S. Theetten) add emps fsalt move gps spgu spgv 2 lines below 65 !! - ! 2005-11 (V. Garnier) Surface pressure gradient organization 73 66 !!---------------------------------------------------------------------- 74 !! * modules used75 67 USE lib_mpp 76 77 !! * Arguments 68 !! 78 69 INTEGER ,INTENT(in) :: kt 79 80 !! * local declarations 70 !! 81 71 INTEGER :: inbsel, jk 82 !! INTEGER :: iwrite83 72 INTEGER :: iyear,imon,iday 84 73 INTEGER, SAVE :: nmoyct … … 101 90 CHARACTER(LEN=80) :: clmode 102 91 CHARACTER(LEN= 4) :: clver 92 !!---------------------------------------------------------------------- 103 93 ! 104 94 ! Initialization 105 95 ! --------------- 106 96 ! 107 #ifdef key_diaspr108 inbsel = 20109 #else110 97 inbsel = 17 111 #endif 112 #if defined key_flx_core 113 inbsel = 23 114 #endif 115 116 IF( inbsel > jpk) THEN 117 IF( lwp) WRITE(numout,*) & 118 ' STOP inbsel =',inbsel,' is larger than jpk=',jpk 98 99 IF( inbsel > jpk ) THEN 100 IF(lwp) WRITE(numout,*) ' STOP inbsel =',inbsel,' is larger than jpk=',jpk 119 101 STOP 120 102 ENDIF 121 122 103 123 104 iyear = ndastp/10000 … … 180 161 ! fsel(:,:,15) = fsel(:,:,15) + fbt(:,:) 181 162 fsel(:,:,16) = fsel(:,:,16) + ( emps(:,:)-rnf(:,:) ) 182 #ifdef key_diaspr183 fsel(:,:,18) = fsel(:,:,18) + gps(:,:)/g184 #endif185 163 ! 186 164 ! Output of dynamics and tracer fields and selected fields … … 210 188 ! computed from the averaged gradients. 211 189 ! 212 #ifdef key_diaspr213 fsel(:,:,18)= gps(:,:)/g214 fsel(:,:,19)= spgu(:,:)215 fsel(:,:,20)= spgv(:,:)216 #endif217 190 ! mask mean field with tmask except utau vtau (1,2) 218 191 DO jk=3,inbsel … … 256 229 ! fsel(:,:,15) = fbt(:,:) 257 230 fsel(:,:,16) = ( emps(:,:)-rnf(:,:) ) * tmask(:,:,1) 258 #ifdef key_diaspr259 fsel(:,:,18) = gps(:,:) /g260 fsel(:,:,19) = spgu(:,:)261 fsel(:,:,20) = spgv(:,:)262 #endif263 231 ! 264 232 ! qct(:,:) = 0._wp … … 383 351 ! 384 352 9000 FORMAT(a,"_",a,"_y",i4.4,"m",i2.2,"d",i2.2,".dimgproc") 385 353 ! 386 354 END SUBROUTINE dia_wri -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/SBC/cpl_oasis4.F90
r2287 r2329 154 154 IF(lwp) WRITE(numout,*) 155 155 156 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_forced_daily157 158 #if !defined key_oasis4159 ! The following is not necessarily a valid peice of checking160 161 IF(lwp) WRITE(numout,cform_err)162 IF(lwp) WRITE(numout,*) ' key_coupled and key_flx_bulk_* key_flx_forced_daily are incompatible'163 nstop = nstop + 1164 165 #endif166 167 #endif168 169 156 REWIND( numnam ) 170 157 READ ( numnam, nam_mpp ) … … 308 295 IF(lwp) WRITE(numout,*) 309 296 310 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_forced_daily311 312 #if !defined key_oasis4313 ! The problem with the following is that it ASSUMES we're only ever coupling to an atmosphere314 ! which is not necessarily the case. Prevent this test temporarily for NEMOGAM development.315 316 IF(lwp) WRITE(numout,cform_err)317 IF(lwp) WRITE(numout,*) ' key_coupled and key_flx_bulk_... are incompatible'318 nstop = nstop + 1319 320 #endif321 322 #endif323 324 297 ! ----------------------------------------------------------------- 325 298 ! ... Some initialisation -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
r2299 r2329 5 5 !! turbulent closure parameterization 6 6 !!====================================================================== 7 !! History : 3.0 ! 2009-09 (G. Reffray) : Original code 7 !! History : 3.0 ! 2009-09 (G. Reffray) Original code 8 !! 3.3 ! 2010-10 (C. Bricaud) add in the reference 8 9 !!---------------------------------------------------------------------- 9 10 #if defined key_zdfgls || defined key_esopa 10 11 !!---------------------------------------------------------------------- 11 12 !! 'key_zdfgls' Generic Length Scale vertical physics 12 !!----------------------------------------------------------------------13 13 !!---------------------------------------------------------------------- 14 14 !! zdf_gls : update momentum and tracer Kz from a gls scheme … … 33 33 PRIVATE 34 34 35 PUBLIC zdf_gls ! routine called in step module 36 PUBLIC gls_rst ! routine called in step module 35 PUBLIC zdf_gls ! routine called in step module 36 PUBLIC zdf_gls_init ! routine called in step module 37 PUBLIC gls_rst ! routine called in step module 37 38 38 39 LOGICAL , PUBLIC, PARAMETER :: lk_zdfgls = .TRUE. !: TKE vertical mixing flag 39 40 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: en !: now turbulent kinetic energy 40 41 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: mxln !: now mixing length 41 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: zwall !: wall function42 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ustars2 !: Squared surface velocity scale at T-points43 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ustarb2 !: Squared bottom velocity scale at T-points42 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: zwall !: wall function 43 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ustars2 !: Squared surface velocity scale at T-points 44 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: ustarb2 !: Squared bottom velocity scale at T-points 44 45 45 46 ! !!! ** Namelist namzdf_gls ** 46 47 LOGICAL :: ln_crban = .FALSE. ! =T use Craig and Banner scheme 47 LOGICAL :: ln_length_lim = .FALSE. ! use limit on the dissipation rate under stable stratification(Galperin et al., 1988)48 LOGICAL :: ln_length_lim = .FALSE. ! use limit on the dissipation rate under stable stratif. (Galperin et al., 1988) 48 49 LOGICAL :: ln_sigpsi = .FALSE. ! Activate Burchard (2003) modification for k-eps closure AND wave breaking mixing 49 50 REAL(wp) :: rn_epsmin = 1.e-12_wp ! minimum value of dissipation (m2/s3) … … 113 114 !!---------------------------------------------------------------------- 114 115 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 115 !! $Id $116 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)116 !! $Id $ 117 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 117 118 !!---------------------------------------------------------------------- 118 119 119 CONTAINS 120 120 … … 150 150 !!-------------------------------------------------------------------- 151 151 152 IF( kt == nit000 ) CALL zdf_gls_init ! Initialization (first time-step only)153 154 !!--------------------------------------------------------------------155 152 ! Preliminary computing 156 153 … … 905 902 END SUBROUTINE zdf_gls 906 903 904 907 905 SUBROUTINE zdf_gls_init 908 906 !!---------------------------------------------------------------------- … … 920 918 !! 921 919 !!---------------------------------------------------------------------- 922 USE dynzdf_exp 923 USE trazdf_exp 924 ! 925 # if defined key_vectopt_memory 926 INTEGER :: ji, jj, jk ! dummy loop indices 927 # else 928 INTEGER :: jk ! dummy loop indices 929 # endif 930 REAL(wp):: zcr 920 INTEGER :: jk ! dummy loop indices 921 REAL(wp):: zcr ! local scalar 931 922 !! 932 923 NAMELIST/namzdf_gls/rn_emin, rn_epsmin, ln_length_lim, & … … 1232 1223 END SUBROUTINE zdf_gls_init 1233 1224 1225 1234 1226 SUBROUTINE gls_rst( kt, cdrw ) 1235 1227 !!--------------------------------------------------------------------- … … 1244 1236 INTEGER , INTENT(in) :: kt ! ocean time-step 1245 1237 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 1246 ! 1238 !! 1247 1239 INTEGER :: jit, jk ! dummy loop indices 1248 1240 INTEGER :: id1, id2, id3, id4, id5, id6, id7, id8 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/opa.F90
r2325 r2329 82 82 !!---------------------------------------------------------------------- 83 83 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 84 !! $Id $85 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)84 !! $Id $ 85 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 86 86 !!---------------------------------------------------------------------- 87 88 87 CONTAINS 89 88 … … 276 275 CALL zdf_bfr_init ! bottom friction 277 276 IF( lk_zdfric ) CALL zdf_ric_init ! Richardson number dependent Kz 278 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme for Kz 279 IF( lk_zdfkpp ) CALL zdf_kpp_init ! KPP closure scheme for Kz 277 IF( lk_zdftke ) CALL zdf_tke_init ! TKE closure scheme 278 IF( lk_zdfgls ) CALL zdf_gls_init ! GLS closure scheme 279 IF( lk_zdfkpp ) CALL zdf_kpp_init ! KPP closure scheme 280 280 IF( lk_zdftmx ) CALL zdf_tmx_init ! tidal vertical mixing 281 281 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step.F90
r2325 r2329 32 32 USE trcstp ! passive tracer time-stepping (trc_stp routine) 33 33 #endif 34 35 USE zdfgls ! generic length scale case36 34 USE asminc ! assimilation increments (tra_asm_inc, dyn_asm_inc routines) 37 35 USE stpctl ! time stepping control (stp_ctl routine) -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
r2303 r2329 68 68 USE zdfbfr ! bottom friction (zdf_bfr routine) 69 69 USE zdftke ! TKE vertical mixing (zdf_tke routine) 70 USE zdfgls ! GLS vertical mixing (zdf_gls routine) 70 71 USE zdfkpp ! KPP vertical mixing (zdf_kpp routine) 71 72 USE zdfddm ! double diffusion mixing (zdf_ddm routine)
Note: See TracChangeset
for help on using the changeset viewer.