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 11931 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+ – NEMO

Ignore:
Timestamp:
2019-11-19T18:30:57+01:00 (4 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF_nemo: add comments, improve memory usage of ln_isfcpl_cons option, fix issue in ISOMIP+ configuration

Location:
NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/isf.F90

    r11889 r11931  
    2222   PRIVATE 
    2323 
    24    PUBLIC   isf_alloc, isf_alloc_par, isf_alloc_cav, isf_alloc_cpl 
     24   PUBLIC   isf_alloc, isf_alloc_par, isf_alloc_cav, isf_alloc_cpl, isf_dealloc_cpl 
    2525   ! 
    2626   !------------------------------------------------------- 
     
    175175      !!                  ***  ROUTINE isf_alloc_cpl  *** 
    176176      !! 
    177       !! ** Purpose :  
    178       !! 
    179       !! ** Method  :  
     177      !! ** Purpose : allocate array use for the ice sheet coupling 
    180178      !! 
    181179      !!---------------------------------------------------------------------- 
     
    202200   END SUBROUTINE isf_alloc_cpl 
    203201 
     202   SUBROUTINE isf_dealloc_cpl() 
     203      !!--------------------------------------------------------------------- 
     204      !!                  ***  ROUTINE isf_dealloc_cpl  *** 
     205      !! 
     206      !! ** Purpose : de-allocate useless public 3d array used for ice sheet coupling 
     207      !! 
     208      !!---------------------------------------------------------------------- 
     209      INTEGER :: ierr, ialloc 
     210      !!---------------------------------------------------------------------- 
     211      ierr = 0 
     212      ! 
     213      DEALLOCATE( risfcpl_ssh, risfcpl_tsc, risfcpl_vol, STAT=ialloc ) 
     214      ierr = ierr + ialloc 
     215      ! 
     216      CALL mpp_sum ( 'isf', ierr ) 
     217      IF( ierr /= 0 )   CALL ctl_stop('STOP','isfcpl: failed to deallocate arrays.') 
     218      ! 
     219   END SUBROUTINE isf_dealloc_cpl 
     220 
    204221   SUBROUTINE isf_alloc() 
    205222      !!--------------------------------------------------------------------- 
    206223      !!                  ***  ROUTINE isf_alloc  *** 
    207224      !! 
    208       !! ** Purpose :  
    209       !! 
    210       !! ** Method  :  
     225      !! ** Purpose : allocate array used for the ice shelf cavity (cav and par) 
    211226      !! 
    212227      !!---------------------------------------------------------------------- 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/isfstp.F90

    r11908 r11931  
    9797      END IF 
    9898      ! 
    99       IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) 
     99      IF ( ln_isfcpl ) THEN 
     100         ! after step nit000 + 2 we do not need anymore the risfcpl_ arrays 
     101         IF ( kt == nit000 + 2 ) CALL isf_dealloc_cpl() 
     102 
     103         IF ( lrst_oce ) CALL isfcpl_rst_write(kt) 
     104      END IF 
    100105      ! 
    101106      IF( ln_timing )   CALL timing_stop('isf') 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/tests/ISOMIP+/MY_SRC/sbcfwb.F90

    r11908 r11931  
    118118         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    119119            z_fwf = glob_sum( 'sbcfwb',  e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
     120            ! 
     121            ! correction for ice sheet coupling testing (ie remove the excess through the surface) 
     122            ! test impact on the melt as conservation correction made in depth 
     123            ! test conservation level as sbcfwb is conserving 
     124            ! avoid the model to blow up for large ssh drop (isomip OCEAN3 with melt switch off and uniform T/S) 
     125            IF (ln_isfcpl .AND. ln_isfcpl_cons) THEN 
     126               z_fwf = z_fwf + glob_sum( 'sbcfwb',  e1e2t(:,:) * risfcpl_cons_ssh(:,:) * rau0 ) 
     127            END IF 
     128            ! 
    120129            z_fwf = z_fwf / area 
    121130            zcoef = z_fwf * rcp 
    122             emp(:,:) = emp(:,:) - z_fwf            * tmask(:,:,1) ! (Eq. 34 AD2015) 
    123             qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't want any bouyancy fluxes 
    124             sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't want any bouyancy fluxes 
     131            emp(:,:) = emp(:,:) - z_fwf              * tmask(:,:,1) ! (Eq. 34 AD2015) 
     132            qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! (Eq. 35 AD2015) ! use sst_m to avoid generation of any bouyancy fluxes 
     133            sfx(:,:) = sfx(:,:) + z_fwf * sss_m(:,:) * tmask(:,:,1) ! (Eq. 36 AD2015) ! use sss_m to avoid generation of any bouyancy fluxes 
    125134            !qns(:,:) = qns(:,:) + zcoef * ( -1.9 ) * tmask(:,:,1) ! (Eq. 35 AD2015) ! could be sst_m if we don't want any bouyancy fluxes 
    126135            !sfx(:,:) = sfx(:,:) + z_fwf * ( 33.8 ) * tmask(:,:,1) ! (Eq. 36 AD2015) ! could be sss_m if we don't want any bouyancy fluxes 
     136            !qns(:,:) = qns(:,:) + zcoef * ( -1.0 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 
     137            !sfx(:,:) = sfx(:,:) + z_fwf * ( 34.2 ) * tmask(:,:,1) ! use for ISOMIP+ coupling sanity check (keep ssh cst while playing with cpl conservation option) 
    127138         ENDIF 
    128139         ! 
Note: See TracChangeset for help on using the changeset viewer.