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.
albedo.F90 in branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90 @ 2633

Last change on this file since 2633 was 2633, checked in by trackstand2, 13 years ago

Renamed wrk_use => wrk_in_use and wrk_release => wrk_not_released

  • Property svn:keywords set to Id
File size: 12.0 KB
Line 
1MODULE albedo
2   !!======================================================================
3   !!                       ***  MODULE  albedo  ***
4   !! Ocean forcing:  bulk thermohaline forcing of the ocean (or ice)
5   !!=====================================================================
6   !! History :  8.0  ! 2001-04  (LIM 1.0)
7   !!   NEMO     1.0  ! 2003-07  (C. Ethe, G. Madec)  Optimization (old name:shine)
8   !!             -   ! 2004-11  (C. Talandier)  add albedo_init
9   !!             -   ! 2001-06  (M. Vancoppenolle) LIM 3.0
10   !!             -   ! 2006-08  (G. Madec)  cleaning for surface module
11   !!----------------------------------------------------------------------
12
13   !!----------------------------------------------------------------------
14   !!   albedo_ice  : albedo for   ice (clear and overcast skies)
15   !!   albedo_oce  : albedo for ocean (clear and overcast skies)
16   !!   albedo_init : initialisation of albedo computation
17   !!----------------------------------------------------------------------
18   USE phycst          ! physical constants
19   USE in_out_manager  ! I/O manager
20
21   IMPLICIT NONE
22   PRIVATE
23
24   PUBLIC   albedo_ice   ! routine called sbcice_lim.F90
25   PUBLIC   albedo_oce   ! routine called by ???
26
27   INTEGER  ::   albd_init = 0      !: control flag for initialization
28   REAL(wp) ::   zzero     = 0.e0   ! constant values
29   REAL(wp) ::   zone      = 1.e0   !    "       "
30
31   REAL(wp) ::   c1     = 0.05    ! constants values
32   REAL(wp) ::   c2     = 0.10    !    "        "
33   REAL(wp) ::   rmue   = 0.40    !  cosine of local solar altitude
34
35   !                               !!* namelist namsbc_alb
36   REAL(wp) ::   rn_cloud  = 0.06   !  cloudiness effect on snow or ice albedo (Grenfell & Perovich, 1984)
37#if defined key_lim3
38   REAL(wp) ::   rn_albice = 0.53   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
39#else
40   REAL(wp) ::   rn_albice = 0.50   !  albedo of melting ice in the arctic and antarctic (Shine & Hendersson-Sellers)
41#endif
42   REAL(wp) ::   rn_alphd  = 0.80   !  coefficients for linear interpolation used to compute
43   REAL(wp) ::   rn_alphdi = 0.72   !  albedo between two extremes values (Pyane, 1972)
44   REAL(wp) ::   rn_alphc  = 0.65   !
45
46   !!----------------------------------------------------------------------
47   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
48   !! $Id$
49   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
50   !!----------------------------------------------------------------------
51CONTAINS
52
53   SUBROUTINE albedo_ice( pt_ice, ph_ice, ph_snw, pa_ice_cs, pa_ice_os )
54      !!----------------------------------------------------------------------
55      !!               ***  ROUTINE albedo_ice  ***
56      !!         
57      !! ** Purpose :   Computation of the albedo of the snow/ice system
58      !!                as well as the ocean one
59      !!       
60      !! ** Method  : - Computation of the albedo of snow or ice (choose the
61      !!                rignt one by a large number of tests
62      !!              - Computation of the albedo of the ocean
63      !!
64      !! References :   Shine and Hendersson-Sellers 1985, JGR, 90(D1), 2243-2250.
65      !!----------------------------------------------------------------------
66      USE wrk_nemo, ONLY: wrk_in_use, wrk_not_released, llwrk_in_use, llwrk_not_released
67      USE wrk_nemo, ONLY: wrk_3d_6, wrk_3d_7    ! 3D workspace
68      !!
69      REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   pt_ice      !  ice surface temperature (Kelvin)
70      REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   ph_ice      !  sea-ice thickness
71      REAL(wp), INTENT(in   ), DIMENSION(:,:,:) ::   ph_snw      !  snow thickness
72      REAL(wp), INTENT(  out), DIMENSION(:,:,:) ::   pa_ice_cs   !  albedo of ice under clear    sky
73      REAL(wp), INTENT(  out), DIMENSION(:,:,:) ::   pa_ice_os   !  albedo of ice under overcast sky
74      !!
75      INTEGER  ::   ji, jj, jl    ! dummy loop indices
76      INTEGER  ::   ijpl          ! number of ice categories (3rd dim of ice input arrays)
77      REAL(wp) ::   zalbpsnm      ! albedo of ice under clear sky when snow is melting
78      REAL(wp) ::   zalbpsnf      ! albedo of ice under clear sky when snow is freezing
79      REAL(wp) ::   zalbpsn       ! albedo of snow/ice system when ice is coverd by snow
80      REAL(wp) ::   zalbpic       ! albedo of snow/ice system when ice is free of snow
81      REAL(wp) ::   zithsn        ! = 1 for hsn >= 0 ( ice is cov. by snow ) ; = 0 otherwise (ice is free of snow)
82      REAL(wp) ::   zitmlsn       ! = 1 freezinz snow (pt_ice >=rt0_snow) ; = 0 melting snow (pt_ice<rt0_snow)
83      REAL(wp) ::   zihsc1        ! = 1 hsn <= c1 ; = 0 hsn > c1
84      REAL(wp) ::   zihsc2        ! = 1 hsn >= c2 ; = 0 hsn < c2
85      !!
86      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zalbfz    ! = rn_alphdi for freezing ice ; = rn_albice for melting ice
87      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zficeth   !  function of ice thickness
88      !!---------------------------------------------------------------------
89     
90      ijpl = SIZE( pt_ice, 3 )                     ! number of ice categories
91
92      IF( llwrk_in_use(3,1) .OR. wrk_in_use(3, 6,7) ) THEN
93         CALL ctl_stop('albedo_ice: requested workspace arrays are unavailable')   ;   RETURN
94      ENDIF
95      ! Associate pointers with sub-arrays of workspace arrays
96      zalbfz  =>   wrk_3d_6(:,:,1:ijpl)
97      zficeth =>   wrk_3d_7(:,:,1:ijpl)
98
99      IF( albd_init == 0 )   CALL albedo_init      ! initialization
100
101      !---------------------------
102      !  Computation of  zficeth
103      !---------------------------
104      ! ice free of snow and melts
105      WHERE     ( ph_snw == 0._wp .AND. pt_ice >= rt0_ice )   ;   zalbfz(:,:,:) = rn_albice
106      ELSE WHERE                                              ;   zalbfz(:,:,:) = rn_alphdi
107      END  WHERE
108
109      WHERE     ( 1.5  < ph_ice                     )  ;  zficeth = zalbfz
110      ELSE WHERE( 1.0  < ph_ice .AND. ph_ice <= 1.5 )  ;  zficeth = 0.472  + 2.0 * ( zalbfz - 0.472 ) * ( ph_ice - 1.0 )
111      ELSE WHERE( 0.05 < ph_ice .AND. ph_ice <= 1.0 )  ;  zficeth = 0.2467 + 0.7049 * ph_ice              &
112         &                                                                 - 0.8608 * ph_ice * ph_ice     &
113         &                                                                 + 0.3812 * ph_ice * ph_ice * ph_ice
114      ELSE WHERE                                       ;  zficeth = 0.1    + 3.6    * ph_ice
115      END WHERE
116
117!!gm old code
118!      DO jl = 1, ijpl
119!         DO jj = 1, jpj
120!            DO ji = 1, jpi
121!               IF( ph_ice(ji,jj,jl) > 1.5 ) THEN
122!                  zficeth(ji,jj,jl) = zalbfz(ji,jj,jl)
123!               ELSEIF( ph_ice(ji,jj,jl) > 1.0  .AND. ph_ice(ji,jj,jl) <= 1.5 ) THEN
124!                  zficeth(ji,jj,jl) = 0.472 + 2.0 * ( zalbfz(ji,jj,jl) - 0.472 ) * ( ph_ice(ji,jj,jl) - 1.0 )
125!               ELSEIF( ph_ice(ji,jj,jl) > 0.05 .AND. ph_ice(ji,jj,jl) <= 1.0 ) THEN
126!                  zficeth(ji,jj,jl) = 0.2467 + 0.7049 * ph_ice(ji,jj,jl)                               &
127!                     &                    - 0.8608 * ph_ice(ji,jj,jl) * ph_ice(ji,jj,jl)                 &
128!                     &                    + 0.3812 * ph_ice(ji,jj,jl) * ph_ice(ji,jj,jl) * ph_ice (ji,jj,jl)
129!               ELSE
130!                  zficeth(ji,jj,jl) = 0.1 + 3.6 * ph_ice(ji,jj,jl)
131!               ENDIF
132!            END DO
133!         END DO
134!      END DO
135!!gm end old code
136     
137      !-----------------------------------------------
138      !    Computation of the snow/ice albedo system
139      !-------------------------- ---------------------
140     
141      !    Albedo of snow-ice for clear sky.
142      !-----------------------------------------------   
143      DO jl = 1, ijpl
144         DO jj = 1, jpj
145            DO ji = 1, jpi
146               !  Case of ice covered by snow.             
147               !                                        !  freezing snow       
148               zihsc1   = 1.0 - MAX( zzero , SIGN( zone , - ( ph_snw(ji,jj,jl) - c1 ) ) )
149               zalbpsnf = ( 1.0 - zihsc1 ) * (  zficeth(ji,jj,jl)                                             &
150                  &                           + ph_snw(ji,jj,jl) * ( rn_alphd - zficeth(ji,jj,jl) ) / c1  )   &
151                  &     +         zihsc1   * rn_alphd 
152               !                                        !  melting snow               
153               zihsc2   = MAX( zzero , SIGN( zone , ph_snw(ji,jj,jl) - c2 ) )
154               zalbpsnm = ( 1.0 - zihsc2 ) * ( rn_albice + ph_snw(ji,jj,jl) * ( rn_alphc - rn_albice ) / c2 )   &
155                  &     +         zihsc2   *   rn_alphc 
156               !
157               zitmlsn  =  MAX( zzero , SIGN( zone , pt_ice(ji,jj,jl) - rt0_snow ) )   
158               zalbpsn  =  zitmlsn * zalbpsnm + ( 1.0 - zitmlsn ) * zalbpsnf
159           
160               !  Case of ice free of snow.
161               zalbpic  = zficeth(ji,jj,jl) 
162           
163               ! albedo of the system   
164               zithsn   = 1.0 - MAX( zzero , SIGN( zone , - ph_snw(ji,jj,jl) ) )
165               pa_ice_cs(ji,jj,jl) =  zithsn * zalbpsn + ( 1.0 - zithsn ) *  zalbpic
166            END DO
167         END DO
168      END DO
169     
170      !    Albedo of snow-ice for overcast sky.
171      !---------------------------------------------- 
172      pa_ice_os(:,:,:) = pa_ice_cs(:,:,:) + rn_cloud       ! Oberhuber correction
173      !
174      IF( wrk_not_released(3, 6,7) )   CALL ctl_stop('albedo_ice: failed to release workspace arrays')
175      !
176   END SUBROUTINE albedo_ice
177
178
179   SUBROUTINE albedo_oce( pa_oce_os , pa_oce_cs )
180      !!----------------------------------------------------------------------
181      !!               ***  ROUTINE albedo_oce  ***
182      !!
183      !! ** Purpose :   Computation of the albedo of the ocean
184      !!----------------------------------------------------------------------
185      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pa_oce_os   !  albedo of ocean under overcast sky
186      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pa_oce_cs   !  albedo of ocean under clear sky
187      !!
188      REAL(wp) ::   zcoef   ! temporary scalar
189      !!----------------------------------------------------------------------
190      !
191      zcoef = 0.05 / ( 1.1 * rmue**1.4 + 0.15 )      ! Parameterization of Briegled and Ramanathan, 1982
192      pa_oce_cs(:,:) = zcoef               
193      pa_oce_os(:,:)  = 0.06                         ! Parameterization of Kondratyev, 1969 and Payne, 1972
194      !
195   END SUBROUTINE albedo_oce
196
197
198   SUBROUTINE albedo_init
199      !!----------------------------------------------------------------------
200      !!                 ***  ROUTINE albedo_init  ***
201      !!
202      !! ** Purpose :   initializations for the albedo parameters
203      !!
204      !! ** Method  :   Read the namelist namsbc_alb
205      !!----------------------------------------------------------------------
206      NAMELIST/namsbc_alb/ rn_cloud, rn_albice, rn_alphd, rn_alphdi, rn_alphc
207      !!----------------------------------------------------------------------
208      !
209      albd_init = 1                     ! indicate that the initialization has been done
210      !
211      REWIND( numnam )                  ! Read Namelist namsbc_alb : albedo parameters
212      READ  ( numnam, namsbc_alb )
213      !
214      IF(lwp) THEN                      ! Control print
215         WRITE(numout,*)
216         WRITE(numout,*) 'albedo : set albedo parameters'
217         WRITE(numout,*) '~~~~~~~'
218         WRITE(numout,*) '   Namelist namsbc_alb : albedo '
219         WRITE(numout,*) '      correction for snow and ice albedo                  rn_cloud  = ', rn_cloud
220         WRITE(numout,*) '      albedo of melting ice in the arctic and antarctic   rn_albice = ', rn_albice
221         WRITE(numout,*) '      coefficients for linear                             rn_alphd  = ', rn_alphd
222         WRITE(numout,*) '      interpolation used to compute albedo                rn_alphdi = ', rn_alphdi
223         WRITE(numout,*) '      between two extremes values (Pyane, 1972)           rn_alphc  = ', rn_alphc
224      ENDIF
225      !
226   END SUBROUTINE albedo_init
227
228   !!======================================================================
229END MODULE albedo
Note: See TracBrowser for help on using the repository browser.