- Timestamp:
- 2014-01-10T16:59:04+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r4220 r4345 37 37 LOGICAL, PUBLIC :: ln_diahsb = .FALSE. !: check the heat and salt budgets 38 38 39 REAL(wp), SAVE :: frc_t , frc_s , frc_v ! global forcing trends 40 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ssh_ini ! 41 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hc_loc_ini, sc_loc_ini, e3t_ini ! 42 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: hcssh_loc_ini, scssh_loc_ini ! 39 REAL(dp) :: surf_tot ! 40 REAL(dp) :: frc_t , frc_s , frc_v ! global forcing trends 41 REAL(dp) :: frc_wn_t , frc_wn_s ! global forcing trends 42 REAL(dp), DIMENSION(:,:) , ALLOCATABLE :: surf , ssh_ini ! 43 REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: hc_loc_ini, sc_loc_ini, e3t_ini ! 44 REAL(dp), DIMENSION(:,:) , ALLOCATABLE :: ssh_hc_loc_ini, ssh_sc_loc_ini 43 45 44 46 !! * Substitutions … … 68 70 !! 69 71 INTEGER :: jk ! dummy loop indice 70 REAL(wp) :: zdiff_hc , zdiff_sc ! heat and salt content variations 71 REAL(wp) :: zdiff_v1 , zdiff_v2 ! volume variation 72 REAL(wp) :: z_hc , z_sc ! heat and salt content 73 REAL(wp) :: z_v1 , z_v2 ! volume 74 REAL(wp) :: zdeltat ! - - 75 REAL(wp) :: z_frc_trd_t , z_frc_trd_s ! - - 76 REAL(wp) :: z_frc_trd_v ! - - 77 REAL(wp), POINTER, DIMENSION(:,:) :: zsurf ! 72 REAL(dp) :: zdiff_hc , zdiff_sc ! heat and salt content variations 73 REAL(dp) :: zdiff_hc1 , zdiff_sc1 ! - - - - - - - - 74 REAL(dp) :: zdiff_v1 , zdiff_v2 ! volume variation 75 REAL(dp) :: zerr_hc1 , zerr_sc1 ! heat and salt content misfit 76 REAL(dp) :: zvol_tot ! volume 77 REAL(dp) :: z_frc_trd_t , z_frc_trd_s ! - - 78 REAL(dp) :: z_frc_trd_v ! - - 79 REAL(dp) :: z_wn_trd_t , z_wn_trd_s ! - - 80 REAL(dp) :: z_ssh_hc , z_ssh_sc ! - - 78 81 !!--------------------------------------------------------------------------- 79 82 IF( nn_timing == 1 ) CALL timing_start('dia_hsb') 80 83 81 CALL wrk_alloc( jpi, jpj, zsurf )82 83 zsurf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:) ! masked surface grid cell area84 85 84 ! ------------------------- ! 86 85 ! 1 - Trends due to forcing ! 87 86 ! ------------------------- ! 88 z_frc_trd_v = r1_rau0 * glob_sum( - ( emp(:,:) - rnf(:,:) ) * zsurf(:,:) ) ! volume fluxes89 z_frc_trd_t = glob_sum( sbc_tsc(:,:,jp_tem) * zsurf(:,:) ) ! heat fluxes90 z_frc_trd_s = glob_sum( sbc_tsc(:,:,jp_sal) * zsurf(:,:) ) ! salt fluxes91 ! 92 IF( ln_rnf ) z_frc_trd_t = z_frc_trd_t + glob_sum( rnf_tsc(:,:,jp_tem) * zsurf(:,:) )93 IF( ln_rnf_sal) z_frc_trd_s = z_frc_trd_s + glob_sum( rnf_tsc(:,:,jp_sal) * zsurf(:,:) )87 z_frc_trd_v = r1_rau0 * glob_sum( - ( emp(:,:) - rnf(:,:) ) * surf(:,:) ) ! volume fluxes 88 z_frc_trd_t = glob_sum( sbc_tsc(:,:,jp_tem) * surf(:,:) ) ! heat fluxes 89 z_frc_trd_s = glob_sum( sbc_tsc(:,:,jp_sal) * surf(:,:) ) ! salt fluxes 90 ! Add runoff heat & salt input 91 IF( ln_rnf ) z_frc_trd_t = z_frc_trd_t + glob_sum( rnf_tsc(:,:,jp_tem) * surf(:,:) ) 92 IF( ln_rnf_sal) z_frc_trd_s = z_frc_trd_s + glob_sum( rnf_tsc(:,:,jp_sal) * surf(:,:) ) 94 93 95 94 ! Add penetrative solar radiation 96 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( qsr (:,:) * zsurf(:,:) )95 IF( ln_traqsr ) z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( qsr (:,:) * surf(:,:) ) 97 96 ! Add geothermal heat flux 98 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + glob_sum( qgh_trd0(:,:) * zsurf(:,:) ) 99 ! 97 IF( ln_trabbc ) z_frc_trd_t = z_frc_trd_t + glob_sum( qgh_trd0(:,:) * surf(:,:) ) 98 ! 99 IF( .NOT. lk_vvl ) THEN 100 z_wn_trd_t = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_tem) ) 101 z_wn_trd_s = - glob_sum( surf(:,:) * wn(:,:,1) * tsb(:,:,1,jp_sal) ) 102 ENDIF 103 100 104 frc_v = frc_v + z_frc_trd_v * rdt 101 105 frc_t = frc_t + z_frc_trd_t * rdt 102 106 frc_s = frc_s + z_frc_trd_s * rdt 107 ! ! Advection flux through fixed surface (z=0) 108 IF( .NOT. lk_vvl ) THEN 109 frc_wn_t = frc_wn_t + z_wn_trd_t * rdt 110 frc_wn_s = frc_wn_s + z_wn_trd_s * rdt 111 ENDIF 103 112 104 113 ! ------------------------ ! 105 ! 2 a- Content variations !114 ! 2 - Content variations ! 106 115 ! ------------------------ ! 107 zdiff_v2 = 0._wp 108 zdiff_hc = 0._wp 109 zdiff_sc = 0._wp 116 zdiff_v2 = 0.d0 117 zdiff_hc = 0.d0 118 zdiff_sc = 0.d0 119 110 120 ! volume variation (calculated with ssh) 111 zdiff_v1 = glob_sum( zsurf(:,:) * ( sshn(:,:) - ssh_ini(:,:) ) ) 121 zdiff_v1 = glob_sum( surf(:,:) * ( sshn(:,:) - ssh_ini(:,:) ) ) 122 123 ! heat & salt content variation (associated with ssh) 124 IF( .NOT. lk_vvl ) THEN 125 z_ssh_hc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_tem) * sshn(:,:) - ssh_hc_loc_ini(:,:) ) ) 126 z_ssh_sc = glob_sum( surf(:,:) * ( tsn(:,:,1,jp_sal) * sshn(:,:) - ssh_sc_loc_ini(:,:) ) ) 127 ENDIF 128 112 129 DO jk = 1, jpkm1 113 130 ! volume variation (calculated with scale factors) 114 zdiff_v2 = zdiff_v2 + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) - e3t_ini(:,:,jk) ) ) 131 zdiff_v2 = zdiff_v2 + glob_sum( surf(:,:) * tmask(:,:,jk) & 132 & * ( fse3t_n(:,:,jk) - e3t_ini(:,:,jk) ) ) 115 133 ! heat content variation 116 zdiff_hc = zdiff_hc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) &117 & - hc_loc_ini(:,:,jk) ) )134 zdiff_hc = zdiff_hc + glob_sum( surf(:,:) * tmask(:,:,jk) & 135 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) - hc_loc_ini(:,:,jk) ) ) 118 136 ! salt content variation 119 zdiff_sc = zdiff_sc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) &120 & - sc_loc_ini(:,:,jk) ) )137 zdiff_sc = zdiff_sc + glob_sum( surf(:,:) * tmask(:,:,jk) & 138 & * ( fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) - sc_loc_ini(:,:,jk) ) ) 121 139 ENDDO 122 140 123 141 ! Substract forcing from heat content, salt content and volume variations 124 !frc_v = zdiff_v2 - frc_v 125 !frc_t = zdiff_hc - frc_t 126 !frc_s = zdiff_sc - frc_s 127 128 ! add ssh if not vvl 142 zdiff_v1 = zdiff_v1 - frc_v 143 IF( lk_vvl ) zdiff_v2 = zdiff_v2 - frc_v 144 zdiff_hc = zdiff_hc - frc_t 145 zdiff_sc = zdiff_sc - frc_s 129 146 IF( .NOT. lk_vvl ) THEN 130 zdiff_v2 = zdiff_v2 + zdiff_v1 131 zdiff_hc = zdiff_hc + glob_sum( zsurf(:,:) * ( sshn(:,:) * tsn(:,:,1,jp_tem) & 132 & - hcssh_loc_ini(:,:) ) ) 133 zdiff_sc = zdiff_sc + glob_sum( zsurf(:,:) * ( sshn(:,:) * tsn(:,:,1,jp_sal) & 134 & - scssh_loc_ini(:,:) ) ) 135 ENDIF 136 ! 137 ! ----------------------- ! 138 ! 2b - Content ! 139 ! ----------------------- ! 140 z_v2 = 0._wp 141 z_hc = 0._wp 142 z_sc = 0._wp 143 ! volume (calculated with ssh) 144 z_v1 = glob_sum( zsurf(:,:) * sshn(:,:) ) 145 DO jk = 1, jpkm1 146 ! volume (calculated with scale factors) 147 z_v2 = z_v2 + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) ) 148 ! heat content 149 z_hc = z_hc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) * tsn(:,:,jk,jp_tem) ) 150 ! salt content 151 z_sc = z_sc + glob_sum( zsurf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) * tsn(:,:,jk,jp_sal) ) 152 ENDDO 153 ! add ssh if not vvl 154 IF( .NOT. lk_vvl ) THEN 155 z_v2 = z_v2 + z_v1 156 z_hc = z_hc + glob_sum( zsurf(:,:) * sshn(:,:) * tsn(:,:,1,jp_tem) ) 157 z_sc = z_sc + glob_sum( zsurf(:,:) * sshn(:,:) * tsn(:,:,1,jp_sal) ) 147 zdiff_hc1 = zdiff_hc + z_ssh_hc 148 zdiff_sc1 = zdiff_sc + z_ssh_sc 149 zerr_hc1 = z_ssh_hc - frc_wn_t 150 zerr_sc1 = z_ssh_sc - frc_wn_s 158 151 ENDIF 159 152 … … 161 154 ! 3 - Diagnostics writing ! 162 155 ! ----------------------- ! 163 zdeltat = 1.e0 / ( ( kt - nit000 + 1 ) * rdt ) 164 ! 165 CALL iom_put( 'bgtemper' , z_hc / z_v2 ) ! Temperature (C) 166 CALL iom_put( 'bgsaline' , z_sc / z_v2 ) ! Salinity (psu) 167 CALL iom_put( 'bgheatco' , zdiff_hc * rau0 * rcp * 1.e-9_wp ) ! Heat content variation (10^9 J) 168 CALL iom_put( 'bgsaltco' , zdiff_sc * 1.e-9 ) ! Salt content variation (psu*km3) 169 CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9 ) ! volume ssh (km3) 170 CALL iom_put( 'bgsshtot' , zdiff_v1 / glob_sum(zsurf) ) ! ssh (m) 171 CALL iom_put( 'bgvoltot' , zdiff_v2 * 1.e-9 ) ! volume total (km3) 172 CALL iom_put( 'bgfrcvol' , frc_v * 1.e-9 ) ! vol - surface forcing (volume) 173 CALL iom_put( 'bgfrctem' , frc_t * rau0 * rcp * 1.e-9_wp ) ! hc - surface forcing (heat content) 174 CALL iom_put( 'bgfrcsal' , frc_s * 1.e-9 ) ! sc - surface forcing (salt content) 175 ! 176 CALL wrk_dealloc( jpi, jpj, zsurf ) 177 ! 156 zvol_tot = 0.d0 ! total ocean volume 157 DO jk = 1, jpkm1 158 zvol_tot = zvol_tot + glob_sum( surf(:,:) * tmask(:,:,jk) * fse3t_n(:,:,jk) ) 159 END DO 160 161 IF( lk_vvl ) THEN 162 CALL iom_put( 'bgtemper' , zdiff_hc / zvol_tot ) ! Temperature variation (C) 163 CALL iom_put( 'bgsaline' , zdiff_sc / zvol_tot ) ! Salinity variation (psu) 164 CALL iom_put( 'bgheatco' , zdiff_hc * 1.e-20 * rau0 * rcp ) ! Heat content variation (1.e20 J) 165 CALL iom_put( 'bgsaltco' , zdiff_sc * 1.e-9 ) ! Salt content variation (psu*km3) 166 CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9 ) ! volume ssh variation (km3) 167 CALL iom_put( 'bgvole3t' , zdiff_v2 * 1.e-9 ) ! volume e3t variation (km3) 168 CALL iom_put( 'bgfrcvol' , frc_v * 1.e-9 ) ! vol - surface forcing (km3) 169 CALL iom_put( 'bgfrctem' , frc_t / zvol_tot ) ! hc - surface forcing (C) 170 CALL iom_put( 'bgfrcsal' , frc_s / zvol_tot ) ! sc - surface forcing (psu) 171 ELSE 172 CALL iom_put( 'bgtemper' , zdiff_hc1 / zvol_tot) ! Heat content variation (C) 173 CALL iom_put( 'bgsaline' , zdiff_sc1 / zvol_tot) ! Salt content variation (psu) 174 CALL iom_put( 'bgheatco' , zdiff_hc1 * 1.e-20 * rau0 * rcp ) ! Heat content variation (1.e20 J) 175 CALL iom_put( 'bgsaltco' , zdiff_sc1 * 1.e-9 ) ! Salt content variation (psu*km3) 176 CALL iom_put( 'bgvolssh' , zdiff_v1 * 1.e-9 ) ! volume ssh variation (km3) 177 CALL iom_put( 'bgfrcvol' , frc_v * 1.e-9 ) ! vol - surface forcing (km3) 178 CALL iom_put( 'bgfrctem' , frc_t / zvol_tot ) ! hc - surface forcing (C) 179 CALL iom_put( 'bgfrcsal' , frc_s / zvol_tot ) ! sc - surface forcing (psu) 180 CALL iom_put( 'bgmistem' , zerr_hc1 / zvol_tot ) ! hc - error due to free surface (C) 181 CALL iom_put( 'bgmissal' , zerr_sc1 / zvol_tot ) ! sc - error due to free surface (psu) 182 ENDIF 183 ! 184 IF( lrst_oce ) CALL dia_hsb_rst( kt, 'WRITE' ) 185 178 186 IF( nn_timing == 1 ) CALL timing_stop('dia_hsb') 179 187 ! … … 208 216 WRITE(numout,*) ' Namelist namhsb : set hsb parameters' 209 217 WRITE(numout,*) ' Switch for hsb diagnostic (T) or not (F) ln_diahsb = ', ln_diahsb 218 WRITE(numout,*) 210 219 ENDIF 211 220 212 221 IF( .NOT. ln_diahsb ) RETURN 213 214 ! ------------------- ! 215 ! 1 - Allocate memory ! 216 ! ------------------- ! 217 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), STAT=ierror ) 218 IF( ierror > 0 ) THEN 219 CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' ) ; RETURN 220 ENDIF 221 ALLOCATE( sc_loc_ini(jpi,jpj,jpk), STAT=ierror ) 222 IF( ierror > 0 ) THEN 223 CALL ctl_stop( 'dia_hsb: unable to allocate sc_loc_ini' ) ; RETURN 224 ENDIF 225 ALLOCATE( hcssh_loc_ini(jpi,jpj), STAT=ierror ) 226 IF( ierror > 0 ) THEN 227 CALL ctl_stop( 'dia_hsb: unable to allocate hcssh_loc_ini' ) ; RETURN 228 ENDIF 229 ALLOCATE( scssh_loc_ini(jpi,jpj), STAT=ierror ) 230 IF( ierror > 0 ) THEN 231 CALL ctl_stop( 'dia_hsb: unable to allocate scssh_loc_ini' ) ; RETURN 232 ENDIF 233 ALLOCATE( e3t_ini(jpi,jpj,jpk) , STAT=ierror ) 234 IF( ierror > 0 ) THEN 235 CALL ctl_stop( 'dia_hsb: unable to allocate e3t_ini' ) ; RETURN 236 ENDIF 237 ALLOCATE( ssh_ini(jpi,jpj) , STAT=ierror ) 238 IF( ierror > 0 ) THEN 239 CALL ctl_stop( 'dia_hsb: unable to allocate ssh_ini' ) ; RETURN 240 ENDIF 241 242 ! ----------------------------------------------- ! 243 ! 2 - Time independant variables and file opening ! 244 ! ----------------------------------------------- ! 245 IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated" 246 IF( lk_obc .or. lk_bdy ) THEN 247 CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' ) 248 ENDIF 249 ! 250 CALL dia_hsb_rst( nit000, 'READ' ) !* read or initialize all required files 222 ! IF( .NOT. lk_mpp_rep ) & 223 ! CALL ctl_stop (' Your global mpp_sum if performed in single precision - 64 bits -', & 224 ! & ' whereas the global sum to be precise must be done in double precision ',& 225 ! & ' please add key_mpp_rep') 226 227 ! ------------------- ! 228 ! 1 - Allocate memory ! 229 ! ------------------- ! 230 ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), & 231 & e3t_ini(jpi,jpj,jpk), surf(jpi,jpj), ssh_ini(jpi,jpj), STAT=ierror ) 232 IF( ierror > 0 ) THEN 233 CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' ) ; RETURN 234 ENDIF 235 236 IF(.NOT. lk_vvl ) ALLOCATE( ssh_hc_loc_ini(jpi,jpj), ssh_sc_loc_ini(jpi,jpj),STAT=ierror ) 237 IF( ierror > 0 ) THEN 238 CALL ctl_stop( 'dia_hsb: unable to allocate hc_loc_ini' ) ; RETURN 239 ENDIF 240 241 ! ----------------------------------------------- ! 242 ! 2 - Time independant variables and file opening ! 243 ! ----------------------------------------------- ! 244 IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated" 245 IF(lwp) WRITE(numout,*) '~~~~~~~' 246 surf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:) ! masked surface grid cell area 247 surf_tot = glob_sum( surf(:,:) ) ! total ocean surface area 248 249 IF( lk_bdy ) CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' ) 250 ! 251 ! ---------------------------------- ! 252 ! 4 - initial conservation variables ! 253 ! ---------------------------------- ! 254 CALL dia_hsb_rst( nit000, 'READ' ) !* read or initialize all required files 251 255 ! 252 256 END SUBROUTINE dia_hsb_init … … 271 275 !id1 = iom_varid( numror, 'frc_vol' , ldstop = .FALSE. ) 272 276 ! 277 IF(lwp) WRITE(numout,*) '~~~~~~~' 278 IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 279 IF(lwp) WRITE(numout,*) '~~~~~~~' 273 280 CALL iom_get( numror, 'frc_v', frc_v ) 274 281 CALL iom_get( numror, 'frc_t', frc_t ) 275 282 CALL iom_get( numror, 'frc_s', frc_s ) 276 283 IF( .NOT. lk_vvl ) THEN 284 CALL iom_get( numror, 'frc_wn_t', frc_wn_t ) 285 CALL iom_get( numror, 'frc_wn_s', frc_wn_s ) 286 ENDIF 277 287 CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini ) 278 288 CALL iom_get( numror, jpdom_autoglo, 'e3t_ini', e3t_ini ) 279 289 CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini ) 280 290 CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini ) 281 CALL iom_get( numror, jpdom_autoglo, 'hcssh_loc_ini', hcssh_loc_ini ) 282 CALL iom_get( numror, jpdom_autoglo, 'scssh_loc_ini', scssh_loc_ini ) 291 IF( .NOT. lk_vvl ) THEN 292 CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 293 CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 294 ENDIF 283 295 ELSE 296 IF(lwp) WRITE(numout,*) '~~~~~~~' 297 IF(lwp) WRITE(numout,*) ' dia_hsb at initial state ' 298 IF(lwp) WRITE(numout,*) '~~~~~~~' 284 299 ssh_ini(:,:) = sshn(:,:) ! initial ssh 285 300 DO jk = 1, jpk … … 288 303 sc_loc_ini(:,:,jk) = tsn(:,:,jk,jp_sal) * fse3t_n(:,:,jk) ! initial salt content 289 304 END DO 290 hcssh_loc_ini(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) ! initial heat content in ssh 291 scssh_loc_ini(:,:) = tsn(:,:,1,jp_sal) * sshn(:,:) ! initial salt content in ssh 292 frc_v = 0._wp 293 frc_t = 0._wp 294 frc_s = 0._wp 305 frc_v = 0.d0 ! volume trend due to forcing 306 frc_t = 0.d0 ! heat content - - - - 307 frc_s = 0.d0 ! salt content - - - - 308 IF( .NOT. lk_vvl ) THEN 309 ssh_hc_loc_ini(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) ! initial heat content in ssh 310 ssh_sc_loc_ini(:,:) = tsn(:,:,1,jp_sal) * sshn(:,:) ! initial salt content in ssh 311 frc_wn_t = 0.d0 ! initial heat content misfit due to free surface 312 frc_wn_s = 0.d0 ! initial salt content misfit due to free surface 313 ENDIF 295 314 ENDIF 296 315 297 316 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN ! Create restart file 298 317 ! ! ------------------- 299 IF(lwp) WRITE(numout,*) '---- dia-rst ----' 318 IF(lwp) WRITE(numout,*) '~~~~~~~' 319 IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 320 IF(lwp) WRITE(numout,*) '~~~~~~~' 321 300 322 CALL iom_rstput( kt, nitrst, numrow, 'frc_v' , frc_v ) 301 323 CALL iom_rstput( kt, nitrst, numrow, 'frc_t' , frc_t ) 302 324 CALL iom_rstput( kt, nitrst, numrow, 'frc_s' , frc_s ) 303 325 IF( .NOT. lk_vvl ) THEN 326 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t ) 327 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s ) 328 ENDIF 304 329 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini ) 305 330 CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini ) 306 331 CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini ) 307 332 CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini ) 308 CALL iom_rstput( kt, nitrst, numrow, 'hcssh_loc_ini', hcssh_loc_ini ) 309 CALL iom_rstput( kt, nitrst, numrow, 'scssh_loc_ini', scssh_loc_ini ) 333 IF( .NOT. lk_vvl ) THEN 334 CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini ) 335 CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini ) 336 ENDIF 310 337 ! 311 338 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.