Page 1 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 1 !/ ------------------------------------------------------------------- / 2 MODULE W3SLN1MD 3 !/ 4 !/ +-----------------------------------+ 5 !/ | WAVEWATCH III NOAA/NCEP | 6 !/ | H. L. Tolman | 7 !/ | FORTRAN 90 | 8 !/ | Last update : 29-May-2009 | 9 !/ +-----------------------------------+ 10 !/ 11 !/ 23-Jun-2006 : Origination. ( version 3.09 ) 12 !/ 29-May-2009 : Preparing distribution version. ( version 3.14 ) 13 !/ 14 !/ Copyright 2009 National Weather Service (NWS), 15 !/ National Oceanic and Atmospheric Administration. All rights 16 !/ reserved. WAVEWATCH III is a trademark of the NWS. 17 !/ No unauthorized use without permission. 18 !/ 19 ! 1. Purpose : 20 ! 21 ! Linear wind input according to Cavaleri and Melanotte-Rizzoli 22 ! (1982) filtered for low frequencies according to Tolman (1992). 23 ! 24 ! 2. Variables and types : 25 ! 26 ! 3. Subroutines and functions : 27 ! 28 ! Name Type Scope Description 29 ! ---------------------------------------------------------------- 30 ! W3SLN1 Subr. Public User supplied linear input. 31 ! ---------------------------------------------------------------- 32 ! 33 ! 4. Subroutines and functions used : 34 ! 35 ! Name Type Module Description 36 ! ---------------------------------------------------------------- 37 ! STRACE Subr. W3SERVMD Subroutine tracing. 38 ! ---------------------------------------------------------------- 39 ! 40 ! 5. Remarks : 41 ! 42 ! 6. Switches : 43 ! 44 ! !/S Enable subroutine tracing. 45 ! !/T Test output. 46 ! 47 ! 7. Source code : 48 !/ 49 !/ ------------------------------------------------------------------- / 50 !/ 51 PUBLIC 52 !/ 53 CONTAINS 54 !/ ------------------------------------------------------------------- / 55 SUBROUTINE W3SLN1 (K, FHIGH, USTAR, USDIR, S) 56 !/ 57 !/ +-----------------------------------+ Page 2 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 58 !/ | WAVEWATCH III NOAA/NCEP | 59 !/ | H. L. Tolman | 60 !/ | FORTRAN 90 | 61 !/ | Last update : 23-Jun-2006 | 62 !/ +-----------------------------------+ 63 !/ 64 !/ 23-Jun-2006 : Origination. ( version 3.09 ) 65 !/ 66 ! 1. Purpose : 67 ! 68 ! Linear wind input according to Cavaleri and Melanotte-Rizzoli 69 ! (1982) filtered for low frequencies according to Tolman (1992). 70 ! 71 ! 2. Method : 72 ! 73 ! The expression of Cavaleri and Melanotte-Rizzoli, converted to 74 ! action spectra defined in terms of wavenumber and direction 75 ! becomes 76 ! 77 ! -1 / / \ \ 4 78 ! Sln = SLNC1 * k * max | 0., | U* cos(Dtheta) | | (1) 79 ! \ \ / / 80 ! 81 ! 2 -2 82 ! SLNC1 = 80 RHOr GRAV FILT (2) 83 ! 84 ! Where : 85 ! 86 ! RHOr Density of air dev. by density of water. 87 ! U* Wind friction velocity. 88 ! Dtheta Difference in wind and wave direction. 89 ! FILT Filter based on PM and cut-off frequencies. 90 ! 91 ! 3. Parameters : 92 ! 93 ! Parameter list 94 ! ---------------------------------------------------------------- 95 ! K R.A. I Wavenumber for entire spectrum. 96 ! FHIGH R.A. I Cut-off frequency in integration (rad/s) 97 ! USTAR Real I Friction velocity. 98 ! USDIR Real I Direction of USTAR. 99 ! S R.A. O Source term. 100 ! ---------------------------------------------------------------- 101 ! *) Stored as 1-D array with dimension NTH*NK 102 ! 103 ! 4. Subroutines used : 104 ! 105 ! Name Type Module Description 106 ! ---------------------------------------------------------------- 107 ! STRACE Subr. W3SERVMD Subroutine tracing. 108 ! ---------------------------------------------------------------- 109 ! 110 ! 5. Called by : 111 ! 112 ! Name Type Module Description 113 ! ---------------------------------------------------------------- 114 ! W3SRCE Subr. W3SRCEMD Source term integration. Page 3 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 115 ! W3EXPO Subr. N/A Point output post-processor. 116 ! GXEXPO Subr. N/A GrADS point output post-processor. 117 ! ---------------------------------------------------------------- 118 ! 119 ! 6. Error messages : 120 ! 121 ! None. 122 ! 123 ! 7. Remarks : 124 ! 125 ! 8. Structure : 126 ! 127 ! See source code. 128 ! 129 ! 9. Switches : 130 ! 131 ! !/S Enable subroutine tracing. 132 ! !/T Test output. 133 ! 134 ! 10. Source code : 135 ! 136 !/ ------------------------------------------------------------------- / 137 USE CONSTANTS 138 USE W3GDATMD, ONLY: NTH, NK, ECOS, ESIN, SIG, SLNC1, FSPM, FSHF 139 USE W3ODATMD, ONLY: NDSE, NDST 140 USE W3SERVMD, ONLY: EXTCDE 141 !/ 142 IMPLICIT NONE 143 !/ 144 !/ ------------------------------------------------------------------- / 145 !/ Parameter list 146 !/ 147 REAL, INTENT(IN) :: K(NK), FHIGH, USTAR, USDIR 148 REAL, INTENT(OUT) :: S(NTH,NK) 149 !/ 150 !/ ------------------------------------------------------------------- / 151 !/ Local parameters 152 !/ 153 INTEGER :: ITH, IK 154 REAL :: COSU, SINU, DIRF(NTH), FAC, FF1, FF2, & 155 FFILT, RFR, WNF(NK) 156 !/ 157 !/ ------------------------------------------------------------------- / 158 !/ 159 ! 160 ! 1. Set up factors ------------------------------------------------- * 161 ! 162 COSU = COS(USDIR) 163 SINU = SIN(USDIR) 164 ! 165 DO ITH=1, NTH 166 DIRF(ITH) = MAX ( 0. , (ECOS(ITH)*COSU+ESIN(ITH)*SINU) )**4 167 END DO 168 ! 169 FAC = SLNC1 * USTAR**4 170 FF1 = FSPM * GRAV/(28.*USTAR) 171 FF2 = FSHF * MIN(SIG(NK),FHIGH) Page 4 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 172 FFILT = MIN ( MAX(FF1,FF2) , 2.*SIG(NK) ) 173 DO IK=1, NK 174 RFR = SIG(IK) / FFILT 175 IF ( RFR .LT. 0.5 ) THEN 176 WNF(IK) = 0. 177 ELSE 178 WNF(IK) = FAC / K(IK) * EXP(-RFR**(-4)) 179 END IF 180 END DO 181 ! 182 ! 2. Compose source term -------------------------------------------- * 183 ! 184 DO IK=1, NK 185 S(:,IK) = WNF(IK) * DIRF(:) 186 END DO 187 ! 188 RETURN 189 ! 190 ! Formats 191 ! 192 !/ 193 !/ End of W3SLN1 ----------------------------------------------------- / 194 !/ 195 END SUBROUTINE W3SLN1 ENTRY POINTS Name w3sln1md_mp_w3sln1_ Page 5 Source Listing W3SLN1 2014-09-16 16:54 Symbol Table w3sln1md.f90 SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References CONSTANTS Module 137 137 COS Func 162 scalar 162 COSU Local 154 R(4) 4 scalar 162,166 DIRF Local 154 R(4) 4 1 0 166,185 ECOS Local 138 R(4) 4 1 1 PTR 138,166 ESIN Local 138 R(4) 4 1 1 PTR 138,166 EXP Func 178 scalar 178 EXTCDE Subr 140 140 FAC Local 154 R(4) 4 scalar 169,178 FF1 Local 154 R(4) 4 scalar 170,172 FF2 Local 154 R(4) 4 scalar 171,172 FFILT Local 155 R(4) 4 scalar 172,174 FHIGH Dummy 55 R(4) 4 scalar ARG,IN 171 FSHF Local 138 R(4) 4 scalar PTR 138,171 FSPM Local 138 R(4) 4 scalar PTR 138,170 GRAV Param 170 R(4) 4 scalar 170 IK Local 153 I(4) 4 scalar 173,174,176,178,184,185 ITH Local 153 I(4) 4 scalar 165,166 K Dummy 55 R(4) 4 1 0 ARG,IN 178 MAX Func 166 scalar 166,172 MIN Func 171 scalar 171,172 NDSE Local 139 I(4) 4 scalar PTR 139 NDST Local 139 I(4) 4 scalar PTR 139 NK Local 138 I(4) 4 scalar PTR 138,147,148,155,171,172,173,184 NTH Local 138 I(4) 4 scalar PTR 138,148,154,165 RFR Local 155 R(4) 4 scalar 174,175,178 S Dummy 55 R(4) 4 2 0 ARG,OUT 185 SIG Local 138 R(4) 4 1 1 PTR 138,171,172,174 SIN Func 163 scalar 163 SINU Local 154 R(4) 4 scalar 163,166 SLNC1 Local 138 R(4) 4 scalar PTR 138,169 USDIR Dummy 55 R(4) 4 scalar ARG,IN 162,163 USTAR Dummy 55 R(4) 4 scalar ARG,IN 169,170 W3GDATMD Module 138 138 W3ODATMD Module 139 139 W3SERVMD Module 140 140 W3SLN1 Subr 55 WNF Local 155 R(4) 4 1 0 176,178,185 Page 6 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 196 !/ 197 !/ End of module INSLN1MD -------------------------------------------- / 198 !/ 199 END MODULE W3SLN1MD SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References W3SLN1MD Module 2 Page 7 Source Listing W3SLN1 2014-09-16 16:54 Subprograms/Common Blocks w3sln1md.f90 SUBPROGRAMS/COMMON BLOCKS Name Object Declared Type Bytes Dimen Elements Attributes References W3SLN1 Subr 55 W3SLN1MD Module 2 COMPILER OPTIONS BEING USED -align nocommons -align nodcommons -align noqcommons -align records -align nosequence -align norec1byte -align norec2byte -align norec4byte -align norec8byte -align norec16byte -altparam -assume accuracy_sensitive -assume nobscc -assume nobuffered_io -assume byterecl -assume nocc_omp -assume nocstring -assume nodummy_aliases -assume nofpe_summary -assume noieee_fpe_flags -assume nominus0 -assume noold_boz -assume old_unit_star -assume old_ldout_format -assume noold_logical_ldio -assume old_maxminloc -assume old_xor -assume protect_constants -assume noprotect_parens -assume split_common -assume source_include -assume nostd_intent_in -assume nostd_mod_proc_name -assume norealloc_lhs -assume underscore -assume no2underscores -auto no -auto_scalar no -bintext -ccdefault default -check noargs -check noarg_temp_created -check nobounds -check noformat -check nooutput_conversion -check nooverflow -check nopointers -check power -check noshape -check nounderflow -check nouninitialized -coarray-num-procs 0 no -coarray-config-file -convert big_endian -cross_reference -D __INTEL_COMPILER=1210 -D __unix__ -D __unix -D __linux__ -D __linux -D __gnu_linux__ -D unix -D linux -D __ELF__ -D __x86_64 -D __x86_64__ -D _MT -D __INTEL_COMPILER_BUILD_DATE=20120612 -D __pentium4 -D __pentium4__ -D __tune_pentium4__ -D __SSE2__ -D __SSE3__ -D __SSSE3__ -D __SSE4_1__ -D __SSE4_2__ -D __SSE__ -D __MMX__ -D __AVX__ -double_size 64 no -d_lines no -Qdyncom -error_limit 30 no -f66 no -f77rtl no -fast -fpscomp nofilesfromcmd -fpscomp nogeneral -fpscomp noioformat -fpscomp noldio_spacing -fpscomp nologicals no -fpconstant Page 8 Source Listing W3SLN1 2014-09-16 16:54 w3sln1md.f90 -fpe3 -fprm nearest no -ftz -fp_model noprecise -fp_model fast -fp_model nostrict -fp_model nosource -fp_model nodouble -fp_model noextended -fp_model novery_fast -fp_model noexcept -fp_model nono_except -heap_arrays 0 no -threadprivate_compat -free -g0 -iface nomixed_str_len_arg -iface nono_mixed_str_len_arg no -intconstant -integer_size 32 no -mixed_str_len_arg no -module -names lowercase no -noinclude -O2 no -pad_source -real_size 32 no -recursive -reentrancy none no -sharable_localsaves -vec=simd -show noinclude -show map -show options no -syntax_only no -threadcom no -U no -vms -w noall -w nonone -w alignments -w noargument_checking -w nodeclarations -w general -w noignore_bounds -w noignore_loc -w nointerfaces -w notruncated_source -w uncalled -w uninitialized -w nounused -w usage -includepath : /gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/,.f,./.f,/usrx/local/intel/composerxe/mkl/include/.f, /usrx/local/intel/composerxe/tbb/include/.f,/gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/intel64/.f, /gpfs/gp1/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/.f,/usr/local/include/.f,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/.f, /usr/include/.f,/usr/include/.f -list filename : w3sln1md.lst -o filename : none COMPILER: Intel(R) Fortran 12.1-2100