Code Monkey home page Code Monkey logo

genbe_2.0's Introduction

#########################################################################
#
# GEN_BE Version 2.0
# Author: Gael DESCOMBES, NCAR/MMM June, 2014
# contact [email protected] 
#########################################################################

#------------------------------------------------------------------------
# 1.0 Configuration/Compilation
#------------------------------------------------------------------------

Source codes are in the directories:
- code/src: stage[0,1,2,3,4].F , gen_be_nc2gsi.F
- code/external: Useful modules and libraries
- code/scripts: Scripts to run the different components of GEN_BE.
                The gen_be_wrapper.ksh script and namelist_template need to be 
                filled out for specific applications.
                The script gen_be_set_defaults.ksh contains all the default options
- code/arch contains configuration options for compilation 

command 0: clean
command 1: configure (compilers)
command 2: compile gen_be
The executables are located in the code/src directory

#------------------------------------------------------------------------
# 2.0 How to run it?
#------------------------------------------------------------------------

The user needs to successively set stages 0, 1, 2, 3, and 4 in 
the gen_be_wrapper.ksh script to true:

export RUN_GEN_BE_STAGE0=true  # Run stage 0 (creates perturbation files).
export RUN_GEN_BE_STAGE1=false # Run stage 1 (removes mean, split variables).
export RUN_GEN_BE_STAGE2=false # Run stage 2 (applies balance operator).
export RUN_GEN_BE_STAGE3=false # Run stage 3 (calculates vertical correlation parameters).
export RUN_GEN_BE_STAGE4=false # Run stage 4 (calculates horizontal length scales).

Once the 4 stages are completed, the command export RUN_GEN_BE_DIAGS=true   
will generate the be.nc file (NetCDF) that gathers all the parameters 
that model BE. 

All the results are contained in the working directory (WORK_DIR).
(e.g. to the gen_be_wrapper.ksh for more details)

A converter for GSI application is available:
gen_be_nc2gsi.F
It will convert the be.nc file to a binary input file readable by GSI.

#-----------------------------------------------------------------------
# 3.0 Description of the test cases
#-----------------------------------------------------------------------

The 50 members of the ensemble forecast used for the test cases can be 
provided at request as well for the results ([email protected]). 

3.1. Benchmark

a. The test case Beof can be generated by using the namelist.input
and the option data_on_levels=.false. using CV5 (psi, chi, t, ps, rh)
located inside the benchmark directory.

b. The test case Brcf is generated by using the namelist.input
and the option data_on_levels=.true. using CV5 (psi, chi, t, ps, rh)
located inside the benchmark directory.


3.2. Evaluation of hydrometeor parameters (cloud, ice, rain, snow) 
Tests have been done according to the number of members 05, 10, 50,
located inside the hydrometeors/univariate directory.


3.3. Multivariate approach
Hydrometeor (cloud, ice) mixing ratios are correlated with relative 
humidity errors located inside the hydrometeors/multivariate directory. 


genbe_2.0's People

Contributors

liujake avatar mkavulich avatar syha avatar weisunncar avatar xinzhang8noaa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

genbe_2.0's Issues

Open file repeatedly in gen_be_stage4.exe

When use_global_bin=.true. and num_bins2d .gt. 1, the lines 560 to 562

                 filename = 'sl_print.b'//ci//'.'//trim(variable)
                 open( unit=ounit, file=trim(filename), form='formatted', &
                 action='write', access='sequential', status='replace')

will be executed. In lines 507-509, there are the same codes as above, and there is not a close statement between them, which means the file filename will be opened more than once. This may cause an error in some compiler, such as ifort 17.0.5. According to the context, the code from lines 560 to 562 may be able to be deleted.

Illegal memory access when running gen_be_stage0.exe

When I rans the gen_be_stage3.exe, it threw me an error. And I backtracked to the subroutine read_input_state in external/tools/io_input.f90. In the line 181:

      call io_input_field_time(input_obj, state % date)

the second argument should be type(field3dReal/field2dReal/field1dReal). However, the input argument here is character (len=10) :: date. This may cause illegal memory access in some compilers (my compiler is ifort 17.0.5).

question: filter in laplacian

There is Is the purpose of the conditional below computational efficiency?

There is a conditional test that prevents the calculation of var_bin_field, var_bin_lap_field, var_field, and var_lap_field when the lap_field_2d is small.

if ( lap_field_2d(i,j) .gt. 1e-13 ) then

if ( lap_field_2d(i,j) .gt. 1e-13 ) then

Based on testing, I don't think this conditional filter is good for chemical (e.g., no2) calculations. When I remove the filter, the results look much more reasonable.

ls_method = 1 bugs

ls_method = 1 does not appear to be operational. There are two major bugs that occur when using ls_method = 1 with correl or covar and gauss

  1. arrays used within loop are deallocated after the first bin. This causes a segmentation fault.

deallocate (field_2d)

deallocate (cov)

deallocate (cor)

deallocate (mean)

deallocate (var)

  1. cov is passed directly to get_covariance_masked rather than passing as cov(b, :). It is not clear what the effect would be

Also, ls_method = 1 appears to only work with single level variables. Is this as intended?

I am pursuing ls_method = 1 instead of 2 because I am getting surprising results and wanted to explore other options.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.