Ignore:
Timestamp:
2017-04-11T13:58:38+02:00 (4 years ago)
Author:
jpalmier
Message:

JPALM — 11-04-2017 — MEDUSA spring tidy-up refreshning session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/mocsy_mainmod.F90

    r5841 r7894  
    618618  !       -> 'm10' means use Millero (2010) formulation for K1 & K2 (see Dickson et al., 2007) 
    619619  !                **** Valid for 0 < T < 50°C and 1 < S < 50 psu 
     620  !       -> 'w14' means use Waters (2014) formulation for K1 & K2 (see Dickson et al., 2007) 
     621  !                **** Valid for 0 < T < 50°C and 1 < S < 50 psu 
    620622  !     ----------- 
    621623  !     optKf: 
     
    675677!f2py character*2 optional, intent(in) :: optKf='pf' 
    676678  CHARACTER(2), OPTIONAL, INTENT(in) :: optKf 
    677   !> for K1,K2 choose either \b 'l' (Lueker et al., 2000) or \b 'm10' (Millero, 2010)  
     679  !> for K1,K2 choose either \b 'l' (Lueker et al., 2000) or \b 'm10' (Millero, 2010) or \b 'w14' (Waters et al., 2014) 
    678680!f2py character*3 optional, intent(in) :: optK1K2='l' 
    679681  CHARACTER(3), OPTIONAL, INTENT(in) :: optK1K2 
     
    946948                  - 0.01781d0*s + 0.0001122d0*s2)) 
    947949        ELSEIF (trim(opK1K2) == 'm10') THEN 
    948 !         Millero (2010, Mar. Fresh Wat. Res.) (total pH scale) 
    949 !         pK1o = 6320.813d0*invtk + 19.568224d0*dlogtk -126.34048d0 
    950 !         ma1 = 13.4051d0*sqrts + 0.03185d0*s - (5.218e-5)*s2 
    951 !         mb1 = -531.095d0*sqrts - 5.7789d0*s 
    952 !         mc1 = -2.0663d0*sqrts 
    953 !         pK1 = pK1o + ma1 + mb1*invtk + mc1*dlogtk 
    954 !         K1(i) = 10.0d0**(-pK1)  
    955  
    956 !         pK2o = 5143.692d0*invtk + 14.613358d0*dlogtk -90.18333d0 
    957 !         ma2 = 21.5724d0*sqrts + 0.1212d0*s - (3.714e-4)*s2 
    958 !         mb2 = -798.292d0*sqrts - 18.951d0*s 
    959 !         mc2 = -3.403d0*sqrts 
    960 !         pK2 = pK2o + ma2 + mb2*invtk + mc2*dlogtk 
    961 !         K2(i) = 10.0d0**(-pK2) 
    962  
    963950!         Millero (2010, Mar. Fresh Wat. Res.) (seawater pH scale) 
    964951          pK1o = 6320.813d0*invtk + 19.568224d0*dlogtk -126.34048d0 
     
    975962          pK2 = pK2o + ma2 + mb2*invtk + mc2*dlogtk 
    976963          K2(i) = 10.0d0**(-pK2) 
     964        ELSEIF (trim(opK1K2) == 'w14') THEN 
     965!         Waters, Millero, Woosley (Mar. Chem., 165, 66-67, 2014) (seawater scale) 
     966          pK1o = 6320.813d0*invtk + 19.568224d0*dlogtk -126.34048d0 
     967          ma1 = 13.409160d0*sqrts + 0.031646d0*s - (5.1895e-5)*s2 
     968          mb1 = -531.3642d0*sqrts - 5.713d0*s 
     969          mc1 = -2.0669166d0*sqrts 
     970          pK1 = pK1o + ma1 + mb1*invtk + mc1*dlogtk 
     971          K1(i) = 10.0d0**(-pK1)  
     972 
     973          pK2o = 5143.692d0*invtk + 14.613358d0*dlogtk -90.18333d0 
     974          ma2 = 21.225890d0*sqrts + 0.12450870d0*s - (3.7243e-4_r8)*s2 
     975          mb2 = -779.3444d0*sqrts - 19.91739d0*s 
     976          mc2 = -3.3534679d0*sqrts 
     977          pK2 = pK2o + ma2 + mb2*invtk + mc2*dlogtk 
     978          K2(i) = 10.0d0**(-pK2) 
    977979        ELSE 
    978            PRINT *, "optK1K2 must be either 'l' or 'm10'" 
     980           PRINT *, "optK1K2 must be either 'l' or 'm10', or 'w14'" 
    979981           STOP 
    980982        ENDIF 
     
    16291631! Local variables 
    16301632  REAL(kind=wp) :: ssal, salk, sdic, ssil, sphos 
    1631  
    16321633  REAL(kind=wp) :: tempot, tempis68, tempot68 
    1633 ! REAL(kind=wp) :: dtempot, dtempot68 
    16341634  REAL(kind=wp) :: drho 
    16351635 
     
    19541954  !> hydrostatic pressure [db] 
    19551955  REAL(kind=wp), INTENT(in), DIMENSION(N) :: p 
    1956 !f2py optional , depend(pCO2) :: n=len(pCO2) 
    19571956 
    19581957! OUTPUT variables: 
     
    20212020  !> hydrostatic pressure [db] 
    20222021  REAL(kind=wp), INTENT(in), DIMENSION(N) :: p 
    2023 !f2py optional , depend(pCO2) :: n=len(pCO2) 
    20242022 
    20252023! OUTPUT variables: 
Note: See TracChangeset for help on using the changeset viewer.