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.
isfparmlt.F90 in NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF – NEMO

source: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfparmlt.F90 @ 11852

Last change on this file since 11852 was 11852, checked in by mathiot, 4 years ago

ENHANCE-02_ISF_nemo: fix WED025 restartability, finish removing useless USE, remove useless lbc_lnk

File size: 11.1 KB
Line 
1MODULE isfparmlt
2   !!======================================================================
3   !!                       ***  MODULE  isfparmlt  ***
4   !! Ice shelf parametrisation module :  update surface ocean boundary condition under ice
5   !!                   shelf using an ice shelf melt parametrisation
6   !!======================================================================
7   !! History :  4.0  ! original code
8   !!----------------------------------------------------------------------
9
10   USE isf            ! ice shelf
11   USE isftbl , ONLY: isf_tbl   ! ice shelf depth average
12
13   USE dom_oce                  ! ocean space and time domain
14   USE oce    , ONLY: tsn       ! ocean dynamics and tracers
15   USE phycst , ONLY: rcp, rau0 ! physical constants
16   USE eosbn2 , ONLY: eos_fzp   ! equation of state
17
18   USE in_out_manager              ! I/O manager
19   USE iom        , ONLY: iom_put  ! I/O library
20   USE fldread    , ONLY: fld_read !
21   USE lib_fortran, ONLY: glob_sum !
22   USE lib_mpp    , ONLY: ctl_stop !
23
24   IMPLICIT NONE
25
26   PRIVATE
27
28   PUBLIC  isfpar_mlt 
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   !!----------------------------------------------------------------------
35CONTAINS
36
37! -------------------------------------------------------------------------------------------------------
38! -------------------------------- PUBLIC SUBROUTINE ----------------------------------------------------
39! -------------------------------------------------------------------------------------------------------
40
41  SUBROUTINE isfpar_mlt( kt, pqhc, pqoce, pqfwf )
42      !!---------------------------------------------------------------------
43      !!                  ***  ROUTINE isfpar_mlt  ***
44      !!
45      !! ** Purpose : Compute Salt and Heat fluxes related to ice_shelf
46      !!              melting and freezing
47      !!
48      !! ** Method  :  2 parameterizations are available according
49      !!                        1 : Specified melt flux
50      !!                        2 : Beckmann & Goose parameterization
51      !!----------------------------------------------------------------------
52      !!-------------------------- OUT -------------------------------------
53      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pqfwf, pqoce, pqhc  ! fresh water, ice-ocean heat and heat content fluxes
54      !!-------------------------- IN  -------------------------------------
55      INTEGER, INTENT(in) ::   kt   ! ocean time step
56      !!---------------------------------------------------------------------
57      !
58      ! Choose among the available ice shelf parametrisation
59      SELECT CASE ( cn_isfpar_mlt )
60      CASE ( 'spe' )    ! specified runoff in depth (Mathiot et al., 2017 in preparation)
61         CALL isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf)
62      CASE ( 'bg03' )    ! Beckmann and Goosse parametrisation
63         CALL isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf)
64      CASE ( 'oasis' )
65         CALL isfpar_mlt_oasis( kt, pqhc, pqoce, pqfwf)
66      CASE DEFAULT
67         CALL ctl_stop('STOP', 'unknown isf melt formulation : cn_isfpar (should not see this)')
68      END SELECT
69      !
70   END SUBROUTINE isfpar_mlt
71
72! -------------------------------------------------------------------------------------------------------
73! -------------------------------- PRIVATE SUBROUTINE ---------------------------------------------------
74! -------------------------------------------------------------------------------------------------------
75
76   SUBROUTINE isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf)
77      !!---------------------------------------------------------------------
78      !!                  ***  ROUTINE isfpar_mlt_spe  ***
79      !!
80      !! ** Purpose : prescribed ice shelf melting in case ice shelf cavities are closed.
81      !!              data read into a forcing files.
82      !!
83      !!----------------------------------------------------------------------
84      !!-------------------------- OUT -------------------------------------
85      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pqhc, pqfwf, pqoce  ! fresh water and ice-ocean heat fluxes
86      !!-------------------------- IN  -------------------------------------
87      INTEGER,  INTENT(in) :: kt
88      !!--------------------------------------------------------------------
89      INTEGER :: jk
90      REAL(wp), DIMENSION(jpi,jpj,jpk)  :: ztfrz3d
91      REAL(wp), DIMENSION(jpi,jpj)      :: ztfrz
92      !!--------------------------------------------------------------------
93      !
94      ! 0. ------------Read specified runoff
95      CALL fld_read ( kt, 1, sf_isfpar_fwf   )
96      !
97      ! compute ptfrz
98      ! 1. ------------Mean freezing point
99      DO jk = 1,jpk
100         CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))
101      END DO
102      CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )
103      !
104      pqfwf(:,:) = - sf_isfpar_fwf(1)%fnow(:,:,1)      ! fresh water flux from the isf (fwfisf <0 mean melting)
105      pqoce(:,:) =   pqfwf(:,:) * rLfusisf             ! ocean/ice shelf flux assume to be equal to latent heat flux
106      pqhc (:,:) =   pqfwf(:,:) * ztfrz(:,:) * rcp     ! heat content flux
107      !
108   END SUBROUTINE isfpar_mlt_spe
109
110   SUBROUTINE isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf)
111      !!---------------------------------------------------------------------
112      !!                  ***  ROUTINE isfpar_mlt_bg03  ***
113      !!
114      !! ** Purpose : compute an estimate of ice shelf melting and
115      !!              latent, ocean-ice and heat content heat fluxes
116      !!              in case cavities are closed based on the far fields T and S properties.
117      !!
118      !! ** Method  : The ice shelf melt is computed as proportional to the differences between the
119      !!              mean temperature and mean freezing point in front of the ice shelf averaged
120      !!              over the ice shelf min ice shelf draft and max ice shelf draft and the freezing point
121      !!
122      !! ** Reference : Beckmann and Goosse (2003), "A parameterization of ice shelf-ocean
123      !!                interaction for climate models", Ocean Modelling 5(2003) 157-170.
124      !!----------------------------------------------------------------------
125      !!-------------------------- OUT -------------------------------------
126      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: pqhc, pqfwf, pqoce  ! fresh water and ice-ocean heat fluxes
127      !!-------------------------- IN  -------------------------------------
128      INTEGER,  INTENT(in) :: kt
129      !!--------------------------------------------------------------------
130      INTEGER :: jk
131      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztfrz3d        ! freezing point
132      REAL(wp), DIMENSION(jpi,jpj)     :: ztfrz          ! freezing point
133      REAL(wp), DIMENSION(jpi,jpj)     :: ztavg          ! temperature avg
134      !!----------------------------------------------------------------------
135      !
136      ! 0. ------------Mean freezing point
137      DO jk = 1,jpk
138         CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))
139      END DO
140      CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )
141      !
142      ! 1. ------------Mean temperature
143      CALL isf_tbl(tsn(:,:,jk,jp_tem), ztavg, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )
144      !
145      ! 2. ------------Net heat flux and fresh water flux due to the ice shelf
146      pqoce(:,:) =   rau0 * rcp * rn_gammat0 * risfLeff(:,:) * e1t(:,:) * ( ztavg(:,:) - ztfrz(:,:) ) * r1_e1e2t(:,:)
147      pqfwf(:,:) = - pqoce(:,:) / rLfusisf             ! derived from the latent heat flux
148      pqhc (:,:) =   pqfwf(:,:) * ztfrz(:,:) * rcp     ! heat content flux
149      !
150      ! 3. ------------BG03 output
151      ! output ttbl
152      CALL iom_put('ttbl_par', ztavg(:,:) * mskisf_par(:,:) )
153      !
154      ! output thermal driving
155      CALL iom_put('isfthermald_par',( ztfrz(:,:) - ztavg(:,:) ) * mskisf_par(:,:))
156      !
157   END SUBROUTINE isfpar_mlt_bg03
158
159   SUBROUTINE isfpar_mlt_oasis(kt, pqhc , pqoce, pqfwf )
160      !!----------------------------------------------------------------------
161      !!                  ***  ROUTINE isfpar_mlt_oasis  ***
162      !!
163      !! ** Purpose    : scale the fwf read from input file by the total amount received by the sbccpl interface
164      !!
165      !! ** Purpose    : - read ice shelf melt from forcing file and scale it by the input file total amount => pattern
166      !!                 - compute total amount of fwf given by sbccpl (fwfisf_oasis)
167      !!                 - scale fwf and compute heat fluxes
168      !!
169      !!---------------------------------------------------------------------
170      !!-------------------------- OUT -------------------------------------
171      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes
172      !!-------------------------- IN  -------------------------------------
173      INTEGER                     , INTENT(in   ) :: kt                  ! current time step
174      !!--------------------------------------------------------------------
175      INTEGER                           :: jk                            ! loop index
176      REAL(wp)                          :: zfwf_fld, zfwf_oasis          ! total fwf in the forcing fields (pattern) and from the cpl interface (amount)
177      REAL(wp), DIMENSION(jpi,jpj)      :: ztfrz                         ! tbl freezing temperature
178      REAL(wp), DIMENSION(jpi,jpj)      :: zfwf                          ! 2d fwf map after scaling
179      REAL(wp), DIMENSION(jpi,jpj,jpk)  :: ztfrz3d
180      !!--------------------------------------------------------------------
181      !
182      ! 0. ------------Read specified runoff
183      CALL fld_read ( kt, 1, sf_isfpar_fwf   )
184      !
185      ! 1. ------------Mean freezing point (needed for heat content flux)
186      DO jk = 1,jpk
187         CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk))
188      END DO
189      CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par )
190      !
191      ! 2. ------------Scale isf melt pattern with total amount from oasis
192      ! ice shelf 2d map
193      zfwf(:,:) = - sf_isfpar_fwf(1)%fnow(:,:,1)
194      !
195      ! compute glob sum from input file
196      ! (PM) should we consider delay sum as in fwb ? (it will offset by 1 time step if I understood well)
197      zfwf_fld = glob_sum('isfcav_mlt', e1e2t(:,:) * zfwf(:,:))
198      !
199      ! compute glob sum from atm->oce ice shelf fwf
200      ! (PM) should we consider delay sum as in fwb ?
201      zfwf_oasis = glob_sum('isfcav_mlt', e1e2t(:,:) * fwfisf_oasis(:,:))
202      !
203      ! scale fwf
204      zfwf(:,:) = zfwf(:,:) * zfwf_oasis / zfwf_fld
205      !
206      ! i3. -----------Define fwf and qoce
207      ! ocean heat flux is assume to be equal to the latent heat
208      pqfwf(:,:) =   zfwf(:,:)                         ! fwf                ( >0 out )
209      pqoce(:,:) = - pqfwf(:,:) * rLfusisf             ! ocean heat flux    ( >0 out ) (assumed to be the latent heat flux)
210      pqhc (:,:) =   pqfwf(:,:) * ztfrz(:,:) * rcp     ! heat content flux  ( >0 out )
211      !
212   END SUBROUTINE isfpar_mlt_oasis
213
214END MODULE isfparmlt
Note: See TracBrowser for help on using the repository browser.