├── .gitignore ├── Fortran ├── COARE3.0 │ ├── f77 │ │ ├── README.md │ │ ├── cor3_0bf.for │ │ ├── cor3_0bh.for │ │ ├── test3_0.txt │ │ ├── test3_0rh.txt │ │ ├── tst3_0bf.out │ │ └── tst3_0bh.out │ └── f90 │ │ ├── README.md │ │ ├── cor30_ks_oz.f90 │ │ ├── cor30a.F90 │ │ ├── cor3_0af.F90 │ │ ├── cor3_0ah.F90 │ │ ├── grv.F90 │ │ ├── julday.f90 │ │ ├── nr.f90 │ │ ├── nrtype.f90 │ │ ├── nrutil.f90 │ │ ├── psit_30.F90 │ │ ├── psiu_30.F90 │ │ ├── qsat.F90 │ │ ├── qsee.F90 │ │ ├── test3_0.txt │ │ ├── tst3_0af_out.txt │ │ └── tst3_0ah_out.txt └── COARE3.6 │ ├── PlotCOARE36Errors.m │ ├── README.md │ ├── machine.f90 │ ├── module_coare36_model.f90 │ ├── module_coare36_parameters.f90 │ ├── physcons.F90 │ ├── run_test.bash │ ├── test_35_data.txt │ ├── test_36_output_f90coolskin_dT_skin_min1e-3K.txt │ ├── test_36_output_f90coolskin_dT_skin_min1e-8K.txt │ ├── test_36_output_matlab_072821.txt │ └── test_coare_36.f90 ├── LICENSE ├── Matlab ├── COARE3.0 │ ├── README.md │ ├── VP_test_data_1.txt │ ├── VP_test_results_1.txt │ ├── coare30vn_ref.m │ ├── red_VP_bulk.m │ ├── relhum.m │ └── rhov3.m ├── COARE3.5 │ ├── coare35vn.m │ └── coare35vnWarm.m └── COARE3.6 │ ├── README.md │ ├── coare36vnWarm_et.m │ ├── coare36vn_zrf_et.m │ └── experimental coolskin │ ├── coare36vn_zrf_et_cs.m │ └── dcoolf2.m ├── Python ├── COARE3.5 │ ├── README.md │ ├── bulk.py │ ├── coare35vn.py │ ├── meteo.py │ ├── test_35_data.txt │ ├── test_35_output_py_082020.txt │ └── util.py └── COARE3.6 │ ├── README.md │ ├── coare36vnWarm_et.py │ ├── coare36vn_zrf_et.py │ ├── test_36_data.txt │ ├── test_36_output_withnowavesinput_withwarmlayer.txt │ └── test_36_output_withwavesinput_withwarmlayer.txt ├── README.md └── References ├── Edson et al. 2013 - momentum flux correction.pdf ├── Edson et al. 2013 - momentum flux.pdf ├── Fairall et al. 1996a - cool skin warm layer.pdf ├── Fairall et al. 1996b - bulk fluxes of variables.pdf ├── Fairall et al. 1997 - ship measurements MABL.pdf ├── Fairall et al. 2003 - bulk fluxes.pdf ├── Fairall et al. 2011 - COAREG.pdf └── coare36_readme_1.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .DocumentRevisions-V100 3 | .Spotlight-V100 4 | .Trashes 5 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f77/README.md: -------------------------------------------------------------------------------- 1 | Brief notes about the algorithm and the test data set appears at the head of the fortran file. Here we provide some comments on the structure of the code: 2 | 3 | 1. The input "read" statement is set up for the test data file test3_0.txt . This consists of four days of Moana Wave COARE data, 26-29 Nov 1992, prepared from Chris Fairall's hourly data file wavhr2_5.asc dated 31/10/96. A full description of the Moana Wave operations, instruments and data set is given at http://www.ncdc.noaa.gov/coare/catalog/data/air_sea_fluxes/moana_flux.html 4 | 5 | 2. A list of input variables is given, with units etc.. Only the first 11, the critical environmental and position variables, appear in the test data. If time series of p and/or zi are available to the user, they may be added to the “700 read…” input string, and the default values disabled. The remaining input parameters relate to the instrument set-up and are expected to remain fixed for the duration of the observations. They are therefore set in the main program, as are the switches for cool skin, warm layer and wave state options. 6 | 7 | 3. Properly, wind speed should be relative to the water surface. “u” should be the vector sum of measured wind speed and surface current if available, calculated by the user outside the program. 8 | 9 | 4. Two sea temperature measurements are given in the test data, one at only 0.05m depth, the other at 6m from Mike Gregg's Advanced Microstructure Profiler which operated from the Moana Wave during leg 1. The data was kindly provided in suitable form by Hemantha Wijesekera (COAS, OSU). It allows a better demonstration of the calculation of skin temperature from the bulk via the warm layer option. “ts_depth” should be set to correspond with whichever of “ts” or “hwt” is selected. 10 | 11 | 5. If skin temperature (sst) is measured directly with an infra-red radiometer, the warm layer and cool skin codes should be bypassed by setting jwarm and jcool to zero 12 | 13 | 6. jwave selects the method of calculating zo at the beginning of the main iteration loop in subroutine(ASL), i.e. Smith (1988) or one of the two wind/wave parameterizations. The latter require values for the significant wave height (hwave) and dominant wave period (twave), which are calculated in the code from formulas given by Taylor and Yelland (2001) for fully developed seas. If measurements of hwave and twave are available, they should be added to the input data string and the default values disabled. 14 | 15 | 7. Structure of the fortran code. 16 | The main program (fluxes) opens the input and output files, reads the data and sets fixed values, defaults and options. It adds a data line number (index) and calls subroutine bulk_flux, passing input data in COMMON. 17 | Bulk_flux defines most physical constants and coefficients and, after determining the proper conditions, calculates and integrates the diurnal warming of the ocean surface, using fluxes and net longwave radiation from the previous time-step and the solar absorption profile. The fraction of warming above the temperature sensor is added to the measurement, and subroutine ASL is called for the flux and boundary layer calculations. 18 | ASL is a descendant of the original LKB code, but almost all operations and parameterizations are changed. After a series of first guesses and operations to characterize the atmospheric surface layer within the framework of Monin-Obhukov similarity theory, the core of the subroutine is an iteration loop. This iterates three times over the fluxes (in the form u*, t*, q*), the roughness parameters (zo, zot, zoq), the M-O stability parameter and profile phi functions, and also calculates gustiness and the cool skin within the loop. Final values are returned to bulk_flux in COMMON. 19 | Finally, bulk_flux calculates the surface fluxes (Wm-2), skin temperature (sst), heat and momentum fluxes due to rainfall, neutral transfer coefficients, values of state variables at standard height, etc., and saves the fluxes for the next timestep warm layer integrals. Output files are written before returning to the main program for the next line of input data. 20 | 21 | 8. Outputs available from bulk_flux are listed at the head of the program. The outputs in tst3_0bf.out are given below. To illustrate the warm layer and cool skin, we output the respective delta-temperatures and layer thicknesses. Note that dt_warm is the temperature across the entire warm layer. Only if tk_pwp is less than the sensor depth (ts_depth = 6m in the test case) will tsw=ts +dt_warm. Otherwise, a linear profile is assumed, and the warming above the bulk sensor calculated. The measurement of “ts” at 0.05m depth will generally include most of the warm layer but not the cool skin effect. 22 | 23 | Programs: 24 | * cor3_0bf.for: this version is set up to use the Fairall near-surface temperature sensor for Ts bulk. 25 | * cor3_0bh.for: this version is setup to use the MSP 6m-depth temperature sensor for Ts bulk. 26 | 27 | Input data: 28 | * test3_0.txt (Test data) 29 | 30 | 1 Date: YYYYMMDDHHmmss.ss, YYYY=year, MM=month, DD=day, HH=hour, mm=minute,ss.ss=sec 31 | 32 | 2 U: true wind speed at 15-m height m/s corrected for surface currents 33 | 34 | 3 Tsea: sea surface temp (at about 0.05m depth) deg.C 35 | 36 | 4 Tair: Vaisala air temperature (about 15 m) deg.C 37 | 38 | 5 qair: Vaisala air specific humidity (about 15 m) g/kg 39 | 40 | 6 Rs: solar irradiance W/m2 41 | 42 | 7 Rl: downwelling longwave irradiance W/m2 43 | 44 | 8 Rain: precipitation mm/hr 45 | 46 | 9 Lat: Latitude (N=+) 47 | 48 | 10 Lon: Longitude (E=+) 49 | 50 | 11 MSP: MSP temperature at 6m depth deg.C 51 | 52 | 53 | 54 | Output files: 55 | * tst3_0bf.out and tst3_0bh.out Fortran output files from test data 56 | 57 | 1 index: data line number 58 | 59 | 2 xtime: YYYYMMDDHHmmss, date and time as read in (without dec. sec.) 60 | 61 | 3 hf: sensible heat flux W/m2 62 | 63 | 4 ef: latent heat flux W/m2 64 | 65 | 5 sst: sea skin temperature deg.C 66 | 67 | 6 tau: surface stress N/m2 68 | 69 | 7 Wbar: mean Webb vertical velocity m/s 70 | 71 | 8 rf: sensible heat flux due to precipitation W/m2 72 | 73 | 9 dter: cool skin effect deg.C 74 | 75 | 10 dt_wrm: warming across entire warm layer deg.C 76 | 77 | 11 tk_pwp:warm layer thickness m 78 | 79 | 12 tkt*1000:tkt=cool skin thickness 80 | 81 | 13 Wg: gustiness velocity m/s 82 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f77/test3_0.txt: -------------------------------------------------------------------------------- 1 | 19921125132100.00 4.70 29.00 27.70 17.60 0.00 428.00 0.00 -1.73 156.07 29.15 2 | 19921125141200.00 4.10 29.00 27.70 17.70 0.00 429.00 0.00 -1.73 156.06 29.15 3 | 19921125150300.00 4.30 29.00 27.80 17.80 0.00 422.00 0.00 -1.73 156.06 29.15 4 | 19921125155500.00 4.70 29.00 27.80 17.60 0.00 412.00 0.00 -1.73 156.05 29.15 5 | 19921125164600.00 3.70 29.00 27.70 17.30 0.00 413.00 0.00 -1.73 156.04 29.16 6 | 19921125173800.00 5.10 29.00 27.30 17.60 0.00 419.00 0.00 -1.73 156.02 29.16 7 | 19921125182900.00 2.50 29.00 27.50 17.90 0.00 425.00 0.00 -1.73 156.01 29.16 8 | 19921125192000.00 3.80 29.00 27.90 17.70 50.00 427.00 0.00 -1.73 156.00 29.15 9 | 19921125201200.00 4.80 29.00 28.00 17.60 249.00 428.00 0.00 -1.73 156.00 29.14 10 | 19921125210500.00 3.90 29.00 27.80 18.30 386.00 422.00 0.00 -1.73 155.99 29.13 11 | 19921125221900.00 4.60 29.10 27.90 17.60 633.00 413.00 0.00 -1.73 155.99 29.14 12 | 19921125232700.00 5.20 29.20 28.00 18.00 881.00 409.00 0.00 -1.73 155.99 29.14 13 | 19921126001900.00 4.40 29.30 28.10 18.10 883.00 414.00 0.00 -1.73 155.98 29.20 14 | 19921126011000.00 4.00 29.30 28.10 18.60 853.00 420.00 0.00 -1.73 155.97 29.27 15 | 19921126022200.00 4.80 29.50 28.50 17.90 842.00 417.00 0.00 -1.73 155.97 29.26 16 | 19921126031300.00 4.80 29.50 28.40 18.10 779.00 411.00 0.00 -1.72 155.97 29.42 17 | 19921126041600.00 4.30 29.60 28.50 18.40 513.00 423.00 0.00 -1.72 155.96 29.59 18 | 19921126050700.00 4.40 29.50 28.60 18.90 362.00 422.00 0.00 -1.72 155.96 29.59 19 | 19921126055900.00 4.40 29.30 28.50 18.80 171.00 415.00 0.00 -1.72 155.96 29.50 20 | 19921126065500.00 4.10 29.30 28.50 17.90 26.00 410.00 0.00 -1.72 155.96 29.37 21 | 19921126074700.00 3.90 29.20 28.50 17.60 0.00 410.00 0.00 -1.72 155.95 29.37 22 | 19921126083800.00 3.20 29.30 28.50 17.80 0.00 410.00 0.00 -1.72 155.95 29.35 23 | 19921126093000.00 2.20 29.30 28.60 18.00 0.00 426.00 0.00 -1.72 155.95 29.39 24 | 19921126102100.00 1.90 29.30 28.50 18.00 0.00 414.00 0.00 -1.72 155.94 29.45 25 | 19921126111200.00 1.90 29.30 28.40 18.00 0.00 425.00 0.00 -1.72 155.94 29.42 26 | 19921126120800.00 2.50 29.20 28.40 18.00 0.00 417.00 0.00 -1.72 155.94 29.42 27 | 19921126130000.00 3.00 29.30 28.30 18.10 0.00 408.00 0.00 -1.72 155.94 29.35 28 | 19921126145300.00 2.70 29.20 28.00 18.70 0.00 412.00 0.00 -1.71 156.00 29.41 29 | 19921126154500.00 3.00 29.20 27.90 18.60 0.00 409.00 0.00 -1.72 156.02 29.31 30 | 19921126163600.00 3.10 29.20 27.90 18.50 0.00 413.00 0.00 -1.72 156.05 29.29 31 | 19921126172700.00 2.50 29.10 28.00 18.30 0.00 414.00 0.00 -1.72 156.07 29.27 32 | 19921126181900.00 1.90 29.10 28.00 18.20 0.00 409.00 0.00 -1.72 156.06 29.26 33 | 19921126191000.00 1.10 29.20 27.90 18.20 25.00 411.00 0.00 -1.72 156.06 29.27 34 | 19921126200100.00 0.80 29.20 28.00 18.40 110.00 414.00 0.00 -1.72 156.04 29.27 35 | 19921126213400.00 0.70 29.30 28.10 18.20 123.00 436.00 0.00 -1.72 156.02 29.29 36 | 19921126222600.00 2.10 29.20 27.30 18.40 116.00 445.00 0.00 -1.72 156.01 29.38 37 | 19921126231700.00 7.90 29.20 25.40 18.20 247.00 436.00 4.80 -1.72 156.00 29.31 38 | 19921127000900.00 6.60 29.30 25.90 17.70 635.00 418.00 0.00 -1.73 156.02 29.33 39 | 19921127010000.00 5.80 29.30 26.70 17.40 486.00 422.00 0.00 -1.73 156.06 29.33 40 | 19921127015100.00 4.80 29.30 26.90 17.50 356.00 429.00 0.00 -1.72 156.06 29.33 41 | 19921127024300.00 4.50 29.20 27.00 17.50 421.00 422.00 0.00 -1.72 156.05 29.36 42 | 19921127033400.00 5.20 29.20 26.80 17.90 191.00 434.00 0.00 -1.72 156.04 29.25 43 | 19921127042500.00 6.90 29.10 25.30 18.20 50.00 437.00 9.40 -1.72 156.04 29.23 44 | 19921127051700.00 5.70 29.10 25.10 17.50 72.00 434.00 1.60 -1.72 156.03 29.23 45 | 19921127060800.00 9.90 29.10 24.70 17.70 18.00 432.00 1.50 -1.72 156.01 29.24 46 | 19921127070000.00 5.20 29.10 25.00 17.60 6.00 429.00 0.00 -1.72 156.01 29.22 47 | 19921127075100.00 4.30 29.10 26.10 16.90 0.00 415.00 0.00 -1.72 155.99 29.22 48 | 19921127084200.00 3.70 29.10 26.70 16.30 0.00 414.00 0.00 -1.72 155.98 29.16 49 | 19921127093400.00 3.30 29.10 27.20 16.10 0.00 410.00 0.00 -1.72 155.98 29.15 50 | 19921127102500.00 3.90 29.00 27.50 16.20 0.00 410.00 0.00 -1.72 155.97 29.14 51 | 19921127113200.00 5.00 29.00 27.50 16.90 0.00 414.00 0.00 -1.72 155.96 29.14 52 | 19921127122600.00 5.90 29.00 27.60 17.30 0.00 415.00 0.00 -1.72 155.95 29.12 53 | 19921127134800.00 4.90 29.00 27.50 18.20 0.00 405.00 0.00 -1.72 155.95 29.11 54 | 19921127143900.00 5.20 29.00 27.60 18.30 0.00 406.00 0.00 -1.72 155.97 29.10 55 | 19921127160400.00 5.40 29.00 27.70 17.70 0.00 413.00 0.00 -1.72 156.01 29.13 56 | 19921127170000.00 4.40 29.00 27.70 17.70 0.00 416.00 0.00 -1.72 156.00 29.14 57 | 19921127175200.00 3.80 29.00 27.70 17.70 0.00 413.00 0.00 -1.73 156.00 29.12 58 | 19921127184300.00 3.10 29.00 27.70 17.60 2.00 406.00 0.00 -1.73 155.98 29.12 59 | 19921127193500.00 2.90 29.00 27.90 17.70 88.00 410.00 0.00 -1.72 156.00 29.12 60 | 19921127202600.00 2.10 29.00 27.90 17.80 276.00 410.00 0.00 -1.72 156.00 29.12 61 | 19921127211700.00 1.90 29.10 27.80 17.80 487.00 406.00 0.00 -1.72 155.99 29.12 62 | 19921127220900.00 1.60 29.20 27.70 17.70 670.00 407.00 0.00 -1.73 155.98 29.13 63 | 19921127230000.00 1.40 29.50 27.40 17.90 810.00 416.00 0.00 -1.74 155.98 29.14 64 | 19921127235200.00 1.10 30.10 27.40 17.80 917.00 410.00 0.00 -1.72 156.01 29.16 65 | 19921128004300.00 1.10 30.60 27.40 17.80 960.00 412.00 0.00 -1.72 156.00 29.14 66 | 19921128022100.00 1.50 30.80 27.70 17.90 939.00 413.00 0.00 -1.72 155.99 29.17 67 | 19921128042600.00 1.20 31.00 28.40 17.80 665.00 411.00 0.00 -1.72 156.00 29.27 68 | 19921128043600.00 1.30 31.00 28.70 17.50 493.00 410.00 0.00 -1.72 156.00 29.47 69 | 19921128052800.00 0.80 30.70 28.90 17.50 301.00 410.00 0.00 -1.72 155.99 29.23 70 | 19921128061900.00 0.60 30.60 28.90 17.60 125.00 411.00 0.00 -1.73 155.99 29.44 71 | 19921128075200.00 1.20 30.20 28.70 17.90 0.00 416.00 0.00 -1.72 156.00 29.27 72 | 19921128084300.00 1.00 30.10 28.70 17.90 0.00 417.00 0.00 -1.72 155.99 29.30 73 | 19921128093500.00 2.60 29.80 28.40 18.20 0.00 413.00 0.00 -1.72 155.99 29.30 74 | 19921128102600.00 1.80 29.50 28.50 17.50 0.00 420.00 0.00 -1.72 155.99 29.35 75 | 19921128111800.00 1.00 29.60 28.60 17.40 0.00 417.00 0.00 -1.72 155.99 29.24 76 | 19921128120900.00 2.80 29.30 28.00 18.80 0.00 411.00 0.00 -1.72 155.99 29.30 77 | 19921128130100.00 2.20 29.50 28.00 18.50 0.00 409.00 0.00 -1.72 155.98 29.56 78 | 19921128135200.00 1.60 29.40 28.10 18.10 0.00 407.00 0.00 -1.72 155.98 29.56 79 | 19921128144400.00 1.40 29.40 28.10 18.00 0.00 407.00 0.00 -1.72 155.97 29.29 80 | 19921128153500.00 1.90 29.20 28.10 17.80 0.00 407.00 0.00 -1.72 155.96 29.26 81 | 19921128162600.00 2.20 29.10 28.00 17.70 0.00 407.00 0.00 -1.72 155.95 29.26 82 | 19921128171800.00 2.30 29.10 28.00 18.00 0.00 406.00 0.00 -1.72 155.94 29.19 83 | 19921128180900.00 1.90 29.00 28.00 18.00 0.00 410.00 0.00 -1.72 155.94 29.13 84 | 19921128190100.00 2.30 29.10 28.00 17.80 14.00 407.00 0.00 -1.72 155.94 29.18 85 | 19921128195200.00 2.20 29.10 28.10 17.90 80.00 408.00 0.00 -1.72 155.97 29.17 86 | 19921128204400.00 1.60 29.20 28.10 17.50 109.00 414.00 0.00 -1.72 155.99 29.17 87 | 19921128213500.00 1.90 29.40 28.10 17.60 278.00 430.00 0.00 -1.71 156.02 29.40 88 | 19921128222600.00 1.20 29.60 27.20 18.50 614.00 425.00 0.00 -1.71 156.04 29.52 89 | 19921128231800.00 1.10 29.90 27.30 18.60 719.00 426.00 0.00 -1.71 156.05 29.52 90 | 19921129000900.00 0.50 30.40 27.10 18.40 930.00 415.00 0.00 -1.71 156.04 29.58 91 | 19921129010100.00 2.60 30.50 27.80 18.30 629.00 435.00 0.00 -1.71 156.04 29.49 92 | 19921129015200.00 2.50 30.10 27.70 17.90 838.00 418.00 0.00 -1.71 156.03 29.41 93 | 19921129024400.00 1.70 30.50 28.20 18.00 522.00 432.00 0.00 -1.71 156.03 29.41 94 | 19921129033500.00 2.10 30.30 28.50 17.70 745.00 413.00 0.00 -1.71 156.02 29.37 95 | 19921129042600.00 2.40 30.30 28.80 17.60 565.00 411.00 0.00 -1.71 156.01 29.23 96 | 19921129051800.00 2.10 30.10 28.80 17.80 209.00 430.00 0.00 -1.71 156.00 29.23 97 | 19921129060900.00 1.60 29.90 28.10 18.30 24.00 448.00 0.00 -1.72 155.98 29.32 98 | 19921129070100.00 3.70 30.00 26.60 17.90 1.00 445.00 6.50 -1.72 155.97 29.26 99 | 19921129075200.00 2.10 29.50 25.60 17.10 0.00 441.00 6.60 -1.72 155.97 29.46 100 | 19921129091700.00 2.20 29.80 27.30 17.10 0.00 410.00 0.00 -1.72 155.95 29.34 101 | 19921129100800.00 3.60 29.70 28.10 18.10 0.00 408.00 0.00 -1.72 155.95 29.33 102 | 19921129110000.00 3.20 29.40 28.20 18.40 0.00 409.00 0.00 -1.72 155.94 29.23 103 | 19921129115500.00 2.50 29.30 28.20 18.30 0.00 409.00 0.00 -1.72 155.95 29.23 104 | 19921129124700.00 2.60 29.20 28.10 18.30 0.00 407.00 0.00 -1.72 155.97 29.18 105 | 19921129133800.00 2.10 29.30 28.00 18.20 0.00 406.00 0.00 -1.72 156.00 29.40 106 | 19921129142900.00 2.10 29.50 28.00 18.20 0.00 405.00 0.00 -1.72 156.02 29.40 107 | 19921129153100.00 2.40 29.70 28.00 18.20 0.00 407.00 0.00 -1.72 156.05 29.63 108 | 19921129163800.00 3.00 29.60 28.00 18.00 0.00 411.00 0.00 -1.71 156.07 29.57 109 | 19921129173000.00 3.40 29.50 27.90 18.20 0.00 414.00 0.00 -1.72 156.06 29.49 110 | 19921129182100.00 3.10 29.40 28.00 18.00 0.00 417.00 0.00 -1.72 156.05 29.42 111 | 19921129191300.00 2.90 29.30 28.00 18.00 44.00 415.00 0.00 -1.72 156.04 29.42 112 | 19921129200400.00 3.20 29.30 27.80 18.10 213.00 418.00 0.00 -1.72 156.03 29.35 113 | 19921129205500.00 2.90 29.30 28.10 17.90 340.00 407.00 0.00 -1.72 156.02 29.35 114 | 19921129214700.00 2.40 29.40 28.00 17.90 597.00 405.00 0.00 -1.72 156.01 29.35 115 | 19921129223800.00 2.40 29.60 27.90 17.90 766.00 407.00 0.00 -1.72 156.00 29.37 116 | 19921129233000.00 2.40 29.80 27.80 17.80 900.00 411.00 0.00 -1.72 156.00 29.31 117 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f77/test3_0rh.txt: -------------------------------------------------------------------------------- 1 | 19921125132100 4.7 29 27.7 0.7567 0 428 0 -1.73 156.07 29.15 2 | 19921125141200 4.1 29 27.7 0.7609 0 429 0 -1.73 156.06 29.15 3 | 19921125150300 4.3 29 27.8 0.7607 0 422 0 -1.73 156.06 29.15 4 | 19921125155500 4.7 29 27.8 0.7523 0 412 0 -1.73 156.05 29.15 5 | 19921125164600 3.7 29 27.7 0.7439 0 413 0 -1.73 156.04 29.16 6 | 19921125173800 5.1 29 27.3 0.7746 0 419 0 -1.73 156.02 29.16 7 | 19921125182900 2.5 29 27.5 0.7785 0 425 0 -1.73 156.01 29.16 8 | 19921125192000 3.8 29 27.9 0.7521 50 427 0 -1.73 156 29.15 9 | 19921125201200 4.8 29 28 0.7435 249 428 0 -1.73 156 29.14 10 | 19921125210500 3.9 29 27.8 0.7819 386 422 0 -1.73 155.99 29.13 11 | 19921125221900 4.6 29.1 27.9 0.7479 633 413 0 -1.73 155.99 29.14 12 | 19921125232700 5.2 29.2 28 0.7603 881 409 0 -1.73 155.99 29.14 13 | 19921126001900 4.4 29.3 28.1 0.76 883 414 0 -1.73 155.98 29.2 14 | 19921126011000 4 29.3 28.1 0.7808 853 420 0 -1.73 155.97 29.27 15 | 19921126022200 4.8 29.5 28.5 0.7344 842 417 0 -1.73 155.97 29.26 16 | 19921126031300 4.8 29.5 28.4 0.7468 779 411 0 -1.72 155.97 29.42 17 | 19921126041600 4.3 29.6 28.5 0.7547 513 423 0 -1.72 155.96 29.59 18 | 19921126050700 4.4 29.5 28.6 0.7705 362 422 0 -1.72 155.96 29.59 19 | 19921126055900 4.4 29.3 28.5 0.7709 171 415 0 -1.72 155.96 29.5 20 | 19921126065500 4.1 29.3 28.5 0.7344 26 410 0 -1.72 155.96 29.37 21 | 19921126074700 3.9 29.2 28.5 0.7222 0 410 0 -1.72 155.95 29.37 22 | 19921126083800 3.2 29.3 28.5 0.7303 0 410 0 -1.72 155.95 29.35 23 | 19921126093000 2.2 29.3 28.6 0.7342 0 426 0 -1.72 155.95 29.39 24 | 19921126102100 1.9 29.3 28.5 0.7385 0 414 0 -1.72 155.94 29.45 25 | 19921126111200 1.9 29.3 28.4 0.7428 0 425 0 -1.72 155.94 29.42 26 | 19921126120800 2.5 29.2 28.4 0.7428 0 417 0 -1.72 155.94 29.42 27 | 19921126130000 3 29.3 28.3 0.7512 0 408 0 -1.72 155.94 29.35 28 | 19921126145300 2.7 29.2 28 0.7895 0 412 0 -1.71 156 29.41 29 | 19921126154500 3 29.2 27.9 0.7899 0 409 0 -1.72 156.02 29.31 30 | 19921126163600 3.1 29.2 27.9 0.7857 0 413 0 -1.72 156.05 29.29 31 | 19921126172700 2.5 29.1 28 0.7728 0 414 0 -1.72 156.07 29.27 32 | 19921126181900 1.9 29.1 28 0.7686 0 409 0 -1.72 156.06 29.26 33 | 19921126191000 1.1 29.2 27.9 0.7731 25 411 0 -1.72 156.06 29.27 34 | 19921126200100 0.8 29.2 28 0.777 110 414 0 -1.72 156.04 29.27 35 | 19921126213400 0.7 29.3 28.1 0.7641 123 436 0 -1.72 156.02 29.29 36 | 19921126222600 2.1 29.2 27.3 0.8094 116 445 0 -1.72 156.01 29.38 37 | 19921126231700 7.9 29.2 25.4 0.8957 247 436 4.8 -1.72 156 29.31 38 | 19921127000900 6.6 29.3 25.9 0.8459 635 418 0 -1.73 156.02 29.33 39 | 19921127010000 5.8 29.3 26.7 0.7934 486 422 0 -1.73 156.06 29.33 40 | 19921127015100 4.8 29.3 26.9 0.7885 356 429 0 -1.72 156.06 29.33 41 | 19921127024300 4.5 29.2 27 0.7839 421 422 0 -1.72 156.05 29.36 42 | 19921127033400 5.2 29.2 26.8 0.8111 191 434 0 -1.72 156.04 29.25 43 | 19921127042500 6.9 29.1 25.3 0.9011 50 437 9.4 -1.72 156.04 29.23 44 | 19921127051700 5.7 29.1 25.1 0.8772 72 434 1.6 -1.72 156.03 29.23 45 | 19921127060800 9.9 29.1 24.7 0.9085 18 432 1.5 -1.72 156.01 29.24 46 | 19921127070000 5.2 29.1 25 0.8874 6 429 0 -1.72 156.01 29.22 47 | 19921127075100 4.3 29.1 26.1 0.7986 0 415 0 -1.72 155.99 29.22 48 | 19921127084200 3.7 29.1 26.7 0.7437 0 414 0 -1.72 155.98 29.16 49 | 19921127093400 3.3 29.1 27.2 0.7134 0 410 0 -1.72 155.98 29.15 50 | 19921127102500 3.9 29 27.5 0.7053 0 410 0 -1.72 155.97 29.14 51 | 19921127113200 5 29 27.5 0.7354 0 414 0 -1.72 155.96 29.14 52 | 19921127122600 5.9 29 27.6 0.7483 0 415 0 -1.72 155.95 29.12 53 | 19921127134800 4.9 29 27.5 0.7914 0 405 0 -1.72 155.95 29.11 54 | 19921127143900 5.2 29 27.6 0.791 0 406 0 -1.72 155.97 29.1 55 | 19921127160400 5.4 29 27.7 0.7609 0 413 0 -1.72 156.01 29.13 56 | 19921127170000 4.4 29 27.7 0.7609 0 416 0 -1.72 156 29.14 57 | 19921127175200 3.8 29 27.7 0.7609 0 413 0 -1.73 156 29.12 58 | 19921127184300 3.1 29 27.7 0.7567 2 406 0 -1.73 155.98 29.12 59 | 19921127193500 2.9 29 27.9 0.7521 88 410 0 -1.72 156 29.12 60 | 19921127202600 2.1 29 27.9 0.7563 276 410 0 -1.72 156 29.12 61 | 19921127211700 1.9 29.1 27.8 0.7607 487 406 0 -1.72 155.99 29.12 62 | 19921127220900 1.6 29.2 27.7 0.7609 670 407 0 -1.73 155.98 29.13 63 | 19921127230000 1.4 29.5 27.4 0.7831 810 416 0 -1.74 155.98 29.14 64 | 19921127235200 1.1 30.1 27.4 0.7787 917 410 0 -1.72 156.01 29.16 65 | 19921128004300 1.1 30.6 27.4 0.7787 960 412 0 -1.72 156 29.14 66 | 19921128022100 1.5 30.8 27.7 0.7694 939 413 0 -1.72 155.99 29.17 67 | 19921128042600 1.2 31 28.4 0.7346 665 411 0 -1.72 156 29.27 68 | 19921128043600 1.3 31 28.7 0.7099 493 410 0 -1.72 156 29.47 69 | 19921128052800 0.8 30.7 28.9 0.7017 301 410 0 -1.72 155.99 29.23 70 | 19921128061900 0.6 30.6 28.9 0.7057 125 411 0 -1.73 155.99 29.44 71 | 19921128075200 1.2 30.2 28.7 0.7259 0 416 0 -1.72 156 29.27 72 | 19921128084300 1 30.1 28.7 0.7259 0 417 0 -1.72 155.99 29.3 73 | 19921128093500 2.6 29.8 28.4 0.7509 0 413 0 -1.72 155.99 29.3 74 | 19921128102600 1.8 29.5 28.5 0.7182 0 420 0 -1.72 155.99 29.35 75 | 19921128111800 1 29.6 28.6 0.71 0 417 0 -1.72 155.99 29.24 76 | 19921128120900 2.8 29.3 28 0.7937 0 411 0 -1.72 155.99 29.3 77 | 19921128130100 2.2 29.5 28 0.7811 0 409 0 -1.72 155.98 29.56 78 | 19921128135200 1.6 29.4 28.1 0.76 0 407 0 -1.72 155.98 29.56 79 | 19921128144400 1.4 29.4 28.1 0.7558 0 407 0 -1.72 155.97 29.29 80 | 19921128153500 1.9 29.2 28.1 0.7475 0 407 0 -1.72 155.96 29.26 81 | 19921128162600 2.2 29.1 28 0.7477 0 407 0 -1.72 155.95 29.26 82 | 19921128171800 2.3 29.1 28 0.7603 0 406 0 -1.72 155.94 29.19 83 | 19921128180900 1.9 29 28 0.7603 0 410 0 -1.72 155.94 29.13 84 | 19921128190100 2.3 29.1 28 0.7519 14 407 0 -1.72 155.94 29.18 85 | 19921128195200 2.2 29.1 28.1 0.7517 80 408 0 -1.72 155.97 29.17 86 | 19921128204400 1.6 29.2 28.1 0.7351 109 414 0 -1.72 155.99 29.17 87 | 19921128213500 1.9 29.4 28.1 0.7392 278 430 0 -1.71 156.02 29.4 88 | 19921128222600 1.2 29.6 27.2 0.8185 614 425 0 -1.71 156.04 29.52 89 | 19921128231800 1.1 29.9 27.3 0.8181 719 426 0 -1.71 156.05 29.52 90 | 19921129000900 0.5 30.4 27.1 0.819 930 415 0 -1.71 156.04 29.58 91 | 19921129010100 2.6 30.5 27.8 0.7819 629 435 0 -1.71 156.04 29.49 92 | 19921129015200 2.5 30.1 27.7 0.7694 838 418 0 -1.71 156.03 29.41 93 | 19921129024400 1.7 30.5 28.2 0.7515 522 432 0 -1.71 156.03 29.41 94 | 19921129033500 2.1 30.3 28.5 0.7263 745 413 0 -1.71 156.02 29.37 95 | 19921129042600 2.4 30.3 28.8 0.7098 565 411 0 -1.71 156.01 29.23 96 | 19921129051800 2.1 30.1 28.8 0.7177 209 430 0 -1.71 156 29.23 97 | 19921129060900 1.6 29.9 28.1 0.7683 24 448 0 -1.72 155.98 29.32 98 | 19921129070100 3.7 30 26.6 0.8207 1 445 6.5 -1.72 155.97 29.26 99 | 19921129075200 2.1 29.5 25.6 0.8322 0 441 6.6 -1.72 155.97 29.46 100 | 19921129091700 2.2 29.8 27.3 0.7528 0 410 0 -1.72 155.95 29.34 101 | 19921129100800 3.6 29.7 28.1 0.76 0 408 0 -1.72 155.95 29.33 102 | 19921129110000 3.2 29.4 28.2 0.768 0 409 0 -1.72 155.94 29.23 103 | 19921129115500 2.5 29.3 28.2 0.7638 0 409 0 -1.72 155.95 29.23 104 | 19921129124700 2.6 29.2 28.1 0.7683 0 407 0 -1.72 155.97 29.18 105 | 19921129133800 2.1 29.3 28 0.7686 0 406 0 -1.72 156 29.4 106 | 19921129142900 2.1 29.5 28 0.7686 0 405 0 -1.72 156.02 29.4 107 | 19921129153100 2.4 29.7 28 0.7686 0 407 0 -1.72 156.05 29.63 108 | 19921129163800 3 29.6 28 0.7603 0 411 0 -1.71 156.07 29.57 109 | 19921129173000 3.4 29.5 27.9 0.7731 0 414 0 -1.72 156.06 29.49 110 | 19921129182100 3.1 29.4 28 0.7603 0 417 0 -1.72 156.05 29.42 111 | 19921129191300 2.9 29.3 28 0.7603 44 415 0 -1.72 156.04 29.42 112 | 19921129200400 3.2 29.3 27.8 0.7734 213 418 0 -1.72 156.03 29.35 113 | 19921129205500 2.9 29.3 28.1 0.7517 340 407 0 -1.72 156.02 29.35 114 | 19921129214700 2.4 29.4 28 0.7561 597 405 0 -1.72 156.01 29.35 115 | 19921129223800 2.4 29.6 27.9 0.7605 766 407 0 -1.72 156 29.37 116 | 19921129233000 2.4 29.8 27.8 0.7607 900 411 0 -1.72 156 29.31 117 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f77/tst3_0bf.out: -------------------------------------------------------------------------------- 1 | 1, 19921125132100., 6.12, 114.11, 28.72, 0.02876, 0.00008, 0.00, 0.28, 0.00, 19.00, 1.05, 0.75 2 | 2, 19921125141200., 5.52, 101.87, 28.71, 0.02196, 0.00007, 0.00, 0.29, 0.00, 19.00, 1.18, 0.73 3 | 3, 19921125150300., 4.98, 102.82, 28.71, 0.02394, 0.00007, 0.00, 0.29, 0.00, 19.00, 1.14, 0.72 4 | 4, 19921125155500., 5.22, 112.71, 28.69, 0.02858, 0.00008, 0.00, 0.31, 0.00, 19.00, 1.05, 0.74 5 | 5, 19921125164600., 4.84, 99.00, 28.66, 0.01805, 0.00007, 0.00, 0.34, 0.00, 19.00, 1.26, 0.71 6 | 6, 19921125173800., 9.58, 123.08, 28.70, 0.03449, 0.00010, 0.00, 0.30, 0.00, 19.00, 0.97, 0.82 7 | 7, 19921125182900., 4.65, 68.76, 28.69, 0.00895, 0.00005, 0.00, 0.31, 0.00, 19.00, 1.60, 0.66 8 | 8, 19921125192000., 3.94, 94.71, 28.71, 0.01876, 0.00006, 0.00, 0.29, 0.00, 19.00, 1.26, 0.69 9 | 9, 19921125201200., 4.13, 114.44, 28.73, 0.02959, 0.00008, 0.00, 0.27, 0.00, 19.00, 1.04, 0.72 10 | 10, 19921125210500., 4.81, 88.60, 28.74, 0.01974, 0.00006, 0.00, 0.26, 0.00, 19.00, 1.24, 0.69 11 | 11, 19921125221900., 5.34, 114.34, 28.82, 0.02744, 0.00008, 0.00, 0.28, 0.12, 3.72, 1.08, 0.74 12 | 12, 19921125232700., 5.95, 120.55, 28.94, 0.03510, 0.00008, 0.00, 0.27, 0.20, 5.33, 0.97, 0.76 13 | 13, 19921126001900., 5.28, 107.55, 29.04, 0.02508, 0.00008, 0.00, 0.27, 0.24, 6.76, 1.12, 0.73 14 | 14, 19921126011000., 5.05, 93.02, 29.06, 0.02075, 0.00007, 0.00, 0.24, 0.29, 7.32, 1.22, 0.71 15 | 15, 19921126022200., 4.11, 121.81, 29.23, 0.02963, 0.00008, 0.00, 0.27, 0.38, 7.72, 1.04, 0.73 16 | 16, 19921126031300., 4.78, 118.54, 29.22, 0.02971, 0.00008, 0.00, 0.28, 0.39, 8.56, 1.04, 0.74 17 | 17, 19921126041600., 4.44, 107.07, 29.33, 0.02384, 0.00007, 0.00, 0.28, 0.37, 9.84, 1.14, 0.72 18 | 18, 19921126050700., 3.21, 96.86, 29.24, 0.02454, 0.00006, 0.00, 0.26, 0.35, 10.75, 1.13, 0.68 19 | 19, 19921126055900., 2.44, 92.61, 29.03, 0.02434, 0.00006, 0.00, 0.28, 0.31, 11.99, 1.13, 0.65 20 | 20, 19921126065500., 2.05, 101.14, 28.98, 0.02133, 0.00006, 0.00, 0.32, 0.25, 13.60, 1.19, 0.66 21 | 21, 19921126074700., 1.33, 98.59, 28.87, 0.01925, 0.00006, 0.00, 0.33, 0.21, 15.17, 1.23, 0.64 22 | 22, 19921126083800., 1.58, 83.95, 28.96, 0.01330, 0.00005, 0.00, 0.34, 0.18, 16.70, 1.41, 0.61 23 | 23, 19921126093000., 0.93, 62.08, 28.99, 0.00680, 0.00004, 0.00, 0.31, 0.15, 17.98, 1.73, 0.55 24 | 24, 19921126102100., 1.09, 56.28, 28.96, 0.00533, 0.00003, 0.00, 0.34, 0.14, 18.95, 1.80, 0.54 25 | 25, 19921126111200., 1.55, 57.37, 28.98, 0.00540, 0.00004, 0.00, 0.32, 0.12, 19.00, 1.82, 0.56 26 | 26, 19921126120800., 1.37, 66.53, 28.87, 0.00852, 0.00004, 0.00, 0.33, 0.11, 19.00, 1.62, 0.57 27 | 27, 19921126130000., 2.49, 77.37, 28.96, 0.01194, 0.00005, 0.00, 0.34, 0.09, 19.00, 1.45, 0.62 28 | 28, 19921126145300., 3.33, 64.34, 28.87, 0.00995, 0.00005, 0.00, 0.33, 0.00, 19.00, 1.55, 0.62 29 | 29, 19921126154500., 4.10, 71.18, 28.87, 0.01211, 0.00005, 0.00, 0.33, 0.00, 19.00, 1.46, 0.65 30 | 30, 19921126163600., 4.24, 74.44, 28.88, 0.01287, 0.00005, 0.00, 0.32, 0.00, 19.00, 1.43, 0.66 31 | 31, 19921126172700., 2.70, 63.32, 28.77, 0.00867, 0.00004, 0.00, 0.33, 0.00, 19.00, 1.61, 0.60 32 | 32, 19921126181900., 2.18, 53.26, 28.75, 0.00543, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.79, 0.57 33 | 33, 19921126191000., 2.17, 40.62, 28.86, 0.00234, 0.00003, 0.00, 0.34, 0.00, 19.00, 2.03, 0.53 34 | 34, 19921126200100., 1.69, 33.54, 28.89, 0.00145, 0.00002, 0.00, 0.31, 0.00, 19.00, 2.16, 0.50 35 | 35, 19921126213400., 1.75, 34.57, 29.05, 0.00122, 0.00002, 0.00, 0.25, 0.00, 19.00, 2.30, 0.50 36 | 36, 19921126222600., 6.13, 61.76, 28.94, 0.00683, 0.00005, 0.00, 0.26, 0.00, 19.00, 1.77, 0.68 37 | 37, 19921126231700., 38.52, 175.98, 28.95, 0.09196, 0.00021, 20.72, 0.25, 0.00, 19.00, 0.62, 1.15 38 | 38, 19921127000900., 28.99, 166.05, 29.01, 0.06217, 0.00018, 0.00, 0.29, 0.00, 19.00, 0.74, 1.06 39 | 39, 19921127010000., 18.75, 153.71, 29.00, 0.04648, 0.00014, 0.00, 0.30, 0.00, 19.00, 0.85, 0.96 40 | 40, 19921127015100., 14.75, 131.57, 29.00, 0.03148, 0.00012, 0.00, 0.30, 0.00, 19.00, 1.01, 0.90 41 | 41, 19921127024300., 12.53, 122.15, 28.90, 0.02749, 0.00010, 0.00, 0.30, 0.00, 19.00, 1.07, 0.86 42 | 42, 19921127033400., 15.74, 128.86, 28.92, 0.03685, 0.00012, 0.00, 0.28, 0.00, 19.00, 0.95, 0.90 43 | 43, 19921127042500., 34.62, 154.72, 28.84, 0.06883, 0.00018, 39.92, 0.26, 0.00, 19.00, 0.71, 1.10 44 | 44, 19921127051700., 31.82, 149.77, 28.80, 0.04670, 0.00017, 7.41, 0.30, 0.00, 19.00, 0.85, 1.08 45 | 45, 19921127060800., 55.16, 226.11, 28.84, 0.15300, 0.00028, 6.99, 0.26, 0.00, 19.00, 0.48, 1.28 46 | 46, 19921127070000., 30.66, 138.43, 28.78, 0.03891, 0.00016, 0.00, 0.32, 0.00, 19.00, 0.92, 1.06 47 | 47, 19921127075100., 17.90, 129.06, 28.74, 0.02599, 0.00012, 0.00, 0.36, 0.00, 19.00, 1.08, 0.93 48 | 48, 19921127084200., 11.86, 122.71, 28.72, 0.01917, 0.00010, 0.00, 0.38, 0.00, 19.00, 1.21, 0.85 49 | 49, 19921127093400., 7.72, 112.47, 28.71, 0.01519, 0.00008, 0.00, 0.39, 0.00, 19.00, 1.32, 0.78 50 | 50, 19921127102500., 6.19, 121.55, 28.63, 0.02034, 0.00009, 0.00, 0.37, 0.00, 19.00, 1.19, 0.76 51 | 51, 19921127113200., 7.71, 132.74, 28.68, 0.03299, 0.00010, 0.00, 0.32, 0.00, 19.00, 0.99, 0.80 52 | 52, 19921127122600., 8.08, 141.87, 28.71, 0.04612, 0.00010, 0.00, 0.29, 0.00, 19.00, 0.85, 0.82 53 | 53, 19921127134800., 7.67, 106.98, 28.70, 0.03137, 0.00008, 0.00, 0.30, 0.00, 19.00, 1.01, 0.77 54 | 54, 19921127143900., 7.30, 109.60, 28.71, 0.03523, 0.00008, 0.00, 0.29, 0.00, 19.00, 0.97, 0.77 55 | 55, 19921127160400., 6.72, 124.06, 28.71, 0.03808, 0.00009, 0.00, 0.29, 0.00, 19.00, 0.93, 0.78 56 | 56, 19921127170000., 5.68, 106.49, 28.69, 0.02518, 0.00008, 0.00, 0.31, 0.00, 19.00, 1.11, 0.74 57 | 57, 19921127175200., 4.99, 95.13, 28.68, 0.01893, 0.00007, 0.00, 0.32, 0.00, 19.00, 1.24, 0.71 58 | 58, 19921127184300., 4.13, 82.10, 28.65, 0.01295, 0.00006, 0.00, 0.35, 0.00, 19.00, 1.41, 0.67 59 | 59, 19921127193500., 2.99, 76.11, 28.67, 0.01133, 0.00005, 0.00, 0.33, 0.00, 19.00, 1.49, 0.63 60 | 60, 19921127202600., 2.46, 60.08, 28.68, 0.00646, 0.00004, 0.00, 0.32, 0.00, 19.00, 1.75, 0.59 61 | 61, 19921127211700., 3.13, 58.87, 28.80, 0.00556, 0.00004, 0.00, 0.31, 0.11, 1.38, 1.82, 0.60 62 | 62, 19921127220900., 3.65, 56.49, 28.92, 0.00428, 0.00004, 0.00, 0.29, 0.30, 1.52, 1.93, 0.61 63 | 63, 19921127230000., 5.69, 57.57, 29.26, 0.00364, 0.00005, 0.00, 0.26, 0.59, 1.49, 2.02, 0.66 64 | 64, 19921127235200., 7.11, 61.04, 29.85, 0.00266, 0.00005, 0.00, 0.29, 0.93, 1.46, 2.04, 0.70 65 | 65, 19921128004300., 8.98, 69.38, 30.33, 0.00275, 0.00006, 0.00, 0.31, 1.31, 1.41, 1.98, 0.75 66 | 66, 19921128022100., 9.95, 81.75, 30.53, 0.00433, 0.00007, 0.00, 0.34, 1.90, 1.43, 1.82, 0.78 67 | 67, 19921128042600., 6.91, 73.84, 30.69, 0.00303, 0.00006, 0.00, 0.37, 1.88, 1.77, 1.88, 0.71 68 | 68, 19921128043600., 5.96, 77.38, 30.66, 0.00335, 0.00006, 0.00, 0.40, 1.88, 1.79, 1.83, 0.70 69 | 69, 19921128052800., 3.36, 56.91, 30.37, 0.00161, 0.00004, 0.00, 0.38, 1.72, 1.95, 1.98, 0.61 70 | 70, 19921128061900., 2.74, 49.22, 30.26, 0.00108, 0.00004, 0.00, 0.38, 1.57, 2.08, 2.02, 0.57 71 | 71, 19921128075200., 2.91, 56.84, 29.84, 0.00277, 0.00004, 0.00, 0.38, 1.24, 2.37, 1.91, 0.60 72 | 72, 19921128084300., 2.39, 50.47, 29.75, 0.00209, 0.00004, 0.00, 0.37, 1.07, 2.59, 1.98, 0.57 73 | 73, 19921128093500., 4.13, 79.35, 29.45, 0.00955, 0.00006, 0.00, 0.37, 0.92, 2.80, 1.54, 0.67 74 | 74, 19921128102600., 1.79, 62.93, 29.16, 0.00502, 0.00004, 0.00, 0.35, 0.69, 3.46, 1.81, 0.58 75 | 75, 19921128111800., 1.28, 46.78, 29.26, 0.00201, 0.00003, 0.00, 0.35, 0.57, 3.89, 2.03, 0.52 76 | 76, 19921128120900., 3.92, 67.12, 28.98, 0.01069, 0.00005, 0.00, 0.33, 0.49, 4.17, 1.51, 0.64 77 | 77, 19921128130100., 4.07, 63.34, 29.14, 0.00716, 0.00005, 0.00, 0.36, 0.36, 5.07, 1.67, 0.64 78 | 78, 19921128135200., 2.59, 53.02, 29.03, 0.00419, 0.00004, 0.00, 0.37, 0.00, 19.00, 1.85, 0.58 79 | 79, 19921128144400., 2.40, 49.85, 29.03, 0.00340, 0.00003, 0.00, 0.37, 0.00, 19.00, 1.90, 0.56 80 | 80, 19921128153500., 2.13, 58.15, 28.84, 0.00547, 0.00004, 0.00, 0.36, 0.00, 19.00, 1.77, 0.58 81 | 81, 19921128162600., 2.36, 63.67, 28.74, 0.00699, 0.00004, 0.00, 0.36, 0.00, 19.00, 1.68, 0.59 82 | 82, 19921128171800., 2.44, 62.46, 28.75, 0.00751, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.66, 0.59 83 | 83, 19921128180900., 1.82, 53.38, 28.66, 0.00540, 0.00003, 0.00, 0.34, 0.00, 19.00, 1.80, 0.55 84 | 84, 19921128190100., 2.45, 64.62, 28.75, 0.00753, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.66, 0.60 85 | 85, 19921128195200., 2.01, 61.31, 28.76, 0.00693, 0.00004, 0.00, 0.34, 0.00, 19.00, 1.70, 0.58 86 | 86, 19921128204400., 2.01, 55.31, 28.86, 0.00416, 0.00004, 0.00, 0.34, 0.00, 19.00, 1.88, 0.57 87 | 87, 19921128213500., 3.20, 65.34, 29.11, 0.00561, 0.00005, 0.00, 0.29, 0.00, 19.00, 1.82, 0.62 88 | 88, 19921128222600., 6.28, 50.71, 29.36, 0.00292, 0.00005, 0.00, 0.25, 0.24, 0.98, 2.09, 0.67 89 | 89, 19921128231800., 6.83, 52.45, 29.69, 0.00262, 0.00005, 0.00, 0.24, 0.58, 0.97, 2.13, 0.68 90 | 90, 19921129000900., 7.50, 49.67, 30.21, 0.00099, 0.00005, 0.00, 0.25, 1.06, 0.94, 2.25, 0.69 91 | 91, 19921129010100., 11.51, 100.16, 30.24, 0.01032, 0.00009, 0.00, 0.33, 1.29, 0.99, 1.51, 0.82 92 | 92, 19921129015200., 9.44, 92.92, 29.81, 0.00950, 0.00008, 0.00, 0.32, 1.04, 1.56, 1.56, 0.78 93 | 93, 19921129024400., 7.01, 77.59, 30.20, 0.00503, 0.00006, 0.00, 0.32, 0.87, 2.08, 1.81, 0.72 94 | 94, 19921129033500., 5.56, 84.94, 29.99, 0.00688, 0.00006, 0.00, 0.34, 0.98, 2.20, 1.68, 0.70 95 | 95, 19921129042600., 4.49, 91.41, 29.96, 0.00847, 0.00006, 0.00, 0.36, 0.95, 2.48, 1.59, 0.69 96 | 96, 19921129051800., 3.32, 77.77, 29.78, 0.00666, 0.00005, 0.00, 0.33, 0.77, 2.99, 1.71, 0.65 97 | 97, 19921129060900., 4.78, 61.73, 29.61, 0.00440, 0.00005, 0.00, 0.29, 0.62, 3.48, 1.90, 0.65 98 | 98, 19921129070100., 19.23, 124.10, 29.66, 0.01985, 0.00012, 31.10, 0.35, 0.52, 3.86, 1.20, 0.94 99 | 99, 19921129075200., 15.71, 87.40, 29.14, 0.00757, 0.00009, 33.05, 0.36, 0.31, 5.52, 1.62, 0.87 100 | 100, 19921129091700., 8.57, 87.47, 29.38, 0.00768, 0.00007, 0.00, 0.42, 0.16, 7.50, 1.59, 0.76 101 | 101, 19921129100800., 6.42, 100.99, 29.34, 0.01738, 0.00007, 0.00, 0.36, 0.11, 9.05, 1.27, 0.74 102 | 102, 19921129110000., 3.71, 80.45, 29.06, 0.01359, 0.00006, 0.00, 0.34, 0.06, 12.42, 1.39, 0.66 103 | 103, 19921129115500., 2.62, 66.10, 28.95, 0.00868, 0.00004, 0.00, 0.35, 0.03, 17.07, 1.60, 0.61 104 | 104, 19921129124700., 2.69, 66.32, 28.85, 0.00928, 0.00004, 0.00, 0.35, 0.01, 19.00, 1.57, 0.61 105 | 105, 19921129133800., 3.08, 60.48, 28.94, 0.00653, 0.00004, 0.00, 0.36, 0.00, 19.00, 1.70, 0.61 106 | 106, 19921129142900., 3.88, 64.19, 29.12, 0.00663, 0.00005, 0.00, 0.38, 0.00, 19.00, 1.68, 0.63 107 | 107, 19921129153100., 5.17, 74.38, 29.32, 0.00844, 0.00006, 0.00, 0.38, 0.00, 19.00, 1.58, 0.68 108 | 108, 19921129163800., 5.59, 87.52, 29.23, 0.01244, 0.00006, 0.00, 0.37, 0.00, 19.00, 1.42, 0.71 109 | 109, 19921129173000., 6.24, 91.55, 29.16, 0.01560, 0.00007, 0.00, 0.34, 0.00, 19.00, 1.33, 0.73 110 | 110, 19921129182100., 4.74, 85.21, 29.06, 0.01304, 0.00006, 0.00, 0.34, 0.00, 19.00, 1.41, 0.69 111 | 111, 19921129191300., 4.00, 78.82, 28.96, 0.01148, 0.00006, 0.00, 0.34, 0.00, 19.00, 1.48, 0.66 112 | 112, 19921129200400., 5.56, 85.09, 28.99, 0.01389, 0.00006, 0.00, 0.31, 0.00, 19.00, 1.39, 0.70 113 | 113, 19921129205500., 3.54, 79.66, 28.97, 0.01142, 0.00005, 0.00, 0.33, 0.00, 19.00, 1.48, 0.65 114 | 114, 19921129214700., 4.08, 72.70, 29.09, 0.00831, 0.00005, 0.00, 0.32, 0.11, 2.05, 1.63, 0.65 115 | 115, 19921129223800., 5.56, 77.83, 29.30, 0.00849, 0.00006, 0.00, 0.31, 0.28, 2.17, 1.62, 0.69 116 | 116, 19921129233000., 7.10, 84.14, 29.50, 0.00866, 0.00007, 0.00, 0.31, 0.47, 2.31, 1.61, 0.73 117 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f77/tst3_0bh.out: -------------------------------------------------------------------------------- 1 | 1, 19921125132100., 7.18, 118.60, 28.86, 0.02898, 0.00009, 0.00, 0.29, 0.00, 19.00, 1.05, 0.78 2 | 2, 19921125141200., 6.48, 106.02, 28.85, 0.02215, 0.00008, 0.00, 0.30, 0.00, 19.00, 1.17, 0.75 3 | 3, 19921125150300., 5.96, 107.07, 28.85, 0.02414, 0.00008, 0.00, 0.30, 0.00, 19.00, 1.13, 0.74 4 | 4, 19921125155500., 6.26, 117.20, 28.83, 0.02881, 0.00008, 0.00, 0.32, 0.00, 19.00, 1.05, 0.76 5 | 5, 19921125164600., 5.79, 103.25, 28.81, 0.01823, 0.00007, 0.00, 0.35, 0.00, 19.00, 1.25, 0.73 6 | 6, 19921125173800., 10.81, 128.06, 28.85, 0.03473, 0.00010, 0.00, 0.31, 0.00, 19.00, 0.97, 0.84 7 | 7, 19921125182900., 5.39, 72.00, 28.84, 0.00905, 0.00006, 0.00, 0.32, 0.00, 19.00, 1.59, 0.68 8 | 8, 19921125192000., 4.82, 98.74, 28.85, 0.01894, 0.00007, 0.00, 0.30, 0.00, 19.00, 1.25, 0.71 9 | 9, 19921125201200., 5.10, 118.71, 28.86, 0.02982, 0.00008, 0.00, 0.28, 0.00, 19.00, 1.04, 0.74 10 | 10, 19921125210500., 5.60, 92.07, 28.86, 0.01990, 0.00007, 0.00, 0.27, 0.00, 19.00, 1.23, 0.72 11 | 11, 19921125221900., 6.37, 118.82, 28.96, 0.02766, 0.00008, 0.00, 0.29, 0.11, 3.79, 1.07, 0.76 12 | 12, 19921125232700., 6.96, 124.87, 29.06, 0.03534, 0.00009, 0.00, 0.27, 0.20, 5.42, 0.96, 0.78 13 | 13, 19921126001900., 5.94, 110.48, 29.13, 0.02522, 0.00008, 0.00, 0.27, 0.23, 6.87, 1.12, 0.75 14 | 14, 19921126011000., 6.29, 98.50, 29.24, 0.02100, 0.00007, 0.00, 0.26, 0.29, 7.43, 1.21, 0.74 15 | 15, 19921126022200., 4.36, 122.94, 29.26, 0.02969, 0.00008, 0.00, 0.28, 0.37, 7.87, 1.04, 0.74 16 | 16, 19921126031300., 6.04, 124.19, 29.39, 0.03000, 0.00009, 0.00, 0.29, 0.38, 8.69, 1.03, 0.77 17 | 17, 19921126041600., 5.75, 113.04, 29.52, 0.02412, 0.00008, 0.00, 0.29, 0.36, 10.00, 1.13, 0.75 18 | 18, 19921126050700., 4.97, 104.86, 29.49, 0.02496, 0.00007, 0.00, 0.28, 0.34, 10.93, 1.12, 0.72 19 | 19, 19921126055900., 4.64, 102.59, 29.35, 0.02488, 0.00007, 0.00, 0.30, 0.30, 12.21, 1.12, 0.71 20 | 20, 19921126065500., 3.09, 106.10, 29.14, 0.02157, 0.00007, 0.00, 0.33, 0.24, 13.94, 1.18, 0.69 21 | 21, 19921126074700., 2.74, 105.59, 29.10, 0.01959, 0.00007, 0.00, 0.34, 0.20, 15.58, 1.22, 0.68 22 | 22, 19921126083800., 2.11, 86.62, 29.06, 0.01342, 0.00005, 0.00, 0.35, 0.16, 17.26, 1.40, 0.63 23 | 23, 19921126093000., 1.43, 64.78, 29.11, 0.00688, 0.00004, 0.00, 0.32, 0.14, 18.62, 1.72, 0.57 24 | 24, 19921126102100., 1.75, 59.77, 29.14, 0.00543, 0.00004, 0.00, 0.35, 0.12, 19.00, 1.78, 0.57 25 | 25, 19921126111200., 2.10, 60.20, 29.13, 0.00548, 0.00004, 0.00, 0.33, 0.11, 19.00, 1.80, 0.58 26 | 26, 19921126120800., 2.42, 71.83, 29.11, 0.00870, 0.00005, 0.00, 0.34, 0.10, 19.00, 1.60, 0.61 27 | 27, 19921126130000., 2.85, 79.12, 29.03, 0.01201, 0.00005, 0.00, 0.35, 0.08, 19.00, 1.45, 0.64 28 | 28, 19921126145300., 4.31, 68.78, 29.07, 0.01011, 0.00005, 0.00, 0.34, 0.00, 19.00, 1.53, 0.65 29 | 29, 19921126154500., 4.65, 73.65, 28.97, 0.01220, 0.00005, 0.00, 0.34, 0.00, 19.00, 1.45, 0.67 30 | 30, 19921126163600., 4.71, 76.51, 28.96, 0.01295, 0.00006, 0.00, 0.33, 0.00, 19.00, 1.42, 0.67 31 | 31, 19921126172700., 3.44, 66.79, 28.93, 0.00878, 0.00005, 0.00, 0.34, 0.00, 19.00, 1.60, 0.63 32 | 32, 19921126181900., 2.76, 56.09, 28.91, 0.00551, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.77, 0.59 33 | 33, 19921126191000., 2.37, 41.60, 28.93, 0.00235, 0.00003, 0.00, 0.34, 0.00, 19.00, 2.02, 0.54 34 | 34, 19921126200100., 1.85, 34.43, 28.96, 0.00146, 0.00002, 0.00, 0.31, 0.00, 19.00, 2.15, 0.51 35 | 35, 19921126213400., 1.73, 34.45, 29.04, 0.00122, 0.00002, 0.00, 0.25, 0.00, 19.00, 2.30, 0.50 36 | 36, 19921126222600., 6.92, 65.05, 29.11, 0.00691, 0.00006, 0.00, 0.27, 0.00, 19.00, 1.75, 0.70 37 | 37, 19921126231700., 39.80, 180.56, 29.05, 0.09219, 0.00021, 21.13, 0.26, 0.00, 19.00, 0.62, 1.16 38 | 38, 19921127000900., 29.30, 167.16, 29.04, 0.06222, 0.00018, 0.00, 0.29, 0.00, 19.00, 0.74, 1.07 39 | 39, 19921127010000., 19.02, 154.74, 29.03, 0.04653, 0.00014, 0.00, 0.30, 0.00, 19.00, 0.85, 0.96 40 | 40, 19921127015100., 14.99, 132.48, 29.03, 0.03152, 0.00012, 0.00, 0.30, 0.00, 19.00, 1.01, 0.90 41 | 41, 19921127024300., 13.70, 126.84, 29.05, 0.02768, 0.00011, 0.00, 0.31, 0.00, 19.00, 1.06, 0.88 42 | 42, 19921127033400., 16.14, 130.44, 28.97, 0.03692, 0.00012, 0.00, 0.28, 0.00, 19.00, 0.94, 0.91 43 | 43, 19921127042500., 36.00, 159.61, 28.96, 0.06906, 0.00019, 40.87, 0.27, 0.00, 19.00, 0.71, 1.12 44 | 44, 19921127051700., 33.04, 154.15, 28.92, 0.04687, 0.00018, 7.57, 0.31, 0.00, 19.00, 0.84, 1.09 45 | 45, 19921127060800., 57.13, 233.05, 28.97, 0.15338, 0.00029, 7.16, 0.27, 0.00, 19.00, 0.48, 1.29 46 | 46, 19921127070000., 31.72, 142.24, 28.89, 0.03905, 0.00017, 0.00, 0.33, 0.00, 19.00, 0.91, 1.07 47 | 47, 19921127075100., 18.80, 132.48, 28.85, 0.02611, 0.00013, 0.00, 0.37, 0.00, 19.00, 1.08, 0.94 48 | 48, 19921127084200., 12.26, 124.33, 28.77, 0.01922, 0.00010, 0.00, 0.39, 0.00, 19.00, 1.21, 0.86 49 | 49, 19921127093400., 8.02, 113.73, 28.75, 0.01523, 0.00009, 0.00, 0.40, 0.00, 19.00, 1.32, 0.78 50 | 50, 19921127102500., 7.08, 125.50, 28.76, 0.02049, 0.00009, 0.00, 0.38, 0.00, 19.00, 1.19, 0.78 51 | 51, 19921127113200., 8.76, 137.13, 28.81, 0.03321, 0.00010, 0.00, 0.33, 0.00, 19.00, 0.98, 0.82 52 | 52, 19921127122600., 9.08, 145.98, 28.82, 0.04636, 0.00011, 0.00, 0.30, 0.00, 19.00, 0.85, 0.84 53 | 53, 19921127134800., 8.47, 110.27, 28.80, 0.03154, 0.00009, 0.00, 0.31, 0.00, 19.00, 1.01, 0.79 54 | 54, 19921127143900., 8.06, 112.70, 28.80, 0.03540, 0.00009, 0.00, 0.30, 0.00, 19.00, 0.96, 0.78 55 | 55, 19921127160400., 7.73, 128.25, 28.83, 0.03832, 0.00009, 0.00, 0.30, 0.00, 19.00, 0.93, 0.80 56 | 56, 19921127170000., 6.62, 110.51, 28.82, 0.02537, 0.00008, 0.00, 0.32, 0.00, 19.00, 1.11, 0.76 57 | 57, 19921127175200., 5.72, 98.34, 28.79, 0.01907, 0.00007, 0.00, 0.33, 0.00, 19.00, 1.24, 0.73 58 | 58, 19921127184300., 4.75, 84.91, 28.76, 0.01305, 0.00006, 0.00, 0.36, 0.00, 19.00, 1.41, 0.69 59 | 59, 19921127193500., 3.57, 78.82, 28.78, 0.01143, 0.00005, 0.00, 0.34, 0.00, 19.00, 1.48, 0.65 60 | 60, 19921127202600., 2.92, 62.32, 28.80, 0.00653, 0.00004, 0.00, 0.32, 0.00, 19.00, 1.74, 0.61 61 | 61, 19921127211700., 3.61, 61.10, 28.91, 0.00562, 0.00004, 0.00, 0.32, 0.11, 1.41, 1.80, 0.62 62 | 62, 19921127220900., 4.41, 60.02, 29.12, 0.00436, 0.00005, 0.00, 0.30, 0.29, 1.55, 1.91, 0.64 63 | 63, 19921127230000., 6.34, 60.48, 29.43, 0.00368, 0.00005, 0.00, 0.27, 0.56, 1.53, 1.99, 0.68 64 | 64, 19921127235200., 6.83, 59.76, 29.77, 0.00264, 0.00005, 0.00, 0.28, 0.89, 1.50, 2.06, 0.69 65 | 65, 19921128004300., 8.09, 65.42, 30.11, 0.00271, 0.00006, 0.00, 0.30, 1.26, 1.45, 2.02, 0.72 66 | 66, 19921128022100., 10.66, 84.89, 30.68, 0.00437, 0.00008, 0.00, 0.36, 1.87, 1.46, 1.82, 0.79 67 | 67, 19921128042600., 7.07, 74.64, 30.73, 0.00303, 0.00006, 0.00, 0.37, 1.83, 1.82, 1.89, 0.72 68 | 68, 19921128043600., 6.85, 81.79, 30.89, 0.00341, 0.00007, 0.00, 0.41, 1.83, 1.83, 1.82, 0.72 69 | 69, 19921128052800., 3.78, 59.25, 30.51, 0.00163, 0.00004, 0.00, 0.39, 1.67, 2.00, 1.98, 0.62 70 | 70, 19921128061900., 3.58, 54.04, 30.57, 0.00112, 0.00004, 0.00, 0.40, 1.53, 2.12, 1.99, 0.61 71 | 71, 19921128075200., 3.65, 60.68, 30.07, 0.00283, 0.00004, 0.00, 0.40, 1.20, 2.43, 1.90, 0.62 72 | 72, 19921128084300., 2.95, 53.52, 29.94, 0.00214, 0.00004, 0.00, 0.38, 1.02, 2.66, 1.97, 0.59 73 | 73, 19921128093500., 5.87, 87.47, 29.79, 0.00979, 0.00007, 0.00, 0.39, 0.88, 2.87, 1.51, 0.71 74 | 74, 19921128102600., 3.57, 72.03, 29.62, 0.00523, 0.00005, 0.00, 0.38, 0.65, 3.55, 1.76, 0.64 75 | 75, 19921128111800., 1.69, 49.09, 29.40, 0.00205, 0.00003, 0.00, 0.36, 0.52, 4.03, 2.01, 0.54 76 | 76, 19921128120900., 6.10, 76.77, 29.39, 0.01102, 0.00006, 0.00, 0.36, 0.45, 4.33, 1.48, 0.70 77 | 77, 19921128130100., 5.70, 70.69, 29.50, 0.00735, 0.00006, 0.00, 0.38, 0.32, 5.32, 1.63, 0.69 78 | 78, 19921128135200., 3.14, 55.69, 29.18, 0.00425, 0.00004, 0.00, 0.38, 0.00, 19.00, 1.83, 0.60 79 | 79, 19921128144400., 2.05, 48.12, 28.93, 0.00336, 0.00003, 0.00, 0.36, 0.00, 19.00, 1.92, 0.55 80 | 80, 19921128153500., 2.35, 59.24, 28.89, 0.00550, 0.00004, 0.00, 0.37, 0.00, 19.00, 1.76, 0.58 81 | 81, 19921128162600., 3.00, 66.79, 28.89, 0.00708, 0.00005, 0.00, 0.37, 0.00, 19.00, 1.67, 0.62 82 | 82, 19921128171800., 2.81, 64.23, 28.83, 0.00757, 0.00004, 0.00, 0.36, 0.00, 19.00, 1.65, 0.61 83 | 83, 19921128180900., 2.28, 55.69, 28.78, 0.00546, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.78, 0.57 84 | 84, 19921128190100., 2.77, 66.20, 28.82, 0.00758, 0.00004, 0.00, 0.36, 0.00, 19.00, 1.65, 0.61 85 | 85, 19921128195200., 2.28, 62.67, 28.82, 0.00697, 0.00004, 0.00, 0.35, 0.00, 19.00, 1.69, 0.59 86 | 86, 19921128204400., 1.91, 54.80, 28.83, 0.00414, 0.00004, 0.00, 0.34, 0.00, 19.00, 1.89, 0.56 87 | 87, 19921128213500., 3.20, 65.34, 29.11, 0.00561, 0.00005, 0.00, 0.29, 0.00, 19.00, 1.82, 0.62 88 | 88, 19921128222600., 6.80, 52.91, 29.50, 0.00296, 0.00005, 0.00, 0.26, 0.24, 0.98, 2.07, 0.68 89 | 89, 19921128231800., 7.38, 54.84, 29.84, 0.00265, 0.00005, 0.00, 0.25, 0.57, 0.98, 2.10, 0.70 90 | 90, 19921129000900., 7.99, 51.87, 30.35, 0.00101, 0.00005, 0.00, 0.26, 1.03, 0.96, 2.22, 0.70 91 | 91, 19921129010100., 12.45, 104.20, 30.40, 0.01041, 0.00009, 0.00, 0.34, 1.25, 1.01, 1.50, 0.84 92 | 92, 19921129015200., 10.88, 99.17, 30.07, 0.00964, 0.00009, 0.00, 0.34, 1.01, 1.59, 1.54, 0.81 93 | 93, 19921129024400., 5.89, 72.38, 29.94, 0.00494, 0.00006, 0.00, 0.30, 0.83, 2.14, 1.85, 0.69 94 | 94, 19921129033500., 5.55, 84.89, 29.98, 0.00688, 0.00006, 0.00, 0.34, 0.95, 2.24, 1.69, 0.70 95 | 95, 19921129042600., 3.76, 87.78, 29.80, 0.00838, 0.00006, 0.00, 0.35, 0.93, 2.53, 1.60, 0.67 96 | 96, 19921129051800., 2.83, 75.25, 29.66, 0.00660, 0.00005, 0.00, 0.33, 0.76, 3.03, 1.72, 0.63 97 | 97, 19921129060900., 4.88, 62.19, 29.64, 0.00441, 0.00005, 0.00, 0.30, 0.62, 3.50, 1.90, 0.65 98 | 98, 19921129070100., 17.63, 117.78, 29.44, 0.01967, 0.00012, 29.96, 0.33, 0.52, 3.90, 1.21, 0.92 99 | 99, 19921129075200., 17.09, 92.70, 29.39, 0.00766, 0.00010, 34.36, 0.38, 0.31, 5.49, 1.60, 0.89 100 | 100, 19921129091700., 7.02, 80.74, 29.07, 0.00754, 0.00007, 0.00, 0.40, 0.16, 7.58, 1.61, 0.73 101 | 101, 19921129100800., 4.66, 93.09, 29.06, 0.01707, 0.00007, 0.00, 0.34, 0.11, 9.06, 1.28, 0.70 102 | 102, 19921129110000., 2.99, 77.06, 28.93, 0.01345, 0.00005, 0.00, 0.33, 0.06, 12.22, 1.40, 0.64 103 | 103, 19921129115500., 2.36, 64.88, 28.90, 0.00863, 0.00004, 0.00, 0.34, 0.03, 16.50, 1.61, 0.60 104 | 104, 19921129124700., 2.62, 65.99, 28.84, 0.00927, 0.00004, 0.00, 0.34, 0.01, 19.00, 1.57, 0.61 105 | 105, 19921129133800., 3.48, 62.35, 29.03, 0.00659, 0.00004, 0.00, 0.37, 0.00, 19.00, 1.69, 0.62 106 | 106, 19921129142900., 3.47, 62.30, 29.03, 0.00658, 0.00004, 0.00, 0.37, 0.00, 19.00, 1.69, 0.62 107 | 107, 19921129153100., 4.85, 72.95, 29.25, 0.00840, 0.00005, 0.00, 0.38, 0.00, 19.00, 1.59, 0.67 108 | 108, 19921129163800., 5.43, 86.82, 29.21, 0.01241, 0.00006, 0.00, 0.36, 0.00, 19.00, 1.42, 0.70 109 | 109, 19921129173000., 6.19, 91.29, 29.15, 0.01559, 0.00007, 0.00, 0.34, 0.00, 19.00, 1.33, 0.73 110 | 110, 19921129182100., 4.84, 85.68, 29.08, 0.01306, 0.00006, 0.00, 0.34, 0.00, 19.00, 1.41, 0.69 111 | 111, 19921129191300., 4.60, 81.54, 29.08, 0.01158, 0.00006, 0.00, 0.34, 0.00, 19.00, 1.47, 0.68 112 | 112, 19921129200400., 5.83, 86.28, 29.03, 0.01393, 0.00006, 0.00, 0.32, 0.00, 19.00, 1.39, 0.71 113 | 113, 19921129205500., 3.78, 80.80, 29.02, 0.01146, 0.00006, 0.00, 0.33, 0.00, 19.00, 1.48, 0.66 114 | 114, 19921129214700., 4.34, 73.92, 29.14, 0.00835, 0.00005, 0.00, 0.32, 0.11, 2.06, 1.63, 0.66 115 | 115, 19921129223800., 5.74, 78.63, 29.33, 0.00851, 0.00006, 0.00, 0.31, 0.28, 2.19, 1.62, 0.70 116 | 116, 19921129233000., 6.93, 83.41, 29.47, 0.00864, 0.00007, 0.00, 0.30, 0.47, 2.34, 1.62, 0.73 117 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/README.md: -------------------------------------------------------------------------------- 1 | Programs: 2 | * cor3_0af.F90: this version is set up to use the Fairall near-surface temperature sensor for Ts bulk. 3 | * cor3_0ah.F90: this version is setup to use the MSP 6m-depth temperature sensor for Ts bulk. 4 | 5 | Input data: 6 | * test3_0.txt (Test data) 7 | 8 | 1 Date: YYYYMMDDHHmmss.ss, YYYY=year, MM=month, DD=day, HH=hour, mm=minute,ss.ss=sec 9 | 10 | 2 U: true wind speed at 15-m height m/s corrected for surface currents 11 | 12 | 3 Tsea: sea surface temp (at about 0.05m depth) deg.C 13 | 14 | 4 Tair: Vaisala air temperature (about 15 m) deg.C 15 | 16 | 5 qair: Vaisala air specific humidity (about 15 m) g/kg 17 | 18 | 6 Rs: solar irradiance W/m2 19 | 20 | 7 Rl: downwelling longwave irradiance W/m2 21 | 22 | 8 Rain: precipitation mm/hr 23 | 24 | 9 Lat: Latitude (N=+) 25 | 26 | 10 Lon: Longitude (E=+) 27 | 28 | 11 MSP: MSP temperature at 6m depth deg.C 29 | 30 | 31 | Output files: 32 | * tst3_0af_out.txt and tst3_0ah_out.txt Matlab output file from test data 33 | 34 | 35 | 1 index: data line number 36 | 37 | 2 xtime: YYYYMMDDHHmmss, date and time as read in (without dec. sec.) 38 | 39 | 3 hf: sensible heat flux W/m2 40 | 41 | 4 ef: latent heat flux W/m2 42 | 43 | 5 sst: sea skin temperature deg.C 44 | 45 | 6 tau: surface stress N/m2 46 | 47 | 7 Wbar: mean Webb vertical velocity m/s 48 | 49 | 8 rf: sensible heat flux due to precipitation W/m2 50 | 51 | 9 dter: cool skin effect deg.C 52 | 53 | 10 dt_wrm: warming across entire warm layer deg.C 54 | 55 | 11 tk_pwp:warm layer thickness m 56 | 57 | 12 tkt*1000:tkt=cool skin thickness 58 | 59 | 13 Wg: gustiness velocity m/s 60 | 61 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/cor30_ks_oz.f90: -------------------------------------------------------------------------------- 1 | SUBROUTINE cor30_ks_oz(x,y) 2 | !version with shortened iteration 3 | ! 4 | !x is a 14 element input array from the calling program and 5 | !y is the 6 element output array that this subroutine calculates. 6 | ! the Bessel function used in this routine are from Numerical Recipes. 7 | ! 8 | 9 | ! Variables 10 | implicit none 11 | real, intent(in):: x(14) 12 | real, intent(out)::y(6) 13 | real u,ts,t,ta,Q,Rl,zi,P,zu,usr,hsb,hlb,Aoz,alph,scw,Beta,von,fdg,tdk 14 | real grav,Rgas,Le,cpa,cpv,rhoa,visa,Al,be,cpw,rhow,visw,tcw,bigc,Rnl 15 | real du,wt,wq,tsr,qsr,Bf,ug,ut,qout,dels,qcol,alq,xlamx,tkt,dter,wbar,Cd 16 | real lam,A,sca,ha,hw,usw,b,d,rwo,zoo,rw,bes0,bes,ra,vtc,vtco 17 | 18 | real, external :: bessk0_s,bessk1_s 19 | u=x(1) !wind speed, m/s 20 | ts=x(2) !water temperature, C 21 | t=x(3) 22 | ta=t !air temperature, C 23 | Q=x(4)/1000 !specific humidity 24 | Rl=x(5) !downward IR flux, W/m**2 25 | zi=x(6) !atmospheric inversion height, m 26 | P=x(7) !atmospheric pressure, mb 27 | zu=x(8) !height of the wind speed data, m 28 | usr=x(9) !friction velocity, m/s 29 | hsb=x(10) !sensible heat flux, W/m**2 30 | hlb=x(11) !latent heat flux, W/m**2 31 | Aoz=x(12) !Ozone reaction rate time scale, s**-1 32 | alph=x(13) !Ozone dimensionless solubility 33 | scw=x(14) !Ozone schmidt number in water 34 | 35 | 36 | !*********** set constants ************* 37 | Beta=1.25 38 | von=0.4 39 | fdg=1.00 40 | tdk=273.16 41 | grav=9.82 42 | !************* air constants ************ 43 | Rgas=287.1 44 | Le=(2.501-.00237*ts)*1e6 45 | cpa=1004.67 46 | cpv=cpa*(1+0.84*Q) 47 | rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*Q)) 48 | visa=1.325e-5*(1+6.542e-3*t+8.301e-6*t*t-4.8e-9*t*t*t) 49 | !************ cool skin constants ******* 50 | Al=2.1e-5*(ts+3.2)**0.79 51 | be=0.026 52 | cpw=4000 53 | rhow=1022 54 | visw=1e-6 55 | tcw=0.6 56 | bigc=16*grav*cpw*(rhow*visw)**3/(tcw*tcw*rhoa*rhoa) 57 | 58 | !************** compute aux stuff ******* 59 | if (Rl>0) then 60 | Rnl=0.97*(5.56e-8*(ts+tdk)**4-Rl) 61 | else 62 | Rnl=50 63 | end if 64 | du=u 65 | !*************** Begin bulk loop ******* 66 | wt=hsb/rhoa/cpa 67 | wq=hlb/rhoa/Le 68 | 69 | tsr=-wt/usr 70 | qsr=-wq/usr 71 | Bf=-grav/ta*usr*(tsr+.61*ta*qsr) 72 | if (Bf>0) then 73 | ug=Beta*(Bf*zi)**.333 74 | else 75 | ug=.2 76 | end if 77 | ut=sqrt(du*du+ug*ug) 78 | qout=Rnl+hsb+hlb 79 | dels=0 !ignore sw effect 80 | qcol=qout-dels 81 | alq=Al*qcol+be*hlb*cpw/Le ! Eq. 7 Buoy flux water 82 | 83 | if (alq>0) then 84 | xlamx=6/(1+(bigc*alq/usr**4)**.75)**.333 ! Eq 13 Saunders 85 | else 86 | xlamx=6 ! Eq 13 Saunders 87 | end if 88 | tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr) !Eq.11 Sub. thk 89 | dter=qcol*tkt/tcw ! Eq.12 Cool skin 90 | 91 | 92 | !**************** Webb et al. correection ************ 93 | wbar=1.61*hlb/rhoa/Le+(1+1.61*Q)*hsb/rhoa/cpa/ta 94 | 95 | !************** compute transfer coeffs relative to du @meas. ht ********** 96 | Cd=(usr/du)**2 97 | 98 | lam=13.3 99 | A=1.85 100 | !CO2 variables 101 | sca=1 102 | !Fairall et al. 1999 parameterization 103 | ha=lam !neglect air side sublayer buoyancy effects 104 | hw=lam/A/6*xlamx !includes water side buoyancy effect 105 | 106 | usw=usr/sqrt(rhow/rhoa)*6/xlamx 107 | b=2/von/usw 108 | d=visw/scw 109 | rwo=1/sqrt(Aoz*d) 110 | zoo=b/rwo 111 | rw=rwo*bessk0_s(zoo)/bessk1_s(zoo) 112 | bes0 = bessk0_s(zoo) 113 | bes = bessk1_s(zoo) 114 | 115 | ra=(ha*sqrt(sca)+1./sqrt(Cd)-5+.5*log(sca)/von)/usr !air side resistance, see fairall et al, 2000 BLM 116 | vtc=1/((rw/alph)+ra) !non-bubble xfer velocity 117 | vtco=1/((rwo/alph)+ra) !non-bubble xfer velocity 118 | 119 | y=(/rwo, ra, rw, vtco, vtc, (6/xlamx)/) 120 | ! 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 121 | ! 122 | END !SUBROUTINE cor30_ks_oz 123 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/cor30a.F90: -------------------------------------------------------------------------------- 1 | subroutine cor30a(x,y) 2 | !version with shortened iteration modified Rt and Rq 3 | !uses wave information wave period in s and wave ht in m 4 | !no wave, standard coare 2.6 charnock: jwave=0 5 | !Oost et al. zo=50/2/pi L (u*/c)**4.5 if jwave=1 6 | !taylor and yelland zo=1200 h*(L/h)**4.5 jwave=2 7 | ! 8 | IMPLICIT NONE 9 | real x(19), y(22) 10 | real u,us,ts,t,Qs,Q,Rs,Rl,rain,zi,P,zu,zt,zq,lat,jcool,twave,hwave 11 | real Beta,von,fdg,tdk,grav,Rgas,Le,cpa,cpv,rhoa,visa,Al,be,cpw,rhow,visw,tcw,bigc,wetc 12 | real lwave,cwave,Rns,Rnl,du,dt,dq,qout,dels,qcol,alq,xlamx,alfac,bf,cc,cd10,ch10,charn,ct,ct10,dtmp,dwat,hl_webb 13 | real jwave,l10,nits,pi,ribcu,ribu,rr,ta,u10,ut,zet,zetu,zo10,zot10 14 | real hsb, hlb, tau, zo, zot, zoq, L, usr, tsr, qsr, dter, dqer, tkt, RF, wbar, Cd, Ch, Ce, Cdn_10, Chn_10, Cen_10, ug 15 | real p30, ztL10 16 | real, external :: psit_30, psiuo, grv 17 | integer i 18 | 19 | u=x(1) !wind speed (m/s) at height zu (m) 20 | us=x(2) !surface current speed in the wind direction (m/s) 21 | ts=x(3) !bulk water temperature (C) if jcool=1, interface water T if jcool=0 22 | t=x(4) !bulk air temperature (C), height zt 23 | Qs=x(5)/1000 !bulk water spec hum (g/kg) if jcool=1, ... 24 | Q=x(6)/1000 !bulk air spec hum (g/kg), height zq 25 | Rs=x(7) !downward solar flux (W/m**2) 26 | Rl=x(8) !downard IR flux (W/m**2) 27 | rain=x(9) !rain rate (mm/hr) 28 | zi=x(10) !PBL depth (m) 29 | P=x(11) !Atmos surface pressure (mb) 30 | zu=x(12) !wind speed measurement height (m) 31 | zt=x(13) !air T measurement height (m) 32 | zq=x(14) !air q measurement height (m) 33 | lat=x(15) !latitude (deg, N=+) 34 | jcool=x(16) !implement cool calculation skin switch, 0=no, 1=yes 35 | jwave=x(17) !implement wave dependent roughness model 36 | twave=x(18) !wave period (s) 37 | hwave=x(19) !wave height (m) 38 | 39 | !***************** set constants ************* 40 | Beta=1.2 41 | von=0.4 42 | fdg=1.00 43 | tdk=273.16 44 | pi = 3.141593 45 | grav=grv(lat) !9.82 46 | !************* air constants ************ 47 | Rgas=287.1 48 | Le=(2.501-.00237*ts)*1e6 49 | cpa=1004.67 50 | cpv=cpa*(1+0.84*Q) 51 | rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*Q)) 52 | visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t) 53 | !************ cool skin constants ******* 54 | Al=2.1e-5*(ts+3.2)**0.79 55 | be=0.026 56 | cpw=4000 57 | rhow=1022 58 | visw=1e-6 59 | tcw=0.6 60 | bigc=16*grav*cpw*(rhow*visw)**3/(tcw*tcw*rhoa*rhoa) 61 | wetc=0.622*Le*Qs/(Rgas*(ts+tdk)**2) 62 | 63 | !*************** wave parameters ********* 64 | lwave=grav/2/pi*twave**2 65 | cwave=grav/2/pi*twave 66 | 67 | !************** compute aux stuff ******* 68 | Rns=Rs*.945 69 | Rnl=0.97*(5.67e-8*(ts-0.3*jcool+tdk)**4-Rl) 70 | 71 | !*************** Begin bulk loop ******* 72 | 73 | !*************** first guess ************ 74 | du=u-us 75 | dt=ts-t-.0098*zt 76 | dq=Qs-Q 77 | ta=t+tdk 78 | ug=.5 79 | dter=0.3 80 | dqer=wetc*dter 81 | ut=sqrt(du*du+ug*ug) 82 | u10=ut*log(10/1e-4)/log(zu/1e-4) 83 | usr=.035*u10 84 | zo10=0.011*usr*usr/grav+0.11*visa/usr 85 | Cd10=(von/log(10/zo10))**2 86 | Ch10=0.00115 87 | Ct10=Ch10/sqrt(Cd10) 88 | zot10=10/exp(von/Ct10) 89 | Cd=(von/log(zu/zo10))**2 90 | Ct=von/log(zt/zot10) 91 | CC=von*Ct/Cd 92 | Ribcu=-zu/zi/.004/Beta**3 93 | Ribu=-grav*zu/ta*((dt-dter*jcool)+.61*ta*dq)/ut**2 94 | nits=3 95 | if (Ribu .LT. 0) then 96 | zetu=CC*Ribu/(1+Ribu/Ribcu) 97 | else 98 | zetu=CC*Ribu*(1+27/9*Ribu/CC) 99 | endif 100 | L10=zu/zetu 101 | if (zetu .GT. 50) then 102 | nits=1 103 | endif 104 | usr=ut*von/(log(zu/zo10)-psiuo(zu/L10)) 105 | tsr=-(dt-dter*jcool)*von*fdg/(log(zt/zot10)-psit_30(zt/L10)) 106 | qsr=-(dq-wetc*dter*jcool)*von*fdg/(log(zq/zot10)-psit_30(zq/L10)) 107 | tkt=.001 108 | charn=0.011 109 | if (ut .GT. 10) then 110 | charn=0.011+(ut-10)/(18-10)*(0.018-0.011) 111 | endif 112 | if (ut .GT. 18) then 113 | charn=0.018 114 | endif 115 | 116 | !*************** bulk loop ************ 117 | do i=1, nits 118 | 119 | zet=von*grav*zu/ta*(tsr*(1+0.61*Q)+.61*ta*qsr)/(usr*usr)/(1+0.61*Q) 120 | !disp(usr) 121 | !disp(zet) 122 | if (jwave .EQ. 0) zo=charn*usr*usr/grav+0.11*visa/usr 123 | if (jwave .EQ. 1) zo=50/2/pi*lwave*(usr/cwave)**4.5+0.11*visa/usr !Oost et al 124 | if (jwave .EQ. 2) zo=1200*hwave*(hwave/lwave)**4.5+0.11*visa/usr !Taylor and Yelland 125 | rr=zo*usr/visa 126 | L=zu/zet 127 | zoq=min(1.15e-4,5.5e-5/rr**.6) 128 | zot=zoq 129 | usr=ut*von/(log(zu/zo)-psiuo(zu/L)) 130 | tsr=-(dt-dter*jcool)*von*fdg/(log(zt/zot)-psit_30(zt/L)) 131 | qsr=-(dq-wetc*dter*jcool)*von*fdg/(log(zq/zoq)-psit_30(zq/L)) 132 | Bf=-grav/ta*usr*(tsr+.61*ta*qsr) 133 | if (Bf .GT. 0) then 134 | ug=Beta*(Bf*zi)**.333 135 | else 136 | ug=.2 137 | endif 138 | ut=sqrt(du*du+ug*ug) 139 | Rnl=0.97*(5.67e-8*(ts-dter*jcool+tdk)**4-Rl) 140 | hsb=-rhoa*cpa*usr*tsr 141 | hlb=-rhoa*Le*usr*qsr 142 | qout=Rnl+hsb+hlb 143 | dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4))) ! Eq.16 Shortwave 144 | qcol=qout-dels 145 | alq=Al*qcol+be*hlb*cpw/Le ! Eq. 7 Buoy flux water 146 | 147 | if (alq .GT. 0) then 148 | xlamx=6/(1+(bigc*alq/usr**4)**.75)**.333 ! Eq 13 Saunders 149 | tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr) !Eq.11 Sub. thk 150 | 151 | else 152 | xlamx=6.0 153 | tkt=min(.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)) !Eq.11 Sub. thk 154 | endif 155 | 156 | dter=qcol*tkt/tcw ! Eq.12 Cool skin 157 | dqer=wetc*dter 158 | ! print *,' third guesses=',usr,tsr,qsr,ug,ut 159 | 160 | enddo !bulk iter loop 161 | tau=rhoa*usr*usr*du/ut !stress 162 | hsb=-rhoa*cpa*usr*tsr 163 | hlb=-rhoa*Le*usr*qsr 164 | 165 | !**************** rain heat flux ******** 166 | 167 | dwat=2.11e-5*((t+tdk)/tdk)**1.94 !! water vapour diffusivity 168 | dtmp=(1.+3.309e-3*t-1.44e-6*t*t)*0.02411/(rhoa*cpa) !!heat diffusivity 169 | alfac= 1/(1+(wetc*Le*dwat)/(cpa*dtmp)) !! wet bulb factor 170 | RF= rain*alfac*cpw*((ts-t-dter*jcool)+(Qs-Q-dqer*jcool)*Le/cpa)/3600 171 | !**************** Webb et al. correection ************ 172 | wbar=1.61*hlb/Le/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta !formulation in hlb already includes webb 173 | !wbar=1.61*hlb/Le/rhoa+(1+1.61*Q)*hsb/rhoa/cpa/ta 174 | hl_webb=rhoa*wbar*Q*Le 175 | !************** compute transfer coeffs relative to ut @meas. ht ********** 176 | Cd=tau/rhoa/ut/max(.1,du) 177 | Ch=-usr*tsr/ut/(dt-dter*jcool) 178 | Ce=-usr*qsr/(dq-dqer*jcool)/ut 179 | !************ 10-m neutral coeff realtive to ut ******** 180 | Cdn_10=von*von/log(10/zo)/log(10/zo) 181 | Chn_10=von*von*fdg/log(10/zo)/log(10/zot) 182 | Cen_10=von*von*fdg/log(10/zo)/log(10/zoq) 183 | !**************** the Y array going back tom the main program **************** 184 | y=(/hsb, hlb, tau, zo, zot, zoq, L, usr, tsr, qsr, dter, dqer, tkt, RF, wbar, Cd, Ch, Ce, Cdn_10, Chn_10, Cen_10, ug /) 185 | ! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 186 | end subroutine 187 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/cor3_0af.F90: -------------------------------------------------------------------------------- 1 | Program cor3_0af 2 | !toga coare bulk flux model version 2.6 3 | !*************************************** 4 | !uses following subroutines: 5 | ! cor30a.F90 6 | ! psiu_30.F90 7 | ! psit_30.F90 8 | ! qsee.F90 9 | ! grv.F90 10 | !*************************************** 11 | 12 | !*********** basic specifications ***** 13 | ! zu= height of wind measurement 14 | ! zt= height of air temperature measurement 15 | ! zq= height of air humidity measurement 16 | ! ts_depth depth of water temperature measurement 17 | ! jwarm= 0=no warm layer calc, 1 =do warm layer calc 18 | ! jcool= 0=no cool skin calc, 1=do cool skin calc 19 | ! jwave= 0= Charnock, 1=Oost et al, 2=Taylor and Yelland 20 | 21 | !*********** input data ************** 22 | ! YYYYMMHHMMSS= date in toga coare format, Y2K version 23 | ! u= wind speed (m/s), height zu 24 | ! us= surface current (m/s) 25 | ! ts= bulk surface sea temp (cent) 26 | ! t= air temp (cent), height zt 27 | ! qs= sea surface sat specific humidity (g/kg) 28 | ! q= air specific humidity (g/kg), height zq 29 | ! Rs= downward solar flux (w/m^2) 30 | ! Rl= downward IR flux (w/m^2) 31 | ! zi= inversion height (m) 32 | ! P= air pressure (mb) 33 | ! rain= rain rate (mm/hr) 34 | ! lon= longitude (deg E=+) 35 | ! lat= latitude (deg N=+) 36 | 37 | 38 | !********** output data *************** 39 | ! hsb= sensible heat flux (w/m^2) 40 | ! hlb= latent heat flux (w/m^2) 41 | ! RF= rain heat flux(w/m^2) 42 | ! wbar= webb mean w (m/s) 43 | ! tau= stress (nt/m^2) 44 | ! zo= velocity roughness length (m) 45 | ! zot temperature roughness length (m) 46 | ! zoq= moisture roughness length (m) 47 | ! L= Monin_Obukhov stability length 48 | ! usr= turbulent friction velocity (m/s), including gustiness 49 | ! tsr temperature scaling parameter (K) 50 | ! qsr humidity scaling parameter (g/g) 51 | ! dter= cool skin temperature depression (K) 52 | ! dqer= cool skin humidity depression (g/g) 53 | ! tkt= cool skin thickness (m) 54 | ! Cd= velocity drag coefficient at zu, referenced to u 55 | ! Ch= heat transfer coefficient at zt 56 | ! Ce= moisture transfer coefficient at zq 57 | ! Cdn_10= 10-m velocity drag coeeficient, including gustiness 58 | ! Chn_10= 10-m heat transfer coeeficient, including gustiness 59 | ! Cen_10= 10-m humidity transfer coeeficient, including gustiness 60 | ! 61 | IMPLICIT NONE 62 | 63 | !fclose('all') 64 | !clear 65 | ! 66 | integer xin, ibg, indx(30), jdx(30) 67 | real arrout(116,13), qsx(30), tsx(30), locx(30), dt(30), hwave 68 | real :: x(19), y(30), arnl(35), Hrain(30), hnet(30), hs(30), hl(30), tau(30),hl_webb(30) 69 | real :: u,tsnk,ta,qa,rs,rl,org,lat,lon,msp 70 | real :: jcool, jwave 71 | real :: a,al,b,be,cd,cdn_10,ce,cen_10,ch,chktime,chn_10,cpa,cpv,cpw,ctd1,ctd2 72 | real :: didread,dqer,dsea,dt_wrm,dter,dtime,fxp,grav,hl_old,hlb,hs_old,hsb 73 | integer :: i,icount,iday,ihr,imin,isec,iyr,jamset,jump,jwarm,l,le,mon 74 | real :: loc,locx,lonx,newtime,p,q,q_pwp,qcol_ac,qjoule,qr_out,qs,qsr,rain,rf,rf_old,rgas 75 | real :: rhoa,rhow,rich,rnl,rns,t,tau_ac,tau_old,taub,tcw,tdk,time,intime,jtime,tk_pwp,tkt,ts,ts_depth,tsea 76 | real :: tsr,twave,us,usr,visa,visw,wbar,wg,zi,zo,zoq,zot,zq,zt,zu 77 | double precision :: jdy,st 78 | real, external :: grv, qsee 79 | !real :: jdy,st 80 | xin = 20 81 | didread=0 82 | 83 | ! jdy=x(xin,1) !time in the form YYYYMMDDHHSS.SS 84 | ! U=x(xin,2) !true wind speed, m/s etl sonic anemometer 85 | ! tsnk=x(xin,3) !sea snake temperature, C (0.05 m depth) 86 | ! ta=x(xin,4) !air temperature, C (z=14.5 m) 87 | ! qa=x(xin,5) !air specific humidity, g/kg (z=14.5 m) 88 | ! rs=x(xin,6) !downward solar flux, W/m^2 (ETL units) 89 | ! rl=x(xin,7) !downward IR flux, W/m^2 (ETL units) 90 | ! org=x(xin,8) !rainrate, mm/hr (ETL STI optical rain gauge, uncorrected) 91 | ! lat=x(xin,9) !latitude, deg (SCS pcode) 92 | ! lon=x(xin,10) !longitude, deg (SCS pcode) 93 | ! msp=x(xin,11) !6-m deotg T from MSP, C 94 | 95 | ! ************* open the output file 96 | open(unit=12,file='test3_0_af_out.dat') 97 | 7 format(i6,i9,5i2.2,3f9.2,2f10.5,6f9.2) 98 | ! 99 | zu=15 !anemometer ht 100 | zt=15 !air T height 101 | zq=15 !humidity height 102 | ts_depth=.05 !bulk water temperature sensor depth, ETL sea snake&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 103 | 104 | jcool=1 105 | jwarm=1 106 | jwave=0 107 | icount=1 108 | !********************* housekeep variables ******** 109 | qcol_ac=0 110 | tau_ac=0 111 | jtime=0 112 | jamset=0 113 | tau_old=.06 114 | hs_old=10 115 | hl_old=100 116 | RF_old=0 117 | dsea=0 118 | dt_wrm=0 119 | tk_pwp=19 120 | fxp=.5 121 | q_pwp=0 122 | jump=1 123 | !******************* set constants **************** 124 | tdk=273.16 125 | grav=grv(-2.) !9.72 126 | Rgas=287.1 127 | cpa=1004.67 128 | be=0.026 129 | cpw=4000 130 | rhow=1022 131 | visw=1e-6 132 | tcw=0.6 133 | dter=0.3 134 | 135 | !*********** set variables not in data base ******** 136 | P=1008 !air pressure 137 | us=0 !surface current 138 | zi=600 !inversion ht 139 | !****************** setup read data loop ********** 140 | open(unit=3,file='test3_0.txt') 141 | 8 format(f17.2,f7.2,f9.2,2f8.2,f9.2,f8.2,f6.2,f9.2,f9.2,f7.2) 142 | do ibg = 1,116 !major read loop 143 | read(3,8) jdy, u, tsnk, ta, qa, rs, rl, org, lat, lon, msp 144 | !******* decode date ************ 145 | st=(jdy) 146 | print '(f17.0)',st 147 | iyr=floor(st/1e10) 148 | mon=floor(st/1e8)-iyr*100 149 | iday=floor((st/1e6) -iyr*1e4 - mon*100) 150 | ihr=floor((st/1e4)-iyr*1e6-mon*1e4-iday*100 ) 151 | imin=floor((st/100)- iyr*1e8-mon*1e6-iday*1e4-ihr*100) 152 | isec=0 153 | print *,iyr, mon, iday, ihr, imin, isec 154 | !******** decode bulk met data **** 155 | if(ibg .eq. 1) ts=tsnk 156 | tsea=tsnk !bulk sea surface temp 157 | t=ta !air temp 158 | qs=qsee(tsea, P) !bulk sea surface humidity 159 | q=qa !air humidity 160 | Rs=rs !downward solar flux 161 | Rl=rl !doward IR flux 162 | rain=org !rain rate 163 | grav=grv(lat) !9.72 164 | lonx=lon !longitude 165 | 166 | !***** variables for warm layer *** 167 | ! time=(float(ihr*3600)+float(imin*60))/24./3600. 168 | time=((float(ihr*3600)+float(imin*60))/24.) /3600. 169 | intime=time 170 | loc=(lonx+7.5)/15 171 | locx(ibg)=loc 172 | Rnl=.97*(5.67e-8*(ts-dter*jcool+273.16)**4-Rl) !oceanic broadband emissivity=0.97 173 | arnl(ibg)=Rnl 174 | Rns=.945*Rs !oceanic albedo=0.055 daily average 175 | !********* set condition dependent stuff ****** 176 | Le=(2.501-.00237*tsea)*1e6 177 | cpv=cpa*(1+0.84*q/1000) 178 | rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*q/1000)) 179 | visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t) 180 | Al=2.1e-5*(tsea+3.2)**0.79 181 | 182 | !************** apply warm layer *********** 183 | if (jwarm .EQ. 1) then !do warm layer 184 | chktime=loc+(intime*24.0) 185 | ! chktime=loc+intime*24 186 | newtime=(chktime-24*floor(chktime/24))*3600 187 | if (icount .GT. 1) then !not first time thru 188 | if ((newtime .GT. 21600) .AND. (jump .EQ. 1)) then 189 | else 190 | jump=0 191 | if (newtime .LT. jtime) then !re-zero at midnight 192 | jamset=0 193 | fxp=.5 194 | tk_pwp=19 195 | tau_ac=0 196 | qcol_ac=0 197 | dt_wrm=0 198 | jump=0 !goto 16 199 | else 200 | !*************** set warm layer constants ************** 201 | rich=.65 !crit rich 202 | ctd1=sqrt(2*rich*cpw/(Al*grav*rhow)) 203 | ctd2=sqrt(2*Al*grav/(rich*rhow))/(cpw**1.5) 204 | !************************************************ 205 | dtime=newtime-jtime !delta time for integrals 206 | qr_out=Rnl+hs_old+hl_old+RF_old !total cooling at surface 207 | q_pwp=fxp*Rns-qr_out !tot heat abs in warm layer 208 | if (q_pwp .LT. 50 .AND. jamset .EQ. 0) then !check for threshold 209 | !goto 16 210 | else 211 | jamset=1 !indicates threshold crossed 212 | tau_ac=tau_ac+max(.002,tau_old)*dtime !momentum integral 213 | if ((qcol_ac+q_pwp*dtime) .GT. 0) then !check threshold for warm layer existence 214 | do i=1,5 !loop 5 times for fxp 215 | 216 | fxp=1-(0.28*0.014*(1-exp(-tk_pwp/0.014))+0.27*0.357*(1-exp(-tk_pwp/0.357))+0.45*12.82*(1-exp(-tk_pwp/12.82)))/tk_pwp 217 | !fg=fpaul(tk_pwp) fxp=fg(1) 218 | qjoule=(fxp*Rns-qr_out)*dtime 219 | if (qcol_ac+qjoule .GT. 0) then 220 | tk_pwp=min(19.,ctd1*tau_ac/sqrt(qcol_ac+qjoule)) 221 | endif 222 | enddo ! end i loop 223 | else !warm layer wiped out 224 | fxp=0.75 225 | tk_pwp=19 226 | qjoule=(fxp*Rns-qr_out)*dtime 227 | endif ! end sign check on qcol_ac 228 | qcol_ac=qcol_ac+qjoule !heat integral 229 | !*********** compute dt_warm ************** 230 | if (qcol_ac .GT. 0) then 231 | dt_wrm=ctd2*(qcol_ac)**1.5/tau_ac 232 | else 233 | dt_wrm=0 234 | endif 235 | endif ! end threshold check 236 | endif ! end midnight reset 237 | if (tk_pwp .LT. ts_depth) then 238 | dsea=dt_wrm 239 | else 240 | dsea=dt_wrm*ts_depth/tk_pwp 241 | endif 242 | endif ! end 6am start first time thru 243 | endif ! end first time thru check 244 | jtime=newtime 245 | endif ! end jwarm, end warm layer model appl check 246 | ts=tsea+dsea 247 | qs=qsee(ts, P) 248 | qsx(ibg)=qs 249 | tsx(20)= 1. !ts 250 | a=.018 251 | b=.729 252 | twave=b*u 253 | hwave=a*u**2.*(1+.015*u) 254 | x=(/u, us, ts, t, qs, q, Rs, Rl, rain, zi, P, zu, zt, zq, lat, jcool, jwave, twave, hwave/)!set data for basic flux alogithm 255 | !******** call modified LKB routine ******* 256 | call cor30a(x,y) 257 | !****************** output from routine ***************************** 258 | hsb=y(1) !sensible heat flux W/m/m 259 | hlb=y(2) !latent 260 | taub=y(3) !stress 261 | zo=y(4) !vel roughness 262 | zot=y(5) !temp " 263 | zoq=y(6) !hum " 264 | L=y(7) !Ob Length 265 | usr=y(8) !ustar 266 | tsr=y(9) !tstar 267 | qsr=y(10) !qstar [g/g] 268 | dter=y(11) !cool skin delta T 269 | dqer=y(12) ! " " " q 270 | tkt=y(13) !thickness of cool skin 271 | RF=y(14) !rain heat flux 272 | wbar=y(15) !webb mean w 273 | Cd=y(16) !drag @ zu 274 | Ch=y(17) ! 275 | Ce=y(18) !Dalton 276 | Cdn_10=y(19) !neutral drag @ 10 [includes gustiness] 277 | Chn_10=y(20) ! 278 | Cen_10=y(21) ! 279 | Wg=y(22) 280 | ! zax(1)=jd !julian day 281 | ! zax(2:10)=x(1:9) ! 282 | ! zax(4)=tsea !Tsea [no cool skin] 283 | ! zax(11:32)=y(1:22) ! 284 | ! zax(33:35)=(/dt_wrm, tk_pwp, ts/) !warm layer deltaT, thickness, corrected Tsea 285 | !******* previous values from cwf hp basic code ***** 286 | 287 | Hrain(ibg)=RF 288 | !********** new values from this code 289 | hnet(ibg)=Rns-Rnl-hsb-hlb-Hrain(ibg) !total heat input to ocean 290 | hs(ibg)=hsb 291 | hl(ibg)=hlb 292 | tau(ibg)=taub 293 | hl_webb=rhoa*Le*wbar*qa/1000 294 | !******************** save various parts of data ********************************** 295 | !************* create Bradley type out file 296 | indx(ibg)=ibg 297 | arrout(ibg,1)=ibg 298 | arrout(ibg,2)=jdy !output old results 299 | arrout(ibg,3)=hsb 300 | arrout(ibg,4)=hlb 301 | arrout(ibg,5)=ts-dter*jcool 302 | arrout(ibg,6)=taub 303 | arrout(ibg,7)=wbar 304 | arrout(ibg,8)=RF 305 | arrout(ibg,9)=dter 306 | arrout(ibg,10)=dt_wrm 307 | arrout(ibg,11)=tk_pwp 308 | arrout(ibg,12)=tkt*1e3 309 | arrout(ibg,13)=Wg 310 | hs_old=hsb 311 | hl_old=hlb 312 | RF_old=RF 313 | tau_old=taub 314 | icount=icount+1 315 | ! print *, arrout(ibg,:) 316 | write(12,7)ibg,iyr, mon, iday, ihr, imin, isec ,arrout(ibg,3:13) 317 | enddo ! data line loop 318 | !***************** write output file ****** 319 | close(unit=3) 320 | close(unit=15) 321 | read *, i 322 | end PROGRAM !cor3_0af.F90 323 | 324 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/cor3_0ah.F90: -------------------------------------------------------------------------------- 1 | Program cor3_0af 2 | !toga coare bulk flux model version 2.6 3 | !*************************************** 4 | !uses following subroutines: 5 | ! cor30a.F90 6 | ! psiu_30.F90 7 | ! psit_30.F90 8 | ! qsee.F90 9 | ! grv.F90 10 | !*************************************** 11 | 12 | !*********** basic specifications ***** 13 | ! zu= height of wind measurement 14 | ! zt= height of air temperature measurement 15 | ! zq= height of air humidity measurement 16 | ! ts_depth depth of water temperature measurement 17 | ! jwarm= 0=no warm layer calc, 1 =do warm layer calc 18 | ! jcool= 0=no cool skin calc, 1=do cool skin calc 19 | ! jwave= 0= Charnock, 1=Oost et al, 2=Taylor and Yelland 20 | 21 | !*********** input data ************** 22 | ! YYYYMMHHMMSS= date in toga coare format, Y2K version 23 | ! u= wind speed (m/s), height zu 24 | ! us= surface current (m/s) 25 | ! ts= bulk surface sea temp (cent) 26 | ! t= air temp (cent), height zt 27 | ! qs= sea surface sat specific humidity (g/kg) 28 | ! q= air specific humidity (g/kg), height zq 29 | ! Rs= downward solar flux (w/m^2) 30 | ! Rl= downward IR flux (w/m^2) 31 | ! zi= inversion height (m) 32 | ! P= air pressure (mb) 33 | ! rain= rain rate (mm/hr) 34 | ! lon= longitude (deg E=+) 35 | ! lat= latitude (deg N=+) 36 | 37 | 38 | !********** output data *************** 39 | ! hsb= sensible heat flux (w/m^2) 40 | ! hlb= latent heat flux (w/m^2) 41 | ! RF= rain heat flux(w/m^2) 42 | ! wbar= webb mean w (m/s) 43 | ! tau= stress (nt/m^2) 44 | ! zo= velocity roughness length (m) 45 | ! zot temperature roughness length (m) 46 | ! zoq= moisture roughness length (m) 47 | ! L= Monin_Obukhov stability length 48 | ! usr= turbulent friction velocity (m/s), including gustiness 49 | ! tsr temperature scaling parameter (K) 50 | ! qsr humidity scaling parameter (g/g) 51 | ! dter= cool skin temperature depression (K) 52 | ! dqer= cool skin humidity depression (g/g) 53 | ! tkt= cool skin thickness (m) 54 | ! Cd= velocity drag coefficient at zu, referenced to u 55 | ! Ch= heat transfer coefficient at zt 56 | ! Ce= moisture transfer coefficient at zq 57 | ! Cdn_10= 10-m velocity drag coeeficient, including gustiness 58 | ! Chn_10= 10-m heat transfer coeeficient, including gustiness 59 | ! Cen_10= 10-m humidity transfer coeeficient, including gustiness 60 | ! 61 | IMPLICIT NONE 62 | 63 | !fclose('all') 64 | !clear 65 | ! 66 | integer xin, ibg, indx(30), jdx(30) 67 | real arrout(116,13), qsx(30), tsx(30), locx(30), dt(30), hwave 68 | real :: x(19), y(30), arnl(35), Hrain(30), hnet(30), hs(30), hl(30), tau(30),hl_webb(30) 69 | real :: u,tsnk,ta,qa,rs,rl,org,lat,lon,msp 70 | real :: jcool, jwave 71 | real :: a,al,b,be,cd,cdn_10,ce,cen_10,ch,chktime,chn_10,cpa,cpv,cpw,ctd1,ctd2 72 | real :: didread,dqer,dsea,dt_wrm,dter,dtime,fxp,grav,hl_old,hlb,hs_old,hsb 73 | integer :: i,icount,iday,ihr,imin,isec,iyr,jamset,jump,jwarm,l,le,mon 74 | real :: loc,locx,lonx,newtime,p,q,q_pwp,qcol_ac,qjoule,qr_out,qs,qsr,rain,rf,rf_old,rgas 75 | real :: rhoa,rhow,rich,rnl,rns,t,tau_ac,tau_old,taub,tcw,tdk,time,intime,jtime,tk_pwp,tkt,ts,ts_depth,tsea 76 | real :: tsr,twave,us,usr,visa,visw,wbar,wg,zi,zo,zoq,zot,zq,zt,zu 77 | double precision :: jdy,st 78 | real, external :: grv, qsee 79 | !real :: jdy,st 80 | xin = 20 81 | didread=0 82 | 83 | ! jdy=x(xin,1) !time in the form YYYYMMDDHHSS.SS 84 | ! U=x(xin,2) !true wind speed, m/s etl sonic anemometer 85 | ! tsnk=x(xin,3) !sea snake temperature, C (0.05 m depth) 86 | ! ta=x(xin,4) !air temperature, C (z=14.5 m) 87 | ! qa=x(xin,5) !air specific humidity, g/kg (z=14.5 m) 88 | ! rs=x(xin,6) !downward solar flux, W/m^2 (ETL units) 89 | ! rl=x(xin,7) !downward IR flux, W/m^2 (ETL units) 90 | ! org=x(xin,8) !rainrate, mm/hr (ETL STI optical rain gauge, uncorrected) 91 | ! lat=x(xin,9) !latitude, deg (SCS pcode) 92 | ! lon=x(xin,10) !longitude, deg (SCS pcode) 93 | ! msp=x(xin,11) !6-m deotg T from MSP, C 94 | 95 | ! ************* open the output file 96 | open(unit=12,file='test3_0_ah_out.dat') 97 | 7 format(i6,i9,5i2.2,3f9.2,2f10.5,6f9.2) 98 | ! 99 | zu=15 !anemometer ht 100 | zt=15 !air T height 101 | zq=15 !humidity height 102 | ts_depth=6. !bulk water temperature sensor depth, ETL sea snake&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 103 | 104 | jcool=1 105 | jwarm=1 106 | jwave=0 107 | icount=1 108 | !********************* housekeep variables ******** 109 | qcol_ac=0 110 | tau_ac=0 111 | jtime=0 112 | jamset=0 113 | tau_old=.06 114 | hs_old=10 115 | hl_old=100 116 | RF_old=0 117 | dsea=0 118 | dt_wrm=0 119 | tk_pwp=19 120 | fxp=.5 121 | q_pwp=0 122 | jump=1 123 | !******************* set constants **************** 124 | tdk=273.16 125 | grav=grv(-2.) !9.72 126 | Rgas=287.1 127 | cpa=1004.67 128 | be=0.026 129 | cpw=4000 130 | rhow=1022 131 | visw=1e-6 132 | tcw=0.6 133 | dter=0.3 134 | 135 | !*********** set variables not in data base ******** 136 | P=1008 !air pressure 137 | us=0 !surface current 138 | zi=600 !inversion ht 139 | !****************** setup read data loop ********** 140 | open(unit=3,file='test3_0.txt') 141 | 8 format(f17.2,f7.2,f9.2,2f8.2,f9.2,f8.2,f6.2,f9.2,f9.2,f7.2) 142 | do ibg = 1,116 !major read loop 143 | read(3,8) jdy, u, tsnk, ta, qa, rs, rl, org, lat, lon, msp 144 | !******* decode date ************ 145 | st=(jdy) 146 | print '(f17.0)',st 147 | iyr=floor(st/1e10) 148 | mon=floor(st/1e8)-iyr*100 149 | iday=floor((st/1e6) -iyr*1e4 - mon*100) 150 | ihr=floor((st/1e4)-iyr*1e6-mon*1e4-iday*100 ) 151 | imin=floor((st/100)- iyr*1e8-mon*1e6-iday*1e4-ihr*100) 152 | isec=0 153 | print *,iyr, mon, iday, ihr, imin, isec 154 | !******** decode bulk met data **** 155 | if(ibg .eq. 1) ts=msp 156 | tsea=msp !bulk sea surface temp 157 | t=ta !air temp 158 | qs=qsee(tsea, P) !bulk sea surface humidity 159 | q=qa !air humidity 160 | Rs=rs !downward solar flux 161 | Rl=rl !doward IR flux 162 | rain=org !rain rate 163 | grav=grv(lat) !9.72 164 | lonx=lon !longitude 165 | 166 | !***** variables for warm layer *** 167 | ! time=(float(ihr*3600)+float(imin*60))/24./3600. 168 | time=((float(ihr*3600)+float(imin*60))/24.) /3600. 169 | intime=time 170 | loc=(lonx+7.5)/15 171 | locx(ibg)=loc 172 | Rnl=.97*(5.67e-8*(ts-dter*jcool+273.16)**4-Rl) !oceanic broadband emissivity=0.97 173 | arnl(ibg)=Rnl 174 | Rns=.945*Rs !oceanic albedo=0.055 daily average 175 | !********* set condition dependent stuff ****** 176 | Le=(2.501-.00237*tsea)*1e6 177 | cpv=cpa*(1+0.84*q/1000) 178 | rhoa=P*100/(Rgas*(t+tdk)*(1+0.61*q/1000)) 179 | visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t) 180 | Al=2.1e-5*(tsea+3.2)**0.79 181 | 182 | !************** apply warm layer *********** 183 | if (jwarm .EQ. 1) then !do warm layer 184 | chktime=loc+(intime*24.0) 185 | ! chktime=loc+intime*24 186 | newtime=(chktime-24*floor(chktime/24))*3600 187 | if (icount .GT. 1) then !not first time thru 188 | if ((newtime .GT. 21600) .AND. (jump .EQ. 1)) then 189 | else 190 | jump=0 191 | if (newtime .LT. jtime) then !re-zero at midnight 192 | jamset=0 193 | fxp=.5 194 | tk_pwp=19 195 | tau_ac=0 196 | qcol_ac=0 197 | dt_wrm=0 198 | jump=0 !goto 16 199 | else 200 | !*************** set warm layer constants ************** 201 | rich=.65 !crit rich 202 | ctd1=sqrt(2*rich*cpw/(Al*grav*rhow)) 203 | ctd2=sqrt(2*Al*grav/(rich*rhow))/(cpw**1.5) 204 | !************************************************ 205 | dtime=newtime-jtime !delta time for integrals 206 | qr_out=Rnl+hs_old+hl_old+RF_old !total cooling at surface 207 | q_pwp=fxp*Rns-qr_out !tot heat abs in warm layer 208 | if (q_pwp .LT. 50 .AND. jamset .EQ. 0) then !check for threshold 209 | !goto 16 210 | else 211 | jamset=1 !indicates threshold crossed 212 | tau_ac=tau_ac+max(.002,tau_old)*dtime !momentum integral 213 | if ((qcol_ac+q_pwp*dtime) .GT. 0) then !check threshold for warm layer existence 214 | do i=1,5 !loop 5 times for fxp 215 | 216 | fxp=1-(0.28*0.014*(1-exp(-tk_pwp/0.014))+0.27*0.357*(1-exp(-tk_pwp/0.357))+0.45*12.82*(1-exp(-tk_pwp/12.82)))/tk_pwp 217 | !fg=fpaul(tk_pwp) fxp=fg(1) 218 | qjoule=(fxp*Rns-qr_out)*dtime 219 | if (qcol_ac+qjoule .GT. 0) then 220 | tk_pwp=min(19.,ctd1*tau_ac/sqrt(qcol_ac+qjoule)) 221 | endif 222 | enddo ! end i loop 223 | else !warm layer wiped out 224 | fxp=0.75 225 | tk_pwp=19 226 | qjoule=(fxp*Rns-qr_out)*dtime 227 | endif ! end sign check on qcol_ac 228 | qcol_ac=qcol_ac+qjoule !heat integral 229 | !*********** compute dt_warm ************** 230 | if (qcol_ac .GT. 0) then 231 | dt_wrm=ctd2*(qcol_ac)**1.5/tau_ac 232 | else 233 | dt_wrm=0 234 | endif 235 | endif ! end threshold check 236 | endif ! end midnight reset 237 | if (tk_pwp .LT. ts_depth) then 238 | dsea=dt_wrm 239 | else 240 | dsea=dt_wrm*ts_depth/tk_pwp 241 | endif 242 | endif ! end 6am start first time thru 243 | endif ! end first time thru check 244 | jtime=newtime 245 | endif ! end jwarm, end warm layer model appl check 246 | ts=tsea+dsea 247 | qs=qsee(ts, P) 248 | qsx(ibg)=qs 249 | tsx(20)= 1. !ts 250 | a=.018 251 | b=.729 252 | twave=b*u 253 | hwave=a*u**2.*(1+.015*u) 254 | x=(/u, us, ts, t, qs, q, Rs, Rl, rain, zi, P, zu, zt, zq, lat, jcool, jwave, twave, hwave/)!set data for basic flux alogithm 255 | !******** call modified LKB routine ******* 256 | call cor30a(x,y) 257 | !****************** output from routine ***************************** 258 | hsb=y(1) !sensible heat flux W/m/m 259 | hlb=y(2) !latent 260 | taub=y(3) !stress 261 | zo=y(4) !vel roughness 262 | zot=y(5) !temp " 263 | zoq=y(6) !hum " 264 | L=y(7) !Ob Length 265 | usr=y(8) !ustar 266 | tsr=y(9) !tstar 267 | qsr=y(10) !qstar [g/g] 268 | dter=y(11) !cool skin delta T 269 | dqer=y(12) ! " " " q 270 | tkt=y(13) !thickness of cool skin 271 | RF=y(14) !rain heat flux 272 | wbar=y(15) !webb mean w 273 | Cd=y(16) !drag @ zu 274 | Ch=y(17) ! 275 | Ce=y(18) !Dalton 276 | Cdn_10=y(19) !neutral drag @ 10 [includes gustiness] 277 | Chn_10=y(20) ! 278 | Cen_10=y(21) ! 279 | Wg=y(22) 280 | ! zax(1)=jd !julian day 281 | ! zax(2:10)=x(1:9) ! 282 | ! zax(4)=tsea !Tsea [no cool skin] 283 | ! zax(11:32)=y(1:22) ! 284 | ! zax(33:35)=(/dt_wrm, tk_pwp, ts/) !warm layer deltaT, thickness, corrected Tsea 285 | !******* previous values from cwf hp basic code ***** 286 | 287 | Hrain(ibg)=RF 288 | !********** new values from this code 289 | hnet(ibg)=Rns-Rnl-hsb-hlb-Hrain(ibg) !total heat input to ocean 290 | hs(ibg)=hsb 291 | hl(ibg)=hlb 292 | tau(ibg)=taub 293 | hl_webb=rhoa*Le*wbar*qa/1000 294 | !******************** save various parts of data ********************************** 295 | !************* create Bradley type out file 296 | indx(ibg)=ibg 297 | arrout(ibg,1)=ibg 298 | arrout(ibg,2)=jdy !output old results 299 | arrout(ibg,3)=hsb 300 | arrout(ibg,4)=hlb 301 | arrout(ibg,5)=ts-dter*jcool 302 | arrout(ibg,6)=taub 303 | arrout(ibg,7)=wbar 304 | arrout(ibg,8)=RF 305 | arrout(ibg,9)=dter 306 | arrout(ibg,10)=dt_wrm 307 | arrout(ibg,11)=tk_pwp 308 | arrout(ibg,12)=tkt*1e3 309 | arrout(ibg,13)=Wg 310 | hs_old=hsb 311 | hl_old=hlb 312 | RF_old=RF 313 | tau_old=taub 314 | icount=icount+1 315 | ! print *, arrout(ibg,:) 316 | write(12,7)ibg,iyr, mon, iday, ihr, imin, isec ,arrout(ibg,3:13) 317 | enddo ! data line loop 318 | !***************** write output file ****** 319 | close(unit=3) 320 | close(unit=15) 321 | read *, i 322 | end PROGRAM !cor3_0af.F90 323 | 324 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/grv.F90: -------------------------------------------------------------------------------- 1 | function grv(lat) 2 | real lat 3 | gamma=9.7803267715 4 | c1=0.0052790414 5 | c2=0.0000232718 6 | c3=0.0000001262 7 | c4=0.0000000007 8 | pi=3.141593 9 | 10 | phi=lat*pi/180 11 | x=sin(phi) 12 | grv=gamma*(1+(c1*x**2)+(c2*x**4)+(c3*x**6)+(c4*x**8)) 13 | !print *,'grav=',grv,lat 14 | end function grv 15 | 16 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/julday.f90: -------------------------------------------------------------------------------- 1 | FUNCTION julday(mm,id,iyyy) 2 | USE nrtype; USE nrutil, ONLY : nrerror 3 | IMPLICIT NONE 4 | INTEGER(I4B), INTENT(IN) :: mm,id,iyyy 5 | INTEGER(I4B) :: julday 6 | INTEGER(I4B), PARAMETER :: IGREG=15+31*(10+12*1582) 7 | INTEGER(I4B) :: ja,jm,jy 8 | jy=iyyy 9 | if (jy == 0) call nrerror('julday: there is no year zero') 10 | if (jy < 0) jy=jy+1 11 | if (mm > 2) then 12 | jm=mm+1 13 | else 14 | jy=jy-1 15 | jm=mm+13 16 | end if 17 | julday=floor(365.25_sp*jy)+floor(30.6001_sp*jm)+id+1720995 18 | if (id+31*(mm+12*iyyy) >= IGREG) then 19 | ja=floor(0.01_sp*jy) 20 | julday=julday+2-ja+floor(0.25_sp*ja) 21 | end if 22 | END FUNCTION julday 23 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/nrtype.f90: -------------------------------------------------------------------------------- 1 | MODULE nrtype 2 | INTEGER, PARAMETER :: I4B = SELECTED_INT_KIND(9) 3 | INTEGER, PARAMETER :: I2B = SELECTED_INT_KIND(4) 4 | INTEGER, PARAMETER :: I1B = SELECTED_INT_KIND(2) 5 | INTEGER, PARAMETER :: SP = KIND(1.0) 6 | INTEGER, PARAMETER :: DP = KIND(1.0D0) 7 | INTEGER, PARAMETER :: SPC = KIND((1.0,1.0)) 8 | INTEGER, PARAMETER :: DPC = KIND((1.0D0,1.0D0)) 9 | INTEGER, PARAMETER :: LGT = KIND(.true.) 10 | REAL(SP), PARAMETER :: PI=3.141592653589793238462643383279502884197_sp 11 | REAL(SP), PARAMETER :: PIO2=1.57079632679489661923132169163975144209858_sp 12 | REAL(SP), PARAMETER :: TWOPI=6.283185307179586476925286766559005768394_sp 13 | REAL(SP), PARAMETER :: SQRT2=1.41421356237309504880168872420969807856967_sp 14 | REAL(SP), PARAMETER :: EULER=0.5772156649015328606065120900824024310422_sp 15 | REAL(DP), PARAMETER :: PI_D=3.141592653589793238462643383279502884197_dp 16 | REAL(DP), PARAMETER :: PIO2_D=1.57079632679489661923132169163975144209858_dp 17 | REAL(DP), PARAMETER :: TWOPI_D=6.283185307179586476925286766559005768394_dp 18 | TYPE sprs2_sp 19 | INTEGER(I4B) :: n,len 20 | REAL(SP), DIMENSION(:), POINTER :: val 21 | INTEGER(I4B), DIMENSION(:), POINTER :: irow 22 | INTEGER(I4B), DIMENSION(:), POINTER :: jcol 23 | END TYPE sprs2_sp 24 | TYPE sprs2_dp 25 | INTEGER(I4B) :: n,len 26 | REAL(DP), DIMENSION(:), POINTER :: val 27 | INTEGER(I4B), DIMENSION(:), POINTER :: irow 28 | INTEGER(I4B), DIMENSION(:), POINTER :: jcol 29 | END TYPE sprs2_dp 30 | END MODULE nrtype 31 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/psit_30.F90: -------------------------------------------------------------------------------- 1 | 2 | function psit_30(zet) 3 | x=(1.-(15*zet))**.5 4 | psik=2*log((1+x)/2) 5 | x=(1.-(34.15*zet))**.3333 6 | psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 7 | f=zet*zet/(1+zet*zet) 8 | psit_30=(1-f)*psik+f*psic 9 | 10 | if(zet>0)then 11 | c=min(50.,.35*zet) 12 | psit_30=-((1.+2./3.*zet)**1.5+.6667*(zet-14.28)/exp(c)+8.525) 13 | endif 14 | end FUNCTION psit_30 15 | 16 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/psiu_30.F90: -------------------------------------------------------------------------------- 1 | 2 | function psiuo(zet) 3 | x=(1.-15.*zet)**.25 4 | psik=2.*log((1.+x)/2.)+log((1.+x*x)/2.)-2.*atan(x)+2.*atan(1.) 5 | x=(1.-10.15*zet)**.3333 6 | psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 7 | f=zet*zet/(1+zet*zet) 8 | psiuo=(1-f)*psik+f*psic 9 | if(zet>0)then 10 | c=min(50.,.35*zet) 11 | psiuo=-((1+1.0*zet)**1.0+.667*(zet-14.28)/exp(c)+8.525) 12 | endif 13 | END FUNCTION psiuo 14 | -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/qsat.F90: -------------------------------------------------------------------------------- 1 | function qsat(y) 2 | real :: y(2) 3 | x=y(1) !temp 4 | p=y(2) !pressure 5 | es=6.112*exp(17.502*x/(x+241.0))*(1.0007+3.46e-6*p) 6 | qsat=es*622./(p-.378*es) 7 | end function qsat -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/qsee.F90: -------------------------------------------------------------------------------- 1 | function qsee(ts,Pa) 2 | real :: ts,Pa 3 | x=ts 4 | p=Pa 5 | es=6.112*exp(17.502*x/(x+240.97))*.98*(1.0007+3.46e-6*p) 6 | qsee=es*621.97/(p-.378*es) 7 | end function -------------------------------------------------------------------------------- /Fortran/COARE3.0/f90/test3_0.txt: -------------------------------------------------------------------------------- 1 | 19921125132100.00 4.70 29.00 27.70 17.60 0.00 428.00 0.00 -1.73 156.07 29.15 2 | 19921125141200.00 4.10 29.00 27.70 17.70 0.00 429.00 0.00 -1.73 156.06 29.15 3 | 19921125150300.00 4.30 29.00 27.80 17.80 0.00 422.00 0.00 -1.73 156.06 29.15 4 | 19921125155500.00 4.70 29.00 27.80 17.60 0.00 412.00 0.00 -1.73 156.05 29.15 5 | 19921125164600.00 3.70 29.00 27.70 17.30 0.00 413.00 0.00 -1.73 156.04 29.16 6 | 19921125173800.00 5.10 29.00 27.30 17.60 0.00 419.00 0.00 -1.73 156.02 29.16 7 | 19921125182900.00 2.50 29.00 27.50 17.90 0.00 425.00 0.00 -1.73 156.01 29.16 8 | 19921125192000.00 3.80 29.00 27.90 17.70 50.00 427.00 0.00 -1.73 156.00 29.15 9 | 19921125201200.00 4.80 29.00 28.00 17.60 249.00 428.00 0.00 -1.73 156.00 29.14 10 | 19921125210500.00 3.90 29.00 27.80 18.30 386.00 422.00 0.00 -1.73 155.99 29.13 11 | 19921125221900.00 4.60 29.10 27.90 17.60 633.00 413.00 0.00 -1.73 155.99 29.14 12 | 19921125232700.00 5.20 29.20 28.00 18.00 881.00 409.00 0.00 -1.73 155.99 29.14 13 | 19921126001900.00 4.40 29.30 28.10 18.10 883.00 414.00 0.00 -1.73 155.98 29.20 14 | 19921126011000.00 4.00 29.30 28.10 18.60 853.00 420.00 0.00 -1.73 155.97 29.27 15 | 19921126022200.00 4.80 29.50 28.50 17.90 842.00 417.00 0.00 -1.73 155.97 29.26 16 | 19921126031300.00 4.80 29.50 28.40 18.10 779.00 411.00 0.00 -1.72 155.97 29.42 17 | 19921126041600.00 4.30 29.60 28.50 18.40 513.00 423.00 0.00 -1.72 155.96 29.59 18 | 19921126050700.00 4.40 29.50 28.60 18.90 362.00 422.00 0.00 -1.72 155.96 29.59 19 | 19921126055900.00 4.40 29.30 28.50 18.80 171.00 415.00 0.00 -1.72 155.96 29.50 20 | 19921126065500.00 4.10 29.30 28.50 17.90 26.00 410.00 0.00 -1.72 155.96 29.37 21 | 19921126074700.00 3.90 29.20 28.50 17.60 0.00 410.00 0.00 -1.72 155.95 29.37 22 | 19921126083800.00 3.20 29.30 28.50 17.80 0.00 410.00 0.00 -1.72 155.95 29.35 23 | 19921126093000.00 2.20 29.30 28.60 18.00 0.00 426.00 0.00 -1.72 155.95 29.39 24 | 19921126102100.00 1.90 29.30 28.50 18.00 0.00 414.00 0.00 -1.72 155.94 29.45 25 | 19921126111200.00 1.90 29.30 28.40 18.00 0.00 425.00 0.00 -1.72 155.94 29.42 26 | 19921126120800.00 2.50 29.20 28.40 18.00 0.00 417.00 0.00 -1.72 155.94 29.42 27 | 19921126130000.00 3.00 29.30 28.30 18.10 0.00 408.00 0.00 -1.72 155.94 29.35 28 | 19921126145300.00 2.70 29.20 28.00 18.70 0.00 412.00 0.00 -1.71 156.00 29.41 29 | 19921126154500.00 3.00 29.20 27.90 18.60 0.00 409.00 0.00 -1.72 156.02 29.31 30 | 19921126163600.00 3.10 29.20 27.90 18.50 0.00 413.00 0.00 -1.72 156.05 29.29 31 | 19921126172700.00 2.50 29.10 28.00 18.30 0.00 414.00 0.00 -1.72 156.07 29.27 32 | 19921126181900.00 1.90 29.10 28.00 18.20 0.00 409.00 0.00 -1.72 156.06 29.26 33 | 19921126191000.00 1.10 29.20 27.90 18.20 25.00 411.00 0.00 -1.72 156.06 29.27 34 | 19921126200100.00 0.80 29.20 28.00 18.40 110.00 414.00 0.00 -1.72 156.04 29.27 35 | 19921126213400.00 0.70 29.30 28.10 18.20 123.00 436.00 0.00 -1.72 156.02 29.29 36 | 19921126222600.00 2.10 29.20 27.30 18.40 116.00 445.00 0.00 -1.72 156.01 29.38 37 | 19921126231700.00 7.90 29.20 25.40 18.20 247.00 436.00 4.80 -1.72 156.00 29.31 38 | 19921127000900.00 6.60 29.30 25.90 17.70 635.00 418.00 0.00 -1.73 156.02 29.33 39 | 19921127010000.00 5.80 29.30 26.70 17.40 486.00 422.00 0.00 -1.73 156.06 29.33 40 | 19921127015100.00 4.80 29.30 26.90 17.50 356.00 429.00 0.00 -1.72 156.06 29.33 41 | 19921127024300.00 4.50 29.20 27.00 17.50 421.00 422.00 0.00 -1.72 156.05 29.36 42 | 19921127033400.00 5.20 29.20 26.80 17.90 191.00 434.00 0.00 -1.72 156.04 29.25 43 | 19921127042500.00 6.90 29.10 25.30 18.20 50.00 437.00 9.40 -1.72 156.04 29.23 44 | 19921127051700.00 5.70 29.10 25.10 17.50 72.00 434.00 1.60 -1.72 156.03 29.23 45 | 19921127060800.00 9.90 29.10 24.70 17.70 18.00 432.00 1.50 -1.72 156.01 29.24 46 | 19921127070000.00 5.20 29.10 25.00 17.60 6.00 429.00 0.00 -1.72 156.01 29.22 47 | 19921127075100.00 4.30 29.10 26.10 16.90 0.00 415.00 0.00 -1.72 155.99 29.22 48 | 19921127084200.00 3.70 29.10 26.70 16.30 0.00 414.00 0.00 -1.72 155.98 29.16 49 | 19921127093400.00 3.30 29.10 27.20 16.10 0.00 410.00 0.00 -1.72 155.98 29.15 50 | 19921127102500.00 3.90 29.00 27.50 16.20 0.00 410.00 0.00 -1.72 155.97 29.14 51 | 19921127113200.00 5.00 29.00 27.50 16.90 0.00 414.00 0.00 -1.72 155.96 29.14 52 | 19921127122600.00 5.90 29.00 27.60 17.30 0.00 415.00 0.00 -1.72 155.95 29.12 53 | 19921127134800.00 4.90 29.00 27.50 18.20 0.00 405.00 0.00 -1.72 155.95 29.11 54 | 19921127143900.00 5.20 29.00 27.60 18.30 0.00 406.00 0.00 -1.72 155.97 29.10 55 | 19921127160400.00 5.40 29.00 27.70 17.70 0.00 413.00 0.00 -1.72 156.01 29.13 56 | 19921127170000.00 4.40 29.00 27.70 17.70 0.00 416.00 0.00 -1.72 156.00 29.14 57 | 19921127175200.00 3.80 29.00 27.70 17.70 0.00 413.00 0.00 -1.73 156.00 29.12 58 | 19921127184300.00 3.10 29.00 27.70 17.60 2.00 406.00 0.00 -1.73 155.98 29.12 59 | 19921127193500.00 2.90 29.00 27.90 17.70 88.00 410.00 0.00 -1.72 156.00 29.12 60 | 19921127202600.00 2.10 29.00 27.90 17.80 276.00 410.00 0.00 -1.72 156.00 29.12 61 | 19921127211700.00 1.90 29.10 27.80 17.80 487.00 406.00 0.00 -1.72 155.99 29.12 62 | 19921127220900.00 1.60 29.20 27.70 17.70 670.00 407.00 0.00 -1.73 155.98 29.13 63 | 19921127230000.00 1.40 29.50 27.40 17.90 810.00 416.00 0.00 -1.74 155.98 29.14 64 | 19921127235200.00 1.10 30.10 27.40 17.80 917.00 410.00 0.00 -1.72 156.01 29.16 65 | 19921128004300.00 1.10 30.60 27.40 17.80 960.00 412.00 0.00 -1.72 156.00 29.14 66 | 19921128022100.00 1.50 30.80 27.70 17.90 939.00 413.00 0.00 -1.72 155.99 29.17 67 | 19921128042600.00 1.20 31.00 28.40 17.80 665.00 411.00 0.00 -1.72 156.00 29.27 68 | 19921128043600.00 1.30 31.00 28.70 17.50 493.00 410.00 0.00 -1.72 156.00 29.47 69 | 19921128052800.00 0.80 30.70 28.90 17.50 301.00 410.00 0.00 -1.72 155.99 29.23 70 | 19921128061900.00 0.60 30.60 28.90 17.60 125.00 411.00 0.00 -1.73 155.99 29.44 71 | 19921128075200.00 1.20 30.20 28.70 17.90 0.00 416.00 0.00 -1.72 156.00 29.27 72 | 19921128084300.00 1.00 30.10 28.70 17.90 0.00 417.00 0.00 -1.72 155.99 29.30 73 | 19921128093500.00 2.60 29.80 28.40 18.20 0.00 413.00 0.00 -1.72 155.99 29.30 74 | 19921128102600.00 1.80 29.50 28.50 17.50 0.00 420.00 0.00 -1.72 155.99 29.35 75 | 19921128111800.00 1.00 29.60 28.60 17.40 0.00 417.00 0.00 -1.72 155.99 29.24 76 | 19921128120900.00 2.80 29.30 28.00 18.80 0.00 411.00 0.00 -1.72 155.99 29.30 77 | 19921128130100.00 2.20 29.50 28.00 18.50 0.00 409.00 0.00 -1.72 155.98 29.56 78 | 19921128135200.00 1.60 29.40 28.10 18.10 0.00 407.00 0.00 -1.72 155.98 29.56 79 | 19921128144400.00 1.40 29.40 28.10 18.00 0.00 407.00 0.00 -1.72 155.97 29.29 80 | 19921128153500.00 1.90 29.20 28.10 17.80 0.00 407.00 0.00 -1.72 155.96 29.26 81 | 19921128162600.00 2.20 29.10 28.00 17.70 0.00 407.00 0.00 -1.72 155.95 29.26 82 | 19921128171800.00 2.30 29.10 28.00 18.00 0.00 406.00 0.00 -1.72 155.94 29.19 83 | 19921128180900.00 1.90 29.00 28.00 18.00 0.00 410.00 0.00 -1.72 155.94 29.13 84 | 19921128190100.00 2.30 29.10 28.00 17.80 14.00 407.00 0.00 -1.72 155.94 29.18 85 | 19921128195200.00 2.20 29.10 28.10 17.90 80.00 408.00 0.00 -1.72 155.97 29.17 86 | 19921128204400.00 1.60 29.20 28.10 17.50 109.00 414.00 0.00 -1.72 155.99 29.17 87 | 19921128213500.00 1.90 29.40 28.10 17.60 278.00 430.00 0.00 -1.71 156.02 29.40 88 | 19921128222600.00 1.20 29.60 27.20 18.50 614.00 425.00 0.00 -1.71 156.04 29.52 89 | 19921128231800.00 1.10 29.90 27.30 18.60 719.00 426.00 0.00 -1.71 156.05 29.52 90 | 19921129000900.00 0.50 30.40 27.10 18.40 930.00 415.00 0.00 -1.71 156.04 29.58 91 | 19921129010100.00 2.60 30.50 27.80 18.30 629.00 435.00 0.00 -1.71 156.04 29.49 92 | 19921129015200.00 2.50 30.10 27.70 17.90 838.00 418.00 0.00 -1.71 156.03 29.41 93 | 19921129024400.00 1.70 30.50 28.20 18.00 522.00 432.00 0.00 -1.71 156.03 29.41 94 | 19921129033500.00 2.10 30.30 28.50 17.70 745.00 413.00 0.00 -1.71 156.02 29.37 95 | 19921129042600.00 2.40 30.30 28.80 17.60 565.00 411.00 0.00 -1.71 156.01 29.23 96 | 19921129051800.00 2.10 30.10 28.80 17.80 209.00 430.00 0.00 -1.71 156.00 29.23 97 | 19921129060900.00 1.60 29.90 28.10 18.30 24.00 448.00 0.00 -1.72 155.98 29.32 98 | 19921129070100.00 3.70 30.00 26.60 17.90 1.00 445.00 6.50 -1.72 155.97 29.26 99 | 19921129075200.00 2.10 29.50 25.60 17.10 0.00 441.00 6.60 -1.72 155.97 29.46 100 | 19921129091700.00 2.20 29.80 27.30 17.10 0.00 410.00 0.00 -1.72 155.95 29.34 101 | 19921129100800.00 3.60 29.70 28.10 18.10 0.00 408.00 0.00 -1.72 155.95 29.33 102 | 19921129110000.00 3.20 29.40 28.20 18.40 0.00 409.00 0.00 -1.72 155.94 29.23 103 | 19921129115500.00 2.50 29.30 28.20 18.30 0.00 409.00 0.00 -1.72 155.95 29.23 104 | 19921129124700.00 2.60 29.20 28.10 18.30 0.00 407.00 0.00 -1.72 155.97 29.18 105 | 19921129133800.00 2.10 29.30 28.00 18.20 0.00 406.00 0.00 -1.72 156.00 29.40 106 | 19921129142900.00 2.10 29.50 28.00 18.20 0.00 405.00 0.00 -1.72 156.02 29.40 107 | 19921129153100.00 2.40 29.70 28.00 18.20 0.00 407.00 0.00 -1.72 156.05 29.63 108 | 19921129163800.00 3.00 29.60 28.00 18.00 0.00 411.00 0.00 -1.71 156.07 29.57 109 | 19921129173000.00 3.40 29.50 27.90 18.20 0.00 414.00 0.00 -1.72 156.06 29.49 110 | 19921129182100.00 3.10 29.40 28.00 18.00 0.00 417.00 0.00 -1.72 156.05 29.42 111 | 19921129191300.00 2.90 29.30 28.00 18.00 44.00 415.00 0.00 -1.72 156.04 29.42 112 | 19921129200400.00 3.20 29.30 27.80 18.10 213.00 418.00 0.00 -1.72 156.03 29.35 113 | 19921129205500.00 2.90 29.30 28.10 17.90 340.00 407.00 0.00 -1.72 156.02 29.35 114 | 19921129214700.00 2.40 29.40 28.00 17.90 597.00 405.00 0.00 -1.72 156.01 29.35 115 | 19921129223800.00 2.40 29.60 27.90 17.90 766.00 407.00 0.00 -1.72 156.00 29.37 116 | 19921129233000.00 2.40 29.80 27.80 17.80 900.00 411.00 0.00 -1.72 156.00 29.31 117 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/PlotCOARE36Errors.m: -------------------------------------------------------------------------------- 1 | clear all; close all; 2 | 3 | % Set this to true to output plots to png files. 4 | output_plots = false; 5 | 6 | fid = fopen('test_36_output_matlab_072821.txt','r'); 7 | fgetl(fid); 8 | a = reshape(fscanf(fid,'%g'), [21 116]); 9 | 10 | fid = fopen('test_36_output_f90coolskin.txt','r'); 11 | fgetl(fid) 12 | b = fscanf(fid,'%g'); disp(size(b)) 13 | b = reshape(b, [21 116]); 14 | b(b==-999999) = NaN; 15 | b(7,:) = 1e3*b(7,:); % qsr --> g/kg 16 | 17 | abserr = abs((b-a)); 18 | relerr = abs((b-a)./a); 19 | 20 | vv = {'usr','tau','hsb','hlb','hlwebb','tsr','qsr','zot','zoq','Cd','Ch','Ce','L','zet','dter','dqer','tkt','RF','Cdn10','Chn10','Cen10'}; 21 | Nvar = length(vv); 22 | gg = {[1 2],[3 4],[6 7],[8 9],[10 11 12],[13 14],[15 17],[19 20 21]} 23 | 24 | for n = 1:length(gg) 25 | varind = gg{n} 26 | for ii = 1:4 27 | expind = [1:29]+29*(ii-1); 28 | close all 29 | figure; clf 30 | subplot(211); plot(expind,abserr(varind,expind),'-o'); 31 | legend(vv{varind}); ylabel('|error|'); 32 | title('coare36flux\_coolskin vs coare36vn_zrf.m') 33 | subplot(212); plot(expind,relerr(varind,expind),'-o'); 34 | ylabel('|rel error|'); 35 | xlabel('experiment #') 36 | set(gca,'XMinorTick','on') 37 | 38 | fname = sprintf('Figures/COARE36CoolSkinCheckAgainstMatlabv36_%.2d_Exp%.3d-%.3d_%s.png', ... 39 | n,expind(1),expind(end),datestr(today,['yyyy-mm-' ... 40 | 'dd'])); 41 | if output_plots; eval(['print -dpng -r400 ' fname]); end 42 | end 43 | end -------------------------------------------------------------------------------- /Fortran/COARE3.6/README.md: -------------------------------------------------------------------------------- 1 | This repository provides a fortran implementation of the COARE3.6 algorithm for the computation of surface fluxes of momentum, heat and moisture over oceans. Within the file module_coare36_model.f90, the algorithm is implemented in two subroutines: 2 | - coare36flux_coolskin, which assumes that an ocean bulk temperature is input in ts. This subroutine will compute a skin temperature that accounts for the heating/cooling of the surface by radiative, sensible and latent heat fluxes. 3 | - coare36flux, assumes that a skin temperature is input in ts and only computes the surface energy fluxes. 4 | 5 | This repository includes several files that have been extracted from a preliminary implementation in NOAA's Unified Forecast System (UFS), and the two model_coare36*f90 files are intended for use in that model. 6 | 7 | The current versions of these files have been verified against a matlab implementation of COARE3.6 in coare36vn_zrf.m. Sample output from the matlab code is provided in test_36_output_matlab_072821.txt. Do note that acceleration due to gravity was fixed at 9.81 m/s2 in that test. The default algorithm allows this to change with latitude. 8 | 9 | The fortran program test_coare_36.f90 is a driver for the test suite in the data file test_35_data.txt. This program may be compiled and run (using the intel compiler) with the script run_test.bash. This program will produce an output file test_36_output_f90coolskin.txt, which may be compared against test_36_output_matlab_072821.txt. An additional matlab script PlotCOARE36Errors.m produces plots of absolute and relative error for many quantities output by the scheme and, optionally, writes them to files in the Figures/ directory. The default version of the algorithm agrees to the matlab version within 1% for most variables. Better agreement can be achieved by decreasing dT_skin_min in module_coare36_parameters.f90 to 1.e-8, which tightens the tolerance for stopping iterations within the (iterative) flux computation. 10 | 11 | Peter Blossey, July 2021 12 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/machine.f90: -------------------------------------------------------------------------------- 1 | module machine 2 | implicit none 3 | private 4 | 5 | integer, parameter :: kind_phys = KIND(1.0) 6 | integer, parameter :: kind_rad = KIND(1.0) 7 | 8 | public :: kind_phys, kind_rad 9 | 10 | end module machine 11 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/module_coare36_parameters.f90: -------------------------------------------------------------------------------- 1 | module module_coare36_parameters 2 | 3 | use machine, only : kind_phys & 4 | ,kind_rad ! for astronomy (date) calculations 5 | 6 | ! air constants and coefficients from the atmospehric model 7 | use physcons, only: & 8 | eps => con_eps & 9 | ,cp_a => con_cp & !< spec heat air @p (j/kg/k) 10 | ,epsm1 => con_epsm1 & 11 | ,sigma_r => con_sbc & !< stefan-boltzmann (w/m2/k4) 12 | ,omega => con_omega & !< ang vel of earth (1/s) 13 | ,rvrdm1 => con_fvirt & 14 | ,rd => con_rd & 15 | ,rocp => con_rocp & !< r/cp 16 | ,Rgas => con_rd & ! gas constant air ( J/kg/K ) 17 | ,cpa => con_cp & ! spec heat air at p ( J/kg/K ) 18 | ,T2K => con_t0c & ! temp at 0C (K) 19 | ,rhow => con_rhw0 & ! sea water reference density ( kg/m3 ) 20 | ,pi => con_pi 21 | 22 | 23 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 24 | 25 | public 26 | 27 | real (kind=kind_phys), parameter :: & 28 | !%*********** set constants ********************************************** 29 | zref = 10., & 30 | Beta = 1.2, & 31 | von = 0.4, & 32 | fdg = 1.00, & !% Turbulent Prandtl number 33 | !bloss(Defined above) T2K = 273.16, & 34 | !%*********** air constants ********************************************** 35 | !bloss(Defined above) Rgas = 287.1, & 36 | !bloss(Defined above) cpa = 1004.67, & 37 | !%*********** cool skin constants *************************************** 38 | !%%% includes salinity dependent thermal expansion coeff for water 39 | !%%%%%%%%%%%%%%%%%%% 40 | bets = 7.5e-4, & !% salintity expansion coeff; assumes beta independent of 41 | ! temperature 42 | !%%%% see "Computing the seater expansion coefficients directly from the 43 | !%%%% 1980 equation of state". J. Lillibridge, J.Atmos.Oceanic.Tech, 1980. 44 | cpw = 4000., & 45 | !bloss(Defined above) rhow = 1022., & 46 | visw = 1.e-6, & 47 | tcw = 0.6, & 48 | dT_skin_min = 0.001, & ! minimum value for cool-skin temperature 49 | ! depression change 50 | ! use it for abs(dT_skin-dT_skin_pre) criterion 51 | ! for especaping loop 52 | lw_emiss = 0.97, & ! longwave emissivity 53 | sw_onema = 0.945 ! 1-[shortwave albedo] 54 | 55 | end module module_coare36_parameters 56 | 57 | 58 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/physcons.F90: -------------------------------------------------------------------------------- 1 | !> \file physcons.f 2 | !! This file contains module physcons 3 | 4 | ! ========================================================== !!!!! 5 | ! module 'physcons' description !!!!! 6 | ! ========================================================== !!!!! 7 | ! ! 8 | ! this module contains some the most frequently used math and ! 9 | ! physics constatns for gcm models. ! 10 | ! ! 11 | ! references: ! 12 | ! as set in NMC handbook from Smithsonian tables. ! 13 | ! ! 14 | ! modification history: ! 15 | ! ! 16 | ! 1990-04-30 g and rd are made consistent with NWS usage ! 17 | ! 2001-10-22 g made consistent with SI usage ! 18 | ! 2005-04-13 added molecular weights for gases - y-t hou ! 19 | ! 2013-07-12 added temperature for homogen. nuc. for ice. - R.sun ! 20 | ! ! 21 | ! external modules referenced: ! 22 | ! ! 23 | ! 'module machine' in 'machine.f' ! 24 | ! ! 25 | ! ! 26 | !!!!! ========================================================== !!!!! 27 | !!!!! end descriptions !!!!! 28 | !!!!! ========================================================== !!!!! 29 | 30 | !> \ingroup rad 31 | !! \defgroup physcons physcons 32 | !! This module contains some of the most frequently used math and physics 33 | !! constants for GCM models. 34 | !! @{ 35 | !========================================! 36 | module physcons ! 37 | !........................................! 38 | ! 39 | use machine, only : kind_phys 40 | ! 41 | implicit none 42 | ! 43 | public 44 | 45 | !> \name Math constants 46 | 47 | !> pi 48 | ! real(kind=kind_phys),parameter:: con_pi =3.1415926535897931 49 | real(kind=kind_phys),parameter:: con_pi =4.0d0*atan(1.0d0) 50 | !> square root of 2 51 | real(kind=kind_phys),parameter:: con_sqrt2 =1.414214e+0_kind_phys 52 | !> square root of 3 53 | real(kind=kind_phys),parameter:: con_sqrt3 =1.732051e+0_kind_phys 54 | 55 | !> \name Geophysics/Astronomy constants 56 | 57 | !> radius of earth (m) 58 | real(kind=kind_phys),parameter:: con_rerth =6.3712e+6_kind_phys 59 | !> gravity (\f$m/s^{2}\f$) 60 | real(kind=kind_phys),parameter:: con_g =9.80665e+0_kind_phys 61 | !> ang vel of earth (\f$s^{-1}\f$) 62 | real(kind=kind_phys),parameter:: con_omega =7.2921e-5_kind_phys 63 | !> std atms pressure (pa) 64 | real(kind=kind_phys),parameter:: con_p0 =1.01325e5_kind_phys 65 | ! real(kind=kind_phys),parameter:: con_solr =1.36822e+3_kind_phys ! solar constant (W/m2)-aer(2001) 66 | !> solar constant (\f$W/m^{2}\f$)-liu(2002) 67 | real(kind=kind_phys),parameter:: con_solr_old =1.3660e+3_kind_phys 68 | !> solar constant (\f$W/m^{2}\f$)-nasa-sorce Tim(2008) 69 | real(kind=kind_phys),parameter:: con_solr =1.3608e+3_kind_phys 70 | ! real(kind=kind_phys),parameter:: con_solr =1.36742732e+3_kind_phys ! solar constant (W/m2)-gfdl(1989) - OPR as of Jan 2006 71 | 72 | !> \name Thermodynamics constants 73 | 74 | !> molar gas constant (\f$J/mol/K\f$) 75 | real(kind=kind_phys),parameter:: con_rgas =8.314472_kind_phys 76 | !> gas constant air (\f$J/kg/K\f$) 77 | real(kind=kind_phys),parameter:: con_rd =2.8705e+2_kind_phys 78 | !> gas constant H2O (\f$J/kg/K\f$) 79 | real(kind=kind_phys),parameter:: con_rv =4.6150e+2_kind_phys 80 | !> spec heat air at p (\f$J/kg/K\f$) 81 | real(kind=kind_phys),parameter:: con_cp =1.0046e+3_kind_phys 82 | !> spec heat air at v (\f$J/kg/K\f$) 83 | real(kind=kind_phys),parameter:: con_cv =7.1760e+2_kind_phys 84 | !> spec heat H2O gas (\f$J/kg/K\f$) 85 | real(kind=kind_phys),parameter:: con_cvap =1.8460e+3_kind_phys 86 | !> spec heat H2O liq (\f$J/kg/K\f$) 87 | real(kind=kind_phys),parameter:: con_cliq =4.1855e+3_kind_phys 88 | !> spec heat H2O ice (\f$J/kg/K\f$) 89 | real(kind=kind_phys),parameter:: con_csol =2.1060e+3_kind_phys 90 | !> lat heat H2O cond (\f$J/kg\f$) 91 | real(kind=kind_phys),parameter:: con_hvap =2.5000e+6_kind_phys 92 | ! real(kind=kind_phys),parameter:: con_hvap =2.5010e+6_kind_phys ! from AMS 93 | !> lat heat H2O fusion (\f$J/kg\f$) 94 | real(kind=kind_phys),parameter:: con_hfus =3.3358e+5_kind_phys 95 | ! real(kind=kind_phys),parameter:: con_hfus =3.3370e+5_kind_phys ! from AMS 96 | !> pres at H2O 3pt (Pa) 97 | real(kind=kind_phys),parameter:: con_psat =6.1078e+2_kind_phys 98 | !> temp at 0C (K) 99 | real(kind=kind_phys),parameter:: con_t0c =2.7315e+2_kind_phys 100 | !> temp at H2O 3pt (K) 101 | real(kind=kind_phys),parameter:: con_ttp =2.7316e+2_kind_phys 102 | !> temp freezing sea (K) 103 | real(kind=kind_phys),parameter:: con_tice =2.7120e+2_kind_phys 104 | !> joules per calorie 105 | real(kind=kind_phys),parameter:: con_jcal =4.1855E+0_kind_phys 106 | !> sea water reference density (\f$kg/m^{3}\f$) 107 | real(kind=kind_phys),parameter:: con_rhw0 =1022.0_kind_phys 108 | !> min q for computing precip type 109 | real(kind=kind_phys),parameter:: con_epsq =1.0E-12_kind_phys 110 | 111 | !> \name Secondary constants 112 | 113 | real(kind=kind_phys),parameter:: con_rocp =con_rd/con_cp 114 | real(kind=kind_phys),parameter:: con_cpor =con_cp/con_rd 115 | real(kind=kind_phys),parameter:: con_rog =con_rd/con_g 116 | real(kind=kind_phys),parameter:: con_fvirt =con_rv/con_rd-1. 117 | real(kind=kind_phys),parameter:: con_eps =con_rd/con_rv 118 | real(kind=kind_phys),parameter:: con_epsm1 =con_rd/con_rv-1. 119 | real(kind=kind_phys),parameter:: con_dldt =con_cvap-con_cliq 120 | real(kind=kind_phys),parameter:: con_xpona =-con_dldt/con_rv 121 | real(kind=kind_phys),parameter:: con_xponb =-con_dldt/con_rv+con_hvap/(con_rv*con_ttp) 122 | 123 | !> \name Other Physics/Chemistry constants (source: 2002 CODATA) 124 | 125 | !> speed of light (\f$m/s\f$) 126 | real(kind=kind_phys),parameter:: con_c =2.99792458e+8_kind_phys 127 | !> planck constant (\f$J/s\f$) 128 | real(kind=kind_phys),parameter:: con_plnk =6.6260693e-34_kind_phys 129 | !> boltzmann constant (\f$J/K\f$) 130 | real(kind=kind_phys),parameter:: con_boltz =1.3806505e-23_kind_phys 131 | !> stefan-boltzmann (\f$W/m^{2}/K^{4}\f$) 132 | real(kind=kind_phys),parameter:: con_sbc =5.670400e-8_kind_phys 133 | !> avogadro constant (\f$mol^{-1}\f$) 134 | real(kind=kind_phys),parameter:: con_avgd =6.0221415e23_kind_phys 135 | !> vol of ideal gas at 273.15K, 101.325kPa (\f$m^{3}/mol\f$) 136 | real(kind=kind_phys),parameter:: con_gasv =22413.996e-6_kind_phys 137 | ! real(kind=kind_phys),parameter:: con_amd =28.970_kind_phys ! molecular wght of dry air (g/mol) 138 | !> molecular wght of dry air (\f$g/mol\f$) 139 | real(kind=kind_phys),parameter:: con_amd =28.9644_kind_phys 140 | !> molecular wght of water vapor (\f$g/mol\f$) 141 | real(kind=kind_phys),parameter:: con_amw =18.0154_kind_phys 142 | !> molecular wght of o3 (\f$g/mol\f$) 143 | real(kind=kind_phys),parameter:: con_amo3 =47.9982_kind_phys 144 | ! real(kind=kind_phys),parameter:: con_amo3 =48.0_kind_phys ! molecular wght of o3 (g/mol) 145 | !> molecular wght of co2 (\f$g/mol\f$) 146 | real(kind=kind_phys),parameter:: con_amco2 =44.011_kind_phys 147 | !> molecular wght of o2 (\f$g/mol\f$) 148 | real(kind=kind_phys),parameter:: con_amo2 =31.9999_kind_phys 149 | !> molecular wght of ch4 (\f$g/mol\f$) 150 | real(kind=kind_phys),parameter:: con_amch4 =16.043_kind_phys 151 | !> molecular wght of n2o (\f$g/mol\f$) 152 | real(kind=kind_phys),parameter:: con_amn2o =44.013_kind_phys 153 | !> temperature the H.G.Nuc. ice starts 154 | real(kind=kind_phys), parameter:: con_thgni =-38.15_kind_phys 155 | 156 | !!$#ifdef CCPP 157 | !!$!> minimum ice concentration 158 | !!$ real(kind=kind_phys),parameter:: cimin =0.15 159 | !!$#endif 160 | !> minimum aerosol concentration 161 | real(kind=kind_phys),parameter:: qamin = 1.e-16_kind_phys 162 | 163 | !> \name Miscellaneous physics related constants (Moorthi - Jul 2014) 164 | 165 | ! integer, parameter :: max_lon=16000, max_lat=8000, min_lon=192, min_lat=94 166 | ! integer, parameter :: max_lon=5000, max_lat=2500, min_lon=192, min_lat=94 ! current opr 167 | ! integer, parameter :: max_lon=5000, max_lat=2000, min_lon=192, min_lat=94 ! current opr 168 | ! integer, parameter :: max_lon=8000, max_lat=4000, min_lon=192, min_lat=94 ! current opr 169 | ! real(kind=kind_phys), parameter:: rlapse = 0.65e-2, rhc_max = 0.9999 ! current opr 170 | ! real(kind=kind_phys), parameter:: rlapse = 0.65e-2, rhc_max = 0.9999999 ! new 171 | ! real(kind=kind_phys), parameter:: rlapse = 0.65e-2, rhc_max = 0.9900 172 | 173 | real(kind=kind_phys), parameter:: rlapse = 0.65e-2_kind_phys 174 | real(kind=kind_phys), parameter:: cb2mb = 10.0_kind_phys, pa2mb = 0.01_kind_phys 175 | ! for wsm6 176 | real(kind=kind_phys),parameter:: rhowater = 1000._kind_phys ! density of water (kg/m^3) 177 | real(kind=kind_phys),parameter:: rhosnow = 100._kind_phys ! density of snow (kg/m^3) 178 | real(kind=kind_phys),parameter:: rhoair = 1.28_kind_phys ! density of air near surface (kg/m^3) 179 | 180 | !!$#ifndef CCPP 181 | !!$ real(kind=kind_phys) :: dxmax, dxmin, dxinv, rhc_max 182 | !!$! For min/max hourly rh02m and t02m 183 | !!$ real(kind=kind_phys),parameter :: PQ0 = 379.90516E0_kind_phys 184 | !!$ real(kind=kind_phys),parameter :: A2A = 17.2693882_kind_phys 185 | !!$ real(kind=kind_phys),parameter :: A3 = 273.16_kind_phys 186 | !!$ real(kind=kind_phys),parameter :: A4 = 35.86_kind_phys 187 | !!$ real(kind=kind_phys),parameter :: RHmin = 1.0E-6_kind_phys 188 | !!$#endif 189 | 190 | !........................................! 191 | end module physcons ! 192 | !========================================! 193 | !! @} 194 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/run_test.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Running test_coare_36, driven by test cases in test_35_data.txt" 4 | 5 | rm -f *mod *.o test_coare_36 6 | ifort -no-wrap-margin -o test_coare_36 machine.f90 physcons.F90 module_coare36_parameters.f90 module_coare36_model.f90 test_coare_36.f90 7 | nice ./test_coare_36 > log_coare_36_output 8 | 9 | 10 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/test_35_data.txt: -------------------------------------------------------------------------------- 1 | u zu t zt rh zq P ts Rs Rl lat zi rain cp sigH 2 | 4.70 16.00 27.70 16.00 75.21 16.00 1008.00 29.15 0.00 428.00 -1.73 600.00 0.00 -1.0 -1.0 3 | 4.10 16.00 27.70 16.00 75.63 16.00 1008.00 29.15 0.00 429.00 -1.73 600.00 0.00 -1.0 -1.0 4 | 4.30 16.00 27.80 16.00 75.61 16.00 1008.00 29.15 0.00 422.00 -1.73 600.00 0.00 -1.0 -1.0 5 | 4.70 16.00 27.80 16.00 74.77 16.00 1008.00 29.15 0.00 412.00 -1.73 600.00 0.00 -1.0 -1.0 6 | 3.70 16.00 27.70 16.00 73.94 16.00 1008.00 29.16 0.00 413.00 -1.73 600.00 0.00 -1.0 -1.0 7 | 5.10 16.00 27.30 16.00 76.99 16.00 1008.00 29.16 0.00 419.00 -1.73 600.00 0.00 -1.0 -1.0 8 | 2.50 16.00 27.50 16.00 77.38 16.00 1008.00 29.16 0.00 425.00 -1.73 600.00 0.00 -1.0 -1.0 9 | 3.80 16.00 27.90 16.00 74.75 16.00 1008.00 29.15 50.00 427.00 -1.73 600.00 0.00 -1.0 -1.0 10 | 4.80 16.00 28.00 16.00 73.90 16.00 1008.00 29.14 249.00 428.00 -1.73 600.00 0.00 -1.0 -1.0 11 | 3.90 16.00 27.80 16.00 77.71 16.00 1008.00 29.13 386.00 422.00 -1.73 600.00 0.00 -1.0 -1.0 12 | 4.60 16.00 27.90 16.00 74.34 16.00 1008.00 29.14 633.00 413.00 -1.73 600.00 0.00 -1.0 -1.0 13 | 5.20 16.00 28.00 16.00 75.56 16.00 1008.00 29.14 881.00 409.00 -1.73 600.00 0.00 -1.0 -1.0 14 | 4.40 16.00 28.10 16.00 75.54 16.00 1008.00 29.20 883.00 414.00 -1.73 600.00 0.00 -1.0 -1.0 15 | 4.00 16.00 28.10 16.00 77.60 16.00 1008.00 29.27 853.00 420.00 -1.73 600.00 0.00 -1.0 -1.0 16 | 4.80 16.00 28.50 16.00 72.99 16.00 1008.00 29.26 842.00 417.00 -1.73 600.00 0.00 -1.0 -1.0 17 | 4.80 16.00 28.40 16.00 74.23 16.00 1008.00 29.42 779.00 411.00 -1.72 600.00 0.00 -1.0 -1.0 18 | 4.30 16.00 28.50 16.00 75.01 16.00 1008.00 29.59 513.00 423.00 -1.72 600.00 0.00 -1.0 -1.0 19 | 4.40 16.00 28.60 16.00 76.58 16.00 1008.00 29.59 362.00 422.00 -1.72 600.00 0.00 -1.0 -1.0 20 | 4.40 16.00 28.50 16.00 76.62 16.00 1008.00 29.50 171.00 415.00 -1.72 600.00 0.00 -1.0 -1.0 21 | 4.10 16.00 28.50 16.00 72.99 16.00 1008.00 29.37 26.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 22 | 3.90 16.00 28.50 16.00 71.78 16.00 1008.00 29.37 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 23 | 3.20 16.00 28.50 16.00 72.59 16.00 1008.00 29.35 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 24 | 2.20 16.00 28.60 16.00 72.97 16.00 1008.00 29.39 0.00 426.00 -1.72 600.00 0.00 -1.0 -1.0 25 | 1.90 16.00 28.50 16.00 73.40 16.00 1008.00 29.45 0.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 26 | 1.90 16.00 28.40 16.00 73.83 16.00 1008.00 29.42 0.00 425.00 -1.72 600.00 0.00 -1.0 -1.0 27 | 2.50 16.00 28.40 16.00 73.83 16.00 1008.00 29.42 0.00 417.00 -1.72 600.00 0.00 -1.0 -1.0 28 | 3.00 16.00 28.30 16.00 74.66 16.00 1008.00 29.35 0.00 408.00 -1.72 600.00 0.00 -1.0 -1.0 29 | 2.70 16.00 28.00 16.00 78.47 16.00 1008.00 29.41 0.00 412.00 -1.71 600.00 0.00 -1.0 -1.0 30 | 3.00 16.00 27.90 16.00 78.51 16.00 1008.00 29.31 0.00 409.00 -1.72 600.00 0.00 -1.0 -1.0 31 | 3.10 16.00 27.90 16.00 78.09 16.00 1008.00 29.29 0.00 413.00 -1.72 600.00 0.00 -1.0 -1.0 32 | 2.50 16.00 28.00 16.00 76.81 16.00 1008.00 29.27 0.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 33 | 1.90 16.00 28.00 16.00 76.40 16.00 1008.00 29.26 0.00 409.00 -1.72 600.00 0.00 -1.0 -1.0 34 | 1.10 16.00 27.90 16.00 76.84 16.00 1008.00 29.27 25.00 411.00 -1.72 600.00 0.00 -1.0 -1.0 35 | 0.80 16.00 28.00 16.00 77.23 16.00 1008.00 29.27 110.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 36 | 0.70 16.00 28.10 16.00 75.95 16.00 1008.00 29.29 123.00 436.00 -1.72 600.00 0.00 -1.0 -1.0 37 | 2.10 16.00 27.30 16.00 80.45 16.00 1008.00 29.38 116.00 445.00 -1.72 600.00 0.00 -1.0 -1.0 38 | 7.90 16.00 25.40 16.00 89.03 16.00 1008.00 29.31 247.00 436.00 -1.72 600.00 4.80 -1.0 -1.0 39 | 6.60 16.00 25.90 16.00 84.08 16.00 1008.00 29.33 635.00 418.00 -1.73 600.00 0.00 -1.0 -1.0 40 | 5.80 16.00 26.70 16.00 78.85 16.00 1008.00 29.33 486.00 422.00 -1.73 600.00 0.00 -1.0 -1.0 41 | 4.80 16.00 26.90 16.00 78.37 16.00 1008.00 29.33 356.00 429.00 -1.72 600.00 0.00 -1.0 -1.0 42 | 4.50 16.00 27.00 16.00 77.92 16.00 1008.00 29.36 421.00 422.00 -1.72 600.00 0.00 -1.0 -1.0 43 | 5.20 16.00 26.80 16.00 80.62 16.00 1008.00 29.25 191.00 434.00 -1.72 600.00 0.00 -1.0 -1.0 44 | 6.90 16.00 25.30 16.00 89.56 16.00 1008.00 29.23 50.00 437.00 -1.72 600.00 9.40 -1.0 -1.0 45 | 5.70 16.00 25.10 16.00 87.18 16.00 1008.00 29.23 72.00 434.00 -1.72 600.00 1.60 -1.0 -1.0 46 | 9.90 16.00 24.70 16.00 90.30 16.00 1008.00 29.24 18.00 432.00 -1.72 600.00 1.50 -1.0 -1.0 47 | 5.20 16.00 25.00 16.00 88.20 16.00 1008.00 29.22 6.00 429.00 -1.72 600.00 0.00 -1.0 -1.0 48 | 4.30 16.00 26.10 16.00 79.37 16.00 1008.00 29.22 0.00 415.00 -1.72 600.00 0.00 -1.0 -1.0 49 | 3.70 16.00 26.70 16.00 73.92 16.00 1008.00 29.16 0.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 50 | 3.30 16.00 27.20 16.00 70.91 16.00 1008.00 29.15 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 51 | 3.90 16.00 27.50 16.00 70.10 16.00 1008.00 29.14 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 52 | 5.00 16.00 27.50 16.00 73.10 16.00 1008.00 29.14 0.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 53 | 5.90 16.00 27.60 16.00 74.37 16.00 1008.00 29.12 0.00 415.00 -1.72 600.00 0.00 -1.0 -1.0 54 | 4.90 16.00 27.50 16.00 78.66 16.00 1008.00 29.11 0.00 405.00 -1.72 600.00 0.00 -1.0 -1.0 55 | 5.20 16.00 27.60 16.00 78.62 16.00 1008.00 29.10 0.00 406.00 -1.72 600.00 0.00 -1.0 -1.0 56 | 5.40 16.00 27.70 16.00 75.63 16.00 1008.00 29.13 0.00 413.00 -1.72 600.00 0.00 -1.0 -1.0 57 | 4.40 16.00 27.70 16.00 75.63 16.00 1008.00 29.14 0.00 416.00 -1.72 600.00 0.00 -1.0 -1.0 58 | 3.80 16.00 27.70 16.00 75.63 16.00 1008.00 29.12 0.00 413.00 -1.73 600.00 0.00 -1.0 -1.0 59 | 3.10 16.00 27.70 16.00 75.21 16.00 1008.00 29.12 2.00 406.00 -1.73 600.00 0.00 -1.0 -1.0 60 | 2.90 16.00 27.90 16.00 74.75 16.00 1008.00 29.12 88.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 61 | 2.10 16.00 27.90 16.00 75.17 16.00 1008.00 29.12 276.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 62 | 1.90 16.00 27.80 16.00 75.61 16.00 1008.00 29.12 487.00 406.00 -1.72 600.00 0.00 -1.0 -1.0 63 | 1.60 16.00 27.70 16.00 75.63 16.00 1008.00 29.13 670.00 407.00 -1.73 600.00 0.00 -1.0 -1.0 64 | 1.40 16.00 27.40 16.00 77.83 16.00 1008.00 29.14 810.00 416.00 -1.74 600.00 0.00 -1.0 -1.0 65 | 1.10 16.00 27.40 16.00 77.40 16.00 1008.00 29.16 917.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 66 | 1.10 16.00 27.40 16.00 77.40 16.00 1008.00 29.14 960.00 412.00 -1.72 600.00 0.00 -1.0 -1.0 67 | 1.50 16.00 27.70 16.00 76.48 16.00 1008.00 29.17 939.00 413.00 -1.72 600.00 0.00 -1.0 -1.0 68 | 1.20 16.00 28.40 16.00 73.01 16.00 1008.00 29.27 665.00 411.00 -1.72 600.00 0.00 -1.0 -1.0 69 | 1.30 16.00 28.70 16.00 70.56 16.00 1008.00 29.47 493.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 70 | 0.80 16.00 28.90 16.00 69.74 16.00 1008.00 29.23 301.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 71 | 0.60 16.00 28.90 16.00 70.14 16.00 1008.00 29.44 125.00 411.00 -1.73 600.00 0.00 -1.0 -1.0 72 | 1.20 16.00 28.70 16.00 72.15 16.00 1008.00 29.27 0.00 416.00 -1.72 600.00 0.00 -1.0 -1.0 73 | 1.00 16.00 28.70 16.00 72.15 16.00 1008.00 29.30 0.00 417.00 -1.72 600.00 0.00 -1.0 -1.0 74 | 2.60 16.00 28.40 16.00 74.64 16.00 1008.00 29.30 0.00 413.00 -1.72 600.00 0.00 -1.0 -1.0 75 | 1.80 16.00 28.50 16.00 71.38 16.00 1008.00 29.35 0.00 420.00 -1.72 600.00 0.00 -1.0 -1.0 76 | 1.00 16.00 28.60 16.00 70.57 16.00 1008.00 29.24 0.00 417.00 -1.72 600.00 0.00 -1.0 -1.0 77 | 2.80 16.00 28.00 16.00 78.89 16.00 1008.00 29.30 0.00 411.00 -1.72 600.00 0.00 -1.0 -1.0 78 | 2.20 16.00 28.00 16.00 77.64 16.00 1008.00 29.56 0.00 409.00 -1.72 600.00 0.00 -1.0 -1.0 79 | 1.60 16.00 28.10 16.00 75.54 16.00 1008.00 29.56 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 80 | 1.40 16.00 28.10 16.00 75.13 16.00 1008.00 29.29 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 81 | 1.90 16.00 28.10 16.00 74.30 16.00 1008.00 29.26 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 82 | 2.20 16.00 28.00 16.00 74.32 16.00 1008.00 29.26 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 83 | 2.30 16.00 28.00 16.00 75.56 16.00 1008.00 29.19 0.00 406.00 -1.72 600.00 0.00 -1.0 -1.0 84 | 1.90 16.00 28.00 16.00 75.56 16.00 1008.00 29.13 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 85 | 2.30 16.00 28.00 16.00 74.73 16.00 1008.00 29.18 14.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 86 | 2.20 16.00 28.10 16.00 74.71 16.00 1008.00 29.17 80.00 408.00 -1.72 600.00 0.00 -1.0 -1.0 87 | 1.60 16.00 28.10 16.00 73.06 16.00 1008.00 29.17 109.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 88 | 1.90 16.00 28.10 16.00 73.47 16.00 1008.00 29.40 278.00 430.00 -1.71 600.00 0.00 -1.0 -1.0 89 | 1.20 16.00 27.20 16.00 81.36 16.00 1008.00 29.52 614.00 425.00 -1.71 600.00 0.00 -1.0 -1.0 90 | 1.10 16.00 27.30 16.00 81.31 16.00 1008.00 29.52 719.00 426.00 -1.71 600.00 0.00 -1.0 -1.0 91 | 0.50 16.00 27.10 16.00 81.40 16.00 1008.00 29.58 930.00 415.00 -1.71 600.00 0.00 -1.0 -1.0 92 | 2.60 16.00 27.80 16.00 77.71 16.00 1008.00 29.49 629.00 435.00 -1.71 600.00 0.00 -1.0 -1.0 93 | 2.50 16.00 27.70 16.00 76.48 16.00 1008.00 29.41 838.00 418.00 -1.71 600.00 0.00 -1.0 -1.0 94 | 1.70 16.00 28.20 16.00 74.69 16.00 1008.00 29.41 522.00 432.00 -1.71 600.00 0.00 -1.0 -1.0 95 | 2.10 16.00 28.50 16.00 72.19 16.00 1008.00 29.37 745.00 413.00 -1.71 600.00 0.00 -1.0 -1.0 96 | 2.40 16.00 28.80 16.00 70.55 16.00 1008.00 29.23 565.00 411.00 -1.71 600.00 0.00 -1.0 -1.0 97 | 2.10 16.00 28.80 16.00 71.34 16.00 1008.00 29.23 209.00 430.00 -1.71 600.00 0.00 -1.0 -1.0 98 | 1.60 16.00 28.10 16.00 76.36 16.00 1008.00 29.32 24.00 448.00 -1.72 600.00 0.00 -1.0 -1.0 99 | 3.70 16.00 26.60 16.00 81.57 16.00 1008.00 29.26 1.00 445.00 -1.72 600.00 6.50 -1.0 -1.0 100 | 2.10 16.00 25.60 16.00 82.71 16.00 1008.00 29.46 0.00 441.00 -1.72 600.00 6.60 -1.0 -1.0 101 | 2.20 16.00 27.30 16.00 74.82 16.00 1008.00 29.34 0.00 410.00 -1.72 600.00 0.00 -1.0 -1.0 102 | 3.60 16.00 28.10 16.00 75.54 16.00 1008.00 29.33 0.00 408.00 -1.72 600.00 0.00 -1.0 -1.0 103 | 3.20 16.00 28.20 16.00 76.33 16.00 1008.00 29.23 0.00 409.00 -1.72 600.00 0.00 -1.0 -1.0 104 | 2.50 16.00 28.20 16.00 75.92 16.00 1008.00 29.23 0.00 409.00 -1.72 600.00 0.00 -1.0 -1.0 105 | 2.60 16.00 28.10 16.00 76.36 16.00 1008.00 29.18 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 106 | 2.10 16.00 28.00 16.00 76.40 16.00 1008.00 29.40 0.00 406.00 -1.72 600.00 0.00 -1.0 -1.0 107 | 2.10 16.00 28.00 16.00 76.40 16.00 1008.00 29.40 0.00 405.00 -1.72 600.00 0.00 -1.0 -1.0 108 | 2.40 16.00 28.00 16.00 76.40 16.00 1008.00 29.63 0.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 109 | 3.00 16.00 28.00 16.00 75.56 16.00 1008.00 29.57 0.00 411.00 -1.71 600.00 0.00 -1.0 -1.0 110 | 3.40 16.00 27.90 16.00 76.84 16.00 1008.00 29.49 0.00 414.00 -1.72 600.00 0.00 -1.0 -1.0 111 | 3.10 16.00 28.00 16.00 75.56 16.00 1008.00 29.42 0.00 417.00 -1.72 600.00 0.00 -1.0 -1.0 112 | 2.90 16.00 28.00 16.00 75.56 16.00 1008.00 29.42 44.00 415.00 -1.72 600.00 0.00 -1.0 -1.0 113 | 3.20 16.00 27.80 16.00 76.87 16.00 1008.00 29.35 213.00 418.00 -1.72 600.00 0.00 -1.0 -1.0 114 | 2.90 16.00 28.10 16.00 74.71 16.00 1008.00 29.35 340.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 115 | 2.40 16.00 28.00 16.00 75.15 16.00 1008.00 29.35 597.00 405.00 -1.72 600.00 0.00 -1.0 -1.0 116 | 2.40 16.00 27.90 16.00 75.59 16.00 1008.00 29.37 766.00 407.00 -1.72 600.00 0.00 -1.0 -1.0 117 | 2.40 16.00 27.80 16.00 75.61 16.00 1008.00 29.31 900.00 411.00 -1.72 600.00 0.00 -1.0 -1.0 118 | -------------------------------------------------------------------------------- /Fortran/COARE3.6/test_coare_36.f90: -------------------------------------------------------------------------------- 1 | program test_coare_36 2 | use machine , only : kind_phys 3 | use coare36_module, only: coare36flux, coare36flux_coolskin 4 | 5 | 6 | implicit none 7 | 8 | real :: zet 9 | integer :: ii 10 | ! input arguments for coare36_flux 11 | real(kind=kind_phys):: u, zu, t, zt, rh, zq, P, ts, & 12 | sw_dn, lw_dn, grav, zi, rain, Ss, cp, latitude, dT_skinx, dz_skin 13 | ! input/output arguments for coare36_flux 14 | real(kind_phys) :: sigH 15 | ! output arguments for coare36_flux 16 | real(kind=kind_phys) :: tau, hsb, hlb, Le, & 17 | sw_net, lw_dn_abs, lw_up 18 | real(kind=kind_phys), dimension(21) :: output_vec, output_vec_python, output_vec_cskin 19 | 20 | open(unit=12,file='test_35_data.txt',form='FORMATTED',action='read') 21 | read(12,*) 22 | open(unit=14,file='../MATLABv3p6/test_36_output_matlab_072821.txt',form='FORMATTED',action='read') 23 | open(unit=15,file='test_36_output_f90coolskin.txt',form='FORMATTED',action='write') 24 | read(14,*) 25 | write(15,*) '# usr tau hsb hlb hlwebb tsr qsr zot zoq Cd Ch Ce L zet dter dqer tkt RF Cdn_10 Chn_10 Cen_10' 26 | do ii = 1,116 27 | write(*,*) 'Running case ', ii 28 | read(12,*) u, zu, t, zt, rh, zq, P, ts, & 29 | sw_dn, lw_dn, latitude, zi, rain, cp, sigH 30 | read(14,*) output_vec_python(1:21) 31 | 32 | grav = 9.81 33 | Ss = 35.5 34 | call coare36flux_coolskin( & 35 | u,zu,t,zt,rh,zq,P,ts,sw_dn,lw_dn,grav,zi,rain,Ss,cp,sigH, & 36 | tau,hsb,hlb,Le,sw_net,lw_dn_abs,lw_up,dT_skinx,dz_skin,output_vec_cskin) 37 | write(15,'(21E14.6)') output_vec_cskin(1:21) 38 | 39 | 40 | ! convert units on fortran output 41 | output_vec_cskin(7) = 1.e3*output_vec_cskin(7) 42 | 43 | write(*,*) 'Values (matlab36, fortran36, fortran36CoolSkin)' 44 | write(*,*) '# usr tau hsb hlb hlwebb tsr qsr zot zoq ' 45 | write(*,'(9E14.6)') output_vec_python(1:9) 46 | write(*,'(21E14.6)') output_vec_cskin(1:9) 47 | write(*,*) 48 | write(*,*) '# Cd Ch Ce L zet dter dqer tkt ' 49 | write(*,'(9E14.6)') output_vec_python(10:17) 50 | write(*,'(21E14.6)') output_vec_cskin(10:17) 51 | 52 | write(*,*) 53 | write(*,*) '# RF Cdn_10 Chn_10 Cen_10' 54 | write(*,'(9E14.6)') output_vec_python(18:21) 55 | write(*,'(21E14.6)') output_vec_cskin(18:21) 56 | 57 | write(*,*) 58 | write(*,*) 'Relative Error (fort36-py35, fort36CoolSkin-py35)' 59 | write(*,*) '# usr tau hsb hlb hlwebb tsr qsr zot zoq ' 60 | write(*,'(21E14.3)') (output_vec_cskin(1:9)-output_vec_python(1:9))/output_vec_python(1:9) 61 | 62 | write(*,*) 63 | write(*,*) '# Cd Ch Ce L zet dter dqer tkt ' 64 | write(*,'(21E14.3)') (output_vec_cskin(10:17)-output_vec_python(10:17))/output_vec_python(10:17) 65 | 66 | write(*,*) 67 | write(*,*) '# RF Cdn_10 Chn_10 Cen_10' 68 | write(*,'(21E14.3)') (output_vec_cskin(18:21)-output_vec_python(18:21))/output_vec_python(18:21) 69 | 70 | end do 71 | 72 | close(unit=12) 73 | close(unit=14) 74 | close(unit=15) 75 | 76 | end program test_coare_36 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 NOAA/OAR/ESRL Physical Sciences Laboratory 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Matlab/COARE3.0/README.md: -------------------------------------------------------------------------------- 1 | 'red_VP_bulk.m' is the main testing program. It loads the input data 'VP_test_data_1.txt', calls the 'coare30vn_ref.m' function, and compares to output files 'VP_test_results_1.txt' 2 | 3 | -------------------------------------------------------------------------------- /Matlab/COARE3.0/VP_test_data_1.txt: -------------------------------------------------------------------------------- 1 | 36739 1012.48534 25.16708364 26.08979066 7.995308555 14.47469522 0.183108502 2 | 36739.125 1012.30467 25.19149769 25.81009686 8.963020594 14.4598682 0.183108502 3 | 36739.25 1013.74998 24.96414187 25.18982664 7.552193487 14.44504119 0.183108502 4 | 36739.375 1015.10496 25.16174307 25.0199962 7.659310146 13.549 0.183108502 5 | 36739.5 1014.9243 24.92904667 25.33997323 6.483773478 12.199 0.183108502 6 | 36739.625 1014.9243 25.50582856 25.05982166 7.693184645 10.849 0.183108502 7 | 36739.75 1014.6533 25.3227232 24.9398875 9.467475971 9.8688 0.183108502 8 | 36739.875 1015.37596 24.80850231 24.84009494 10.37110112 9.789907485 0.183108502 9 | 36740 1015.28563 24.71008318 24.5901558 8.623360077 9.847939445 0.034743789 10 | 36740.125 1015.55662 24.62463401 24.35990051 9.976508983 9.905971405 0.034743789 11 | 36740.25 1016.45994 24.40567052 24.16992845 9.570014995 9.964003364 0.034743789 12 | 36740.375 1016.73094 24.42703281 24.25003715 10.05066667 10.02203532 0.034743789 13 | 36740.5 1017.00194 24.50485259 24.29993342 10.65308344 10.08006728 0.034743789 14 | 36740.625 1016.82127 24.7985841 24.29993342 7.534798474 10.13809924 0.034743789 15 | 36740.75 1016.55028 24.90539556 24.27017876 7.608040634 10.1961312 0.034743789 16 | 36740.875 1016.73094 24.61090111 24.21021168 7.937630354 9.801082056 0.034743789 17 | 36741 1016.18895 24.3446354 24.20014087 7.242745361 9.373669973 0.040954969 18 | 36741.125 1015.82762 24.24926802 24.14978683 7.825020533 8.94625789 0.040954969 19 | 36741.25 1015.91795 24.07913263 24.10996136 9.17176075 8.622225705 0.040954969 20 | 36741.375 1016.09862 24.12490897 24.12003217 8.54920239 8.68376699 0.040954969 21 | 36741.5 1015.46629 24.4346622 24.19007006 8.226021359 8.993961165 0.040954969 22 | 36741.625 1014.83397 24.72152727 24.23996634 6.557931165 9.30415534 0.040954969 23 | 36741.75 1014.74364 24.49035675 24.19007006 4.599618912 9.614349514 0.040954969 24 | 36741.875 1014.56297 24.26300093 24.10996136 8.145454983 9.924543689 0.040954969 25 | 36742 1013.56932 24.24850509 24.06006509 7.309578832 10.23473786 0.029503106 26 | 36742.125 1013.20799 24.00741636 24.04999428 7.772835494 10.54493204 0.029503106 27 | 36742.25 1013.65965 24.02801571 24.01978186 6.334542577 10.36405063 0.029503106 28 | 36742.375 1013.74998 24.27139326 24.15985764 5.947274656 9.373954306 0.029503106 29 | 36742.5 1013.02733 24.46823152 24.31000423 6.308907821 9.271142355 0.029503106 30 | 36742.625 1012.30467 24.67346211 24.36997132 6.81885636 9.168330404 0.029503106 31 | 36742.75 1011.76268 24.38735998 24.29993342 6.595467772 9.065518453 0.029503106 32 | 36742.875 1011.76268 24.48501618 24.26010796 7.713326239 9.177272727 0.029503106 33 | 36743 1010.58836 24.40185582 24.21021168 8.380745422 9.540909091 0 34 | 36743.125 1010.22704 24.54376248 24.14017379 8.151863672 9.904545455 0 35 | 36743.25 1010.85936 24.2408757 24.10996136 8.131722078 10.20244147 0 36 | 36743.375 1011.22069 24.24469039 24.16992845 8.149117091 10.15545455 0 37 | 36743.5 1011.13036 24.50714141 24.29993342 7.617195904 10.23181818 0 38 | 36743.625 1010.76903 24.59716821 24.40018374 7.077950501 10.30818182 0 39 | 36743.75 1011.13036 24.4796756 24.40979678 6.805123455 9.674664537 0 40 | 36743.875 1010.76903 24.39804113 24.38004212 8.28369956 9.475048544 0 41 | 36744 1010.22704 24.48425324 24.45008002 7.978829069 10.07699029 0.014266304 42 | 36744.125 1009.77538 24.4384769 24.40979678 8.731392263 10.67893204 0.014266304 43 | 36744.25 1010.49803 24.48120148 24.38004212 7.02942757 10.86503356 0.014266304 44 | 36744.375 1011.22069 24.46136507 24.47983468 5.867623807 10.12028986 0.014266304 45 | 36744.5 1010.76903 24.58114649 24.64005208 6.894845101 10.43550725 0.014266304 46 | 36744.625 1010.49803 24.62158226 24.72016078 6.67237204 10.75072464 0.014266304 47 | 36744.75 1010.94969 24.54834011 24.66980674 6.288766227 11.18228188 0.014266304 48 | 36744.875 1011.04002 24.55520656 24.70001916 6.520394558 10.78591595 0.014266304 49 | 36745 1010.31737 24.34005777 24.66980674 7.500923975 10.82794181 0.01242236 50 | 36745.125 1010.22704 24.45983919 24.61991046 7.359932817 10.86996767 0.01242236 51 | 36745.25 1010.76903 24.7222902 24.60983965 7.076119447 10.93741611 0.01242236 52 | 36745.375 1010.94969 24.94430545 24.70001916 8.172920793 10.6891924 0.01242236 53 | 36745.5 1010.6787 25.09078974 24.8698496 5.819100876 10.14049881 0.01242236 54 | 36745.625 1010.31737 25.39291359 24.98978377 3.625498184 9.591805225 0.01242236 55 | 36745.75 1010.49803 24.88174446 24.92981669 5.228585961 10.11218855 0.01242236 56 | 36745.875 1011.13036 24.78027357 24.79019867 4.020090321 10.45351753 0.01242236 57 | 36746 1010.58836 24.39270056 24.70001916 3.707895614 10.58104145 0.026494565 58 | 36746.125 1010.22704 24.2507939 24.66980674 5.057382412 10.70856536 0.026494565 59 | 36746.25 1010.85936 24.39880407 24.60022661 2.879343679 10.68191275 0.026494565 60 | 36746.375 1011.31102 24.98855592 24.60022661 2.979136122 10.7138361 0.026494565 61 | 36746.5 1010.76903 25.22048937 24.92981669 3.749094329 10.85279097 0.026494565 62 | 36746.625 1010.6787 25.52413909 25.18982664 4.034738753 10.99174584 0.026494565 63 | 36746.75 1011.40135 24.72915666 25.18982664 6.015939181 11.01197987 0.026494565 64 | 36746.875 1011.94334 24.4796756 25.06989247 6.034249721 10.71653909 0.026494565 65 | 36747 1011.13036 24.30114788 24.92020364 4.967660766 10.58217427 0.027125388 66 | 36747.125 1011.13036 23.92730777 24.8698496 4.294748421 10.44780945 0.027125388 67 | 36747.25 1011.58202 24.28131146 24.87992041 5.121469302 10.31344463 0.027125388 68 | 36747.375 1012.12401 24.43542514 24.99985458 5.59205018 10.51080664 0.027125388 69 | 36747.5 1011.49168 25.19302357 25.26993534 6.059884477 10.86667853 0.027125388 70 | 36747.625 1011.13036 25.68435628 25.30014776 5.453805603 11.22255042 0.027125388 71 | 36747.75 1011.31102 25.31738262 25.11978875 5.706491055 12.3730303 0.027125388 72 | 36747.875 1011.40135 25.19989002 25.05020862 7.069710758 12.63780212 0.027125388 73 | 36748 1009.95604 24.87640388 24.98017073 7.757271535 12.76077032 0.03435559 74 | 36748.125 1009.32372 24.90310675 24.87992041 8.942879 12.88373852 0.03435559 75 | 36748.25 1009.77538 25.00991821 24.79019867 7.049569164 13.00670671 0.03435559 76 | 36748.375 1010.49803 24.98321534 24.85016575 6.495675329 13.07809969 0.03435559 77 | 36748.5 1010.1367 25.04959104 25.00992539 7.803963412 12.87872274 0.03435559 78 | 36748.625 1009.77538 25.30288678 25.07996328 6.145944015 12.67934579 0.03435559 79 | 36748.75 1009.77538 24.97711183 25.00992539 6.753853943 12.47996885 0.03435559 80 | 36748.875 1009.95604 24.83749399 24.9398875 7.085274717 12.76986511 0.03435559 81 | 36749 1008.60106 24.71618669 24.91013284 9.006050363 13.08551259 0.098044449 82 | 36749.125 1008.23973 24.71847551 24.85016575 7.860726086 13.40116007 0.098044449 83 | 36749.25 1008.69139 24.33853189 24.83002414 7.799385777 13.51873754 0.098044449 84 | 36749.375 1009.14305 24.2195134 24.90006203 7.603462999 13.06281195 0.098044449 85 | 36749.5 1008.69139 24.4972232 24.9499583 8.102425214 12.74119508 0.098044449 86 | 36749.625 1007.69774 24.86724861 25.00992539 8.706673034 12.41957821 0.098044449 87 | 36749.75 1007.96874 24.63455222 24.97009992 9.311836381 12.09796134 0.098044449 88 | 36749.875 1008.23973 24.7222902 24.90006203 9.894111553 12.17972311 0.098044449 89 | 36750 1007.51708 24.55902126 24.83002414 9.054573294 12.76119276 0.202478002 90 | 36750.125 1007.24608 24.83825693 24.72016078 8.729561209 13.34266241 0.202478002 91 | 36750.25 1008.4204 24.98474122 24.67987754 8.147286037 13.8359596 0.202478002 92 | 36750.375 1009.14305 25.07324214 24.83002414 8.165596577 13.63488095 0.202478002 93 | 36750.5 1009.41405 25.30670148 24.8597788 7.603462999 13.71345238 0.202478002 94 | 36750.625 1008.96239 25.00839233 24.71008997 8.555611079 13.79202381 0.202478002 95 | 36750.75 1010.49803 24.7261049 24.62998127 7.629097755 13.50231544 0.202478002 96 | 36750.875 1010.85936 24.79171765 24.53980176 8.284615087 12.97976621 0.202478002 97 | 36751 1010.31737 24.79248059 24.47022163 9.25415818 12.5589373 0.06884058 98 | 36751.125 1010.49803 24.59335351 24.39011293 9.742134071 12.1381084 0.06884058 99 | 36751.25 1011.58202 24.42550693 24.25003715 9.151619156 11.62527027 0.06884058 100 | 36751.375 1012.395 24.77188124 24.38004212 10.08179459 11.85281139 0.06884058 101 | 36751.5 1012.30467 24.91302495 24.45008002 10.12573988 11.88483986 0.06884058 102 | 36751.625 1012.57567 25.2113341 24.47983468 7.741707576 11.91686833 0.06884058 103 | 36751.75 1012.937 24.99694824 24.45008002 7.647408295 11.66091216 0.06884058 104 | 36751.875 1013.29832 24.92828373 24.40018374 8.876961056 11.48383881 0.06884058 105 | 36752 1012.03368 25.01983641 24.39011293 10.02320086 11.49020148 0.014266304 106 | 36752.125 1011.76268 24.91760259 24.39011293 8.739632006 11.49656416 0.014266304 107 | 36752.25 1012.12401 24.54147366 24.40018374 9.576423684 11.80874576 0.014266304 108 | 36752.375 1012.84666 24.73144547 24.46015082 8.5766682 12.18948992 0.014266304 109 | 36752.5 1012.75633 24.81460582 24.52011791 8.159187888 12.42080664 0.014266304 110 | 36752.625 1011.76268 25.05569455 24.54987257 9.435432526 12.65212337 0.014266304 111 | 36752.75 1011.85301 24.74288956 24.54987257 7.440499193 12.52762712 0.014266304 112 | 36752.875 1011.76268 24.89776617 24.44000921 8.726814628 12.59847296 0.014266304 113 | 36753 1010.58836 25.25253281 24.39011293 8.744209641 12.5666596 0 114 | 36753.125 1009.95604 24.93133549 24.39011293 7.695931226 12.53484624 0 115 | 36753.25 1010.6787 24.87335213 24.36997132 6.323556253 12.52 0 116 | 36753.375 1010.58836 25.00686645 24.44000921 6.734627876 12.6657346 0 117 | 36753.5 1010.04637 25.03890989 24.60022661 7.277535387 12.93232227 0 118 | 36753.625 1009.50438 25.40435767 24.67987754 5.891427509 13.19890995 0 119 | 36753.75 1009.41405 24.85885629 24.66980674 5.938119386 13.55532423 0 120 | 36753.875 1009.59471 24.73373429 24.60983965 7.499092921 13.58066737 0 121 | -------------------------------------------------------------------------------- /Matlab/COARE3.0/VP_test_results_1.txt: -------------------------------------------------------------------------------- 1 | 36739 294.9562708 -94.6682092 -12.98214296 -194.0268499 0.131726958 2 | 36739.125 294.9562708 -92.9565624 -9.635904758 -204.6826721 0.173884633 3 | 36739.25 294.9562708 -90.32974679 -2.774804668 -148.8898497 0.113690087 4 | 36739.375 294.9562708 -91.76693796 2.199020492 -169.8055907 0.11741539 5 | 36739.5 294.9562708 -99.92345713 -4.58466912 -192.458259 0.07965307 6 | 36739.625 294.9562708 -100.8456844 6.388559208 -252.5500561 0.118945666 7 | 36739.75 294.9562708 -104.7684814 6.861105313 -345.1313942 0.199527506 8 | 36739.875 294.9562708 -106.753032 -0.226708677 -381.7226956 0.254520726 9 | 36740 293.9693491 -107.3782483 2.167996555 -302.2576026 0.158810926 10 | 36740.125 293.9693491 -106.175317 5.138042244 -338.01963 0.228351305 11 | 36740.25 293.9693491 -105.7770802 4.422187132 -313.2716293 0.205947083 12 | 36740.375 293.9693491 -105.9198636 3.588894128 -331.3639961 0.233464628 13 | 36740.5 293.9693491 -105.6361855 4.373755692 -353.3059873 0.27405072 14 | 36740.625 293.9693491 -104.1190417 6.985396556 -242.3828993 0.113443259 15 | 36740.75 293.9693491 -103.258448 8.889561004 -241.0240812 0.115844257 16 | 36740.875 293.9693491 -105.7169174 5.987654099 -263.8834665 0.129199581 17 | 36741 292.9643633 -108.4505486 2.141797818 -255.2435877 0.103837353 18 | 36741.125 292.9643633 -110.2103006 1.681779487 -287.6572442 0.125497596 19 | 36741.25 292.9643633 -111.9438995 -0.186970099 -348.8684601 0.186174344 20 | 36741.375 292.9643633 -111.5649065 0.378982583 -322.8148641 0.156321903 21 | 36741.5 292.9643633 -109.4677499 3.91506243 -301.1940984 0.141489623 22 | 36741.625 292.9643633 -107.3417643 5.8869009 -232.664594 0.081196324 23 | 36741.75 292.9643633 -106.8878607 2.703348143 -163.2253382 0.035950501 24 | 36741.875 292.9643633 -106.2498331 2.528505125 -265.7466387 0.137873893 25 | 36742 291.935184 -104.9319734 2.725091632 -227.9786407 0.105587933 26 | 36742.125 291.935184 -104.7820869 -0.320951974 -233.8726886 0.122939617 27 | 36742.25 291.935184 -105.1791809 0.317709762 -195.4871656 0.075147835 28 | 36742.375 291.935184 -108.6672471 1.411485059 -211.8480709 0.064877413 29 | 36742.5 291.935184 -109.0983912 2.02231944 -230.3758011 0.074432163 30 | 36742.625 291.935184 -108.9659061 3.949762927 -251.5013311 0.089271093 31 | 36742.75 291.935184 -110.2170026 1.271590303 -246.3441 0.082767345 32 | 36742.875 291.935184 -109.1333903 3.381813657 -280.3371706 0.120386196 33 | 36743 290.8817754 -107.9198082 3.173992252 -291.1166891 0.147369216 34 | 36743.125 290.8817754 -105.5225319 6.15574387 -267.3734959 0.137068713 35 | 36743.25 290.8817754 -105.5333836 2.192125752 -257.6113033 0.136770386 36 | 36743.375 290.8817754 -106.0302959 1.378923779 -262.0611888 0.13765483 37 | 36743.5 290.8817754 -105.3443585 3.087992767 -246.1339432 0.116394627 38 | 36743.625 290.8817754 -105.2565613 2.738766301 -230.1559169 0.097357274 39 | 36743.75 290.8817754 -108.2193723 1.093513877 -240.3323024 0.088984244 40 | 36743.875 290.8817754 -109.1727206 0.55960792 -297.2070358 0.143554503 41 | 36744 289.8041761 -106.9335771 0.768755211 -269.4876494 0.130631786 42 | 36744.125 289.8041761 -104.6425254 0.755560188 -272.7041835 0.162868598 43 | 36744.25 289.8041761 -103.5453017 1.516327328 -212.9651249 0.095737904 44 | 36744.375 289.8041761 -107.0074193 0.011989367 -201.1861681 0.062733917 45 | 36744.5 289.8041761 -106.2395881 -0.48635405 -230.1265976 0.091778758 46 | 36744.625 289.8041761 -105.3463684 -0.946029975 -217.3086314 0.084816518 47 | 36744.75 289.8041761 -103.7250943 -1.151803429 -193.0898088 0.073668448 48 | 36744.875 289.8041761 -105.3688266 -1.468669424 -211.3033132 0.080397832 49 | 36745 288.7024314 -106.0236259 -4.18195876 -240.5661152 0.11276563 50 | 36745.125 288.7024314 -105.0419213 -1.853535983 -232.2446273 0.107398209 51 | 36745.25 288.7024314 -103.532535 1.668646107 -219.3400727 0.097249583 52 | 36745.375 288.7024314 -104.004658 3.850635712 -263.3650445 0.138002835 53 | 36745.5 288.7024314 -106.4516405 2.516351075 -207.8606819 0.06117597 54 | 36745.625 288.7024314 -107.9272421 2.899940646 -149.8249035 0.021480968 55 | 36745.75 288.7024314 -107.8487961 -0.271713444 -193.5253092 0.048147261 56 | 36745.875 288.7024314 -106.156001 0.073201094 -146.484491 0.026952506 57 | 36746 287.5775103 -106.8564286 -2.059576285 -136.3170282 0.022958159 58 | 36746.125 287.5775103 -106.8426404 -3.725149069 -171.7389053 0.044948106 59 | 36746.25 287.5775103 -105.8514012 -1.036055843 -106.9674464 0.013760123 60 | 36746.375 287.5775103 -103.0800874 2.301402744 -103.8044087 0.014285821 61 | 36746.5 287.5775103 -103.4688007 2.177551237 -131.7467209 0.022942264 62 | 36746.625 287.5775103 -103.1055485 2.639447661 -142.133747 0.026760597 63 | 36746.75 287.5775103 -106.5737507 -4.823010946 -206.6092068 0.066919621 64 | 36746.875 287.5775103 -108.0790252 -6.283689299 -211.9445911 0.067671101 65 | 36747 286.4389971 -108.5298834 -5.544716211 -179.2689432 0.043474587 66 | 36747.125 286.4389971 -110.3948852 -7.630035706 -163.5721069 0.031941371 67 | 36747.25 286.4389971 -109.3780248 -5.505867661 -188.5526917 0.046585169 68 | 36747.375 286.4389971 -108.6331089 -5.597497737 -201.1510626 0.056794703 69 | 36747.5 286.4389971 -105.5130432 -0.626189557 -211.0758962 0.067570728 70 | 36747.625 286.4389971 -102.1247614 3.942122364 -180.9448672 0.052239874 71 | 36747.75 286.4389971 -98.31475077 2.212527866 -158.2064642 0.058015189 72 | 36747.875 286.4389971 -97.42776624 2.125887444 -184.5705506 0.096519491 73 | 36748 285.2784715 -98.07205267 -1.163239827 -198.1822387 0.121264927 74 | 36748.125 285.2784715 -96.92414278 0.68257181 -220.2014802 0.171849219 75 | 36748.25 285.2784715 -95.41776001 2.985050218 -165.6482225 0.095487357 76 | 36748.375 285.2784715 -95.58633915 1.759027234 -153.0762562 0.078596702 77 | 36748.5 285.2784715 -96.99713804 0.822170644 -195.9141358 0.122765406 78 | 36748.625 285.2784715 -97.02365406 2.644544665 -161.1092399 0.068830333 79 | 36748.75 285.2784715 -98.86107942 -0.158970947 -181.2766798 0.086669395 80 | 36748.875 285.2784715 -97.97837618 -1.044928175 -179.7393993 0.097306064 81 | 36749 284.0942427 -96.7236994 -2.805859841 -217.2445972 0.175170135 82 | 36749.125 284.0942427 -95.18494957 -1.56580009 -177.1816159 0.124923163 83 | 36749.25 284.0942427 -96.34836459 -6.575744755 -172.9636574 0.123240418 84 | 36749.375 284.0942427 -98.99757772 -9.017420806 -185.6318539 0.11634238 85 | 36749.5 284.0942427 -99.25669505 -6.279801905 -208.8423454 0.13544647 86 | 36749.625 284.0942427 -99.18474923 -1.912163876 -236.7801556 0.161008924 87 | 36749.75 284.0942427 -101.2136475 -5.279192429 -264.7527791 0.190955926 88 | 36749.875 284.0942427 -100.0811912 -2.812144891 -274.699631 0.221976797 89 | 36750 282.8863895 -96.37358038 -4.071128949 -227.6499537 0.177658284 90 | 36750.125 282.8863895 -92.24484746 2.133657235 -193.3576239 0.161165344 91 | 36750.25 282.8863895 -89.38776513 4.667648769 -161.5401211 0.135411722 92 | 36750.375 282.8863895 -90.58697654 3.797230563 -173.6866385 0.136442219 93 | 36750.5 282.8863895 -89.35710776 6.242379077 -158.8880787 0.114065391 94 | 36750.625 282.8863895 -89.59388069 4.815176673 -172.3772477 0.152989893 95 | 36750.75 282.8863895 -91.46166494 1.565738718 -159.4106589 0.115917576 96 | 36750.875 282.8863895 -92.6030223 3.995524731 -186.1484295 0.141907615 97 | 36751 281.6549987 -95.99427817 5.644594127 -221.3608582 0.186904821 98 | 36751.125 281.6549987 -98.01666535 3.894241506 -247.0073755 0.21324742 99 | 36751.25 281.6549987 -99.84700724 3.19994632 -243.8875751 0.182750615 100 | 36751.375 281.6549987 -98.14484496 7.463103706 -265.4141529 0.233053621 101 | 36751.5 281.6549987 -97.79739387 8.786767294 -268.2110474 0.235600633 102 | 36751.625 281.6549987 -96.48148847 10.27323296 -200.242722 0.11963841 103 | 36751.75 281.6549987 -98.24239149 7.683445205 -205.5948342 0.116595299 104 | 36751.875 281.6549987 -98.92054204 8.679555536 -244.2709509 0.168852109 105 | 36752 280.4021213 -98.74774396 11.67526983 -277.356432 0.228786617 106 | 36752.125 280.4021213 -99.1969841 8.516952934 -240.1015395 0.162169091 107 | 36752.25 280.4021213 -99.75256697 2.768995055 -255.002693 0.204834581 108 | 36752.375 280.4021213 -97.76754832 4.45312041 -215.6640162 0.155202809 109 | 36752.5 280.4021213 -96.86633214 4.561464941 -199.4408747 0.137006843 110 | 36752.625 280.4021213 -95.10693272 8.845284128 -224.1952586 0.195982086 111 | 36752.75 280.4021213 -97.00473844 2.811345348 -180.3386819 0.109305669 112 | 36752.875 280.4021213 -95.38938295 7.407910787 -204.272915 0.161305376 113 | 36753 279.1324096 -93.66319343 13.62261507 -202.097283 0.160928927 114 | 36753.125 279.1324096 -95.28355506 7.616797879 -179.6467054 0.117806382 115 | 36753.25 279.1324096 -95.45236741 5.830156953 -147.1031401 0.073261149 116 | 36753.375 279.1324096 -94.70332069 6.949521175 -154.3915273 0.085060041 117 | 36753.5 279.1324096 -94.50921584 5.881922942 -165.57336 0.102799673 118 | 36753.625 279.1324096 -92.30566518 7.654731762 -127.9656318 0.061306586 119 | 36753.75 279.1324096 -93.41607468 2.192410682 -124.3170041 0.063257963 120 | 36753.875 279.1324096 -93.53603646 1.904915546 -153.924884 0.110975657 121 | -------------------------------------------------------------------------------- /Matlab/COARE3.0/red_VP_bulk.m: -------------------------------------------------------------------------------- 1 | y=load('C:\Data\cwf\dropbox\matlabstf\cwf\whoi_bulk\VP_test_data_1.txt'); 2 | jdy=y(:,1)-y(1,1)+datenum(2000,1,8)-datenum(1999,12,31);%julian day 3 | %COLUMN A: DATE & TIME (UTC) 4 | P=y(:,2);%COLUMN B: Atmospheric Pressure mbs 5 | ta=y(:,3);%COLUMN C: Air Temperature (2m) 6 | ts=y(:,4);%COLUMN D: Sea temperature (deprth 3m) 7 | u=y(:,5);%COLUMN E: Wind speed (m/sec, 2m) 8 | qa=y(:,6);%COLUMN F: Specific Humidity (gr/Kgr, 10m) 9 | cloudf=y(:,7);%COLUMN G: Total Cloud Coverage (8 times the same daily value) 10 | 11 | %************** set height of the input data ******** 12 | zu=2; 13 | zt=2; 14 | zq=10; 15 | %****************************** Bogus in downward solar, IR flux, and BL 16 | %height 17 | Rs=200*ones(size(jdy)); 18 | Rl=400*ones(size(jdy)); 19 | zi=600*ones(size(jdy)); 20 | lat=35;%latitude of the site 21 | %************** set reference height for output of mean variables (e.g., 10-m) ******** 22 | zref_u=10; 23 | zref_t=10; 24 | zref_q=10; 25 | %%************************ 26 | 27 | rh=relhum([ta qa P]); 28 | A=coare30vn_ref(u,zu,ta,zt,rh,zq,P,ts,Rs,Rl,lat,zi,zref_u,zref_t,zref_q); 29 | 30 | %outputs of A 31 | %A=[usr tau hsb hlb hbb hsbb tsr qsr zo zot zoq Cd Ch Ce L zet dter tkt Urf Trf Qrf RHrf U10n]; 32 | % 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 33 | usr=A(:,1);%% usr = friction velocity (m/s) 34 | % tau = wind stress (N/m^2) 35 | % hsb = sensible heat flux into ocean (W/m^2) 36 | % hlb = latent heat flux into ocean (W/m^2) 37 | % hbb = bouyancy flux into ocean (W/m^2) 38 | % hsbb = sonic bouyancy flux into ocean (W/m^2) 39 | % tsr = t* 40 | % qsr = q* 41 | % zo= z_o for velcoity turbulencen (m) 42 | % zot = z_o for temperature (m) 43 | % zoq = z_o for humidity (m) 44 | % Cd = wind stress transfer coefficient at height zu 45 | % Ch = sensible heat transfer coefficient at height zt 46 | % Ce = latent heat transfer coefficient at height zq 47 | % L = Obukhov length scale (m) 48 | % zet = Monin-Obukhov stability parameter zu/L 49 | % dter = cool-skin temperature depression (degC) 50 | % tkt = cool-skin thickness (m) 51 | % Urf = windspeed at reference height, zref_u (m/s) 52 | % Trf = temperture at reference height, zref_t (C) 53 | % Qrf = specific humidity at reference height, zref_q (g/kg) 54 | % RHrf = relative humidity at reference height (%) 55 | U10n=A(:,23);% U10n = 10-m neutral wind (m/s) 56 | 57 | yy=load('C:\Data\cwf\dropbox\matlabstf\cwf\whoi_bulk\VP_test_results_1.txt'); 58 | %COLUMN A: DATE & TIME 59 | Rsday=yy(:,2);%COLUMN B: DAILY INSOLATION (8 same values) 60 | Rl=yy(:,3);%COLUMN C: LONG-WAVE RADIATION 61 | Hs=yy(:,4);%COLUMN D: SENSIBLE HEAT 62 | Hl=yy(:,5);%COLUMN E: LATENT HEAT 63 | Tau=yy(:,6);%COLUMN F: WIND STRESS 64 | 65 | 66 | figure;plot(jdy,A(:,2),jdy,Tau,'x');xlabel('Julian Day');ylabel('Stress (N/m^2)'); 67 | figure;plot(jdy,A(:,3),jdy,Hs,'x');xlabel('Julian Day');ylabel('Sensible Heat (W/m^2)'); 68 | figure;plot(jdy,A(:,4),jdy,Hl,'x');xlabel('Julian Day');ylabel('Latent heat (W/m^2)'); 69 | 70 | figure;plot(jdy,u,jdy,U10n,'-x');xlabel('Julian Day');ylabel('Wind Speed (m/s)'); 71 | legend('u input height','U10n'); 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /Matlab/COARE3.0/relhum.m: -------------------------------------------------------------------------------- 1 | function [rh]=relhum(x) 2 | %x=[t h p] 3 | t=x(:,1);%air temp (Cent) 4 | qa=x(:,2);%spec hum (g/kg) 5 | p=x(:,3);%pressure (mb) 6 | tdk=273.16; 7 | Rgas=287.1; 8 | e=6.112.*exp(17.502.*t./(t+241.0)).*(1.0007+3.46e-6*p);%vapor pressure, from Buck 9 | qs=e*622./(p-.378*e);%specific humidity, g/kg 10 | rh=qa./qs*100;%absolute humidity (g/m^3) -------------------------------------------------------------------------------- /Matlab/COARE3.0/rhov3.m: -------------------------------------------------------------------------------- 1 | 2 | function rhov=rhov3(y) 3 | p=y(:,1);%pressure in mb 4 | t=y(:,2);%temperature in C 5 | h=y(:,3);%relative humidity in % 6 | es=6.112.*exp(17.502.*t./(t+241.0)).*(1.0007+3.46e-6*p).*h/100; 7 | q=es*622./(p-.378*es); 8 | 9 | tdk=273.16; 10 | Rgas=287.1; 11 | rhoa=p*100/(Rgas*(t+tdk)*(1+0.61*q/1000)); 12 | rhov=rhoa*q;% (g/m^3) 13 | y=rhov; 14 | -------------------------------------------------------------------------------- /Matlab/COARE3.5/coare35vnWarm.m: -------------------------------------------------------------------------------- 1 | function B=coare35vnWarm(yday,Ur,zu,Tair,zt,RH,zq,Pair,Tsea,Solar,IR,Lat,Lon,zi,Rainrate,ts_depth); 2 | 3 | disp('WarmCoolLayer') 4 | 5 | %*********** input data ************** 6 | % yday= day-of-year 7 | % Ur= wind speed (m/s) relative to water at height zu 8 | % zu= height (m) of wind measurement 9 | % Tair= air temp (degC)at height zt 10 | % zt= height (m) of air temperature measurement 11 | % RH= relative humidity (%) at height zq 12 | % zq= height (m) of air humidity measurement 13 | % Pair= air pressure (mb) 14 | % Tsea= bulk surface sea temp (degC) at ts_depth 15 | % ts_depth depth (m) of water temperature measurement 16 | % Solar= downward solar flux (w/m^2) defined positive down 17 | % IR= downward IR flux (w/m^2) defined positive down 18 | % Lat= latitude (deg N=+) 19 | % Lon= longitude (deg E=+) 20 | % zi= inversion height (m) 21 | % Rainrate= rain rate (mm/hr) 22 | %********** output data *************** 23 | %Outputs 24 | %From coare35vn 25 | %B=[usr tau hsb hlb hbb hsbb hlwebb tsr qsr zot zoq Cd Ch Ce L zet dter dqer tkt Urf Trf Qrf RHrf UrfN Rnl Le rhoa UN U10 U10N Cdn_10 Chn_10 Cen_10 RF Qs Evap T10 Q10 RH10]; 26 | % 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 27 | %From WarmLayer 28 | % 40: dt_wrm - warming across entire warm layer degC 29 | % 41: tk_pwp - warm layer thickness m 30 | % 42: dsea - dT due to warming at depth of Tsea such that Tsea_true = Tsea + dsea 31 | 32 | jcool=1; %0=no cool skin calc, 1=do cool skin calc 33 | icount=1; 34 | %********************* housekeep variables ******** 35 | % Call coare35vn to get initial flux values 36 | Bx=coare35vn(Ur(1),zu,Tair(1),zt,RH(1),zq,Pair(1),Tsea(1),Solar(1),IR(1),Lat(1),zi,Rainrate(1),NaN,NaN); 37 | tau_old=Bx(2); %stress 38 | hs_old=Bx(3); %sensible heat flux 39 | hl_old=Bx(7); %latent heat flux - Webb corrected 40 | dter=Bx(17); %cool skin 41 | RF_old=Bx(34); %rain heat flux 42 | 43 | qcol_ac=0; %accumulates heat from integral 44 | tau_ac=0; %accumulates stress from integral 45 | dt_wrm=0; %total warming (amplitude) in warm layer 46 | max_pwp=19; %maximum depth of warm layer (adjustable) 47 | tk_pwp=max_pwp; %initial depth set to max value 48 | dsea=0; %dT initially set to 0 49 | q_pwp=0; %total heat absorped in warm layer 50 | fxp=.5; %initial value of solar flux absorption 51 | 52 | rich=.65; %critical Richardson number 53 | 54 | jtime=0; 55 | jamset=0; 56 | jump=1; 57 | 58 | %******************* set constants **************** 59 | tdk=273.16; %Converts to Kelvin 60 | Rgas=287.1; %Universal gas constant 61 | cpa=1004.67; %Specific heat of air at constant pressure 62 | cpw=4000; %Specific heat of water 63 | rhow=1022; %Density of water 64 | visw=1e-6; %Viscosity of water 65 | 66 | be=0.026; 67 | tcw=0.6; 68 | 69 | %********************************************************** 70 | %****************** setup read data loop **************** 71 | 72 | [Press,Tseak,Tairk,Qsatsea,Qsat,Qair,Rhoair,Rhodry]=scalarv(Pair,Tsea,Tair,RH); 73 | 74 | nx=length(yday); %# of lines of data 75 | 76 | for ibg = 1:nx %major read loop 77 | yd=yday(ibg); %yearday 78 | P=Pair(ibg); %air pressure 79 | u=Ur(ibg); %wind speed 80 | tsea=Tsea(ibg); %bulk sea surface temp 81 | t=Tair(ibg); %air temp 82 | qs=Qsatsea(ibg); %bulk sea surface humidity 83 | q=Qair(ibg); %specific humidity 84 | rh=RH(ibg); %relative humidity 85 | Rs=Solar(ibg); %downward solar flux (positive down) 86 | Rl=IR(ibg); %doward IR flux (positive down) 87 | rain=Rainrate(ibg); %rain rate 88 | grav=grv(Lat(ibg)); %gravity 89 | latx=Lat(ibg); %latitude 90 | lonx=Lon(ibg); %longitude 91 | rhoa=Rhoair(ibg); %air density 92 | 93 | %***** variables for warm layer *** 94 | Rnl=.97*(5.67e-8*(tsea-dter*jcool+tdk)^4-Rl); %Net IR 95 | Rns=.945*Rs; %Net Solar 96 | cpv=cpa*(1+0.84*q/1000); 97 | visa=1.326e-5*(1+6.542e-3*t+8.301e-6*t*t-4.84e-9*t*t*t); 98 | Al=2.1e-5*(tsea+3.2)^0.79; 99 | ctd1=sqrt(2*rich*cpw/(Al*grav*rhow)); %mess-o-constants 1 100 | ctd2=sqrt(2*Al*grav/(rich*rhow))/(cpw^1.5); %mess-o-constants 2 101 | 102 | %******************************************************** 103 | %**** Compute apply warm layer correction ************* 104 | %******************************************************** 105 | 106 | intime=yd-fix(yd); 107 | loc=(lonx+7.5)/15; 108 | chktime=loc+intime*24; 109 | if chktime>24 110 | chktime=chktime-24; 111 | end 112 | newtime=(chktime-24*fix(chktime/24))*3600; 113 | if icount>1 %not first time thru 114 | if newtime<=21600 | jump==0 115 | jump=0; 116 | if newtime < jtime %re-zero at midnight 117 | jamset=0; 118 | fxp=.5; 119 | tk_pwp=max_pwp; 120 | tau_ac=0; 121 | qcol_ac=0; 122 | dt_wrm=0; 123 | else 124 | %************************************ 125 | %**** set warm layer constants *** 126 | %************************************ 127 | dtime=newtime-jtime; %delta time for integrals 128 | qr_out=Rnl+hs_old+hl_old+RF_old; %total cooling at surface 129 | q_pwp=fxp*Rns-qr_out; %tot heat abs in warm layer 130 | qqrx(ibg)=hs_old; 131 | if q_pwp>=50 | jamset==1 %Check for threshold 132 | jamset=1; %indicates threshold crossed 133 | tau_ac=tau_ac+max(.002,tau_old)*dtime; %momentum integral 134 | if qcol_ac+q_pwp*dtime>0 %check threshold for warm layer existence 135 | %****************************************** 136 | % Compute the absorption profile 137 | %****************************************** 138 | for i=1:5 %loop 5 times for fxp 139 | fxp=1-(0.28*0.014*(1-exp(-tk_pwp/0.014))+0.27*0.357*(1-exp(-tk_pwp/0.357))+0.45*12.82*(1-exp(-tk_pwp/12.82)))/tk_pwp; 140 | qjoule=(fxp*Rns-qr_out)*dtime; 141 | if qcol_ac+qjoule>0 %Compute warm-layer depth 142 | tk_pwp=min(max_pwp,ctd1*tau_ac/sqrt(qcol_ac+qjoule)); 143 | end; 144 | end; 145 | else %warm layer wiped out 146 | fxp=0.75; 147 | tk_pwp=max_pwp; 148 | qjoule=(fxp*Rns-qr_out)*dtime; 149 | end; 150 | qcol_ac=qcol_ac+qjoule; %heat integral 151 | %******* compute dt_warm ****** 152 | if qcol_ac>0 153 | dt_wrm=ctd2*(qcol_ac)^1.5/tau_ac; 154 | else 155 | dt_wrm=0; 156 | end; 157 | end;% end threshold check 158 | end;% end midnight reset 159 | if tk_pwp5*delu(k)); 70 | if isempty(ii) 71 | mx(k)=n; 72 | else 73 | mx(k)=ii(1); 74 | end; 75 | y(k)=QQ(k).*delof(k,mx(k))/rhow/cpw-Rns(k).*up(k,mx(k))/rhow/cpw; 76 | end; 77 | tkt=5*delu'; 78 | %QQ(1).*delof(1,mx(1))/rhow/cpw 79 | 80 | %%%%%%%%%%%%%%%%%%%% total coolskin from surface to 5*dewlu 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Python/COARE3.5/README.md: -------------------------------------------------------------------------------- 1 | Python implementation of COARE air/sea flux algorithm version 3.5. 2 | 3 | The python code runs the same data set used to exercise the matlab code. Execute '%run coare35vn.py' from the iPython command line for test run with 'test_35_data.txt' input data file. Edit line 554 to indicate path to test data file. This will output a file of results that you can compare to the test_35_output_py_082020.txt provided. The file contains a time series of flux variables (usr tau hsb hlb hlwebb tsr qsr zot zoq Cd Ch Ce L zet dter dqer tkt RF Cdn_10 Chn_10 Cen_10 ). 4 | 5 | -------------------------------------------------------------------------------- /Python/COARE3.5/meteo.py: -------------------------------------------------------------------------------- 1 | """ 2 | Functions for meteorological variable conversions and functions. 3 | 4 | Translated and vectorized from NOAA bulk model and flux processing MATLAB scripts. 5 | 6 | Uncomment code at the end of this file and execute '%run flux.py' from the iPython command line to test functions. 7 | 8 | Byron Blomquist, CU/CIRES, NOAA/ESRL/PSD3 9 | v1: Oct 2014 10 | """ 11 | 12 | def qsat(t,p): 13 | """ 14 | usage: es = qsat(t,p) 15 | Returns saturation vapor pressure es (mb) given t(C) and p(mb). 16 | 17 | After Buck, 1981: J.Appl.Meteor., 20, 1527-1532 18 | 19 | Returns ndarray float for any numeric object input. 20 | """ 21 | from numpy import copy, asarray, exp 22 | 23 | t2 = copy(asarray(t, dtype=float)) # convert to ndarray float 24 | p2 = copy(asarray(p, dtype=float)) 25 | es = 6.1121 * exp(17.502 * t2 / (240.97 + t2)) 26 | es = es * (1.0007 + p2 * 3.46e-6) 27 | return es 28 | 29 | 30 | def qsea(sst,p): 31 | """ 32 | usage: qs = qsea(sst,p) 33 | Returns saturation specific humidity (g/kg) at sea surface 34 | given sst(C) and p(mb) input of any numeric type. 35 | 36 | Returns ndarray float for any numeric object input. 37 | """ 38 | ex = qsat(sst,p) # returns ex as ndarray float 39 | es = 0.98 * ex 40 | qs = 622 * es /(p - 0.378 * es) 41 | return qs 42 | 43 | 44 | def qair(t,p,rh): 45 | """ 46 | usage: qa, em = qair(t,p,rh) 47 | Returns specific humidity (g/kg) and partial pressure (mb) 48 | given t(C), p(mb) and rh(%). 49 | 50 | Returns ndarray float for any numeric object input. 51 | """ 52 | from numpy import copy, asarray 53 | 54 | rh2 = copy(asarray(rh,dtype=float)) # conversion to ndarray float 55 | rh2 /= 100.0 # frational rh 56 | p2 = copy(asarray(p, dtype=float)) 57 | t2 = copy(asarray(t, dtype=float)) 58 | em = rh2 * qsat(t2,p2) 59 | qa = 621.97 * em / (p2 - 0.378 * em) 60 | return (qa, em) 61 | 62 | 63 | def rhcalc(t,p,q): 64 | """ 65 | usage: rh = rhcalc(t,p,q) 66 | Returns RH(%) for given t(C), p(mb) and specific humidity, q(kg/kg) 67 | 68 | Returns ndarray float for any numeric object input. 69 | """ 70 | from numpy import copy, asarray 71 | 72 | q2 = copy(asarray(q, dtype=float)) # conversion to ndarray float 73 | p2 = copy(asarray(p, dtype=float)) 74 | t2 = copy(asarray(t, dtype=float)) 75 | es = qsat(t2,p2) 76 | em = p2 * q2 / (0.622 + 0.378 * q2) 77 | rh = 100.0 * em / es 78 | return rh 79 | 80 | 81 | def rhoa(t,p,rh): 82 | """ 83 | computes moist air density from temperature, pressure and RH 84 | 85 | usage: Ra = rhoa(t,p,rh) 86 | 87 | inputs: t (deg C), p (mb or hPa) and rh 88 | 89 | output: Ra = moist air density in kg/m3 90 | 91 | """ 92 | Md = 0.028964 # mol wt dry air, kg/mole 93 | Mv = 0.018016 # mol wt water, kg/mole 94 | Tk = t + 273.15 # deg Kelvin 95 | Pa = p*100.0 # Pascals 96 | Rgas = 8.314 # in m3 Pa/mol K 97 | Pv = (rh/100.0)*qsat(t,p)*100.0 # H2O vapor pressure in Pa 98 | Pd = Pa - Pv # pressure dry air 99 | Ra = (Pd*Md + Pv*Mv)/(Rgas*Tk) # moist air density 100 | return Ra 101 | 102 | 103 | def rhod(t,p): 104 | """ 105 | computes dry air density from temperature and pressure 106 | 107 | usage: Rd = rhod(t,p) 108 | 109 | inputs: t (deg C), and p (mb or hPa) 110 | 111 | output: Rd = dry air density in kg/m3 112 | 113 | """ 114 | Rd = 287.058 # gas const for dry air in J/kg K 115 | tk = t+273.15 # deg Kelvin 116 | Pa = p*100 # Pascals 117 | Rdry = Pa/(Rd*Tk) # dry air density, kg/m3 118 | return Rd 119 | 120 | 121 | def grv(latitude): 122 | """ 123 | usage: g = grv(latitude) 124 | Computes gravity, g [m/sec^2] given latitude in deg. 125 | 126 | Ref?? 127 | 128 | Returns ndarray float for any numeric object input. 129 | """ 130 | from numpy import copy, pi, sin, asarray 131 | 132 | lat = copy(asarray(latitude, dtype=float)) # conversion to ndarray float 133 | gamma = 9.7803267715 134 | c1 = 0.0052790414 135 | c2 = 0.0000232718 136 | c3 = 0.0000001262 137 | c4 = 0.0000000007 138 | phi = lat * pi/180; 139 | x = sin(phi); 140 | g = gamma * (1 + c1*x**2 + c2*x**4 + c3*x**6 + c4*x**8) 141 | return g 142 | 143 | 144 | def psit_26(z_L): 145 | """ 146 | usage psi = psit_26(z_L) 147 | 148 | Computes the temperature structure function given z/L. 149 | """ 150 | from numpy import exp, log, sqrt, arctan, asarray, copy 151 | from util import find 152 | 153 | zet = copy(asarray(z_L, dtype=float)) # conversion to ndarray float 154 | dzet = 0.35*zet 155 | dzet[dzet>50] = 50. # stable 156 | psi = -((1 + 0.6667*zet)**1.5 + 0.6667*(zet - 14.28)*exp(-dzet) + 8.525) 157 | k = find(zet < 0) # unstable 158 | x = (1 - 15*zet[k])**0.5 159 | psik = 2*log((1 + x)/2.) 160 | x = (1 - 34.15*zet[k])**0.3333 161 | psic = 1.5*log((1.+x+x**2)/3.) - sqrt(3)*arctan((1 + 2*x)/sqrt(3)) 162 | psic += 4*arctan(1.)/sqrt(3.) 163 | f = zet[k]**2 / (1. + zet[k]**2.) 164 | psi[k] = (1-f)*psik + f*psic 165 | return psi 166 | 167 | 168 | def psiu_26(z_L): 169 | """ 170 | usage: psi = psiu_26(z_L) 171 | 172 | Computes velocity structure function given z/L 173 | """ 174 | from numpy import exp, log, sqrt, arctan, min, asarray, copy 175 | from util import find 176 | 177 | zet = copy(asarray(z_L, dtype=float)) # conversion to ndarray float 178 | dzet = 0.35*zet 179 | dzet[dzet>50] = 50. # stable 180 | a = 0.7 181 | b = 3./4. 182 | c = 5. 183 | d = 0.35 184 | psi = -(a*zet + b*(zet - c/d)*exp(-dzet) + b*c/d) 185 | k = find(zet < 0) # unstable 186 | x = (1 - 15*zet[k])**0.25 187 | psik = 2.*log((1.+x)/2.) + log((1.+x*x)/2.) - 2.*arctan(x) + 2.*arctan(1.) 188 | x = (1 - 10.15*zet[k])**0.3333 189 | psic = 1.5*log((1.+x+x**2)/3.) - sqrt(3.)*arctan((1.+2.*x)/sqrt(3.)) 190 | psic += 4*arctan(1.)/sqrt(3.) 191 | f = zet[k]**2 / (1.+zet[k]**2) 192 | psi[k] = (1-f)*psik + f*psic 193 | return psi 194 | 195 | 196 | def psiu_40(z_L): 197 | """ 198 | usage: psi = psiu_40(z_L) 199 | 200 | Computes velocity structure function given z/L 201 | """ 202 | from numpy import exp, log, sqrt, arctan, min, asarray, copy 203 | from util import find 204 | 205 | zet = copy(asarray(z_L, dtype=float)) # conversion to ndarray float 206 | dzet = 0.35*zet 207 | dzet[dzet>50] = 50. # stable 208 | a = 1. 209 | b = 3./4. 210 | c = 5. 211 | d = 0.35 212 | psi = -(a*zet + b*(zet - c/d)*exp(-dzet) + b*c/d) 213 | k = find(zet < 0) # unstable 214 | x = (1. - 18.*zet[k])**0.25 215 | psik = 2.*log((1.+x)/2.) + log((1.+x*x)/2.) - 2.*arctan(x) + 2.*arctan(1.) 216 | x = (1. - 10.*zet[k])**0.3333 217 | psic = 1.5*log((1.+x+x**2)/3.) - sqrt(3.)*arctan((1.+2.*x)/sqrt(3.)) 218 | psic += 4.*arctan(1.)/sqrt(3.) 219 | f = zet[k]**2 / (1.+zet[k]**2) 220 | psi[k] = (1-f)*psik + f*psic 221 | return psi 222 | 223 | 224 | 225 | def Le_water(t, sal): 226 | """ 227 | computes latent heat of vaporization for pure water and seawater 228 | reference: M. H. Sharqawy, J. H. Lienhard V, and S. M. Zubair, Desalination 229 | and Water Treatment, 16, 354-380, 2010. (http://web.mit.edu/seawater/) 230 | validity: 0 < t < 200 C; 0 1: 99 | raise ValueError ('find: Input should be 1-D') 100 | 101 | F = b.size - sum(b) # number of False in b 102 | idx = argsort(b)[F:] # argsort puts True at the end, so select [F:] 103 | idx = sort(idx) # be sure values in idx are ordered low to high 104 | return idx 105 | 106 | 107 | def md2jd(YYYY, MM, DD): 108 | """ 109 | Converts Month and Day into day-of-year (julian date) 110 | 111 | Usage: yday = md2jd(YYYY, MM, DD) 112 | 113 | Inputs YYYY, MM & DD may be strings or numbers. 114 | 115 | Returns integer day of year 116 | 117 | """ 118 | import numpy as np 119 | 120 | day_tab = [[31,28,31,30,31,30,31,31,30,31,30,31], 121 | [31,29,31,30,31,30,31,31,30,31,30,31]] 122 | days = np.array(day_tab) 123 | yr = np.int(YYYY) 124 | mo = np.int(MM) 125 | day = np.int(DD) 126 | 127 | leap = np.logical_and((np.remainder(yr,4) == 0), 128 | (np.remainder(yr,100) != 0)) 129 | leap = np.logical_or(leap, (np.remainder(yr,400) == 0)) 130 | 131 | yday = day 132 | for ii in np.arange(1,mo): 133 | yday += days[leap,ii-1] 134 | 135 | return np.int(yday) 136 | 137 | 138 | def jd2md(YYYY, DOY): 139 | """ 140 | Converts day-of-year (julian date) to Month and Day of given Year 141 | 142 | Usage: mo, da = jd2md(YYYY, JD) 143 | 144 | Inputs YYYY, & DOY may be strings or numbers. 145 | 146 | Returns tuple of integers, month and day 147 | 148 | """ 149 | import numpy as np 150 | 151 | day_tab = [[31,28,31,30,31,30,31,31,30,31,30,31], 152 | [31,29,31,30,31,30,31,31,30,31,30,31]] 153 | days = np.array(day_tab) 154 | yr = np.int(YYYY) 155 | jd = np.int(DOY) 156 | 157 | leap = np.logical_and((np.remainder(yr,4) == 0), 158 | (np.remainder(yr,100) != 0)) 159 | leap = np.logical_or(leap, (np.remainder(yr,400) == 0)) 160 | 161 | ii = 1 162 | while jd > days[leap,ii-1]: 163 | jd -= days[leap,ii-1] 164 | ii += 1 165 | 166 | mo = np.int(ii) 167 | day = np.int(jd) 168 | return (mo, day) 169 | 170 | 171 | def replace_nan(x): 172 | """ 173 | Replaces NaNs in 1D array with nearest finite value. 174 | 175 | Usage: y = replace_nan(x) 176 | 177 | Returns filled array y without altering input array x. 178 | Assumes input is numpy array. 179 | 180 | 3/2015 BWB 181 | """ 182 | import numpy as np 183 | # 184 | x2 = np.zeros(len(x)) 185 | np.copyto(x2,x) 186 | # 187 | bads = find(np.isnan(x)) # indices of NaNs 188 | if bads.size == 0: 189 | return x2 190 | else: 191 | fins = find(np.isfinite(x)) # indices for all finites 192 | for ii in np.arange(0,bads.size): # for all NaNs 193 | # locate index of nearest finite 194 | diffs = np.abs(fins-bads[ii]) 195 | idx = diffs.argmin() 196 | # replace NaN with nearest finite 197 | x2[bads[ii]] = x[fins[idx]] 198 | return x2 199 | 200 | 201 | def invert_dict(d): 202 | """Inverts a dictionary, returning a map from val to a list of keys. 203 | 204 | If the mapping key->val appears in d, then in the new dictionary 205 | val maps to a list that includes key. 206 | 207 | d: dict 208 | 209 | Returns: dict 210 | 211 | Copyright 2012 Allen B. Downey 212 | License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html 213 | """ 214 | inverse = {} 215 | for key, val in d.iteritems(): 216 | inverse.setdefault(val, []).append(key) 217 | return inverse 218 | 219 | 220 | def find_module(module): 221 | """ 222 | Searches the PYTHONPATH for a module 223 | """ 224 | import sys 225 | import os 226 | import glob 227 | 228 | result = [] 229 | # Loop over the list of paths in sys.path 230 | for subdir in sys.path: 231 | # Join the subdir path with the module we're searching for 232 | pth = os.path.join(subdir, module) 233 | # Use glob to test if the pth is exists 234 | res = glob.glob(pth) 235 | # glob returns a list, if it is not empty, the pth exists 236 | if len(res) > 0: 237 | result.append(res) 238 | return result 239 | 240 | 241 | def print_attributes(obj): 242 | """ 243 | Prints attributes for given object 244 | """ 245 | for attr in obj.__dict__: 246 | print(attr), getattr(obj,attr) 247 | 248 | 249 | def walk(dirname): 250 | """ 251 | Recursively traverse all files in given directory, printing 252 | file names. 253 | """ 254 | import os 255 | 256 | for name in os.listdir(dirname): 257 | path = os.path.join(dirname,name) 258 | 259 | if os.path.isfile(path): 260 | print(path) 261 | else: 262 | walk(path) 263 | 264 | # Test code 265 | if __name__ == '__main__': 266 | print('test') 267 | # print 'testing invert_dict' 268 | # d = dict(a=1, b=2, c=3, z=1) 269 | # print d 270 | # inverse = invert_dict(d) 271 | # for val, keys in inverse.iteritems(): 272 | # print val, keys 273 | # 274 | # print "testing find_module('site.py')" 275 | # result = find_module('site.py') 276 | # print result 277 | # 278 | # print 'testing walk(os.getcwd())' 279 | # walk(os.getcwd()) 280 | 281 | -------------------------------------------------------------------------------- /Python/COARE3.6/README.md: -------------------------------------------------------------------------------- 1 | # Python implementation of COARE air/sea flux algorithm version 3.6. 2 | 3 | This includes functions for bulk flux calculations: 4 | - Without warm layer computations [coare36vn\_zrf\_et.py](https://github.com/noaa-psd/COARE-algorithm/blob/feature/sanAkel/decorated_doc/Python/COARE3.6/coare36vn_zrf_et.py). 5 | - With warm layer computations [coare36vnWarm\_et.py](https://github.com/noaa-psd/COARE-algorithm/blob/feature/sanAkel/decorated_doc/Python/COARE3.6/coare36vnWarm_et.py). 6 | 7 | The python codes were translated from the MATLAB scripts. They can be run over the same input data set [test\_36\_data.txt](https://github.com/noaa-psd/COARE-algorithm/blob/feature/sanAkel/decorated_doc/Python/COARE3.6/test_36_data.txt) that is used to exercise the MATLAB code. Output with and without wave effects is included in [test\_36\_output\_withwavesinput\_withwarmlayer.txt](https://github.com/noaa-psd/COARE-algorithm/blob/feature/sanAkel/decorated_doc/Python/COARE3.6/test_36_output_withwavesinput_withwarmlayer.txt) and [test\_36\_output\_withnowavesinput\_withwarmlayer.txt](https://github.com/noaa-psd/COARE-algorithm/blob/feature/sanAkel/decorated_doc/Python/COARE3.6/test_36_output_withnowavesinput_withwarmlayer.txt) respectively. 8 | 9 | ## Instructions 10 | - For the bulk flux calculations without warm layer computations, run: `coare36vn_zrf_et.py` from the iPython command line. Edit line `959` to set path to test data file: `test_36_data.txt`. 11 | - With warm layer computations, run: `coare36vnWarm_et.py`. Edit line 403 to set path to test data file: `test_36_data.txt`. 12 | 13 | Depending if the waves parameters: `cp` and `sigH` are used as input to COARE3.6, this will output a file of results that you can compare to the ones provided (`test_36_output_withnowavesinput_withwarmlayer.txt`, `test_36_output_withwavesinput_withwarmlayer.txt`). 14 | 15 | ## Sample output 16 | This file contains a time series of following variables. 17 | 18 | 19 | | Variable Name | Description | Notes | 20 | | :------------ | :---------: | ----: | 21 | | usr | friction velocity that includes gustiness (m/s) | Denoted by u* | 22 | | tau | wind stress that includes gustiness (N/m^2)| | 23 | | hsb | sensible heat flux (W/m^2) | positive for $T_{air}$ < $T_{skin}$ | 24 | | hlb | latent heat flux (W/m^2) | positive for $q_{air} < q_s$ 25 | | hbb | atmospheric buoyany flux (W/m^2) | positive when `hlb` and `hsb` heat the atmosphere | 26 | | hsbb | atmospheric buoyancy flux from sonic | as above, computed with sonic anemometer `T` | 27 | | hlwebb | Webb factor to be added to `hl` | covariance and ID latent heat fluxes | 28 | | tsr | temperature scaling parameter (K) | Denoted by t* | 29 | | qsr | specific humidity scaling parameter (kg/kg) | Denoted by q* | 30 | | zo | momentum roughness length (m)| | 31 | | zot | thermal roughness length (m)| | 32 | | zoq | moisture roughness length (m)| | 33 | | Cd | wind stress transfer (drag) coefficient at height zu (unitless)| | 34 | | Ch |sensible heat transfer coefficient (Stanton number) at height zu (unitless)| | 35 | | Ce | latent heat transfer coefficient (Dalton number) at height zu (unitless)| | 36 | | L | Monin-Obukhov length scale (m) 37 | | zeta | Monin-Obukhov stability parameter zu/L (dimensionless)| | 38 | | dT_skin | cool-skin temperature depression (degC)| positive value means skin is cooler than subskin| 39 | | dq_skin | cool-skin humidity depression (g/kg)| | 40 | | dz_skin | cool-skin thickness (m)| | 41 | | Urf | wind speed at reference height |user can select height at input | 42 | | Trf | air temperature at reference height| | 43 | | Qrf |air specific humidity at reference height| | 44 | | RHrf | air relative humidity at reference height| | 45 | | UrfN | neutral value of wind speed at reference height| | 46 | | TrfN | neutral value of air temp at reference height | | 47 | | qarfN | neutral value of air specific humidity at reference height | | 48 | | lw_net | Net IR radiation computed by COARE (W/m2) | positive heating ocean | 49 | | sw_net | Net solar radiation computed by COARE (W/m2) | positive heating ocean | 50 | | Le | latent heat of vaporization (J/K)| | 51 | | rhoa | density of air at input parameter height zt (kg/m3)|typically same as zq | 52 | | UN | neutral value of wind speed at zu (m/s)| | 53 | | U10 | wind speed adjusted to 10 m (m/s)| | 54 | | UN10 | neutral value of wind speed at 10m (m/s)| | 55 | | Cdn_10 | neutral value of drag coefficient at 10m (unitless)| | 56 | | Chn_10 | neutral value of Stanton number at 10m (unitless)| | 57 | | Cen_10 | neutral value of Dalton number at 10m (unitless)| | 58 | | hrain | rain heat flux (W/m^2) | positive cooling ocean | 59 | | Qs | sea surface specific humidity, assuming saturation (g/kg)| | 60 | | Evap | evaporation rate (mm/h)| | 61 | | T10 | air temperature at 10m (deg C)| | 62 | | T10N | neutral air temperature at 10m (deg C) | | 63 | | Q10 | air specific humidity at 10m (g/kg) | | 64 | | Q10N | neutral air specific humidity at 10m (g/kg) | | 65 | | RH10 | air relative humidity at 10m (unitless) | | 66 | | P10 | air pressure at 10m (mb) | | 67 | | rhoa10 | air density at 10m (kg/m3) | | 68 | | gust | gustiness velocity (m/s) | | 69 | | wc_frac | whitecap fraction (ratio) | | 70 | | Edis | energy dissipated by wave breaking (W/m^2) | | 71 | | dT_warm | dT from base of warm layer to skin, i.e. warming across entire warm layer depth (deg C) | | 72 | | dz_warm | warm layer thickness (m) | | 73 | | dT\_warm\_to\_skin | dT from measurement depth to skin due to warm layer, such that $T_{skin} = T_{sea} + dT_{warm_to_skin} - dT_{skin}$ | | 74 | | du_warm | total current accumulation in warm layer (m/s) | | 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # COARE-algorithm 2 | Repository of the TOGA-COARE bulk air-sea flux algorithm in: 3 | - Python 4 | - MATLAB 5 | - FORTRAN 6 | 7 | ## Origins 8 | The international TOGA-COARE field program which took place in the western Pacific warm pool over 4 months from November 1992 to February 1993 ([Fairall et al. 1996a](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Fairall%20et%20al.%201996a%20-%20cool%20skin%20warm%20layer.pdf), [1996b](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Fairall%20et%20al.%201996b%20-%20bulk%20fluxes%20of%20variables.pdf) and [1997](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Fairall%20et%20al.%201997%20-%20ship%20measurements%20MABL.pdf)) spurred the development of the COARE model. The algorithm is intended to provide estimates of `momentum, sensible heat`, and `latent heat fluxes` using inputs of bulk atmospheric variables (`wind speed, SST, air temperature, air humidity`). The algorithm contains subroutines/functions to handle near-surface gradients of temperature in the ocean. 9 | 10 | ## Versions 11 | - **Version 2.5** was published in 1996. 12 | - **Version 3.0** was published in 2003; it was a major update from Version 2.5. This update was based on new observations at higher wind speeds (10 to 20 m/s). Available in MATLAB and FORTRAN only. 13 | - **Version 3.5** was released in 2013 following the publication of [Edson et al. 2013](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Edson%20et%20al.%202013%20-%20momentum%20flux.pdf), which made adjustments to the wind speed dependence of the Charnock parameter based on a large database of direct covariance stress observations (principally from a buoy). This led to an increase in stress for wind speeds greater than about 18 m/s. The roughness Reynolds number formulation of the scalar roughness length was tuned slightly to give the same values of `Ch` and `Ce` as Version 3.0. The diurnal warm layer model was structured as a separate routine instead of embedded in a driver program. COARE 3.5 was based on Edson’s buoy data ([Edson et al. 2013](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Edson%20et%20al.%202013%20-%20momentum%20flux.pdf)) and was compared to a large database (a total of 16,000 hours of observations) combining observations from NOAA, WHOI, and U. Miami ([Fairall et al. 2011](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/Fairall%20et%20al.%202011%20-%20COAREG.pdf)). It is available in Python and MATLAB. 14 | - **Version 3.6** is slightly restructured and built around improvements in the representation of the effects of waves on fluxes. This includes improved relationships of `surface roughness`, $z_o$, and `whitecap fraction`, $W_f$, on wave parameters. More details can be found in [coare3.6\_readme\_1.pdf](https://github.com/noaa-psd/COARE-algorithm/blob/master/References/coare36_readme_1.pdf). This version is available in Python, MATLAB and FORTRAN. 15 | 16 | 17 | # References: 18 | 19 | * Edson, J.B., J. V. S. Raju, R.A. Weller, S. Bigorre, A. Plueddemann, C.W. Fairall, S. Miller, L. Mahrt, Dean Vickers, and Hans Hersbach, 2013: On the Exchange of momentum over the open ocean. J. Phys. Oceanogr., 43, 1589–1610. doi: http://dx.doi.org/10.1175/JPO-D-12-0173.1 20 | 21 | * Fairall, C.W., E.F. Bradley, J.S. Godfrey, G.A. Wick, J.B. Edson, and G.S. Young, 1996a: The cool skin and the warm layer in bulk flux calculations. J. Geophys. Res. 101, 1295-1308. https://doi.org/10.1029/95JC03190 22 | 23 | * Fairall, C.W., E.F. Bradley, D.P. Rogers, J.B. Edson, G.S. Young, 1996b: Bulk parameterization of air-sea fluxes for TOGA COARE. J. Geophys. Res. 101, 3747-3764. https://doi.org/10.1029/95JC03205 24 | 25 | * Fairall, C. W., White, A. B., Edson, J. B., and Hare, J. E.: Integrated Shipboard Measurements of the Marine Boundary Layer, J. Atmos. Ocean. Tech., 14, 338–359, 1997. https://doi.org/10.1175/1520-0426(1997)014<0338:ISMOTM>2.0.CO;2 26 | 27 | * Fairall, C.W., E.F. Bradley, J.E. Hare, A.A. Grachev, and J.B. Edson, 2003: Bulk parameterization of air-sea fluxes: Updates and verification for the COARE algorithm. J. Climate 16, 571-591. https://doi.org/10.1175/1520-0442(2003)016<0571:BPOASF>2.0.CO;2 28 | 29 | * Fairall, C.W., Mingxi Yang, Ludovic Bariteau, J.B. Edson, D. Helmig, W. McGillis, S. Pezoa, J.E. Hare, B. Huebert, and B. Blomquist, 2011: Implementation of the COARE flux algorithm with CO2, DMS, and O3. J. Geophys. Res., 116, C00F09, https://doi.org/10.1029/2010JC006884 30 | -------------------------------------------------------------------------------- /References/Edson et al. 2013 - momentum flux correction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Edson et al. 2013 - momentum flux correction.pdf -------------------------------------------------------------------------------- /References/Edson et al. 2013 - momentum flux.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Edson et al. 2013 - momentum flux.pdf -------------------------------------------------------------------------------- /References/Fairall et al. 1996a - cool skin warm layer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Fairall et al. 1996a - cool skin warm layer.pdf -------------------------------------------------------------------------------- /References/Fairall et al. 1996b - bulk fluxes of variables.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Fairall et al. 1996b - bulk fluxes of variables.pdf -------------------------------------------------------------------------------- /References/Fairall et al. 1997 - ship measurements MABL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Fairall et al. 1997 - ship measurements MABL.pdf -------------------------------------------------------------------------------- /References/Fairall et al. 2003 - bulk fluxes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Fairall et al. 2003 - bulk fluxes.pdf -------------------------------------------------------------------------------- /References/Fairall et al. 2011 - COAREG.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/Fairall et al. 2011 - COAREG.pdf -------------------------------------------------------------------------------- /References/coare36_readme_1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NOAA-PSL/COARE-algorithm/5b144cf6376a98b42200196d57ae40d791494abe/References/coare36_readme_1.pdf --------------------------------------------------------------------------------