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 9943 – NEMO

Changeset 9943


Ignore:
Timestamp:
2018-07-13T16:15:22+02:00 (6 years ago)
Author:
clem
Message:

add a proper correction for negative values occuring after Ultimate-Macho advection scheme. This correction conserves mass, heat etc. 3 diagnostics have also been added in the outputs to make sure that the negative values are indeed small and unimportant in view of the advantages in using Ultimate-Macho

Location:
NEMO/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml

    r9896 r9943  
    7979       <field field_ref="vfxsnw"           name="vfxsnw" /> 
    8080        
     81       <!-- diag error for negative ice volume after advection --> 
     82       <field field_ref="iceneg_pres"      name="sineg_pres" /> 
     83       <field field_ref="iceneg_volu"      name="sineg_volu" /> 
     84       <field field_ref="iceneg_hfx"       name="sineg_hfx"  /> 
     85 
    8186       <!-- categories --> 
    8287       <field field_ref="icemask_cat"      name="simskcat"/> 
  • NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml

    r9934 r9943  
    158158          <!-- diags --> 
    159159          <field id="hfxdhc"       long_name="Heat content variation in snow and ice (neg = ice cooling)"   unit="W/m2" /> 
     160 
     161     <!-- diagnostics of the negative values resulting from the advection scheme --> 
     162     <field id="iceneg_pres"  long_name="Fraction of time steps with negative sea ice volume"                    unit=""     /> 
     163     <field id="iceneg_volu"  long_name="Negative sea ice volume per area arising from advection"                unit="m"    /> 
     164          <field id="iceneg_hfx"   long_name="Negative sea ice heat content (eq. heat flux) arising from advection"   unit="W/m2" /> 
    160165 
    161166     <!-- sbcssm variables --> 
  • NEMO/trunk/cfgs/SPITZ12/EXPREF/file_def_nemo-ice.xml

    r9896 r9943  
    7878       <field field_ref="vfxice"           name="vfxice" /> 
    7979       <field field_ref="vfxsnw"           name="vfxsnw" /> 
     80 
     81       <!-- diag error for negative ice volume after advection --> 
     82       <field field_ref="iceneg_pres"      name="sineg_pres" /> 
     83       <field field_ref="iceneg_volu"      name="sineg_volu" /> 
     84       <field field_ref="iceneg_hfx"       name="sineg_hfx"  /> 
    8085        
    8186       <!-- categories --> 
  • NEMO/trunk/src/ICE/icectl.F90

    r9935 r9943  
    148148            IF ( ABS( zs   ) > zs_sill )   WRITE(numout,*) 'violation saline [psu*Mt/day] (',cd_routine,') = ',zs 
    149149            IF ( ABS( zt   ) > zt_sill )   WRITE(numout,*) 'violation enthalpy [GW]       (',cd_routine,') = ',zt 
    150             IF ( ABS(zvtrp ) > zv_sill .AND. cd_routine == 'icedyn_adv' ) THEN 
    151                                            WRITE(numout,*) 'violation vtrp [Mt/day]       (',cd_routine,') = ',zvtrp 
    152                                            WRITE(numout,*) 'violation etrp [GW]           (',cd_routine,') = ',zetrp 
    153             ENDIF 
    154150            IF ( zvmin < -epsi10 )         WRITE(numout,*) 'violation v_i<0  [m]          (',cd_routine,') = ',zvmin 
    155151            IF ( zamax > MAX(rn_amax_n,rn_amax_s)+epsi10 .AND. cd_routine /= 'icedyn_adv' .AND. cd_routine /= 'icedyn_rdgrft' )  & 
    156152               &                           WRITE(numout,*) 'violation a_i>amax            (',cd_routine,') = ',zamax 
    157153            IF ( zamin < -epsi10 )         WRITE(numout,*) 'violation a_i<0               (',cd_routine,') = ',zamin 
     154!clem: the following check fails when using UM3-5 advection scheme (see comments in icedyn_adv.F90) 
     155!            IF ( ABS(zvtrp ) > zv_sill .AND. cd_routine == 'icedyn_adv' ) THEN 
     156!                                           WRITE(numout,*) 'violation vtrp [Mt/day]       (',cd_routine,') = ',zvtrp 
     157!                                           WRITE(numout,*) 'violation etrp [GW]           (',cd_routine,') = ',zetrp 
     158!            ENDIF 
    158159         ENDIF 
    159160         ! 
  • NEMO/trunk/src/ICE/icedyn_adv.F90

    r9935 r9943  
    6666      !!---------------------------------------------------------------------- 
    6767      INTEGER, INTENT(in) ::   kt   ! number of iteration 
     68      ! 
     69      INTEGER ::   jl   ! dummy loop indice 
     70      REAL(wp), DIMENSION(jpi,jpj) ::   zmask  ! fraction of time step with v_i < 0 
    6871      !!--------------------------------------------------------------------- 
    6972      ! 
     
    98101      ! Debug the advection schemes 
    99102      !---------------------------- 
    100       ! clem: The 2 advection schemes above are not strictly positive. 
    101       !       In Prather, advected fields are bounded by 0 (not anymore?) in the routine with a MAX(0,field) ==> likely conservation issues 
    102       !       In UM  , advected fields are not bounded and negative values can appear. 
     103      ! clem: At least one advection scheme above is not strictly positive => UM from 3d to 5th order 
     104      !       In Prather, I am not sure if the fields are bounded by 0 or not (it seems not) 
     105      !       In UM3-5  , advected fields are not bounded and negative values can appear. 
    103106      !                   These values are usually very small but in some occasions they can also be non-negligible 
    104107      !                   Therefore one needs to bound the advected fields by 0 (though this is not a clean fix) 
    105       ! ==> 1) remove negative ice areas and volumes (conservation is ensure) 
    106       CALL ice_var_zapsmall  
    107       ! ==> 2) remove remaining negative advected fields (conservation is not preserved) => conservation issue 
    108       WHERE( v_s (:,:,:)   < 0._wp )   v_s (:,:,:)   = 0._wp 
    109       WHERE( sv_i(:,:,:)   < 0._wp )   sv_i(:,:,:)   = 0._wp 
    110       WHERE( e_i (:,:,:,:) < 0._wp )   e_i (:,:,:,:) = 0._wp 
    111       WHERE( e_s (:,:,:,:) < 0._wp )   e_s (:,:,:,:) = 0._wp 
     108      ! 
     109      ! record the negative values resulting from UMx 
     110      zmask(:,:) = 0._wp ! keep the init to 0 here 
     111      DO jl = 1, jpl 
     112         WHERE( v_i(:,:,jl) < 0._wp )   zmask(:,:) = 1._wp 
     113      END DO 
     114      IF( iom_use('iceneg_pres') )   CALL iom_put("iceneg_pres", zmask                                      )  ! fraction of time step with v_i < 0 
     115      IF( iom_use('iceneg_volu') )   CALL iom_put("iceneg_volu", SUM(MIN( v_i, 0. ), dim=3 )                )  ! negative ice volume (only) 
     116      IF( iom_use('iceneg_hfx' ) )   CALL iom_put("iceneg_hfx" , ( SUM(SUM( MIN( e_i(:,:,1:nlay_i,:), 0. )  &  ! negative ice heat content (only) 
     117         &                                                                  , dim=4 ), dim=3 ) )* r1_rdtice )  ! -- eq. heat flux [W/m2] 
     118      ! 
     119      ! ==> conservation is ensured by calling this routine below, 
     120      !     however the global ice volume is then changed by advection (but errors are very small)  
     121      CALL ice_var_zapneg( ato_i, v_i, v_s, sv_i, oa_i, a_i, a_ip, v_ip, e_s, e_i ) 
    112122 
    113123      !------------ 
  • NEMO/trunk/src/ICE/icethd_pnd.F90

    r9935 r9943  
    163163            !--- Pond gowth ---! 
    164164            ! v_ip should never be negative, otherwise code crashes 
    165             ! MV: as far as I saw, UM5 can create very small negative v_ip values (not Prather) 
    166165            v_ip_1d(ji) = MAX( 0._wp, v_ip_1d(ji) + zfr_mlt * zdv_mlt ) 
    167166            ! 
  • NEMO/trunk/src/ICE/icevar.F90

    r9935 r9943  
    4444   !!   ice_var_salprof1d : salinity profile in the ice 1D 
    4545   !!   ice_var_zapsmall  : remove very small area and volume 
     46   !!   ice_var_zapneg    : remove negative ice fields (to debug the advection scheme UM3-5) 
    4647   !!   ice_var_itd       : convert 1-cat to jpl-cat 
    4748   !!   ice_var_itd2      : convert N-cat to jpl-cat 
     
    6869   PUBLIC   ice_var_salprof1d     
    6970   PUBLIC   ice_var_zapsmall 
     71   PUBLIC   ice_var_zapneg 
    7072   PUBLIC   ice_var_itd 
    7173   PUBLIC   ice_var_itd2 
     
    462464      DO jl = 1, jpl       !==  loop over the categories  ==! 
    463465         ! 
     466         WHERE( a_i(:,:,jl) > epsi10 )   ;   h_i(:,:,jl) = v_i(:,:,jl) / a_i(:,:,jl) 
     467         ELSEWHERE                       ;   h_i(:,:,jl) = 0._wp 
     468         END WHERE 
     469         ! 
     470         WHERE( a_i(:,:,jl) < epsi10 .OR. v_i(:,:,jl) < epsi10 .OR. h_i(:,:,jl) < epsi10 )   ;   zswitch(:,:) = 0._wp 
     471         ELSEWHERE                                                                           ;   zswitch(:,:) = 1._wp 
     472         END WHERE 
     473         ! 
    464474         !----------------------------------------------------------------- 
    465475         ! Zap ice energy and use ocean heat to melt ice 
    466476         !----------------------------------------------------------------- 
    467          WHERE( a_i(:,:,jl) > epsi10 )   ;   h_i(:,:,jl) = v_i(:,:,jl) / a_i(:,:,jl) 
    468          ELSEWHERE                       ;   h_i(:,:,jl) = 0._wp 
    469          END WHERE 
    470          ! 
    471          WHERE( a_i(:,:,jl) < epsi10 .OR. v_i(:,:,jl) < epsi10 .OR. h_i(:,:,jl) < epsi10 )   ;   zswitch(:,:) = 0._wp 
    472          ELSEWHERE                                                                           ;   zswitch(:,:) = 1._wp 
    473          END WHERE 
    474          ! 
    475477         DO jk = 1, nlay_i 
    476478            DO jj = 1 , jpj 
     
    495497         END DO 
    496498         ! 
     499         !----------------------------------------------------------------- 
     500         ! zap ice and snow volume, add water and salt to ocean 
     501         !----------------------------------------------------------------- 
    497502         DO jj = 1 , jpj 
    498503            DO ji = 1 , jpi 
     
    502507               wfx_res(ji,jj)  = wfx_res(ji,jj) + (1._wp - zswitch(ji,jj) ) * v_s (ji,jj,jl)   * rhos * r1_rdtice 
    503508               ! 
    504                !----------------------------------------------------------------- 
    505                ! zap ice and snow volume, add water and salt to ocean 
    506                !----------------------------------------------------------------- 
    507509               a_i  (ji,jj,jl) = a_i (ji,jj,jl) * zswitch(ji,jj) 
    508510               v_i  (ji,jj,jl) = v_i (ji,jj,jl) * zswitch(ji,jj) 
     
    533535 
    534536 
     537   SUBROUTINE ice_var_zapneg( pato_i, pv_i, pv_s, psv_i, poa_i, pa_i, pa_ip, pv_ip, pe_s, pe_i ) 
     538      !!------------------------------------------------------------------- 
     539      !!                   ***  ROUTINE ice_var_zapneg *** 
     540      !! 
     541      !! ** Purpose :   Remove negative sea ice fields and correct fluxes 
     542      !!------------------------------------------------------------------- 
     543      INTEGER  ::   ji, jj, jl, jk   ! dummy loop indices 
     544      ! 
     545      REAL(wp), DIMENSION(:,:)    , INTENT(inout) ::   pato_i     ! open water area 
     546      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pv_i       ! ice volume 
     547      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pv_s       ! snw volume 
     548      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   psv_i      ! salt content 
     549      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   poa_i      ! age content 
     550      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pa_i       ! ice concentration 
     551      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pa_ip      ! melt pond fraction 
     552      REAL(wp), DIMENSION(:,:,:)  , INTENT(inout) ::   pv_ip      ! melt pond volume 
     553      REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) ::   pe_s       ! snw heat content 
     554      REAL(wp), DIMENSION(:,:,:,:), INTENT(inout) ::   pe_i       ! ice heat content 
     555      !!------------------------------------------------------------------- 
     556      ! 
     557      WHERE( pato_i(:,:)   < 0._wp )   pato_i(:,:)   = 0._wp 
     558      WHERE( poa_i (:,:,:) < 0._wp )   poa_i (:,:,:) = 0._wp 
     559      WHERE( pa_i  (:,:,:) < 0._wp )   pa_i  (:,:,:) = 0._wp 
     560      WHERE( pa_ip (:,:,:) < 0._wp )   pa_ip (:,:,:) = 0._wp 
     561      WHERE( pv_ip (:,:,:) < 0._wp )   pv_ip (:,:,:) = 0._wp ! in theory one should change wfx_pnd(-) and wfx_sum(+) 
     562      !                                                        but it does not change conservation, so keep it this way is ok 
     563      ! 
     564      DO jl = 1, jpl       !==  loop over the categories  ==! 
     565         ! 
     566         !---------------------------------------- 
     567         ! zap ice energy and send it to the ocean 
     568         !---------------------------------------- 
     569         DO jk = 1, nlay_i 
     570            DO jj = 1 , jpj 
     571               DO ji = 1 , jpi 
     572                  IF( pe_i(ji,jj,jk,jl) < 0._wp ) THEN 
     573                     hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0 
     574                     pe_i(ji,jj,jk,jl) = 0._wp 
     575                  ENDIF 
     576               END DO 
     577            END DO 
     578         END DO 
     579         ! 
     580         DO jk = 1, nlay_s 
     581            DO jj = 1 , jpj 
     582               DO ji = 1 , jpi 
     583                  IF( pe_s(ji,jj,jk,jl) < 0._wp ) THEN 
     584                     hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * r1_rdtice ! W.m-2 <0 
     585                     pe_s(ji,jj,jk,jl) = 0._wp 
     586                  ENDIF 
     587               END DO 
     588            END DO 
     589         END DO 
     590         ! 
     591         !----------------------------------------------------- 
     592         ! zap ice and snow volume, add water and salt to ocean 
     593         !----------------------------------------------------- 
     594         DO jj = 1 , jpj 
     595            DO ji = 1 , jpi 
     596              IF( pv_i(ji,jj,jl) < 0._wp ) THEN 
     597                  wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * r1_rdtice 
     598                  pv_i   (ji,jj,jl) = 0._wp 
     599               ENDIF 
     600               IF( pv_s(ji,jj,jl) < 0._wp ) THEN 
     601                  wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_s (ji,jj,jl) * rhos * r1_rdtice 
     602                  pv_s   (ji,jj,jl) = 0._wp 
     603               ENDIF 
     604               IF( psv_i(ji,jj,jl) < 0._wp ) THEN 
     605                  sfx_res(ji,jj)    = sfx_res(ji,jj) + psv_i(ji,jj,jl) * rhoi * r1_rdtice 
     606                  psv_i  (ji,jj,jl) = 0._wp 
     607               ENDIF 
     608            END DO 
     609         END DO 
     610         ! 
     611      END DO  
     612      ! 
     613   END SUBROUTINE ice_var_zapneg 
     614 
     615    
    535616   SUBROUTINE ice_var_itd( zhti, zhts, zati, zh_i, zh_s, za_i ) 
    536617      !!------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.