コード例 #1
0
        try:
            number_of_profiles, lat, lon, distance = results[0]
            interp_pressure, oxygen_sat_grid, oxygen_grid, salinity_grid, consv_temperature_grid, density_grid = results[
                1]
            eps_pressure, eps_oxygen_sat_grid, eps_oxygen_grid, eps_grid, eps_salinity_grid, eps_consv_temperature_grid, eps_N_squared_grid, eps_density_grid = results[
                2]
        except TypeError:
            print(cruisename, DATAFILENAME[:-4], "is skipped!")
            continue

        #use self written function to get BBL
        results = thesis.find_bottom_and_bottom_currents(
            number_of_profiles,
            interp_pressure,
            density_grid,
            oxygen_grid,
            height_above_ground=10,
            minimal_density_difference=0.02)
        bathymetrie, list_of_bathymetrie_indices = results[0]
        BBL, list_of_BBL_indices = results[1]
        BBL_range, list_of_BBL_range_indices = results[2]

        ##########################################################################################################################################################

        #print(np.max(interp_pressure),np.min(interp_pressure))
        BBL_thickness = bathymetrie - BBL

        #searches for the index of the profile with the biggest BBL thickness
        index_of_maximum_thickness = np.argmax(BBL_thickness)
コード例 #2
0
            corrected_eps_Reynolds_bouyancy_grid 
            eps_wiki_Reynolds_bouyancy_grid
            corrected_eps_wiki_Reynolds_bouyancy_grid 
            """

        except KeyError:
            print(transect_name, " is skipped, Error during loading data")
            continue

        print("Number of profiles:", number_of_profiles)

        print(min(eps_pressure), max(eps_pressure), len(eps_pressure))

        #calculate the idices of the bottom and some meters above that
        results = thesis.find_bottom_and_bottom_currents(
            number_of_profiles, eps_pressure, eps_density_grid,
            eps_oxygen_grid)
        """
        bathymetrie                     pressure values of the first NaN value (in most cases this corresponds to the bottom, but is sometimes wrong due to missing data
        list_of_bathymetrie_indices     corresponding index (eg for interp_pressure or other arrays of the same size)
        BBL                             pressure values of the calculated Bottom Boundary Layer (exact position depends on the criteria)
        list_of_BBL_indices             corresponding index (eg for interp_pressure or other arrays of the same size)
        BBL_range                       pressure values of "height_above_ground" meters. Follows therefore the batyhmetrie. 
        list_of_BBL_range_indices       corresponding index (eg for interp_pressure or other arrays of the same size)
        """
        bathymetry, list_of_bathymetrie_indices = results[0]
        #BBL,list_of_BBL_indices = results[1] #not needed here
        BBL_range, list_of_BBL_range_indices = results[2]

        eps_N_grid = np.sqrt(eps_N_squared_grid)
        #ozmidov scale
コード例 #3
0
            """

        except KeyError:
            print(transect_name, "Error during loading data")
            raise AssertionError

        number_of_transects += 1

        print("Number of profiles:", number_of_profiles)

        #print(min(eps_pressure),max(eps_pressure),len(eps_pressure))

        #calculate the idices of the bottom and some meters above that
        results = thesis.find_bottom_and_bottom_currents(
            number_of_profiles,
            eps_pressure,
            eps_density_grid,
            eps_oxygen_grid,
            height_above_ground=height_above_ground)
        """
        bathymetrie                     pressure values of the first NaN value (in most cases this corresponds to the bottom, but is sometimes wrong due to missing data
        list_of_bathymetrie_indices     corresponding index (eg for interp_pressure or other arrays of the same size)
        BBL                             pressure values of the calculated Bottom Boundary Layer (exact position depends on the criteria)
        list_of_BBL_indices             corresponding index (eg for interp_pressure or other arrays of the same size)
        BBL_range                       pressure values of "height_above_ground" meters. Follows therefore the batyhmetrie. 
        list_of_BBL_range_indices       corresponding index (eg for interp_pressure or other arrays of the same size)
        """
        bathymetrie, list_of_bathymetrie_indices = results[0]
        #BBL,list_of_BBL_indices = results[1] #not needed here
        BBL_range, list_of_BBL_range_indices = results[2]

        eps_N_grid = np.sqrt(eps_N_squared_grid)
コード例 #4
0
ファイル: mss_analysis.py プロジェクト: opinner/MasterThesis
        eps_Reynolds_bouyancy_grid[eps_Reynolds_bouyancy_grid < 0] = np.nan 
        Reynolds_bouyancy_grid[Reynolds_bouyancy_grid < 0] = np.nan 
        bin_Reynolds_bouyancy_grid[bin_Reynolds_bouyancy_grid < 0] = np.nan            
                    
        #apply the correction on the dissipation rate following Garanaik2018           
        corrected_eps_grid = thesis.correct_dissipation(eps_grid,eps_Reynolds_bouyancy_grid)
        corrected_fine_eps_grid = thesis.correct_dissipation(fine_eps_grid,Reynolds_bouyancy_grid)
        corrected_bin_eps_grid = thesis.correct_dissipation(bin_eps_grid,bin_Reynolds_bouyancy_grid)

        #from that calculate again the now corrected Bouyancy Reynolds number (in 3D)
        corrected_eps_Reynolds_bouyancy_grid = corrected_eps_grid/(eps_viscosity_grid*eps_N_squared_grid)
        corrected_Reynolds_bouyancy_grid = corrected_fine_eps_grid/(viscosity_grid*N_squared_grid)
        corrected_bin_Reynolds_bouyancy_grid = corrected_bin_eps_grid/(bin_viscosity_grid*bin_N_squared_grid)

        #use self written function to get BBL
        results = thesis.find_bottom_and_bottom_currents(number_of_profiles,interp_pressure,pot_density_grid,oxygen_grid) #with a default density difference for the BBL of 0.01 kg/m^3
        bathymetrie,list_of_bathymetrie_indices = results[0]
        BBL,list_of_BBL_indices = results[1]
        BBL_range,list_of_BBL_range_indices = results[2]

          
          
        ##########################################################################################################################################################  
        shift_name = "-50"
        np.savez(\
        "/home/ole/windows/shifted_mss_data/"+shift_name+"/"+cruisename+"/"+transect_name ,\
        number_of_profiles = number_of_profiles, lat = lat,lon = lon,distance = distance, bathymetrie = bathymetrie,list_of_bathymetrie_indices = list_of_bathymetrie_indices, \
        BBL = BBL,list_of_BBL_indices = list_of_BBL_indices,BBL_range = BBL_range,list_of_BBL_range_indices = list_of_BBL_range_indices, \
        \
        interp_pressure = interp_pressure, fine_eps_grid = fine_eps_grid, corrected_fine_eps_grid = corrected_fine_eps_grid, salinity_grid = salinity_grid, \
        consv_temperature_grid = consv_temperature_grid, oxygen_grid = oxygen_grid, oxygen_sat_grid = oxygen_sat_grid, N_squared_grid = N_squared_grid, \