Changeset 13237 for NEMO/trunk/src/OCE/DIA/diawri.F90
- Timestamp:
- 2020-07-03T11:12:53+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/src/OCE/DIA/diawri.F90
r13226 r13237 85 85 !! * Substitutions 86 86 # include "do_loop_substitute.h90" 87 # include "domzgr_substitute.h90" 87 88 !!---------------------------------------------------------------------- 88 89 !! NEMO/OCE 4.0 , NEMO Consortium (2018) … … 136 137 CALL iom_put("e3v_0", e3v_0(:,:,:) ) 137 138 ! 138 CALL iom_put( "e3t" , e3t(:,:,:,Kmm) ) 139 CALL iom_put( "e3u" , e3u(:,:,:,Kmm) ) 140 CALL iom_put( "e3v" , e3v(:,:,:,Kmm) ) 141 CALL iom_put( "e3w" , e3w(:,:,:,Kmm) ) 142 IF( iom_use("e3tdef") ) & 143 CALL iom_put( "e3tdef" , ( ( e3t(:,:,:,Kmm) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 ) 144 145 IF( ll_wd ) THEN 146 CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)*tmask(:,:,1) ) ! sea surface height (brought back to the reference used for wetting and drying) 139 IF ( iom_use("e3t") .OR. iom_use("e3tdef") ) THEN ! time-varying e3t 140 DO jk = 1, jpk 141 z3d(:,:,jk) = e3t(:,:,jk,Kmm) 142 END DO 143 CALL iom_put( "e3t" , z3d(:,:,:) ) 144 CALL iom_put( "e3tdef" , ( ( z3d(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 ) 145 ENDIF 146 IF ( iom_use("e3u") ) THEN ! time-varying e3u 147 DO jk = 1, jpk 148 z3d(:,:,jk) = e3u(:,:,jk,Kmm) 149 END DO 150 CALL iom_put( "e3u" , z3d(:,:,:) ) 151 ENDIF 152 IF ( iom_use("e3v") ) THEN ! time-varying e3v 153 DO jk = 1, jpk 154 z3d(:,:,jk) = e3v(:,:,jk,Kmm) 155 END DO 156 CALL iom_put( "e3v" , z3d(:,:,:) ) 157 ENDIF 158 IF ( iom_use("e3w") ) THEN ! time-varying e3w 159 DO jk = 1, jpk 160 z3d(:,:,jk) = e3w(:,:,jk,Kmm) 161 END DO 162 CALL iom_put( "e3w" , z3d(:,:,:) ) 163 ENDIF 164 165 IF( ll_wd ) THEN ! sea surface height (brought back to the reference used for wetting and drying) 166 CALL iom_put( "ssh" , (ssh(:,:,Kmm)+ssh_ref)*tmask(:,:,1) ) 147 167 ELSE 148 168 CALL iom_put( "ssh" , ssh(:,:,Kmm) ) ! sea surface height … … 172 192 ENDIF 173 193 194 #if ! defined key_qco 174 195 CALL iom_put( "rhop", rhop(:,:,:) ) ! 3D potential density (sigma0) 196 #endif 175 197 176 198 IF ( iom_use("taubot") ) THEN ! bottom stress … … 210 232 211 233 IF( ln_zad_Aimp ) ww = ww + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 212 !213 234 CALL iom_put( "woce", ww ) ! vertical velocity 235 214 236 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value 215 237 ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. … … 417 439 ! 418 440 REAL(wp), DIMENSION(jpi,jpj) :: zw2d ! 2D workspace 419 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace441 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d, ze3t, zgdept ! 3D workspace 420 442 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 421 443 !!---------------------------------------------------------------------- … … 457 479 it = kt 458 480 itmod = kt - nit000 + 1 481 482 ! store e3t for subsitute 483 DO jk = 1, jpk 484 ze3t (:,:,jk) = e3t (:,:,jk,Kmm) 485 zgdept(:,:,jk) = gdept(:,:,jk,Kmm) 486 END DO 459 487 460 488 … … 571 599 DEALLOCATE(zw3d_abl) 572 600 ENDIF 601 ! 573 602 574 603 ! Declare all the output fields as NETCDF variables … … 580 609 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 581 610 IF( .NOT.ln_linssh ) THEN 582 CALL histdef( nid_T, "vovvle3t", "Level thickness" , "m" ,& ! e3t (:,:,:,Kmm)611 CALL histdef( nid_T, "vovvle3t", "Level thickness" , "m" ,& ! e3t n 583 612 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 584 CALL histdef( nid_T, "vovvldep", "T point depth" , "m" ,& ! e3t (:,:,:,Kmm)613 CALL histdef( nid_T, "vovvldep", "T point depth" , "m" ,& ! e3t n 585 614 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 586 CALL histdef( nid_T, "vovvldef", "Squared level deformation" , "%^2" ,& ! e3t (:,:,:,Kmm)615 CALL histdef( nid_T, "vovvldef", "Squared level deformation" , "%^2" ,& ! e3t n 587 616 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 588 617 ENDIF … … 768 797 769 798 IF( .NOT.ln_linssh ) THEN 770 CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) * e3t(:,:,:,Kmm) , ndim_T , ndex_T ) ! heat content771 CALL histwrite( nid_T, "vosaline", it, ts(:,:,:,jp_sal,Kmm) * e3t(:,:,:,Kmm) , ndim_T , ndex_T ) ! salt content772 CALL histwrite( nid_T, "sosstsst", it, ts(:,:,1,jp_tem,Kmm) * e3t(:,:,1,Kmm) , ndim_hT, ndex_hT ) ! sea surface heat content773 CALL histwrite( nid_T, "sosaline", it, ts(:,:,1,jp_sal,Kmm) * e3t(:,:,1,Kmm) , ndim_hT, ndex_hT ) ! sea surface salinity content799 CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T ) ! heat content 800 CALL histwrite( nid_T, "vosaline", it, ts(:,:,:,jp_sal,Kmm) * ze3t(:,:,:) , ndim_T , ndex_T ) ! salt content 801 CALL histwrite( nid_T, "sosstsst", it, ts(:,:,1,jp_tem,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT ) ! sea surface heat content 802 CALL histwrite( nid_T, "sosaline", it, ts(:,:,1,jp_sal,Kmm) * ze3t(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity content 774 803 ELSE 775 804 CALL histwrite( nid_T, "votemper", it, ts(:,:,:,jp_tem,Kmm) , ndim_T , ndex_T ) ! temperature … … 779 808 ENDIF 780 809 IF( .NOT.ln_linssh ) THEN 781 zw3d(:,:,:) = ( ( e3t(:,:,:,Kmm) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2782 CALL histwrite( nid_T, "vovvle3t", it, e3t (:,:,:,Kmm), ndim_T , ndex_T ) ! level thickness783 CALL histwrite( nid_T, "vovvldep", it, gdept(:,:,:,Kmm) , ndim_T , ndex_T ) ! t-point depth810 zw3d(:,:,:) = ( ( ze3t(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 811 CALL histwrite( nid_T, "vovvle3t", it, ze3t (:,:,:) , ndim_T , ndex_T ) ! level thickness 812 CALL histwrite( nid_T, "vovvldep", it, zgdept , ndim_T , ndex_T ) ! t-point depth 784 813 CALL histwrite( nid_T, "vovvldef", it, zw3d , ndim_T , ndex_T ) ! level thickness deformation 785 814 ENDIF … … 920 949 !! 921 950 INTEGER :: inum, jk 951 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t, zgdept ! 3D workspace !!st patch to use substitution 922 952 !!---------------------------------------------------------------------- 923 953 ! 924 IF(lwp) WRITE(numout,*) 925 IF(lwp) WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state' 926 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ and forcing fields file created ' 927 IF(lwp) WRITE(numout,*) ' and named :', cdfile_name, '...nc' 954 IF(lwp) THEN 955 WRITE(numout,*) 956 WRITE(numout,*) 'dia_wri_state : single instantaneous ocean state' 957 WRITE(numout,*) '~~~~~~~~~~~~~ and forcing fields file created ' 958 WRITE(numout,*) ' and named :', cdfile_name, '...nc' 959 ENDIF 960 ! 961 DO jk = 1, jpk 962 ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 963 zgdept(:,:,jk) = gdept(:,:,jk,Kmm) 964 END DO 928 965 ! 929 966 CALL iom_open( TRIM(cdfile_name), inum, ldwrt = .TRUE. ) … … 940 977 ENDIF 941 978 CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep ) ! now k-velocity 942 CALL iom_rstput( 0, 0, inum, 'ht' , ht 979 CALL iom_rstput( 0, 0, inum, 'ht' , ht(:,:) ) ! now water column height 943 980 ! 944 981 IF ( ln_isf ) THEN … … 977 1014 CALL iom_rstput( 0, 0, inum, 'sometauy', vtau ) ! j-wind stress 978 1015 IF( .NOT.ln_linssh ) THEN 979 CALL iom_rstput( 0, 0, inum, 'vovvldep', gdept(:,:,:,Kmm)) ! T-cell depth980 CALL iom_rstput( 0, 0, inum, 'vovvle3t', e3t(:,:,:,Kmm)) ! T-cell thickness1016 CALL iom_rstput( 0, 0, inum, 'vovvldep', zgdept ) ! T-cell depth 1017 CALL iom_rstput( 0, 0, inum, 'vovvle3t', ze3t ) ! T-cell thickness 981 1018 END IF 982 1019 IF( ln_wave .AND. ln_sdw ) THEN
Note: See TracChangeset
for help on using the changeset viewer.