- Timestamp:
- 2015-08-04T14:45:33+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/2015_CO6_CO5_shelfdiagnostic/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r5427 r5666 48 48 USE iom 49 49 USE ioipsl 50 USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities 51 50 52 #if defined key_lim2 51 53 USE limwri_2 … … 127 129 !! 128 130 INTEGER :: ji, jj, jk ! dummy loop indices 131 INTEGER :: jkbot ! 129 132 REAL(wp) :: zztmp, zztmpx, zztmpy ! 130 133 !! … … 150 153 CALL iom_put( "e3w" , fse3w_n(:,:,:) ) 151 154 ENDIF 155 156 CALL iom_put( "ssh" , sshn ) ! sea surface height 157 if( iom_use('ssh2') ) CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) ) ! square of sea surface height 152 158 153 159 CALL iom_put( "toce", tsn(:,:,:,jp_tem) ) ! 3D temperature … … 156 162 DO jj = 1, jpj 157 163 DO ji = 1, jpi 158 z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_tem) 164 jkbot = mbkt(ji,jj) 165 z2d(ji,jj) = tsn(ji,jj,jkbot,jp_tem) 159 166 END DO 160 167 END DO … … 167 174 DO jj = 1, jpj 168 175 DO ji = 1, jpi 169 z2d(ji,jj) = tsn(ji,jj,MAX(mbathy(ji,jj),1),jp_sal) 176 jkbot = mbkt(ji,jj) 177 z2d(ji,jj) = tsn(ji,jj,jkbot,jp_sal) 170 178 END DO 171 179 END DO 172 180 CALL iom_put( "sbs", z2d ) ! bottom salinity 181 ENDIF 182 183 IF ( iom_use("taubot") ) THEN ! bottom stress 184 z2d(:,:) = 0._wp 185 DO jj = 2, jpjm1 186 DO ji = fs_2, fs_jpim1 ! vector opt. 187 zztmpx = ( bfrua(ji ,jj) * un(ji ,jj,mbku(ji ,jj)) & 188 & + bfrua(ji-1,jj) * un(ji-1,jj,mbku(ji-1,jj)) ) 189 zztmpy = ( bfrva(ji, jj) * vn(ji,jj ,mbkv(ji,jj )) & 190 & + bfrva(ji,jj-1) * vn(ji,jj-1,mbkv(ji,jj-1)) ) 191 z2d(ji,jj) = rau0 * SQRT( zztmpx * zztmpx + zztmpy * zztmpy ) * tmask(ji,jj,1) 192 ! 193 ENDDO 194 ENDDO 195 CALL lbc_lnk( z2d, 'T', 1. ) 196 CALL iom_put( "taubot", z2d ) 173 197 ENDIF 174 198 … … 178 202 DO jj = 1, jpj 179 203 DO ji = 1, jpi 180 z2d(ji,jj) = un(ji,jj,MAX(mbathy(ji,jj),1)) 204 jkbot = mbku(ji,jj) 205 z2d(ji,jj) = un(ji,jj,jkbot) 181 206 END DO 182 207 END DO 183 208 CALL iom_put( "sbu", z2d ) ! bottom i-current 184 209 ENDIF 210 #if defined key_dynspg_ts 211 CALL iom_put( "ubar", un_adv(:,:) ) ! barotropic i-current 212 #else 213 CALL iom_put( "ubar", un_b(:,:) ) ! barotropic i-current 214 #endif 185 215 186 216 CALL iom_put( "voce", vn(:,:,:) ) ! 3D j-current … … 189 219 DO jj = 1, jpj 190 220 DO ji = 1, jpi 191 z2d(ji,jj) = vn(ji,jj,MAX(mbathy(ji,jj),1)) 221 jkbot = mbkv(ji,jj) 222 z2d(ji,jj) = vn(ji,jj,jkbot) 192 223 END DO 193 224 END DO 194 225 CALL iom_put( "sbv", z2d ) ! bottom j-current 226 ENDIF 227 #if defined key_dynspg_ts 228 CALL iom_put( "vbar", vn_adv(:,:) ) ! barotropic j-current 229 #else 230 CALL iom_put( "vbar", vn_b(:,:) ) ! barotropic j-current 231 #endif 232 233 CALL iom_put( "woce", wn ) ! vertical velocity 234 IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value 235 ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 236 z2d(:,:) = rau0 * e12t(:,:) 237 DO jk = 1, jpk 238 z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:) 239 END DO 240 CALL iom_put( "w_masstr" , z3d ) 241 IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 195 242 ENDIF 196 243 … … 604 651 ENDIF 605 652 606 IF( .NOT. l k_cpl ) THEN653 IF( .NOT. ln_cpl ) THEN 607 654 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 608 655 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 613 660 ENDIF 614 661 615 IF( l k_cpl .AND. nn_ice <= 1 ) THEN662 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 616 663 CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping" , "W/m2" , & ! qrp 617 664 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 636 683 #endif 637 684 638 IF( l k_cpl .AND. nn_ice == 2 ) THEN685 IF( ln_cpl .AND. nn_ice == 2 ) THEN 639 686 CALL histdef( nid_T,"soicetem" , "Ice Surface Temperature" , "K" , & ! tn_ice 640 687 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 791 838 ENDIF 792 839 793 IF( .NOT. l k_cpl ) THEN840 IF( .NOT. ln_cpl ) THEN 794 841 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 795 842 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping … … 797 844 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 798 845 ENDIF 799 IF( l k_cpl .AND. nn_ice <= 1 ) THEN846 IF( ln_cpl .AND. nn_ice <= 1 ) THEN 800 847 CALL histwrite( nid_T, "sohefldp", it, qrp , ndim_hT, ndex_hT ) ! heat flux damping 801 848 CALL histwrite( nid_T, "sowafldp", it, erp , ndim_hT, ndex_hT ) ! freshwater flux damping … … 813 860 #endif 814 861 815 IF( l k_cpl .AND. nn_ice == 2 ) THEN862 IF( ln_cpl .AND. nn_ice == 2 ) THEN 816 863 CALL histwrite( nid_T, "soicetem", it, tn_ice(:,:,1) , ndim_hT, ndex_hT ) ! surf. ice temperature 817 864 CALL histwrite( nid_T, "soicealb", it, alb_ice(:,:,1), ndim_hT, ndex_hT ) ! ice albedo
Note: See TracChangeset
for help on using the changeset viewer.