- Timestamp:
- 2018-06-21T11:58:42+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_nemo2cice_prints/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
r9816 r9817 22 22 !! - ! 2013-04 (F. Roquet, G. Madec) add eos_rab, change bn2 computation and reorganize the module 23 23 !! - ! 2014-09 (F. Roquet) add TEOS-10, S-EOS, and modify EOS-80 24 !! - ! 2015-06 (P.A. Bouttier) eos_fzp functions changed to subroutines for AGRIF 24 25 !!---------------------------------------------------------------------- 25 26 … … 991 992 992 993 993 FUNCTION eos_fzp_2d( psal, pdep ) RESULT( ptf)994 SUBROUTINE eos_fzp_2d( psal, ptf, pdep ) 994 995 !!---------------------------------------------------------------------- 995 996 !! *** ROUTINE eos_fzp *** … … 1005 1006 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ) :: psal ! salinity [psu] 1006 1007 REAL(wp), DIMENSION(jpi,jpj), INTENT(in ), OPTIONAL :: pdep ! depth [m] 1007 REAL(wp), DIMENSION(jpi,jpj) :: ptf! freezing temperature [Celcius]1008 REAL(wp), DIMENSION(jpi,jpj), INTENT(out ) :: ptf ! freezing temperature [Celcius] 1008 1009 ! 1009 1010 INTEGER :: ji, jj ! dummy loop indices … … 1017 1018 DO jj = 1, jpj 1018 1019 DO ji = 1, jpi 1019 zs= SQRT( ABS( psal(ji,jj) ) * r1_S0) ! square root salinity1020 zs= SQRT( ABS( psal(ji,jj) ) / 35.16504_wp ) ! square root salinity 1020 1021 ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs & 1021 1022 & - 3.12775e-02_wp)*zs+2.07679e-02_wp)*zs-5.87701e-02_wp … … 1038 1039 nstop = nstop + 1 1039 1040 ! 1040 END SELECT 1041 ! 1042 END FUNCTIONeos_fzp_2d1043 1044 FUNCTION eos_fzp_0d( psal, pdep ) RESULT( ptf)1041 END SELECT 1042 ! 1043 END SUBROUTINE eos_fzp_2d 1044 1045 SUBROUTINE eos_fzp_0d( psal, ptf, pdep ) 1045 1046 !!---------------------------------------------------------------------- 1046 1047 !! *** ROUTINE eos_fzp *** … … 1054 1055 !! Reference : UNESCO tech. papers in the marine science no. 28. 1978 1055 1056 !!---------------------------------------------------------------------- 1056 REAL(wp), INTENT(in ) :: psal! salinity [psu]1057 REAL(wp), INTENT(in ), OPTIONAL :: pdep! depth [m]1058 REAL(wp) :: ptf! freezing temperature [Celcius]1057 REAL(wp), INTENT(in ) :: psal ! salinity [psu] 1058 REAL(wp), INTENT(in ), OPTIONAL :: pdep ! depth [m] 1059 REAL(wp), INTENT(out) :: ptf ! freezing temperature [Celcius] 1059 1060 ! 1060 1061 REAL(wp) :: zs ! local scalars … … 1065 1066 CASE ( -1, 1 ) !== CT,SA (TEOS-10 formulation) ==! 1066 1067 ! 1067 zs = SQRT( ABS( psal ) * r1_S0) ! square root salinity1068 zs = SQRT( ABS( psal ) / 35.16504_wp ) ! square root salinity 1068 1069 ptf = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs & 1069 1070 & - 3.12775e-02_wp)*zs+2.07679e-02_wp)*zs-5.87701e-02_wp … … 1086 1087 END SELECT 1087 1088 ! 1088 END FUNCTIONeos_fzp_0d1089 END SUBROUTINE eos_fzp_0d 1089 1090 1090 1091 … … 1255 1256 WRITE(numout,*) ' model does not use Conservative Temperature' 1256 1257 ENDIF 1258 ENDIF 1259 ! 1260 ! Consistency check on ln_useCT and nn_eos 1261 IF ((nn_eos .EQ. -1) .AND. (.NOT. ln_useCT)) THEN 1262 CALL ctl_stop("ln_useCT should be set to True if using TEOS-10 (nn_eos=-1)") 1263 ELSE IF ((nn_eos .NE. -1) .AND. (ln_useCT)) THEN 1264 CALL ctl_stop("ln_useCT should be set to False if using TEOS-80 or simplified equation of state (nn_eos=0 or nn_eos=1)") 1257 1265 ENDIF 1258 1266 !
Note: See TracChangeset
for help on using the changeset viewer.