module_mp_tempo_ml Module

neural network module designed for cloud droplet number concentration prediction

inspired by work from David John Gagne (NCAR)


Uses

  • module~~module_mp_tempo_ml~~UsesGraph module~module_mp_tempo_ml module_mp_tempo_ml module~module_mp_tempo_params module_mp_tempo_params module~module_mp_tempo_ml->module~module_mp_tempo_params ccpp_kind_types ccpp_kind_types module~module_mp_tempo_params->ccpp_kind_types iso_fortran_env iso_fortran_env module~module_mp_tempo_params->iso_fortran_env module~machine machine module~module_mp_tempo_params->module~machine mpas_kind_types mpas_kind_types module~module_mp_tempo_params->mpas_kind_types

Used by

  • module~~module_mp_tempo_ml~~UsedByGraph module~module_mp_tempo_ml module_mp_tempo_ml module~module_mp_tempo_driver module_mp_tempo_driver module~module_mp_tempo_driver->module~module_mp_tempo_ml module~module_mp_tempo_main module_mp_tempo_main module~module_mp_tempo_driver->module~module_mp_tempo_main module~module_mp_tempo_main->module~module_mp_tempo_ml module~tests tests module~tests->module~module_mp_tempo_driver program~run_tempo_tests run_tempo_tests program~run_tempo_tests->module~tests

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: nc_ml_input = 7
integer, public, parameter :: nc_ml_nodes = 24
integer, public, parameter :: nc_ml_output = 1
real(kind=wp), public, parameter, dimension(nc_ml_input) :: nc_ml_trans_mean = [0.000191556196486247_wp, 3.58145042772654e-05_wp, 3.12611085359273e-07_wp, 5.74303078738579e-05_wp, 84191.2092225319_wp, 279.070551773565_wp, 0.123679354084004_wp]
real(kind=wp), public, parameter, dimension(nc_ml_input) :: nc_ml_trans_var = [5.78143564171777e-08_wp, 3.22834309750552e-08_wp, 6.45745893307455e-11_wp, 4.16625579383794e-08_wp, 215694631.771185_wp, 94.6576255386858_wp, 0.384841247662964_wp]
real(kind=wp), public, parameter, dimension(nc_ml_input * nc_ml_nodes) :: nc_ml_w00 = [-2.006957_wp, -0.2812008_wp, -0.339073_wp, 1.596426_wp, 2.395225_wp, 1.76315_wp, -0.0626798_wp, 1.267002_wp, -0.02234177_wp, -6.522605e-33_wp, 0.4792154_wp, -0.1253034_wp, -3.217191_wp, -3.092887_wp, -0.0863651_wp, 1.071625_wp, 0.09741028_wp, 0.2255831_wp, -0.6929023_wp, -0.02693799_wp, -3.432344e-33_wp, -0.8791879_wp, -0.9359049_wp, 1.083484_wp, -0.07909214_wp, -0.0122418_wp, -0.02815927_wp, 0.1676407_wp, 0.08252326_wp, 0.6697816_wp, -0.4019359_wp, 0.4687141_wp, 0.001813132_wp, -9.792186e-33_wp, 0.0409322_wp, 0.0113192_wp, -0.01354596_wp, 0.00307771_wp, -0.4635534_wp, 0.03835761_wp, -0.1015553_wp, 0.7316446_wp, -0.05791711_wp, -0.0002690362_wp, -7.920147e-33_wp, -0.1216918_wp, -0.3190572_wp, 0.09809405_wp, -0.16476_wp, -0.03387314_wp, 0.005422261_wp, 0.04043967_wp, 0.03901243_wp, 0.07444729_wp, 0.01954299_wp, 0.06918761_wp, 0.04823543_wp, -8.637957e-33_wp, 0.06371575_wp, -0.09250915_wp, -1.109653_wp, -1.373999_wp, -0.2412623_wp, -0.04482195_wp, 0.1584691_wp, 0.06353725_wp, 0.0006248798_wp, 0.04593191_wp, -8.878673e-33_wp, -0.4988684_wp, 0.01110262_wp, 0.04623203_wp, 0.006581791_wp, 0.03536217_wp, -0.1890567_wp, -0.08839592_wp, 0.1327181_wp, 0.03478973_wp, -0.1565902_wp, -0.100401_wp, -0.1179777_wp, -8.879818e-33_wp, -0.1383738_wp, 0.02847495_wp, -0.005902881_wp, 0.005615512_wp, -0.6308192_wp, -0.02431803_wp, -0.141971_wp, -0.3490018_wp, -0.9850957_wp, -0.1449479_wp, -8.059166e-33_wp, -0.1186465_wp, -1.165381_wp, 0.069015_wp, 0.003388841_wp, -0.04041302_wp, 0.1638467_wp, 0.1147008_wp, -0.04833491_wp, -0.07755993_wp, -0.5137688_wp, 0.04546477_wp, 0.04101883_wp, 6.752353e-33_wp, 0.3541977_wp, 0.04880851_wp, -0.00102834_wp, -0.01280629_wp, -0.1116254_wp, -0.02204754_wp, 0.07100908_wp, 0.2354002_wp, 0.07129629_wp, 0.2489657_wp, 8.080785e-33_wp, -0.03449865_wp, 0.06037927_wp, -0.02023619_wp, 0.7779589_wp, 0.04680278_wp, 0.7492616_wp, 0.6545208_wp, -1.09497_wp, -1.176524_wp, -0.451585_wp, 0.881124_wp, -0.4551499_wp, -8.708624e-33_wp, 1.006558_wp, -0.04979523_wp, -0.0006915367_wp, -0.002993054_wp, 0.01654614_wp, -0.07141764_wp, -0.2216591_wp, 0.8637336_wp, 0.8358089_wp, -0.7576646_wp, 8.186339e-33_wp, 0.1161914_wp, 0.7121871_wp, -1.146734_wp, 0.03925339_wp, 0.9975697_wp, -0.06953461_wp, -0.07598846_wp, -0.06418022_wp, -0.01897495_wp, -0.03612464_wp, -0.06703389_wp, -0.103049_wp, 9.364858e-33_wp, -0.03949085_wp, 1.005938_wp, 0.0001625419_wp, -0.01027657_wp, 0.03823901_wp, 0.3197246_wp, -0.1160718_wp, 0.04449431_wp, 0.009831783_wp, 0.6551342_wp, -8.470687e-33_wp, 0.1374123_wp, -0.01782138_wp, 0.01719949_wp]
real(kind=wp), public, parameter, dimension(nc_ml_nodes) :: nc_ml_w01 = [-4.045869_wp, 0.558111_wp, -1.567351_wp, -1.64972_wp, 2.748608_wp, -1.909901_wp, 0.3955558_wp, 1.507247_wp, 0.3599722_wp, -0.0001173223_wp, -0.9398569_wp, -0.6867028_wp, -61.72853_wp, -63.13766_wp, 1.165811_wp, -0.6848684_wp, 0.1931683_wp, 1.1208_wp, 2.63087_wp, 0.740169_wp, -21.62499_wp, 1.545568_wp, 3.575141_wp, -1.299604_wp]
real(kind=wp), public, parameter, dimension(nc_ml_nodes) :: nc_ml_b00 = [-0.9842531_wp, 0.3064759_wp, -0.4500185_wp, 1.28336_wp, 1.384105_wp, 0.528031_wp, 0.8453538_wp, 1.579872_wp, 2.245679_wp, -0.008679952_wp, 0.4549862_wp, -0.136581_wp, -2.576741_wp, -2.483647_wp, -0.2089484_wp, 0.7607977_wp, 1.847745_wp, 0.7316047_wp, -0.287945_wp, 2.227298_wp, -2.314714_wp, -0.2561245_wp, -0.6993448_wp, -0.1359731_wp]
real(kind=wp), public, parameter, dimension(nc_ml_output) :: nc_ml_b01 = [1.572826_wp]

Derived Types

type, public ::  ty_tempo_ml_data

Components

Type Visibility Attributes Name Initial
integer, public :: input_size
integer, public :: output_size
integer, public :: node_size
real(kind=wp), public, dimension(:), allocatable :: transform_mean
real(kind=wp), public, dimension(:), allocatable :: transform_var
real(kind=wp), public, dimension(:,:), allocatable :: weights00
real(kind=wp), public, dimension(:), allocatable :: bias00
real(kind=wp), public, dimension(:,:), allocatable :: weights01
real(kind=wp), public, dimension(:), allocatable :: bias01

Subroutines

public subroutine save_or_read_ml_data(ml_data_in, ml_data_out)

initializes and saves or returns neural network information

Arguments

Type IntentOptional Attributes Name
type(ty_tempo_ml_data), intent(in), optional, dimension(1) :: ml_data_in
type(ty_tempo_ml_data), intent(out), optional, dimension(1) :: ml_data_out

public subroutine tempo_ml_predict_cloud_number(qc, qr, qi, qs, pres, temp, w, predicted_number)

predicts number concentration

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: qc
real(kind=wp), intent(in), dimension(:) :: qr
real(kind=wp), intent(in), dimension(:) :: qi
real(kind=wp), intent(in), dimension(:) :: qs
real(kind=wp), intent(in), dimension(:) :: pres
real(kind=wp), intent(in), dimension(:) :: temp
real(kind=wp), intent(in), dimension(:) :: w
real(kind=wp), intent(inout), dimension(:) :: predicted_number

private subroutine standard_scaler_transform(mean, var, raw_data, transformed_data)

standard scaler tranformer

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:) :: mean
real(kind=wp), intent(in), dimension(:) :: var
real(kind=wp), intent(in), dimension(:,:) :: raw_data
real(kind=wp), intent(out), dimension(:,:), allocatable :: transformed_data

private subroutine relu_activation(input, output)

relu activation function

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(:,:) :: input
real(kind=wp), intent(out), dimension(:,:), allocatable :: output