New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 4649 for branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 – NEMO

Ignore:
Timestamp:
2014-05-27T11:28:12+02:00 (10 years ago)
Author:
clem
Message:

finalizing LIM3 heat budget conservation + multiple minor bugs corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r4634 r4649  
    4242   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    4343   USE traqsr           ! clem: add penetration of solar flux into the calculation of heat budget 
     44   USE iom 
    4445 
    4546   IMPLICIT NONE 
     
    104105      INTEGER  ::   ji, jj, jl, jk           ! dummy loop indices 
    105106      REAL(wp) ::   zinda, zemp      ! local scalars 
    106       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp     ! 2D/3D workspace 
    107       REAL(wp) ::   ztmelts         ! clem 2014: for HC diags 
    108  
    109107      REAL(wp) ::   zf_mass         ! Heat flux associated with mass exchange ice->ocean (W.m-2) 
    110108      REAL(wp) ::   zfcm1           ! New solar flux received by the ocean 
     109      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalb, zalbp     ! 2D/3D workspace 
    111110      !!--------------------------------------------------------------------- 
    112111       
    113112      IF( lk_cpl )   CALL wrk_alloc( jpi, jpj, jpl, zalb, zalbp ) 
     113 
     114      ! make calls for heat fluxes before it is modified 
     115      CALL iom_put( "qsr_oce" , qsr(:,:) * pfrld(:,:) )   !     solar flux at ocean surface 
     116      CALL iom_put( "qns_oce" , qns(:,:) * pfrld(:,:) )   ! non-solar flux at ocean surface 
     117      CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  !     solar flux at ice surface 
     118      CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  ! non-solar flux at ice surface 
     119      CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * old_a_i(:,:,:), dim=3 ) )  !     solar flux transmitted thru ice 
     120      CALL iom_put( "qt_oce"  , ( qsr(:,:) + qns(:,:) ) * pfrld(:,:) )   
     121      CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) ) * old_a_i(:,:,:), dim=3 ) ) 
    114122 
    115123      ! pfrld is the lead fraction at the previous time step (actually between TRP and THD) 
     
    165173            IF( lk_cpl ) THEN  
    166174               zemp = - emp_tot(ji,jj) + emp_ice(ji,jj) * ( 1. - pfrld(ji,jj) )    &   ! 
    167                   &   - wfx_snw(ji,jj) 
     175                  &   + wfx_snw(ji,jj) 
    168176            ELSE 
    169177               zemp =   emp(ji,jj)     *           pfrld(ji,jj)            &   ! evaporation over oceanic fraction 
     
    176184 
    177185            ! mass flux at the ocean/ice interface 
    178             fmmflx(ji,jj) = wfx_ice(ji,jj) * rdt_ice                   ! F/M mass flux save at least for biogeochemical model 
    179             emp(ji,jj)    = zemp + wfx_ice(ji,jj) + wfx_snw(ji,jj)     ! mass flux + F/M mass flux (always ice/ocean mass exchange) 
     186            fmmflx(ji,jj) = - wfx_ice(ji,jj) * rdt_ice                   ! F/M mass flux save at least for biogeochemical model 
     187            emp(ji,jj)    = zemp - wfx_ice(ji,jj) - wfx_snw(ji,jj) - wfx_sub(ji,jj)   ! mass flux + F/M mass flux (always ice/ocean mass exchange) 
    180188             
    181189         END DO 
     
    213221      ENDIF 
    214222 
    215       ! ------------------------------------------------- 
    216       ! C. Rousset Begin Diagnostics for heat in W/m2 
    217       ! ------------------------------------------------- 
    218       DO jj = 1, jpj 
    219          DO ji = 1, jpi             
    220             diag_heat_dhc1(ji,jj) = ( SUM( d_e_i_trp(ji,jj,1:nlay_i,:) + d_e_i_thd(ji,jj,1:nlay_i,:) ) +  &  
    221                &                      SUM( d_e_s_trp(ji,jj,1:nlay_s,:) + d_e_s_thd(ji,jj,1:nlay_s,:) ) ) * unit_fac * r1_rdtice / area(ji,jj)    
    222          END DO 
    223       END DO 
    224       ! ------------------------------------------------- 
    225       ! C. Rousset End Diagnostics 
    226       ! ------------------------------------------------- 
    227223 
    228224      IF(ln_ctl) THEN 
Note: See TracChangeset for help on using the changeset viewer.