Changeset 632
- Timestamp:
- 2007-03-02T17:45:17+01:00 (18 years ago)
- Location:
- trunk/NEMO/OPA_SRC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DIA/diawri.F90
r460 r632 120 120 CHARACTER (len=80) :: clname 121 121 !!---------------------------------------------------------------------- 122 122 123 123 ! 0. Initialisation 124 124 ! ----------------- 125 125 126 126 ! local variable for debugging 127 127 ll_print = .FALSE. … … 160 160 161 161 ! Define the NETCDF files (one per grid) 162 162 163 163 ! Compute julian date from starting date of the run 164 164 CALL ymds2ju( nyear, nmonth, nday, 0.e0, zjulian ) … … 175 175 WRITE(inum,*) clhstnam 176 176 CLOSE(inum) 177 177 178 178 ! Define the T grid FILE ( nid_T ) 179 179 180 180 CALL dia_nam( clhstnam, nwrite, 'grid_T' ) 181 181 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename … … 224 224 CALL histvert( nid_W, "depthw", "Vertical W levels", & ! Vertical grid: gdepw 225 225 & "m", ipk, gdepw_0, nz_W ) 226 226 227 227 228 228 ! Declare all the output fields as NETCDF variables … … 280 280 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 281 281 #endif 282 283 #if defined key_flx_core 284 CALL histdef( nid_T, "solhflup", "Latent Heat Flux Upward" , "W/m2" , & ! qla 285 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 286 CALL histdef( nid_T, "solwfldo", "Longwave Radiation downward" , "W/m2" , & ! qlw 287 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 288 CALL histdef( nid_T, "sosbhfup", "Sensible Heat Flux upward" , "W/m2" , & ! qsb 289 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 290 #endif 291 282 292 283 293 #if ( defined key_coupled && ! defined key_ice_lim ) … … 432 442 zw2d(:,:) = erp(:,:) * sn(:,:,1) * tmask(:,:,1) 433 443 CALL histwrite( nid_T, "sosafldp", it, zw2d , ndim_hT, ndex_hT ) ! salt flux damping 444 #endif 445 #if defined key_flx_core 446 CALL histwrite( nid_T, "solhflup", it, qla , ndim_hT, ndex_hT ) ! latent heat flux 447 CALL histwrite( nid_T, "solwfldo", it, qlw , ndim_hT, ndex_hT ) ! longwave heat flux 448 CALL histwrite( nid_T, "sosbhfup", it, qsb , ndim_hT, ndex_hT ) ! sensible heat flux 434 449 #endif 435 450 #if ( defined key_coupled && ! defined key_ice_lim ) … … 556 571 IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~ and forcing fields file created ' 557 572 IF(lwp) WRITE(numout,*) ' and named :', cdfile_name, '.nc' 558 573 559 574 ! 0. Initialisation 560 575 ! ----------------- 561 576 562 577 ! Define frequency of output and means 563 578 zdt = rdt … … 617 632 ! donne le nombre d'elements, et idex la liste des indices a sortir 618 633 idex(1) = 1 ! init to avoid compil warning 619 634 620 635 ! Write all fields on T grid 621 636 CALL histwrite( id_i, "votemper", 1, tn , jpi*jpj*jpk, idex ) ! now temperature … … 641 656 642 657 END SUBROUTINE dia_wri_state 643 658 644 659 #endif 645 660 !!====================================================================== -
trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90
r574 r632 82 82 83 83 !! * local declarations 84 INTEGER :: inbsel 84 INTEGER :: inbsel, jk 85 85 !! INTEGER :: iwrite 86 86 INTEGER :: iyear,imon,iday … … 113 113 inbsel = 17 114 114 #endif 115 #if defined key_flx_core 116 inbsel = 23 117 #endif 115 118 116 119 IF( inbsel > jpk) THEN … … 131 134 ! 132 135 IF( .NOT. ll_dia_inst ) THEN 133 !#if ! defined key_diainstant134 136 ! 135 137 !! * Mean output section … … 191 193 fsel(:,:,18) = fsel(:,:,18) + gps(:,:)/g 192 194 #endif 195 #if defined key_flx_core 196 fsel(:,:,21) = fsel(:,:,21) + qla(:,:) 197 fsel(:,:,22) = fsel(:,:,22) + qlw(:,:) 198 fsel(:,:,23) = fsel(:,:,23) + qsb(:,:) 199 #endif 193 200 ! 194 201 ! Output of dynamics and tracer fields and selected fields (numwri) … … 224 231 fsel(:,:,20)= spgv(:,:) 225 232 #endif 233 ! mask mean field with tmask except taux tauy (1,2) 234 DO jk=3,inbsel 235 fsel(:,:,jk)=fsel(:,:,jk)*tmask(:,:,1) 236 END DO 226 237 ENDIF 227 238 ! 228 239 ELSE ! ll_dia_inst true 229 !# else230 240 ! 231 241 !! * Instantaneous output section … … 248 258 fsel(:,:,1 ) = taux(:,:) * umask(:,:,1) 249 259 fsel(:,:,2 ) = tauy(:,:) * vmask(:,:,1) 250 fsel(:,:,3 ) = qt (:,:) 251 fsel(:,:,4 ) = emp (:,:) 260 fsel(:,:,3 ) = qt (:,:) * tmask(:,:,1) 261 fsel(:,:,4 ) = emp (:,:) * tmask(:,:,1) 252 262 fsel(:,:,5 ) = (tb (:,:,1) -sst(:,:)) *tmask(:,:,1) 253 263 … … 257 267 fsel(:,:,6 ) = bsfn(:,:) 258 268 #endif 259 fsel(:,:,7 ) = qsr (:,:) 260 fsel(:,:,8 ) = qrp (:,:) 261 fsel(:,:,9 ) = erp (:,:) *tmask(:,:,1)262 fsel(:,:,10) = hmld(:,:) 263 fsel(:,:,11) = hmlp(:,:) 264 fsel(:,:,12) = freeze(:,:) 269 fsel(:,:,7 ) = qsr (:,:) * tmask(:,:,1) 270 fsel(:,:,8 ) = qrp (:,:) * tmask(:,:,1) 271 fsel(:,:,9 ) = erp (:,:) * tmask(:,:,1) 272 fsel(:,:,10) = hmld(:,:) * tmask(:,:,1) 273 fsel(:,:,11) = hmlp(:,:) * tmask(:,:,1) 274 fsel(:,:,12) = freeze(:,:) * tmask(:,:,1) 265 275 fsel(:,:,13) = sst(:,:) 266 276 ! fsel(:,:,14) = qct(:,:) 267 277 ! fsel(:,:,15) = fbt(:,:) 268 fsel(:,:,16) = emps(:,:) 278 fsel(:,:,16) = emps(:,:) * tmask(:,:,1) 269 279 #if defined key_ice_lim 270 fsel(:,:,17) = fsalt(:,:) 280 fsel(:,:,17) = fsalt(:,:) * tmask(:,:,1) 271 281 #endif 272 282 #ifdef key_diaspr … … 275 285 fsel(:,:,20) = spgv(:,:) 276 286 #endif 287 #if defined key_flx_core 288 fsel(:,:,21) = qla(:,:)* tmask(:,:,1) 289 fsel(:,:,22) = qlw(:,:)* tmask(:,:,1) 290 fsel(:,:,23) = qsb(:,:)* tmask(:,:,1) 291 #endif 277 292 ! 278 293 ! qct(:,:) = 0._wp 279 294 ENDIF 280 !#endif281 295 ENDIF 282 296 ! -
trunk/NEMO/OPA_SRC/SBC/flx_oce.F90
r247 r632 16 16 IMPLICIT NONE 17 17 PRIVATE 18 18 19 19 20 20 !!---------------------------------------------------------------------- … … 30 30 p_emp !: evaporation minus precipitation 31 31 32 #elif defined key_ice_lim || defined key_flx_bulk_monthly || defined key_flx_bulk_daily 32 #elif defined key_ice_lim || defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core 33 33 REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: 34 34 qsr_ice , & !: solar flux over ice … … 56 56 !! Default option Empty module 57 57 !!---------------------------------------------------------------------- 58 58 59 59 #endif 60 60 -
trunk/NEMO/OPA_SRC/SBC/ocesbc.F90
r602 r632 42 42 qt , & !: total surface heat flux (w/m2) 43 43 qsr , & !: solar radiation (w/m2) 44 qla , & !: Latent heat flux (W/m2) 45 qlw , & !: Long Wave Heat Flux (W/m2) 46 qsb , & !: Sensible Heat Flux (W/m2) 44 47 emp , & !: evaporation minus precipitation (kg/m2/s = mm/s) 45 48 emps, & !: evaporation - precipitation (free surface) … … 90 93 REAL(wp) :: ztdta, ztgel, zqrp 91 94 !!---------------------------------------------------------------------- 92 95 93 96 ! 1. initialization to zero at kt = nit000 94 97 ! --------------------------------------- 95 98 96 99 IF( kt == nit000 ) THEN 97 100 qsr (:,:) = 0.e0 … … 202 205 ! 1. initialization to zero at kt = nit000 203 206 ! --------------------------------------- 204 207 205 208 IF( kt == nit000 ) THEN 206 209 qsr (:,:) = 0.e0 207 210 qt (:,:) = 0.e0 211 qla (:,:) = 0.e0 212 qlw (:,:) = 0.e0 213 qsb (:,:) = 0.e0 208 214 qrp (:,:) = 0.e0 209 215 emp (:,:) = 0.e0 … … 214 220 #endif 215 221 ENDIF 216 222 #if defined key_flx_core 223 qla(:,:) = (1 - freeze(:,:))*qla_oce + freeze(:,:)*qla_ice(:,:) 224 qsb(:,:) = (1 - freeze(:,:))*qsb_oce + freeze(:,:)*qsb_ice(:,:) 225 qlw(:,:) = (1 - freeze(:,:))*qlw_oce + freeze(:,:)*qlw_ice(:,:) 226 #endif 217 227 IF( MOD( kt-1, nfice ) == 0 ) THEN 218 228 … … 325 335 326 336 ! hemisphere indicator (=1 north, =-1 south) 327 337 328 338 zhemis = float(isign(1, mjg(jj)-(jpjglo/2+1))) 329 339 330 340 ! a) net downward radiative flux qsr() 331 341 ! - AGCM qsrc if no ice … … 350 360 zqi = -3. + zhemis 351 361 qt(ji,jj) = ( (1.-zice) * zq + zice * zqi ) * tmask(ji,jj,1) + qrp(ji,jj) 352 362 353 363 ! d) water flux damping term erp() 354 364 ! - no damping 355 365 zerp = 0. 356 366 erp(ji,jj) = zerp 357 367 358 368 ! e) net upward water flux e() = eo + runoff() + erp() 359 369 ! for e0 … … 364 374 zro = runoff(ji,jj) 365 375 emp(ji,jj) = ( ( 1. - zice ) * ze + zice * zei + zro ) * tmask(ji,jj,1) + erp(ji,jj) 366 376 367 377 ! f) net upward water flux for the salinity surface 368 378 ! boundary condition … … 375 385 # elif defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_forced_daily || defined key_flx_core 376 386 !!------------------------------------------------------------------------- 377 !! 'key_flx_bulk_monthly' or 'key_flx_bulk_daily' or 387 !! 'key_flx_bulk_monthly' or 'key_flx_bulk_daily' or core bulk formulea 378 388 !! 'key_flx_forced_daily' or no bulk case 379 389 !!------------------------------------------------------------------------- … … 397 407 USE dtasst, ONLY : rclice ! sea surface temperature data 398 408 #endif 399 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 409 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core 400 410 USE blk_oce ! bulk variables 401 411 #endif … … 424 434 ! 1. initialization to zero at kt = nit000 425 435 ! --------------------------------------- 426 436 427 437 IF( kt == nit000 ) THEN 428 438 qsr (:,:) = 0.e0 429 439 freeze (:,:) = 0.e0 430 440 qt (:,:) = 0.e0 441 qla (:,:) = 0.e0 442 qlw (:,:) = 0.e0 443 qsb (:,:) = 0.e0 431 444 qrp (:,:) = 0.e0 432 445 emp (:,:) = 0.e0 … … 438 451 ENDIF 439 452 440 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 453 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core 441 454 ifreq = nfbulk 442 455 zqt (:,:) = qsr_oce(:,:) + qnsr_oce(:,:) … … 451 464 zemp(:,:) = p_emp(:,:) 452 465 #endif 453 466 #if defined key_flx_core 467 qla(:,:) = (1 - freeze(:,:))*qla_oce + freeze(:,:)*qla_ice(:,:) 468 qsb(:,:) = (1 - freeze(:,:))*qsb_oce + freeze(:,:)*qsb_ice(:,:) 469 qlw(:,:) = (1 - freeze(:,:))*qlw_oce + freeze(:,:)*qlw_ice(:,:) 470 #endif 454 471 IF( MOD( kt-1, ifreq) == 0 ) THEN 455 472 ! Computation of internal and evaporation damping terms … … 491 508 & + freeze(ji,jj) * zqrj ) ) * tmask(ji,jj,1) 492 509 493 #if ! defined key_flx_bulk_monthly && ! defined key_flx_bulk_daily 510 #if ! defined key_flx_bulk_monthly && ! defined key_flx_bulk_daily && ! defined key_flx_core 494 511 zqrp = dqdt0 * ( tb(ji,jj,1) - ztdta ) 495 512 qrp(ji,jj) = qrp(ji,jj) + (1. - ziclim(ji,jj)) * zqrp … … 549 566 ! ------------------------------------------------- 550 567 CALL lbc_lnk( emp, 'T', 1. ) 551 568 552 569 ENDIF 553 570 … … 757 774 qrp (:,:) = 0.e0 758 775 erp (:,:) = 0.e0 759 776 760 777 runoff(:,:) = 0.e0 761 778 ENDIF … … 856 873 aplus = 0.e0 857 874 aminus = 0.e0 858 875 859 876 IF( nbit_cmp == 1) THEN 860 877 861 878 IF(ln_ctl) THEN 862 879 WRITE(charout,FMT="('oce_sbc_dmp : a+ = ',D23.16, ' a- = ',D23.16)") aplus, aminus … … 892 909 #else 893 910 ! Rigid-lid (emp=emps=E-P-R+Erp) 894 911 895 912 erp(:,:) = ( 1. - zfreeze(:,:) ) * zsrp & ! surface restoring term 896 913 & * ( zsss(:,:) - s_dta(:,:,1) ) & -
trunk/NEMO/OPA_SRC/restart.F90
r611 r632 69 69 lrst_oce = .FALSE. 70 70 ENDIF 71 71 72 72 IF ( kt == nitrst-1 .AND. lrst_oce ) THEN 73 73 CALL ctl_stop( 'rst_opn: we cannot create an ocean restart at every time step', & 74 & 'if the run ahs more than one tie step!!!' )74 & 'if the run has more than one time step!!!' ) 75 75 numrow = 0 76 76 ELSEIF( kt == nitrst-1 .OR. nitend == nit000 ) THEN ! beware if model runs only one time step … … 85 85 IF(lwp) THEN 86 86 WRITE(numout,*) 87 WRITE(numout,*) ' open ocean restart.output NetCDF file: '//clname 87 SELECT CASE ( jprstlib ) 88 CASE ( jpnf90 ) 89 WRITE(numout,*) ' open ocean restart.output NetCDF file: '//clname 90 CASE ( jprstdimg ) 91 WRITE(numout,*) ' open ocean restart.output binary file: '//clname 92 END SELECT 88 93 IF( kt == nitrst-1 ) THEN 89 94 WRITE(numout,*) ' kt = nitrst - 1 = ', kt,' date= ', ndastp … … 104 109 !! *** ROUTINE rstwrite *** 105 110 !! 106 !! ** Purpose : Write restart fields in NetCDF format111 !! ** Purpose : Write restart fields in the format corresponding to jprstlib 107 112 !! 108 113 !! ** Method : Write in numrow when kt == nitrst in NetCDF … … 134 139 CALL iom_rstput( kt, nitrst, numrow, 'rotn' , rotn ) 135 140 CALL iom_rstput( kt, nitrst, numrow, 'hdivn' , hdivn ) 136 141 137 142 #if defined key_ice_lim 138 143 CALL iom_rstput( kt, nitrst, numrow, 'nfice' , REAL( nfice, wp) ) ! ice computation frequency … … 145 150 # endif 146 151 #endif 147 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 152 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core 148 153 CALL iom_rstput( kt, nitrst, numrow, 'nfbulk' , REAL( nfbulk, wp) ) ! bulk computation frequency 149 154 CALL iom_rstput( kt, nitrst, numrow, 'gsst' , gsst ) … … 175 180 !! *** ROUTINE rst_read *** 176 181 !! 177 !! ** Purpose : Read files for restart 182 !! ** Purpose : Read files for restart (format fixed by jprstlib ) 178 183 !! 179 !! ** Method : Read the previous fields on the NetCDF file184 !! ** Method : Read the previous fields on the NetCDF/binary file 180 185 !! the first record indicates previous characterics 181 186 !! after control with the present run, we read : … … 208 213 IF(lwp) THEN ! Contol prints 209 214 WRITE(numout,*) 210 WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 215 SELECT CASE ( jprstlib ) 216 CASE ( jpnf90 ) 217 WRITE(numout,*) 'rst_read : read oce NetCDF restart file' 218 CASE ( jprstdimg ) 219 WRITE(numout,*) 'rst_read : read oce binary restart file' 220 END SELECT 211 221 WRITE(numout,*) '~~~~~~~~' 212 222 213 223 WRITE(numout,*) ' *** Info on the present job : ' 214 224 WRITE(numout,*) ' time-step : ', nit000 … … 329 339 ENDIF 330 340 #endif 331 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 341 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core 332 342 ! Louvain La Neuve Sea Ice Model 333 343 IF( iom_varid( numror, 'nfbulk' ) > 0 ) THEN … … 345 355 ENDIF 346 356 #endif 347 357 348 358 !!sm: end of TO BE MOVED IN NEW SURFACE MODULE... 349 359
Note: See TracChangeset
for help on using the changeset viewer.