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 70 for trunk/NEMO/LIM_SRC – NEMO

Changeset 70 for trunk/NEMO/LIM_SRC


Ignore:
Timestamp:
2004-04-22T14:19:29+02:00 (20 years ago)
Author:
opalod
Message:

CT : BUGFIX044 : Remove the hard coded vertical lenght dz in limmsh.F90 and use fse3t(:,:,1) in limthd.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC/limthd.F90

    r3 r70  
    1616   USE lbclnk 
    1717   USE in_out_manager  ! I/O manager 
    18  
    1918   USE ice             ! LIM sea-ice variables 
    2019   USE ice_oce         ! sea-ice/ocean variables 
     
    3332   PUBLIC lim_thd       ! called by lim_step 
    3433 
    35   !! * Module variables 
    36      REAL(wp)  ::            &  ! constant values 
    37          epsi20 = 1e-20   ,  & 
    38          epsi16 = 1e-16   ,  & 
    39          epsi04 = 1e-04   ,  & 
    40          zzero  = 0.0     ,  & 
    41          zone   = 1.0 
     34   !! * Module variables 
     35   REAL(wp)  ::            &  ! constant values 
     36      epsi20 = 1.e-20   ,  & 
     37      epsi16 = 1.e-16   ,  & 
     38      epsi04 = 1.e-04   ,  & 
     39      zzero  = 0.e0     ,  & 
     40      zone   = 1.e0 
     41 
    4242   !! * Substitutions 
     43#  include "domzgr_substitute.h90" 
    4344#  include "vectopt_loop_substitute.h90" 
    4445   !!-------- ------------------------------------------------------------- 
     
    6364      !!             - call lim_lat_acc  for the ice accretion 
    6465      !!             - back to the geographic grid 
    65       !!      
    6666      !! 
    6767      !! ** References : 
     
    7676         nbpb  ,               &   ! nb of icy pts for thermo. cal. 
    7777         nbpac                     ! nb of pts for lateral accretion  
    78  
    7978      REAL(wp) ::  & 
    8079         zfric_umin = 5e-03 ,  &   ! lower bound for the friction velocity 
    8180         zfric_umax = 2e-02        ! upper bound for the friction velocity 
    82        
    8381      REAL(wp) ::   & 
    8482         zinda              ,  &   ! switch for test. the val. of concen. 
     
    8987         zfontn             ,  &   ! heat flux from snow thickness 
    9088         zfntlat, zpareff          ! test. the val. of lead heat budget 
    91        
    9289      REAL(wp), DIMENSION(jpi,jpj) :: & 
    9390         zhicifp            ,  &   ! ice thickness for outputs 
     
    10299       
    103100!i est-ce utile?  oui au moins en partie 
    104       rdvosif(:,:) = 0.0   ! variation of ice volume at surface 
    105       rdvobif(:,:) = 0.0   ! variation of ice volume at bottom 
    106       fdvolif(:,:) = 0.0   ! total variation of ice volume 
    107       rdvonif(:,:) = 0.0   ! lateral variation of ice volume 
    108       fstric (:,:) = 0.0   ! part of solar radiation absorbing inside the ice 
    109       fscmbq (:,:) = 0.0   ! linked with fstric 
    110       ffltbif(:,:) = 0.0   ! linked with fstric 
    111       qfvbq  (:,:) = 0.0   ! linked with fstric 
    112       rdmsnif(:,:) = 0.0   ! variation of snow mass per unit area 
    113       rdmicif(:,:) = 0.0   ! variation of ice mass per unit area 
    114       hicifp (:,:) = 0.0   ! daily thermodynamic ice production.  
     101      rdvosif(:,:) = 0.e0   ! variation of ice volume at surface 
     102      rdvobif(:,:) = 0.e0   ! variation of ice volume at bottom 
     103      fdvolif(:,:) = 0.e0   ! total variation of ice volume 
     104      rdvonif(:,:) = 0.e0   ! lateral variation of ice volume 
     105      fstric (:,:) = 0.e0   ! part of solar radiation absorbing inside the ice 
     106      fscmbq (:,:) = 0.e0   ! linked with fstric 
     107      ffltbif(:,:) = 0.e0   ! linked with fstric 
     108      qfvbq  (:,:) = 0.e0   ! linked with fstric 
     109      rdmsnif(:,:) = 0.e0   ! variation of snow mass per unit area 
     110      rdmicif(:,:) = 0.e0   ! variation of ice mass per unit area 
     111      hicifp (:,:) = 0.e0   ! daily thermodynamic ice production.  
    115112 
    116113      DO jj = 1, jpj 
     
    119116         END DO 
    120117      END DO 
    121       IF( l_ctl .AND. lwp )   WRITE(numout,*) 'lim_thd  : ', SUM( hsnif(:,:) ) , ' hsnif' 
     118      IF(l_ctl)   WRITE(numout,*) 'lim_thd  : ', SUM( hsnif(:,:) ) , ' hsnif' 
    122119       
    123120       
     
    151148         END DO 
    152149      END DO 
    153       IF( l_ctl .AND. lwp ) THEN 
     150      IF(l_ctl) THEN 
    154151         WRITE(numout,*) 'lim_thd: hicif : ', SUM( hicif ), ' hsnif  ', SUM( hsnif  ) 
    155152         WRITE(numout,*) 'lim_thd: dmgwi : ', SUM( dmgwi ), ' qstoif ', SUM( qstoif ) 
     
    175172             
    176173            !  solar irradiance transmission at the mixed layer bottom and used in the lead heat budget 
    177             thcm(ji,jj)    = 0.0  
     174            thcm(ji,jj)    = 0.e0  
    178175             
    179176            !  net downward heat flux from the ice to the ocean, expressed as a function of ocean  
     
    198195             
    199196            !  energy needed to bring ocean surface layer until its freezing 
    200             qcmif  (ji,jj) =  rau0 * rcp * dz * ( tfu(ji,jj) - sst_io(ji,jj) ) * ( 1 - zinda ) 
     197            qcmif  (ji,jj) =  rau0 * rcp * fse3t(ji,jj,1) * ( tfu(ji,jj) - sst_io(ji,jj) ) * ( 1 - zinda ) 
    201198             
    202199            !  calculate oceanic heat flux. 
     
    220217         END DO 
    221218      END DO 
    222       IF( l_ctl .AND. lwp ) THEN 
     219      IF(l_ctl) THEN 
    223220         WRITE(numout,*) 'lim_thd: pfrld ', SUM( pfrld  ), ' thcm    ', SUM( thcm    ) 
    224221         WRITE(numout,*) 'lim_thd: fdtcn ', SUM( fdtcn  ), ' qdtcn   ', SUM( qdtcn   ) 
     
    261258         CALL tab_2d_1d( nbpb, qlbbq_1d   (1:nbpb)     , zqlbsbq    , jpi, jpj, npb(1:nbpb) ) 
    262259  
    263  
    264           
    265          !  call the ice growth routine. 
    266          CALL lim_thd_zdf( 1, nbpb )  
     260         CALL lim_thd_zdf( 1, nbpb )       !  compute ice growth 
    267261          
    268262         !  back to the geographic grid. 
     
    304298      !      Tricky trick : add 2 to frld in the Southern Hemisphere. 
    305299      !---------------------------------------------------------- 
    306       DO jj = 1, jeqm1      !ibug in mpp 
     300      DO jj = 1, njeqm1      !ibug in mpp 
    307301         DO ji = 1, jpi 
    308302            frld(ji,jj) = frld(ji,jj) + 2.0 
     
    317311      DO jj = 1, jpj 
    318312         DO ji = 1, jpi 
    319 !i yes!     IF ( ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.0 ) THEN 
    320             IF ( tms(ji,jj) * ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.0 ) THEN 
     313!i yes!     IF ( ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.e0 ) THEN 
     314            IF ( tms(ji,jj) * ( qcmif(ji,jj) - qldif(ji,jj) ) > 0.e0 ) THEN 
    321315               nbpac = nbpac + 1 
    322316               npac( nbpac ) = (jj - 1) * jpi + ji 
     
    325319      END DO 
    326320       
    327       IF( l_ctl .AND. lwp ) THEN 
     321      IF(l_ctl) THEN 
    328322         WRITE(numout,*) 'lim_thd : phicif ', SUM( phicif ), ' hicif ', SUM( hicif ) 
    329323         WRITE(numout,*) 'lim_thd : nbpac = ', nbpac 
     
    335329      !-------------------------------------------------------------------------------- 
    336330 
    337       IF ( nbpac > 0 ) THEN 
     331      IF( nbpac > 0 ) THEN 
    338332          
    339333         !...Put the variable in a 1-D array for lateral accretion 
    340         CALL tab_2d_1d( nbpac, frld_1d   (1:nbpac)     , frld       , jpi, jpj, npac(1:nbpac) ) 
    341         CALL tab_2d_1d( nbpac, h_snow_1d (1:nbpac)     , hsnif      , jpi, jpj, npac(1:nbpac) ) 
    342         CALL tab_2d_1d( nbpac, h_ice_1d  (1:nbpac)     , hicif      , jpi, jpj, npac(1:nbpac) ) 
    343         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 1 ), tbif(:,:,1), jpi, jpj, npac(1:nbpac) )    
    344         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 2 ), tbif(:,:,2), jpi, jpj, npac(1:nbpac) )    
    345         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 3 ), tbif(:,:,3), jpi, jpj, npac(1:nbpac) )    
    346         CALL tab_2d_1d( nbpac, qldif_1d  (1:nbpac)     , qldif      , jpi, jpj, npac(1:nbpac) ) 
    347         CALL tab_2d_1d( nbpac, qcmif_1d  (1:nbpac)     , qcmif      , jpi, jpj, npac(1:nbpac) ) 
    348         CALL tab_2d_1d( nbpac, qstbif_1d (1:nbpac)     , qstoif     , jpi, jpj, npac(1:nbpac) ) 
    349         CALL tab_2d_1d( nbpac, rdmicif_1d(1:nbpac)     , rdmicif    , jpi, jpj, npac(1:nbpac) ) 
    350         CALL tab_2d_1d( nbpac, dvlbq_1d  (1:nbpac)     , fdvolif    , jpi, jpj, npac(1:nbpac) ) 
    351         CALL tab_2d_1d( nbpac, tfu_1d    (1:nbpac)     , tfu        , jpi, jpj, npac(1:nbpac) ) 
     334         CALL tab_2d_1d( nbpac, frld_1d   (1:nbpac)     , frld       , jpi, jpj, npac(1:nbpac) ) 
     335         CALL tab_2d_1d( nbpac, h_snow_1d (1:nbpac)     , hsnif      , jpi, jpj, npac(1:nbpac) ) 
     336         CALL tab_2d_1d( nbpac, h_ice_1d  (1:nbpac)     , hicif      , jpi, jpj, npac(1:nbpac) ) 
     337         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 1 ), tbif(:,:,1), jpi, jpj, npac(1:nbpac) )    
     338         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 2 ), tbif(:,:,2), jpi, jpj, npac(1:nbpac) )    
     339         CALL tab_2d_1d( nbpac, tbif_1d   (1:nbpac , 3 ), tbif(:,:,3), jpi, jpj, npac(1:nbpac) )    
     340         CALL tab_2d_1d( nbpac, qldif_1d  (1:nbpac)     , qldif      , jpi, jpj, npac(1:nbpac) ) 
     341         CALL tab_2d_1d( nbpac, qcmif_1d  (1:nbpac)     , qcmif      , jpi, jpj, npac(1:nbpac) ) 
     342         CALL tab_2d_1d( nbpac, qstbif_1d (1:nbpac)     , qstoif     , jpi, jpj, npac(1:nbpac) ) 
     343         CALL tab_2d_1d( nbpac, rdmicif_1d(1:nbpac)     , rdmicif    , jpi, jpj, npac(1:nbpac) ) 
     344         CALL tab_2d_1d( nbpac, dvlbq_1d  (1:nbpac)     , fdvolif    , jpi, jpj, npac(1:nbpac) ) 
     345         CALL tab_2d_1d( nbpac, tfu_1d    (1:nbpac)     , tfu        , jpi, jpj, npac(1:nbpac) ) 
    352346         
    353         !  call lateral accretion routine. 
    354         CALL lim_thd_lac( 1 , nbpac ) 
     347         !  call lateral accretion routine. 
     348         CALL lim_thd_lac( 1 , nbpac ) 
     349          
     350         !   back to the geographic grid 
     351         CALL tab_1d_2d( nbpac, frld       , npac(1:nbpac), frld_1d   (1:nbpac)     , jpi, jpj ) 
     352         CALL tab_1d_2d( nbpac, hsnif      , npac(1:nbpac), h_snow_1d (1:nbpac)     , jpi, jpj ) 
     353         CALL tab_1d_2d( nbpac, hicif      , npac(1:nbpac), h_ice_1d  (1:nbpac)     , jpi, jpj ) 
     354         CALL tab_1d_2d( nbpac, tbif(:,:,1), npac(1:nbpac), tbif_1d   (1:nbpac , 1 ), jpi, jpj ) 
     355         CALL tab_1d_2d( nbpac, tbif(:,:,2), npac(1:nbpac), tbif_1d   (1:nbpac , 2 ), jpi, jpj ) 
     356         CALL tab_1d_2d( nbpac, tbif(:,:,3), npac(1:nbpac), tbif_1d   (1:nbpac , 3 ), jpi, jpj ) 
     357         CALL tab_1d_2d( nbpac, qstoif     , npac(1:nbpac), qstbif_1d (1:nbpac)     , jpi, jpj ) 
     358         CALL tab_1d_2d( nbpac, rdmicif    , npac(1:nbpac), rdmicif_1d(1:nbpac)     , jpi, jpj ) 
     359         CALL tab_1d_2d( nbpac, fdvolif    , npac(1:nbpac), dvlbq_1d  (1:nbpac)     , jpi, jpj ) 
    355360         
    356         !   back to the geographic grid 
    357         CALL tab_1d_2d( nbpac, frld       , npac(1:nbpac), frld_1d   (1:nbpac)     , jpi, jpj ) 
    358         CALL tab_1d_2d( nbpac, hsnif      , npac(1:nbpac), h_snow_1d (1:nbpac)     , jpi, jpj ) 
    359         CALL tab_1d_2d( nbpac, hicif      , npac(1:nbpac), h_ice_1d  (1:nbpac)     , jpi, jpj ) 
    360         CALL tab_1d_2d( nbpac, tbif(:,:,1), npac(1:nbpac), tbif_1d   (1:nbpac , 1 ), jpi, jpj ) 
    361         CALL tab_1d_2d( nbpac, tbif(:,:,2), npac(1:nbpac), tbif_1d   (1:nbpac , 2 ), jpi, jpj ) 
    362         CALL tab_1d_2d( nbpac, tbif(:,:,3), npac(1:nbpac), tbif_1d   (1:nbpac , 3 ), jpi, jpj ) 
    363         CALL tab_1d_2d( nbpac, qstoif     , npac(1:nbpac), qstbif_1d (1:nbpac)     , jpi, jpj ) 
    364         CALL tab_1d_2d( nbpac, rdmicif    , npac(1:nbpac), rdmicif_1d(1:nbpac)     , jpi, jpj ) 
    365         CALL tab_1d_2d( nbpac, fdvolif    , npac(1:nbpac), dvlbq_1d  (1:nbpac)     , jpi, jpj ) 
    366  
    367          
    368        ENDIF 
     361      ENDIF 
    369362        
    370363        
    371        !      Recover frld values between 0 and 1 in the Southern Hemisphere (tricky trick) 
    372        !      Update daily thermodynamic ice production.     
    373        !------------------------------------------------------------------------------ 
     364      !      Recover frld values between 0 and 1 in the Southern Hemisphere (tricky trick) 
     365      !      Update daily thermodynamic ice production.     
     366      !------------------------------------------------------------------------------ 
    374367        
    375368      DO jj = 1, jpj 
     
    380373      END DO 
    381374 
    382       IF( l_ctl .AND. lwp ) THEN 
     375      IF(l_ctl) THEN 
    383376         WRITE(numout,*) ' lim_thd  end  ' 
    384377         WRITE(numout,*) '  hicif ', SUM( hicif  ), '  hsnif ', SUM( hsnif  ) 
     
    392385 
    393386    END SUBROUTINE lim_thd 
     387 
    394388 
    395389    SUBROUTINE lim_thd_init 
     
    418412      REWIND( numnam_ice ) 
    419413      READ  ( numnam_ice , namicethd ) 
    420       IF (lwp) THEN 
     414      IF(lwp) THEN 
    421415         WRITE(numout,*) 
    422416         WRITE(numout,*)'lim_thd_init : ice parameters for ice thermodynamic computation ' 
    423417         WRITE(numout,*)'~~~~~~~~~~~~' 
    424          WRITE(numout,*)'   maximum melting at the bottom                           hmelt        = ', hmelt 
    425          WRITE(numout,*)'   ice thick. for lateral accretion in NH (SH)             hiccrit(1/2) = ', hiccrit 
    426          WRITE(numout,*)'   ice thick. corr. to max. energy stored in brine pocket  hicmin       = ', hicmin   
    427          WRITE(numout,*)'   minimum ice thickness                                   hiclim       = ', hiclim  
    428          WRITE(numout,*)'   maximum lead fraction                                   amax         = ', amax  
    429          WRITE(numout,*)'   energy stored in brine pocket (=1) or not (=0)   swiqst       = ', swiqst  
    430          WRITE(numout,*)'   numerical carac. of the scheme for diffusion in ice ' 
    431          WRITE(numout,*)'   Cranck-Nicholson (=0.5), implicit (=1), explicit (=0)   sbeta        = ', sbeta 
    432          WRITE(numout,*)'   percentage of energy used for lateral ablation          parlat       = ', parlat 
    433          WRITE(numout,*)'   slope of distr. for Hakkinen-Mellor lateral melting     hakspl       = ', hakspl   
    434          WRITE(numout,*)'   slope of distribution for Hibler lateral melting        hibspl       = ', hibspl 
    435          WRITE(numout,*)'   exponent for leads-closure rate                         exld         = ', exld 
    436          WRITE(numout,*)'   coefficient for diffusions of ice and snow              hakdif       = ', hakdif 
    437          WRITE(numout,*)'   threshold thick. for comp. of eq. thermal conductivity  zhth         = ', thth  
    438          WRITE(numout,*)'   thickness of the surf. layer in temp. computation       hnzst        = ', hnzst 
    439          WRITE(numout,*)'   switch for snow sublimation  (=1) or not (=0)           parsub       = ', parsub   
    440          WRITE(numout,*)'   coefficient for snow density when snow ice formation    alphs        = ', alphs 
     418         WRITE(numout,*)'       maximum melting at the bottom                           hmelt        = ', hmelt 
     419         WRITE(numout,*)'       ice thick. for lateral accretion in NH (SH)             hiccrit(1/2) = ', hiccrit 
     420         WRITE(numout,*)'       ice thick. corr. to max. energy stored in brine pocket  hicmin       = ', hicmin   
     421         WRITE(numout,*)'       minimum ice thickness                                   hiclim       = ', hiclim  
     422         WRITE(numout,*)'       maximum lead fraction                                   amax         = ', amax  
     423         WRITE(numout,*)'       energy stored in brine pocket (=1) or not (=0)     swiqst       = ', swiqst  
     424         WRITE(numout,*)'       numerical carac. of the scheme for diffusion in ice ' 
     425         WRITE(numout,*)'       Cranck-Nicholson (=0.5), implicit (=1), explicit (=0)   sbeta        = ', sbeta 
     426         WRITE(numout,*)'       percentage of energy used for lateral ablation          parlat       = ', parlat 
     427         WRITE(numout,*)'       slope of distr. for Hakkinen-Mellor lateral melting     hakspl       = ', hakspl   
     428         WRITE(numout,*)'       slope of distribution for Hibler lateral melting        hibspl       = ', hibspl 
     429         WRITE(numout,*)'       exponent for leads-closure rate                         exld         = ', exld 
     430         WRITE(numout,*)'       coefficient for diffusions of ice and snow              hakdif       = ', hakdif 
     431         WRITE(numout,*)'       threshold thick. for comp. of eq. thermal conductivity  zhth         = ', thth  
     432         WRITE(numout,*)'       thickness of the surf. layer in temp. computation       hnzst        = ', hnzst 
     433         WRITE(numout,*)'       switch for snow sublimation  (=1) or not (=0)           parsub       = ', parsub   
     434         WRITE(numout,*)'       coefficient for snow density when snow ice formation    alphs        = ', alphs 
    441435      ENDIF 
    442436             
     
    445439      rcdic = hakdif * rcdic 
    446440       
    447       IF ( ( hsndif > 100.0 ) .OR. ( hicdif > 100.0 ) ) THEN 
     441      IF ( ( hsndif > 100.e0 ) .OR. ( hicdif > 100.e0 ) ) THEN 
    448442         cnscg = 0.e0 
    449443      ELSE 
     
    454448 
    455449#else 
    456    !!====================================================================== 
    457    !!                       ***  MODULE limthd   *** 
    458    !!                        No sea ice model 
    459    !!====================================================================== 
     450   !!---------------------------------------------------------------------- 
     451   !!   Default option          Dummy module           NO LIM sea-ice model 
     452   !!---------------------------------------------------------------------- 
    460453CONTAINS 
    461    SUBROUTINE lim_thd         ! Empty routine 
     454   SUBROUTINE lim_thd         ! Dummy routine 
    462455   END SUBROUTINE lim_thd 
    463456#endif 
Note: See TracChangeset for help on using the changeset viewer.