- Timestamp:
- 2013-11-20T17:28:04+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
r4161 r4292 25 25 USE oce ! ocean dynamics and tracers 26 26 USE dom_oce ! ocean space and time domain 27 USE dynadv, ONLY: ln_dynadv_vec 27 28 USE zdf_oce ! ocean vertical physics 28 29 USE ldftra_oce ! ocean active tracers: lateral physics … … 44 45 USE diadimg ! dimg direct access file format output 45 46 USE diaar5, ONLY : lk_diaar5 47 USE dynadv, ONLY : ln_dynadv_vec 46 48 USE iom 47 49 USE ioipsl … … 144 146 ENDIF 145 147 146 CALL iom_put( "toce" , tsn(:,:,:,jp_tem) ) ! temperature 147 CALL iom_put( "soce" , tsn(:,:,:,jp_sal) ) ! salinity 148 CALL iom_put( "sst" , tsn(:,:,1,jp_tem) ) ! sea surface temperature 149 CALL iom_put( "sst2" , tsn(:,:,1,jp_tem) * tsn(:,:,1,jp_tem) ) ! square of sea surface temperature 150 CALL iom_put( "sss" , tsn(:,:,1,jp_sal) ) ! sea surface salinity 151 CALL iom_put( "sss2" , tsn(:,:,1,jp_sal) * tsn(:,:,1,jp_sal) ) ! square of sea surface salinity 152 CALL iom_put( "uoce" , un ) ! i-current 153 CALL iom_put( "suoce" , un(:,:,1) ) ! surface i-current 154 CALL iom_put( "voce" , vn ) ! j-current 155 CALL iom_put( "svoce" , vn(:,:,1) ) ! surface j-current 156 157 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 158 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 148 IF( lk_vvl ) THEN 149 z3d(:,:,:) = tsn(:,:,:,jp_tem) * fse3t_n(:,:,:) 150 CALL iom_put( "toce" , z3d ) ! heat content 151 CALL iom_put( "sst" , z3d(:,:,1) ) ! sea surface heat content 152 z3d(:,:,1) = tsn(:,:,1,jp_tem) * z3d(:,:,1) 153 CALL iom_put( "sst2" , z3d(:,:,1) ) ! sea surface content of squared temperature 154 z3d(:,:,:) = tsn(:,:,:,jp_sal) * fse3t_n(:,:,:) 155 CALL iom_put( "soce" , z3d ) ! salinity content 156 CALL iom_put( "sss" , z3d(:,:,1) ) ! sea surface salinity content 157 z3d(:,:,1) = tsn(:,:,1,jp_sal) * z3d(:,:,1) 158 CALL iom_put( "sss2" , z3d(:,:,1) ) ! sea surface content of squared salinity 159 ELSE 160 CALL iom_put( "toce" , tsn(:,:,:,jp_tem) ) ! temperature 161 CALL iom_put( "sst" , tsn(:,:,1,jp_tem) ) ! sea surface temperature 162 CALL iom_put( "sst2" , tsn(:,:,1,jp_tem) * tsn(:,:,1,jp_tem) ) ! square of sea surface temperature 163 CALL iom_put( "soce" , tsn(:,:,:,jp_sal) ) ! salinity 164 CALL iom_put( "sss" , tsn(:,:,1,jp_sal) ) ! sea surface salinity 165 CALL iom_put( "sss2" , tsn(:,:,1,jp_sal) * tsn(:,:,1,jp_sal) ) ! square of sea surface salinity 166 END IF 167 IF( lk_vvl .AND. (.NOT. ln_dynadv_vec) ) THEN 168 CALL iom_put( "uoce" , un(:,:,:) * fse3u_n(:,:,:) ) ! i-transport 169 CALL iom_put( "voce" , vn(:,:,:) * fse3v_n(:,:,:) ) ! j-transport 170 ELSE 171 CALL iom_put( "uoce" , un ) ! i-current 172 CALL iom_put( "voce" , vn ) ! j-current 173 END IF 174 CALL iom_put( "avt" , avt ) ! T vert. eddy diff. coef. 175 CALL iom_put( "avm" , avmu ) ! T vert. eddy visc. coef. 159 176 IF( lk_zdfddm ) THEN 160 177 CALL iom_put( "avs" , fsavs(:,:,:) ) ! S vert. eddy diff. coef. … … 252 269 ! 253 270 CALL wrk_alloc( jpi , jpj , zw2d ) 254 IF ( ln_traldf_gdia ) call wrk_alloc( jpi , jpj , jpk , zw3d )271 IF ( ln_traldf_gdia .OR. lk_vvl ) call wrk_alloc( jpi , jpj , jpk , zw3d ) 255 272 ! 256 273 ! Output the initial state and forcings … … 325 342 & nit000-1, zjulian, zdt, nh_T, nid_T, domain_id=nidom, snc4chunks=snc4set ) 326 343 CALL histvert( nid_T, "deptht", "Vertical T levels", & ! Vertical grid: gdept 327 & "m", ipk, gdept_ 0, nz_T, "down" )344 & "m", ipk, gdept_1d, nz_T, "down" ) 328 345 ! ! Index of ocean points 329 346 CALL wheneq( jpi*jpj*ipk, tmask, 1, 1., ndex_T , ndim_T ) ! volume … … 361 378 & nit000-1, zjulian, zdt, nh_U, nid_U, domain_id=nidom, snc4chunks=snc4set ) 362 379 CALL histvert( nid_U, "depthu", "Vertical U levels", & ! Vertical grid: gdept 363 & "m", ipk, gdept_ 0, nz_U, "down" )380 & "m", ipk, gdept_1d, nz_U, "down" ) 364 381 ! ! Index of ocean points 365 382 CALL wheneq( jpi*jpj*ipk, umask, 1, 1., ndex_U , ndim_U ) ! volume … … 374 391 & nit000-1, zjulian, zdt, nh_V, nid_V, domain_id=nidom, snc4chunks=snc4set ) 375 392 CALL histvert( nid_V, "depthv", "Vertical V levels", & ! Vertical grid : gdept 376 & "m", ipk, gdept_ 0, nz_V, "down" )393 & "m", ipk, gdept_1d, nz_V, "down" ) 377 394 ! ! Index of ocean points 378 395 CALL wheneq( jpi*jpj*ipk, vmask, 1, 1., ndex_V , ndim_V ) ! volume … … 387 404 & nit000-1, zjulian, zdt, nh_W, nid_W, domain_id=nidom, snc4chunks=snc4set ) 388 405 CALL histvert( nid_W, "depthw", "Vertical W levels", & ! Vertical grid: gdepw 389 & "m", ipk, gdepw_ 0, nz_W, "down" )406 & "m", ipk, gdepw_1d, nz_W, "down" ) 390 407 391 408 … … 397 414 CALL histdef( nid_T, "vosaline", "Salinity" , "PSU" , & ! sn 398 415 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 416 IF( lk_vvl ) THEN 417 CALL histdef( nid_T, "vovvle3t", "Level thickness" , "m" ,& ! e3t_n 418 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 419 CALL histdef( nid_T, "vovvldep", "T point depth" , "m" ,& ! e3t_n 420 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 421 CALL histdef( nid_T, "vovvldef", "Squared level deformation" , "%^2" ,& ! e3t_n 422 & jpi, jpj, nh_T, ipk, 1, ipk, nz_T, 32, clop, zsto, zout ) 423 ENDIF 399 424 ! !!! nid_T : 2D 400 425 CALL histdef( nid_T, "sosstsst", "Sea Surface temperature" , "C" , & ! sst … … 408 433 CALL histdef( nid_T, "sosfldow", "downward salt flux" , "PSU/m2/s", & ! sfx 409 434 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 410 #if ! defined key_vvl 411 CALL histdef( nid_T, "sosst_cd", "Concentration/Dilution term on temperature"& ! emp * tsn(:,:,1,jp_tem)435 IF( .NOT. lk_vvl ) THEN 436 CALL histdef( nid_T, "sosst_cd", "Concentration/Dilution term on temperature" & ! emp * tsn(:,:,1,jp_tem) 412 437 & , "KgC/m2/s", & ! sosst_cd 413 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )414 CALL histdef( nid_T, "sosss_cd", "Concentration/Dilution term on salinity"& ! emp * tsn(:,:,1,jp_sal)438 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 439 CALL histdef( nid_T, "sosss_cd", "Concentration/Dilution term on salinity" & ! emp * tsn(:,:,1,jp_sal) 415 440 & , "KgPSU/m2/s",& ! sosss_cd 416 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout )417 #endif 441 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 442 ENDIF 418 443 CALL histdef( nid_T, "sohefldo", "Net Downward Heat Flux" , "W/m2" , & ! qns + qsr 419 444 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) … … 587 612 ! --------------------- 588 613 589 ! ndex(1) est utilise ssi l'avant dernier argument est diff ferent de614 ! ndex(1) est utilise ssi l'avant dernier argument est different de 590 615 ! la taille du tableau en sortie. Dans ce cas , l'avant dernier argument 591 616 ! donne le nombre d'elements, et ndex la liste des indices a sortir … … 597 622 598 623 ! Write fields on T grid 599 CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem), ndim_T , ndex_T ) ! temperature 600 CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal), ndim_T , ndex_T ) ! salinity 601 CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem), ndim_hT, ndex_hT ) ! sea surface temperature 602 CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal), ndim_hT, ndex_hT ) ! sea surface salinity 624 IF( lk_vvl ) THEN 625 CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) * fse3t_n(:,:,:) , ndim_T , ndex_T ) ! heat content 626 CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) * fse3t_n(:,:,:) , ndim_T , ndex_T ) ! salt content 627 CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) * fse3t_n(:,:,1) , ndim_hT, ndex_hT ) ! sea surface heat content 628 CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) * fse3t_n(:,:,1) , ndim_hT, ndex_hT ) ! sea surface salinity content 629 ELSE 630 CALL histwrite( nid_T, "votemper", it, tsn(:,:,:,jp_tem) , ndim_T , ndex_T ) ! temperature 631 CALL histwrite( nid_T, "vosaline", it, tsn(:,:,:,jp_sal) , ndim_T , ndex_T ) ! salinity 632 CALL histwrite( nid_T, "sosstsst", it, tsn(:,:,1,jp_tem) , ndim_hT, ndex_hT ) ! sea surface temperature 633 CALL histwrite( nid_T, "sosaline", it, tsn(:,:,1,jp_sal) , ndim_hT, ndex_hT ) ! sea surface salinity 634 635 ENDIF 636 IF( lk_vvl ) THEN 637 zw3d(:,:,:) = ( ( fse3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 638 CALL histwrite( nid_T, "vovvle3t", it, fse3t_n (:,:,:) , ndim_T , ndex_T ) ! level thickness 639 CALL histwrite( nid_T, "vovvldep", it, fsdept_n(:,:,:) , ndim_T , ndex_T ) ! t-point depth 640 CALL histwrite( nid_T, "vovvldef", it, zw3d , ndim_T , ndex_T ) ! level thickness deformation 641 ENDIF 603 642 CALL histwrite( nid_T, "sossheig", it, sshn , ndim_hT, ndex_hT ) ! sea surface height 604 643 CALL histwrite( nid_T, "sowaflup", it, ( emp-rnf ) , ndim_hT, ndex_hT ) ! upward water flux … … 606 645 ! (includes virtual salt flux beneath ice 607 646 ! in linear free surface case) 608 #if ! defined key_vvl 609 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem)610 CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT )! c/d term on sst611 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal)612 CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT )! c/d term on sss613 #endif 647 IF( .NOT. lk_vvl ) THEN 648 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) 649 CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sst 650 zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal) 651 CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT ) ! c/d term on sss 652 ENDIF 614 653 CALL histwrite( nid_T, "sohefldo", it, qns + qsr , ndim_hT, ndex_hT ) ! total heat flux 615 654 CALL histwrite( nid_T, "soshfldo", it, qsr , ndim_hT, ndex_hT ) ! solar heat flux … … 752 791 ! 753 792 CALL wrk_dealloc( jpi , jpj , zw2d ) 754 IF ( ln_traldf_gdia ) call wrk_dealloc( jpi , jpj , jpk , zw3d )793 IF ( ln_traldf_gdia .OR. lk_vvl ) call wrk_dealloc( jpi , jpj , jpk , zw3d ) 755 794 ! 756 795 IF( nn_timing == 1 ) CALL timing_stop('dia_wri') … … 813 852 1, jpi, 1, jpj, nit000-1, zjulian, zdt, nh_i, id_i, domain_id=nidom, snc4chunks=snc4set ) ! Horizontal grid : glamt and gphit 814 853 CALL histvert( id_i, "deptht", "Vertical T levels", & ! Vertical grid : gdept 815 "m", jpk, gdept_ 0, nz_i, "down")854 "m", jpk, gdept_1d, nz_i, "down") 816 855 817 856 ! Declare all the output fields as NetCDF variables … … 841 880 CALL histdef( id_i, "sometauy", "Meridional Wind Stress", "N/m2" , & ! j-wind stress 842 881 & jpi, jpj, nh_i, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 882 IF( lk_vvl ) THEN 883 CALL histdef( id_i, "vovvldep", "T point depth" , "m" , & ! t-point depth 884 & jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 885 END IF 843 886 844 887 #if defined key_lim2
Note: See TracChangeset
for help on using the changeset viewer.