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 14064 for NEMO/trunk/src/OCE/ISF – NEMO

Ignore:
Timestamp:
2020-12-03T18:01:12+01:00 (3 years ago)
Author:
ayoung
Message:

Merging ticket #2506 into trunk.

Location:
NEMO/trunk/src/OCE/ISF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/ISF/isf_oce.F90

    r13558 r14064  
    11MODULE isf_oce 
    22   !!====================================================================== 
    3    !!                       ***  MODULE  sbcisf  *** 
    4    !! Surface module :  compute iceshelf melt and heat flux 
     3   !!                       ***  MODULE  isf_oce  *** 
     4   !! Ice shelves :  ice shelves variables defined in memory 
    55   !!====================================================================== 
    66   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
     
    146146   END SUBROUTINE isf_alloc_par 
    147147 
     148    
    148149   SUBROUTINE isf_alloc_cav() 
    149150      !!--------------------------------------------------------------------- 
     
    173174   END SUBROUTINE isf_alloc_cav 
    174175 
     176    
    175177   SUBROUTINE isf_alloc_cpl() 
    176178      !!--------------------------------------------------------------------- 
     
    184186      ierr = 0 
    185187      ! 
    186       ALLOCATE( risfcpl_ssh(jpi,jpj), risfcpl_tsc(jpi,jpj,jpk,jpts), risfcpl_vol(jpi,jpj,jpk), STAT=ialloc ) 
    187       ierr = ierr + ialloc 
    188       ! 
    189       risfcpl_tsc(:,:,:,:) = 0.0 ; risfcpl_vol(:,:,:) = 0.0 ; risfcpl_ssh(:,:) = 0.0 
    190  
    191       IF ( ln_isfcpl_cons) THEN 
    192          ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) ,risfcpl_cons_ssh(jpi,jpj), STAT=ialloc ) 
     188      ALLOCATE( risfcpl_ssh(jpi,jpj) , risfcpl_tsc(jpi,jpj,jpk,jpts) , risfcpl_vol(jpi,jpj,jpk) , STAT=ialloc ) 
     189      ierr = ierr + ialloc 
     190      ! 
     191      risfcpl_tsc(:,:,:,:) = 0._wp ; risfcpl_vol(:,:,:) = 0._wp ; risfcpl_ssh(:,:) = 0._wp 
     192 
     193      IF ( ln_isfcpl_cons ) THEN 
     194         ALLOCATE( risfcpl_cons_tsc(jpi,jpj,jpk,jpts) , risfcpl_cons_vol(jpi,jpj,jpk) , risfcpl_cons_ssh(jpi,jpj) , STAT=ialloc ) 
    193195         ierr = ierr + ialloc 
    194196         ! 
    195          risfcpl_cons_tsc(:,:,:,:) = 0.0 ; risfcpl_cons_vol(:,:,:) = 0.0 ; risfcpl_cons_ssh(:,:) = 0.0 
     197         risfcpl_cons_tsc(:,:,:,:) = 0._wp ; risfcpl_cons_vol(:,:,:) = 0._wp ; risfcpl_cons_ssh(:,:) = 0._wp 
    196198         ! 
    197199      END IF 
     
    202204   END SUBROUTINE isf_alloc_cpl 
    203205 
     206    
    204207   SUBROUTINE isf_dealloc_cpl() 
    205208      !!--------------------------------------------------------------------- 
     
    213216      ierr = 0 
    214217      ! 
    215       DEALLOCATE( risfcpl_ssh, risfcpl_tsc, risfcpl_vol, STAT=ialloc ) 
     218      DEALLOCATE( risfcpl_ssh , risfcpl_tsc , risfcpl_vol , STAT=ialloc ) 
    216219      ierr = ierr + ialloc 
    217220      ! 
     
    221224   END SUBROUTINE isf_dealloc_cpl 
    222225 
     226    
    223227   SUBROUTINE isf_alloc() 
    224228      !!--------------------------------------------------------------------- 
     
    233237      ierr = 0       ! set to zero if no array to be allocated 
    234238      ! 
    235       ALLOCATE(fwfisf_par(jpi,jpj)  , fwfisf_par_b(jpi,jpj), & 
    236          &     fwfisf_cav(jpi,jpj)  , fwfisf_cav_b(jpi,jpj), & 
    237          &     fwfisf_oasis(jpi,jpj),            STAT=ialloc ) 
    238       ierr = ierr + ialloc 
    239       ! 
    240       ALLOCATE(risf_par_tsc(jpi,jpj,jpts), risf_par_tsc_b(jpi,jpj,jpts), STAT=ialloc ) 
    241       ierr = ierr + ialloc 
    242       ! 
    243       ALLOCATE(risf_cav_tsc(jpi,jpj,jpts), risf_cav_tsc_b(jpi,jpj,jpts), STAT=ialloc ) 
    244       ierr = ierr + ialloc 
    245       ! 
    246       ALLOCATE(risfload(jpi,jpj), STAT=ialloc) 
    247       ierr = ierr + ialloc 
    248       ! 
    249       ALLOCATE( mskisf_cav(jpi,jpj), STAT=ialloc) 
     239      ALLOCATE( fwfisf_par  (jpi,jpj) , fwfisf_par_b(jpi,jpj) ,    & 
     240         &      fwfisf_cav  (jpi,jpj) , fwfisf_cav_b(jpi,jpj) ,    & 
     241         &      fwfisf_oasis(jpi,jpj)                         , STAT=ialloc ) 
     242      ierr = ierr + ialloc 
     243      ! 
     244      ALLOCATE( risf_par_tsc(jpi,jpj,jpts) , risf_par_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 
     245      ierr = ierr + ialloc 
     246      ! 
     247      ALLOCATE( risf_cav_tsc(jpi,jpj,jpts) , risf_cav_tsc_b(jpi,jpj,jpts) , STAT=ialloc ) 
     248      ierr = ierr + ialloc 
     249      ! 
     250      ALLOCATE( risfload(jpi,jpj) , STAT=ialloc ) 
     251      ierr = ierr + ialloc 
     252      ! 
     253      ALLOCATE( mskisf_cav(jpi,jpj) , STAT=ialloc ) 
    250254      ierr = ierr + ialloc 
    251255      ! 
     
    254258      ! 
    255259      ! initalisation of fwf and tsc array to 0 
    256       risfload(:,:)       = 0.0_wp 
    257       fwfisf_oasis(:,:)   = 0.0_wp 
    258       fwfisf_par(:,:)     = 0.0_wp    ; fwfisf_par_b(:,:)     = 0.0_wp 
    259       fwfisf_cav(:,:)     = 0.0_wp    ; fwfisf_cav_b(:,:)     = 0.0_wp 
    260       risf_cav_tsc(:,:,:) = 0.0_wp    ; risf_cav_tsc_b(:,:,:) = 0.0_wp 
    261       risf_par_tsc(:,:,:) = 0.0_wp    ; risf_par_tsc_b(:,:,:) = 0.0_wp 
    262       ! 
    263  
     260      risfload    (:,:)   = 0._wp 
     261      fwfisf_oasis(:,:)   = 0._wp 
     262      fwfisf_par  (:,:)   = 0._wp   ;   fwfisf_par_b  (:,:)   = 0._wp 
     263      fwfisf_cav  (:,:)   = 0._wp   ;   fwfisf_cav_b  (:,:)   = 0._wp 
     264      risf_cav_tsc(:,:,:) = 0._wp   ;   risf_cav_tsc_b(:,:,:) = 0._wp 
     265      risf_par_tsc(:,:,:) = 0._wp   ;   risf_par_tsc_b(:,:,:) = 0._wp 
     266      ! 
    264267   END SUBROUTINE isf_alloc 
    265  
     268    
     269   !!====================================================================== 
    266270END MODULE isf_oce 
  • NEMO/trunk/src/OCE/ISF/isfload.F90

    r13295 r14064  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfload  *** 
    4    !! isfload module :  compute ice shelf load (needed for the hpg) 
     4   !! Ice Shelves :   compute ice shelf load (needed for the hpg) 
    55   !!====================================================================== 
    66   !! History :  4.1  !  2019-09  (P. Mathiot) original code 
     
    88 
    99   !!---------------------------------------------------------------------- 
    10    !!   isfload      : compute ice shelf load 
     10   !!   isf_load      : compute ice shelf load 
    1111   !!---------------------------------------------------------------------- 
    1212 
     
    2323   PRIVATE 
    2424 
    25    PUBLIC isf_load 
     25   PUBLIC   isf_load   ! called by isfstp.F90 
     26   ! 
    2627   !! * Substitutions 
    2728#  include "do_loop_substitute.h90" 
    2829#  include "domzgr_substitute.h90" 
    29  
     30   !!---------------------------------------------------------------------- 
     31   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     32   !! $Id: sbcisf.F90 10536 2019-01-16 19:21:09Z mathiot $ 
     33   !! Software governed by the CeCILL license (see ./LICENSE) 
     34   !!---------------------------------------------------------------------- 
    3035CONTAINS 
    3136 
     
    3742      !! 
    3843      !!-------------------------------------------------------------------- 
    39       !!-------------------------- OUT ------------------------------------- 
    40       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pisfload 
    41       !!-------------------------- IN  ------------------------------------- 
    42       INTEGER,                      INTENT(in)    :: Kmm           ! ocean time level index 
     44      INTEGER,                      INTENT(in   ) ::   Kmm        ! ocean time level index       
     45      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pisfload   ! ice shelf load 
    4346      !!---------------------------------------------------------------------- 
    4447      ! 
     
    4649      !               the smaller the residual flow is, the better it is. 
    4750      ! 
    48       ! ice shelf cavity 
     51      ! type of ice shelf cavity 
    4952      SELECT CASE ( cn_isfload ) 
    5053      CASE ( 'uniform' ) 
     
    5659   END SUBROUTINE isf_load 
    5760 
    58    SUBROUTINE isf_load_uniform( Kmm, pisfload ) 
     61    
     62   SUBROUTINE isf_load_uniform( Kmm, pload ) 
    5963      !!-------------------------------------------------------------------- 
    6064      !!                  ***  SUBROUTINE isf_load  *** 
     
    6771      !! 
    6872      !!-------------------------------------------------------------------- 
    69       !!-------------------------- OUT ------------------------------------- 
    70       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pisfload 
    71       !!-------------------------- IN  ------------------------------------- 
    72       INTEGER,                      INTENT(in)    :: Kmm           ! ocean time level index 
    73       !!-------------------------------------------------------------------- 
     73      INTEGER,                      INTENT(in   ) ::   Kmm     ! ocean time level index       
     74      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pload   ! ice shelf load 
     75      ! 
    7476      INTEGER  :: ji, jj, jk 
    7577      INTEGER  :: ikt 
    76       REAL(wp)                          :: znad        !  
    7778      REAL(wp), DIMENSION(jpi,jpj)      :: zrhdtop_isf ! water density    displaced by the ice shelf (at the interface) 
    7879      REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts_top     ! water properties displaced by the ice shelf    
    7980      REAL(wp), DIMENSION(jpi,jpj,jpk)  :: zrhd        ! water density    displaced by the ice shelf 
    8081      !!---------------------------------------------------------------------- 
    81       ! 
    82       znad = 1._wp                     !- To use density and not density anomaly 
    8382      ! 
    8483      !                                !- assume water displaced by the ice shelf is at T=rn_isfload_T and S=rn_isfload_S (rude) 
     
    8786      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
    8887         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) ) 
     88!!st ==>> CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) ) 
    8989      END DO 
    9090      ! 
     
    9393      ! 
    9494      !                                !- Surface value + ice shelf gradient 
    95       pisfload(:,:) = 0._wp                       ! compute pressure due to ice shelf load  
     95      pload(:,:) = 0._wp                      ! compute pressure due to ice shelf load  
    9696      DO_2D( 1, 1, 1, 1 ) 
    9797         ikt = mikt(ji,jj) 
    9898         ! 
    9999         IF ( ikt > 1 ) THEN 
     100            !                                 ! top layer of the ice shelf 
     101            pload(ji,jj) = pload(ji,jj)   & 
     102               &         + zrhd (ji,jj,1) * e3w(ji,jj,1,Kmm) 
    100103            ! 
    101             ! top layer of the ice shelf 
    102             pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) )   & 
    103                &                                * e3w(ji,jj,1,Kmm) 
    104             ! 
    105             ! core layers of the ice shelf 
    106             DO jk = 2, ikt-1 
    107                pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk))   & 
    108                   &                                * e3w(ji,jj,jk,Kmm) 
     104            DO jk = 2, ikt-1                  ! core layers of the ice shelf 
     105               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk))   & 
     106                  &                        *   e3w(ji,jj,jk,Kmm) 
    109107            END DO 
    110             ! 
    111             ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 
    112             pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) & 
    113                &                                              * ( risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 
     108            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 
     109            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +  zrhd(ji,jj,ikt-1)     )   & 
     110               &                        * (     risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 
     111!!st ==>>     &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) ) 
    114112            ! 
    115113         END IF 
     
    117115      ! 
    118116   END SUBROUTINE isf_load_uniform 
    119  
     117    
     118   !!====================================================================== 
    120119END MODULE isfload 
  • NEMO/trunk/src/OCE/ISF/isfstp.F90

    r13237 r14064  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfstp  *** 
    4    !! Surface module :  compute iceshelf load, melt and heat flux 
     4   !! Ice Shelves :  compute iceshelf load, melt and heat flux 
    55   !!====================================================================== 
    66   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
     
    4242   !! Software governed by the CeCILL license (see ./LICENSE) 
    4343   !!---------------------------------------------------------------------- 
    44  
    4544CONTAINS 
    4645  
    47   SUBROUTINE isf_stp( kt, Kmm ) 
     46   SUBROUTINE isf_stp( kt, Kmm ) 
    4847      !!--------------------------------------------------------------------- 
    4948      !!                  ***  ROUTINE isf_stp  *** 
     
    5857      !!              - compute fluxes 
    5958      !!              - write restart variables 
    60       !! 
    61       !!---------------------------------------------------------------------- 
    62       INTEGER, INTENT(in) ::   kt   ! ocean time step 
    63       INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    64       !!---------------------------------------------------------------------- 
    65       INTEGER :: jk                               ! loop index 
    66       REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t    ! e3t  
     59      !!---------------------------------------------------------------------- 
     60      INTEGER, INTENT(in) ::   kt    ! ocean time step 
     61      INTEGER, INTENT(in) ::   Kmm   ! ocean time level index 
     62      ! 
     63      INTEGER :: jk                              ! loop index 
     64#if defined key_qco 
     65      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t   ! 3D workspace 
     66#endif 
    6767      !!--------------------------------------------------------------------- 
    6868      ! 
     
    8383         ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
    8484         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
     85#if defined key_qco 
    8586         DO jk = 1, jpk 
    8687            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    8788         END DO  
    88          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
     89         CALL isf_tbl_lvl( ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     90#else 
     91         CALL isf_tbl_lvl( ht(:,:),  e3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     92#endif 
    8993         ! 
    9094         ! 1.3: compute ice shelf melt 
    91          CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 
     95         CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav ) 
    9296         ! 
    9397      END IF 
     
    108112         ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 
    109113         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
     114#if defined key_qco 
    110115         DO jk = 1, jpk 
    111116            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    112117         END DO 
    113          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
     118         CALL isf_tbl_lvl( ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     119#else 
     120         CALL isf_tbl_lvl( ht(:,:),  e3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     121#endif 
    114122         ! 
    115123         ! 2.3: compute ice shelf melt 
    116          CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 
     124         CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par ) 
    117125         ! 
    118126      END IF 
     
    128136   END SUBROUTINE isf_stp 
    129137 
    130    SUBROUTINE isf_init(Kbb, Kmm, Kaa) 
     138    
     139   SUBROUTINE isf_init( Kbb, Kmm, Kaa ) 
    131140      !!--------------------------------------------------------------------- 
    132141      !!                  ***  ROUTINE isfstp_init  *** 
     
    142151      !!              - call cav/param/isfcpl init routine 
    143152      !!---------------------------------------------------------------------- 
    144       INTEGER, INTENT(in) :: Kbb, Kmm, Kaa      ! ocean time level indices 
     153      INTEGER, INTENT(in) ::   Kbb, Kmm, Kaa   ! ocean time level indices 
     154      !!---------------------------------------------------------------------- 
    145155      ! 
    146156      ! constrain: l_isfoasis need to be known 
    147157      ! 
    148       ! Read namelist 
    149       CALL isf_nam() 
    150       ! 
    151       ! Allocate public array 
    152       CALL isf_alloc() 
    153       ! 
    154       ! check option compatibility 
    155       CALL isf_ctl() 
    156       ! 
    157       ! compute ice shelf load 
    158       IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 
     158      CALL isf_nam()                                              ! Read namelist 
     159      ! 
     160      CALL isf_alloc()                                            ! Allocate public array 
     161      ! 
     162      CALL isf_ctl()                                              ! check option compatibility 
     163      ! 
     164      IF( ln_isfcav ) CALL isf_load( Kmm, risfload )              ! compute ice shelf load 
    159165      ! 
    160166      ! terminate routine now if no ice shelf melt formulation specify 
    161       IF ( ln_isf ) THEN 
    162          ! 
    163          !--------------------------------------------------------------------------------------------------------------------- 
    164          ! initialisation melt in the cavity 
    165          IF ( ln_isfcav_mlt ) CALL isf_cav_init() 
    166          ! 
    167          !--------------------------------------------------------------------------------------------------------------------- 
    168          ! initialisation parametrised melt 
    169          IF ( ln_isfpar_mlt ) CALL isf_par_init() 
    170          ! 
    171          !--------------------------------------------------------------------------------------------------------------------- 
    172          ! initialisation ice sheet coupling 
    173          IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 
     167      IF( ln_isf ) THEN 
     168         ! 
     169         IF( ln_isfcav_mlt )   CALL isf_cav_init()                ! initialisation melt in the cavity 
     170         ! 
     171         IF( ln_isfpar_mlt )   CALL isf_par_init()                ! initialisation parametrised melt 
     172         ! 
     173         IF( ln_isfcpl     )   CALL isfcpl_init( Kbb, Kmm, Kaa )  ! initialisation ice sheet coupling 
    174174         ! 
    175175      END IF 
     
    177177  END SUBROUTINE isf_init 
    178178 
     179   
    179180  SUBROUTINE isf_ctl() 
    180181      !!--------------------------------------------------------------------- 
     
    283284      END IF 
    284285   END SUBROUTINE isf_ctl 
    285    ! 
     286 
     287    
    286288   SUBROUTINE isf_nam 
    287289      !!--------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.