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 10288 for NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/OCE/DOM/phycst.F90 – NEMO

Ignore:
Timestamp:
2018-11-07T18:25:49+01:00 (5 years ago)
Author:
francesca
Message:

reduce global communications, see #2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9866_HPC_03_globcom/src/OCE/DOM/phycst.F90

    r9656 r10288  
    2323   PUBLIC   phy_cst     ! routine called by inipar.F90 
    2424 
    25    REAL(wp), PUBLIC ::   rpi = 3.141592653589793_wp             !: pi 
    26    REAL(wp), PUBLIC ::   rad = 3.141592653589793_wp / 180._wp   !: conversion from degre into radian 
    27    REAL(wp), PUBLIC ::   rsmall = 0.5 * EPSILON( 1.e0 )         !: smallest real computer value 
     25   REAL(wp), PUBLIC ::   rpi      = 3.141592653589793_wp             !: pi 
     26   REAL(wp), PUBLIC ::   rad      = 3.141592653589793_wp / 180._wp   !: conversion from degre into radian 
     27   REAL(wp), PUBLIC ::   rsmall   = 0.5 * EPSILON( 1.e0 )            !: smallest real computer value 
    2828    
    29    REAL(wp), PUBLIC ::   rday = 24.*60.*60.     !: day                                [s] 
    30    REAL(wp), PUBLIC ::   rsiyea                 !: sideral year                       [s] 
    31    REAL(wp), PUBLIC ::   rsiday                 !: sideral day                        [s] 
    32    REAL(wp), PUBLIC ::   raamo =  12._wp        !: number of months in one year 
    33    REAL(wp), PUBLIC ::   rjjhh =  24._wp        !: number of hours in one day 
    34    REAL(wp), PUBLIC ::   rhhmm =  60._wp        !: number of minutes in one hour 
    35    REAL(wp), PUBLIC ::   rmmss =  60._wp        !: number of seconds in one minute 
    36    REAL(wp), PUBLIC ::   omega                  !: earth rotation parameter           [s-1] 
    37    REAL(wp), PUBLIC ::   ra    = 6371229._wp    !: earth radius                       [m] 
    38    REAL(wp), PUBLIC ::   grav  = 9.80665_wp     !: gravity                            [m/s2] 
    39     
    40    REAL(wp), PUBLIC ::   rtt      = 273.16_wp        !: triple point of temperature   [Kelvin] 
     29   REAL(wp), PUBLIC ::   rday     = 24.*60.*60.      !: day                                [s] 
     30   REAL(wp), PUBLIC ::   rsiyea                      !: sideral year                       [s] 
     31   REAL(wp), PUBLIC ::   rsiday                      !: sideral day                        [s] 
     32   REAL(wp), PUBLIC ::   raamo    =  12._wp          !: number of months in one year 
     33   REAL(wp), PUBLIC ::   rjjhh    =  24._wp          !: number of hours in one day 
     34   REAL(wp), PUBLIC ::   rhhmm    =  60._wp          !: number of minutes in one hour 
     35   REAL(wp), PUBLIC ::   rmmss    =  60._wp          !: number of seconds in one minute 
     36   REAL(wp), PUBLIC ::   omega                       !: earth rotation parameter           [s-1] 
     37   REAL(wp), PUBLIC ::   ra       = 6371229._wp      !: earth radius                       [m] 
     38   REAL(wp), PUBLIC ::   grav     = 9.80665_wp       !: gravity                            [m/s2]    
    4139   REAL(wp), PUBLIC ::   rt0      = 273.15_wp        !: freezing point of fresh water [Kelvin] 
    42    REAL(wp), PUBLIC ::   rt0_snow = 273.15_wp        !: melting point of snow         [Kelvin] 
    43 #if defined key_si3 
    44    REAL(wp), PUBLIC ::   rt0_ice  = 273.15_wp        !: melting point of ice          [Kelvin] 
    45 #else 
    46    REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp        !: melting point of ice          [Kelvin] 
    47 #endif 
     40 
    4841   REAL(wp), PUBLIC ::   rau0                        !: volumic mass of reference     [kg/m3] 
    4942   REAL(wp), PUBLIC ::   r1_rau0                     !: = 1. / rau0                   [m3/kg] 
     
    5346   REAL(wp), PUBLIC ::   r1_rau0_rcp                 !: = 1. / ( rau0 * rcp ) 
    5447 
    55    REAL(wp), PUBLIC ::   rhosn    =  330._wp         !: volumic mass of snow          [kg/m3] 
    56    REAL(wp), PUBLIC ::   rhofw    = 1000._wp         !: volumic mass of freshwater in melt ponds [kg/m3] 
    57    REAL(wp), PUBLIC ::   emic     =    0.97_wp       !: emissivity of snow or ice 
    58    REAL(wp), PUBLIC ::   sice     =    6.0_wp        !: salinity of ice               [psu] 
    59    REAL(wp), PUBLIC ::   soce     =   34.7_wp        !: salinity of sea               [psu] 
    60    REAL(wp), PUBLIC ::   cevap    =    2.5e+6_wp     !: latent heat of evaporation (water) 
    61    REAL(wp), PUBLIC ::   srgamma  =    0.9_wp        !: correction factor for solar radiation (Oberhuber, 1974) 
     48   REAL(wp), PUBLIC ::   emic     =    0.97_wp       !: emissivity of snow or ice (not used?) 
     49 
     50   REAL(wp), PUBLIC ::   sice     =    6.0_wp        !: salinity of ice (for pisces)          [psu] 
     51   REAL(wp), PUBLIC ::   soce     =   34.7_wp        !: salinity of sea (for pisces and isf)  [psu] 
     52   REAL(wp), PUBLIC ::   rLevap   =    2.5e+6_wp     !: latent heat of evaporation (water) 
    6253   REAL(wp), PUBLIC ::   vkarmn   =    0.4_wp        !: von Karman constant 
    6354   REAL(wp), PUBLIC ::   stefan   =    5.67e-8_wp    !: Stefan-Boltzmann constant  
    6455 
    65 #if defined key_si3 || defined key_cice 
    66    REAL(wp), PUBLIC ::   rhoic    =  917._wp         !: volumic mass of sea ice                               [kg/m3] 
    67    REAL(wp), PUBLIC ::   rcdic    =    2.034396_wp   !: thermal conductivity of fresh ice                     [W/m/K] 
    68    REAL(wp), PUBLIC ::   cpic     = 2067.0_wp        !: specific heat of fresh ice                            [J/kg/K] 
    69    REAL(wp), PUBLIC ::   lsub     =    2.834e+6_wp   !: pure ice latent heat of sublimation                   [J/kg] 
    70    REAL(wp), PUBLIC ::   lfus     =    0.334e+6_wp   !: latent heat of fusion of fresh ice                    [J/kg] 
    71    REAL(wp), PUBLIC ::   tmut     =    0.054_wp      !: decrease of seawater meltpoint with salinity 
    72    REAL(wp), PUBLIC ::   xlsn                        !: = lfus*rhosn (volumetric latent heat fusion of snow)  [J/m3] 
    73 #else 
    74    REAL(wp), PUBLIC ::   rhoic    =  900._wp         !: volumic mass of sea ice                               [kg/m3] 
    75    REAL(wp), PUBLIC ::   rcdic    =    2.034396_wp   !: conductivity of the ice                               [W/m/K] 
    76    REAL(wp), PUBLIC ::   rcpic    =    1.8837e+6_wp  !: volumetric specific heat for ice                      [J/m3/K] 
    77    REAL(wp), PUBLIC ::   cpic                        !: = rcpic / rhoic  (specific heat for ice)              [J/Kg/K] 
    78    REAL(wp), PUBLIC ::   rcdsn    =    0.22_wp       !: conductivity of the snow                              [W/m/K] 
    79    REAL(wp), PUBLIC ::   rcpsn    =    6.9069e+5_wp  !: volumetric specific heat for snow                     [J/m3/K] 
    80    REAL(wp), PUBLIC ::   xlsn     =  110.121e+6_wp   !: volumetric latent heat fusion of snow                 [J/m3] 
    81    REAL(wp), PUBLIC ::   lfus                        !: = xlsn / rhosn   (latent heat of fusion of fresh ice) [J/Kg] 
    82    REAL(wp), PUBLIC ::   xlic     =  300.33e+6_wp    !: volumetric latent heat fusion of ice                  [J/m3] 
    83    REAL(wp), PUBLIC ::   xsn      =    2.8e+6_wp     !: volumetric latent heat of sublimation of snow         [J/m3] 
    84 #endif 
    85 #if defined key_cice 
    86    REAL(wp), PUBLIC ::   rcdsn    =    0.31_wp       !: thermal conductivity of snow                          [W/m/K] 
    87 #endif 
    88 #if defined key_si3 
    89    REAL(wp), PUBLIC ::   r1_rhoic                    !: 1 / rhoic 
    90    REAL(wp), PUBLIC ::   r1_rhosn                    !: 1 / rhosn 
    91    REAL(wp), PUBLIC ::   r1_cpic                     !: 1 / cpic 
    92 #endif 
     56   REAL(wp), PUBLIC ::   rhos     =  330._wp         !: volumic mass of snow                                  [kg/m3] 
     57   REAL(wp), PUBLIC ::   rhoi     =  917._wp         !: volumic mass of sea ice                               [kg/m3] 
     58   REAL(wp), PUBLIC ::   rhow     = 1000._wp         !: volumic mass of freshwater in melt ponds              [kg/m3] 
     59   REAL(wp), PUBLIC ::   rcnd_i   =    2.034396_wp   !: thermal conductivity of fresh ice                     [W/m/K] 
     60   REAL(wp), PUBLIC ::   rcpi     = 2067.0_wp        !: specific heat of fresh ice                            [J/kg/K] 
     61   REAL(wp), PUBLIC ::   rLsub    =    2.834e+6_wp   !: pure ice latent heat of sublimation                   [J/kg] 
     62   REAL(wp), PUBLIC ::   rLfus    =    0.334e+6_wp   !: latent heat of fusion of fresh ice                    [J/kg] 
     63   REAL(wp), PUBLIC ::   rTmlt    =    0.054_wp      !: decrease of seawater meltpoint with salinity 
     64 
     65   REAL(wp), PUBLIC ::   r1_rhoi                     !: 1 / rhoi 
     66   REAL(wp), PUBLIC ::   r1_rhos                     !: 1 / rhos 
     67   REAL(wp), PUBLIC ::   r1_rcpi                     !: 1 / rcpi 
    9368   !!---------------------------------------------------------------------- 
    9469   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    9570   !! $Id$  
    96    !! Software governed by the CeCILL licence (./LICENSE) 
     71   !! Software governed by the CeCILL license (see ./LICENSE) 
    9772   !!---------------------------------------------------------------------- 
    9873    
     
    10681      !!---------------------------------------------------------------------- 
    10782 
    108       IF(lwp) WRITE(numout,*) 
    109       IF(lwp) WRITE(numout,*) 'phy_cst : initialization of ocean parameters and constants' 
    110       IF(lwp) WRITE(numout,*) '~~~~~~~' 
    111  
    112       ! Define & print constants 
    113       ! ------------------------ 
    114       IF(lwp) WRITE(numout,*) 
    115       IF(lwp) WRITE(numout,*) '   Constants' 
    116  
    117       IF(lwp) WRITE(numout,*) 
    118       IF(lwp) WRITE(numout,*) '      mathematical constant                 rpi = ', rpi 
    119  
    12083      rsiyea = 365.25_wp * rday * 2._wp * rpi / 6.283076_wp 
    12184      rsiday = rday / ( 1._wp + rday / rsiyea ) 
     
    12588      omega  = 2._wp * rpi / rsiday  
    12689#endif 
    127       IF(lwp) WRITE(numout,*) 
    128       IF(lwp) WRITE(numout,*) '      day                                rday   = ', rday,   ' s' 
    129       IF(lwp) WRITE(numout,*) '      sideral year                       rsiyea = ', rsiyea, ' s' 
    130       IF(lwp) WRITE(numout,*) '      sideral day                        rsiday = ', rsiday, ' s' 
    131       IF(lwp) WRITE(numout,*) '      omega                              omega  = ', omega,  ' s^-1' 
    132       IF(lwp) WRITE(numout,*) 
    133       IF(lwp) WRITE(numout,*) '      nb of months per year               raamo = ', raamo, ' months' 
    134       IF(lwp) WRITE(numout,*) '      nb of hours per day                 rjjhh = ', rjjhh, ' hours' 
    135       IF(lwp) WRITE(numout,*) '      nb of minutes per hour              rhhmm = ', rhhmm, ' mn' 
    136       IF(lwp) WRITE(numout,*) '      nb of seconds per minute            rmmss = ', rmmss, ' s' 
    137       IF(lwp) WRITE(numout,*) 
    138       IF(lwp) WRITE(numout,*) '      earth radius                         ra   = ', ra, ' m' 
    139       IF(lwp) WRITE(numout,*) '      gravity                              grav = ', grav , ' m/s^2' 
    140       IF(lwp) WRITE(numout,*) 
    141       IF(lwp) WRITE(numout,*) '      triple point of temperature      rtt      = ', rtt     , ' K' 
    142       IF(lwp) WRITE(numout,*) '      freezing point of water          rt0      = ', rt0     , ' K' 
    143       IF(lwp) WRITE(numout,*) '      melting point of snow            rt0_snow = ', rt0_snow, ' K' 
    144       IF(lwp) WRITE(numout,*) '      melting point of ice             rt0_ice  = ', rt0_ice , ' K' 
    145       IF(lwp) WRITE(numout,*) 
    146       IF(lwp) WRITE(numout,*) '   reference density and heat capacity now defined in eosbn2.f90' 
    147                
    148 #if defined key_si3 || defined key_cice 
    149       xlsn = lfus * rhosn        ! volumetric latent heat fusion of snow [J/m3] 
    150 #else 
    151       cpic = rcpic / rhoic       ! specific heat for ice   [J/Kg/K] 
    152       lfus = xlsn / rhosn        ! latent heat of fusion of fresh ice 
    153 #endif 
    154 #if defined key_si3 
    155       r1_rhoic = 1._wp / rhoic 
    156       r1_rhosn = 1._wp / rhosn 
    157       r1_cpic  = 1._wp / cpic 
    158 #endif 
     90 
     91      r1_rhoi = 1._wp / rhoi 
     92      r1_rhos = 1._wp / rhos 
     93      r1_rcpi = 1._wp / rcpi 
     94 
    15995      IF(lwp) THEN 
    16096         WRITE(numout,*) 
    161 #if defined key_cice 
    162          WRITE(numout,*) '      thermal conductivity of the snow          = ', rcdsn   , ' J/s/m/K' 
    163 #endif 
    164          WRITE(numout,*) '      thermal conductivity of pure ice          = ', rcdic   , ' J/s/m/K' 
    165          WRITE(numout,*) '      fresh ice specific heat                   = ', cpic    , ' J/kg/K' 
    166          WRITE(numout,*) '      latent heat of fusion of fresh ice / snow = ', lfus    , ' J/kg' 
    167 #if defined key_si3 || defined key_cice 
    168          WRITE(numout,*) '      latent heat of subl.  of fresh ice / snow = ', lsub    , ' J/kg' 
    169 #else 
    170          WRITE(numout,*) '      density times specific heat for snow      = ', rcpsn   , ' J/m^3/K'  
    171          WRITE(numout,*) '      density times specific heat for ice       = ', rcpic   , ' J/m^3/K' 
    172          WRITE(numout,*) '      volumetric latent heat fusion of sea ice  = ', xlic    , ' J/m'  
    173          WRITE(numout,*) '      latent heat of sublimation of snow        = ', xsn     , ' J/kg'  
    174 #endif 
    175          WRITE(numout,*) '      volumetric latent heat fusion of snow     = ', xlsn    , ' J/m^3'  
    176          WRITE(numout,*) '      density of sea ice                        = ', rhoic   , ' kg/m^3' 
    177          WRITE(numout,*) '      density of snow                           = ', rhosn   , ' kg/m^3' 
    178          WRITE(numout,*) '      density of freshwater (in melt ponds)     = ', rhofw   , ' kg/m^3' 
    179          WRITE(numout,*) '      emissivity of snow or ice                 = ', emic   
    180          WRITE(numout,*) '      salinity of ice                           = ', sice    , ' psu' 
    181          WRITE(numout,*) '      salinity of sea                           = ', soce    , ' psu' 
    182          WRITE(numout,*) '      latent heat of evaporation (water)        = ', cevap   , ' J/m^3'  
    183          WRITE(numout,*) '      correction factor for solar radiation     = ', srgamma  
     97         WRITE(numout,*) 'phy_cst : initialization of ocean parameters and constants' 
     98         WRITE(numout,*) '~~~~~~~' 
     99         WRITE(numout,*) '      mathematical constant                 rpi = ', rpi 
     100         WRITE(numout,*) '      day                                rday   = ', rday,   ' s' 
     101         WRITE(numout,*) '      sideral year                       rsiyea = ', rsiyea, ' s' 
     102         WRITE(numout,*) '      sideral day                        rsiday = ', rsiday, ' s' 
     103         WRITE(numout,*) '      omega                              omega  = ', omega,  ' s^-1' 
     104         WRITE(numout,*) 
     105         WRITE(numout,*) '      nb of months per year               raamo = ', raamo, ' months' 
     106         WRITE(numout,*) '      nb of hours per day                 rjjhh = ', rjjhh, ' hours' 
     107         WRITE(numout,*) '      nb of minutes per hour              rhhmm = ', rhhmm, ' mn' 
     108         WRITE(numout,*) '      nb of seconds per minute            rmmss = ', rmmss, ' s' 
     109         WRITE(numout,*) 
     110         WRITE(numout,*) '      earth radius                         ra   = ', ra   , ' m' 
     111         WRITE(numout,*) '      gravity                              grav = ', grav , ' m/s^2' 
     112         WRITE(numout,*) 
     113         WRITE(numout,*) '      freezing point of water              rt0  = ', rt0  , ' K' 
     114         WRITE(numout,*) 
     115         WRITE(numout,*) '   reference density and heat capacity now defined in eosbn2.f90' 
     116         WRITE(numout,*) 
     117         WRITE(numout,*) '      thermal conductivity of pure ice          = ', rcnd_i  , ' J/s/m/K' 
     118         WRITE(numout,*) '      thermal conductivity of snow is defined in a namelist ' 
     119         WRITE(numout,*) '      fresh ice specific heat                   = ', rcpi    , ' J/kg/K' 
     120         WRITE(numout,*) '      latent heat of fusion of fresh ice / snow = ', rLfus   , ' J/kg' 
     121         WRITE(numout,*) '      latent heat of subl.  of fresh ice / snow = ', rLsub   , ' J/kg' 
     122         WRITE(numout,*) '      density of sea ice                        = ', rhoi    , ' kg/m^3' 
     123         WRITE(numout,*) '      density of snow                           = ', rhos    , ' kg/m^3' 
     124         WRITE(numout,*) '      density of freshwater (in melt ponds)     = ', rhow    , ' kg/m^3' 
     125         WRITE(numout,*) '      salinity of ice (for pisces)              = ', sice    , ' psu' 
     126         WRITE(numout,*) '      salinity of sea (for pisces and isf)      = ', soce    , ' psu' 
     127         WRITE(numout,*) '      latent heat of evaporation (water)        = ', rLevap  , ' J/m^3'  
    184128         WRITE(numout,*) '      von Karman constant                       = ', vkarmn  
    185129         WRITE(numout,*) '      Stefan-Boltzmann constant                 = ', stefan  , ' J/s/m^2/K^4' 
Note: See TracChangeset for help on using the changeset viewer.