Commit c5c03866 authored by Espen Sollum's avatar Espen Sollum
Browse files

Basic files added for flexpart

parent c5094e69
......@@ -28,7 +28,8 @@ verbose: 1
logfile: pyvar.logtest
# Execution directory
workdir : /home/chimereges/aberchet/CIF_dummy_test/
#workdir : /home/eso/repos/CIF/test/
workdir : /home/eso/tmp/CIFtest
# Initial date
# Use the following compatible format for the date:
......@@ -58,7 +59,8 @@ mode:
name: forward
version: std
perturb_obsvect: True
obserror: 0.01
# obserror: 0.01
obserror: 0.25
#####################################################################
#####################################################################
......@@ -73,7 +75,7 @@ model :
version : std
# H matrix
fic_pg : /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
fic_pg : /home/eso/repos/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
#####################################################################
#####################################################################
......@@ -90,8 +92,10 @@ measurements :
version: std
# File where to save data, if does not exist. Reads from there if exists
fic_monitor : /home/chimereges/aberchet/CIF_dummy_test/monitor_reference.nc
fic_monitor : /home/eso/tmp/CIFtest/monitor_reference.nc
# fic_monitor : /home/eso/tmp/CIFtest/monitor_reference.csv
dump_type : nc
# dump_type : csv
species :
# List of tracers to include in the monitor file
# For each tracer observations, please specify:
......@@ -127,8 +131,10 @@ obsvect:
plugin:
name: standard
version: std
fic_obsvect : /home/chimereges/aberchet/CIF_dummy_test/monitor_reference.nc
fic_obsvect : /home/eso/tmp/CIFtest/monitor_reference.nc
# fic_obsvect : /home/eso/tmp/CIFtest/monitor_reference.csv
dump_type: nc
# dump_type: csv
#####################################################################
#####################################################################
......@@ -169,13 +175,13 @@ controlvect:
errtype : max
err : 1
period : '1D'
dir: /home/chimereges/aberchet/CIF_dummy_test/controlvect/
dir: /home/eso/tmp/CIFtest/controlvect/
fic: flx_real.txt
hcorrelations :
landsea: False
dump_hcorr : True
dircorrel : /home/chimereges/aberchet/CIF_dummy_test/controlvect/
sigma: 3000
dircorrel : /home/eso/tmp/CIFtest/controlvect/
sigma: 1000
tcorrelations :
sigma_t: 5
flx_text: 'CIF'
......@@ -207,8 +213,7 @@ meteo :
plugin :
name : dummy
version : csv
dirmeteo : /home/users/aberchet/CIF/data/dummy_gauss/
ficmeteo : meteo2.csv
resolution: '1H'
dirmeteo : /home/eso/repos/CIF/data/dummy_gauss/
ficmeteo : meteo.csv
#####################################################################
#####################################################################
......@@ -22,13 +22,13 @@
# Verbose level
# 1 = Basic information
# 2 = Debugging
verbose : 1
verbose : 2
# Log file (to be saved in $wordkir)
logfile: pyCIF.logtest
# Execution directory
workdir : /home/chimereges/aberchet/CIF_dummy_test_inv/
workdir : /home/eso/tmp/CIFtest
# Initial date
# Use the following compatible format for the date:
......@@ -76,7 +76,12 @@ model :
version : std
# H matrix
fic_pg : /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
fic_pg : /home/eso/repos/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
#####################################################################
#####################################################################
# Save H for later use in inversions
save_H: True
#####################################################################
#####################################################################
......@@ -90,7 +95,7 @@ obsvect:
plugin:
name: standard
version: std
fic_obsvect : /home/chimereges/aberchet//CIF_dummy_test/obsvect/monitor.nc
fic_obsvect : /home/eso/tmp/CIFtest/monitor_reference.nc
dump_type: nc
#####################################################################
#####################################################################
......@@ -162,12 +167,13 @@ controlvect:
errtype : avg
xb_value : 1
err : 1
period : '2D'
flx_text: ''
period : '1D'
dir: /home/eso/tmp/CIFtest/controlvect/
fic: flx_real.txt
hcorrelations :
landsea: False
dump_hcorr : True
dircorrel : /home/chimereges/aberchet/CIF_dummy_test_inv/
dircorrel : /home/eso/tmp/CIFtest/controlvect/
sigma: 1000
tcorrelations :
sigma_t: 200
......@@ -175,3 +181,32 @@ controlvect:
#####################################################################
#####################################################################
#####################################################################
# Domain definition
domain :
plugin :
name : dummy
version : std
xmin: 0
xmax: 25000
nlon: 30
ymin: 0
ymax: 20000
nlat: 15
#####################################################################
#####################################################################
#####################################################################
#####################################################################
# Meteo definition
meteo :
plugin :
name : dummy
version : csv
dirmeteo : /home/eso/repos/CIF/data/dummy_gauss/
ficmeteo : meteo.csv
#####################################################################
#####################################################################
......@@ -22,13 +22,14 @@
# Verbose level
# 1 = Basic information
# 2 = Debugging
verbose : 1
verbose : 2
# Log file (to be saved in $wordkir)
logfile: pyvar.logtest
# Execution directory
workdir : /home/chimereges/aberchet/CIF_dummy_test/
#workdir : /home/eso/repos/CIF/test/
workdir : /home/eso/tmp/CIFtest
# Initial date
# Use the following compatible format for the date:
......@@ -57,8 +58,8 @@ mode:
plugin:
name: post-proc
version: std
controlvect_fic: /home/chimereges/aberchet/CIF_dummy_test/controlvect_final.pickle
# controlvect_fic: /home/chimereges/aberchet/CIF_dummy_test/obsoperator/fwd_-001/controlvect.pickle
# controlvect_fic: /home/eso/tmp/CIF_dummy_test/controlvect_final.pickle
controlvect_fic: /home/eso/tmp/CIFtest/obsoperator/fwd_-001/controlvect.pickle
#####################################################################
#####################################################################
......@@ -73,7 +74,7 @@ model :
version : std
# H matrix
fic_pg : /home/users/aberchet/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
fic_pg : /home/eso/repos/CIF/model_sources/dummy_gauss/Pasquill-Gifford.txt
#####################################################################
#####################################################################
......@@ -90,7 +91,9 @@ measurements :
version: std
# File where to save data, if does not exist. Reads from there if exists
fic_monitor : /home/chimereges/aberchet/CIF_dummy_test/monitor_reference.nc
fic_monitor :
# /home/chimereges/aberchet/CIF_dummy_test/monitor_reference.nc
/home/eso/tmp/CIFtest/monitor_reference.nc
dump_type : nc
species :
# List of tracers to include in the monitor file
......@@ -134,7 +137,7 @@ obsvect:
plugin:
name: standard
version: std
fic_obsvect : /home/chimereges/aberchet/CIF_dummy_test/monitor_reference.nc
fic_obsvect : /home/eso/tmp/CIFtest/monitor_reference.nc
dump_type: nc
#####################################################################
#####################################################################
......@@ -175,12 +178,12 @@ controlvect:
errtype : max
err : 1
period : '1D'
dir: /home/chimereges/aberchet/CIF_dummy_test/controlvect/
dir: /home/eso/tmp/CIFtest/controlvect/
fic: flx_real.txt
hcorrelations :
landsea: False
dump_hcorr : True
dircorrel : /home/chimereges/aberchet/CIF_dummy_test/controlvect/
dircorrel : /home/eso/tmp/CIFtest/controlvect/
sigma: 100
tcorrelations :
sigma_t: 5
......@@ -214,7 +217,7 @@ meteo :
plugin :
name : dummy
version : csv
dirmeteo : /home/users/aberchet/CIF/data/dummy_gauss/
dirmeteo : /home/eso/repos/CIF/data/dummy_gauss/
ficmeteo : meteo.csv
#####################################################################
#####################################################################
......
......@@ -30,8 +30,7 @@ logfile: pyvar.logtest
# Execution directory
#workdir : /home/satellites13/msaunois/INVERSION/GCP_2018/run_00_18_inca_base_network/
#workdir : /home/satellites13/aberchet/msaunois/
workdir : /home/chimereges/aberchet/GCP_congrad_obs/
workdir : /home/eso/tmp/CIFtest/
# Initial date
# Use the following compatible format for the date:
......@@ -70,31 +69,7 @@ mode:
plugin:
name: 4dvar
version: std
minimizer:
plugin:
name: congrad
version: std
simulator:
plugin:
name: gausscost
version: std
reload_from_previous: True
maxiter: 20
epsg: 0.02
df1: 0.01
chi_min:
chi_max:
#mode:
# plugin:
# name: adj-tl_test
# version: std
# increments: 0.2
# incrmode: cst
# testspace: control
# reload_results: True
#####################################################################
#####################################################################
controlvect_fic: /home/eso/tmp/CIFtest/obsoperator/adj_0011/controlvect.pickle
#####################################################################
#####################################################################
......@@ -401,23 +376,18 @@ meteo:
##################
# Parameters below are not yet included in PYVAR
#
#
## surface geopotential file
#ficgeopot : null
#
## first guess path of the file if wanted
#prevanal: null
## LMDz precomputed (1) or not (0)
#precalc : 0
## perturb predefined prior/concentrations
#perturbdir : null
## seed for random number generation
#seed : 3
## diagnostics (0=none; 1=1D(time); 2=2D(lev,time); 3=4D(lat,lon,lev,time) )
#diag : 0
#
#
#
#
#
# surface geopotential file
ficgeopot : null
# first guess path of the file if wanted
prevanal: null
# LMDz precomputed (1) or not (0)
precalc : 0
# perturb predefined prior/concentrations
perturbdir : null
# seed for random number generation
seed : 3
# diagnostics (0=none; 1=1D(time); 2=2D(lev,time); 3=4D(lat,lon,lev,time) )
diag : 0
......@@ -23,11 +23,13 @@ L_BIBIO = -lbibio
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Option de compilation FORTRAN
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
OPTIMTRU90 = -cpp -O3 -DCPP_PARA -assume byterecl -r8 -DNC_DOUBLE -assume buffered_io #-check all -traceback
INCLUDE = -I$(LIBF)/grid -I$(LIBF)/bibio -I. -I$(LIBF)/dyn3d -I/usr/local/include -I$(LIBF)/phylmd -I${LOCAL_DIR}/libo -module $(LIBO) -I $(LIBO)
#OPTIMTRU90 = -cpp -O3 -DCPP_PARA -assume byterecl -r8 -DNC_DOUBLE -assume buffered_io #-check all -traceback
OPTIMTRU90 = -Wfatal-errors -cpp -O3 -DCPP_PARA -fdefault-real-8 -DNC_DOUBLE -fcray-pointer #-check all -traceback
INCLUDE = -I$(LIBF)/grid -I$(LIBF)/bibio -I. -I$(LIBF)/dyn3d -I/usr/local/include -I$(LIBF)/phylmd -I${LOCAL_DIR}/libo -J$(LIBO) -I$(LIBO)
F90 = mpif90
COMPTRU90 = $(F90) $(OPTIMTRU90) $(INCLUDE) -c
LINK = $(F90) -cpp -O -DCPP_PARA -DUSE_VT -align all -assume byterecl -r8 -DNC_DOUBLE -assume buffered_io -extend_source -I${LOCAL_DIR}/libo -module $(LIBO) -I $(LIBO)
#LINK = $(F90) -cpp -O -DCPP_PARA -DUSE_VT -align all -assume byterecl -r8 -DNC_DOUBLE -assume buffered_io -extend_source -I${LOCAL_DIR}/libo -module $(LIBO) -I $(LIBO)
LINK = $(F90) -cpp -O -DCPP_PARA -DUSE_VT -fdefault-real-8 -DNC_DOUBLE -I${LOCAL_DIR}/libo -J$(LIBO) -I$(LIBO)
AR = ar
#OPTION_LINK = -L/usr/local/lib -lnetcdff -lnetcdf -I/usr/local/include
OPTION_LINK = -lnetcdff -lnetcdf
......
......@@ -4,8 +4,10 @@
import lmdz
import chimere
import dummy
import flexpart
from pycif.utils.classes.models import Model
Model.register_plugin('LMDZ', 'std', lmdz)
Model.register_plugin('CHIMERE', 'std', chimere)
Model.register_plugin('FLEXPART', 'std', flexpart)
Model.register_plugin('dummy', 'std', dummy)
......@@ -238,6 +238,15 @@ class Plugin(object):
importlib.import_module(subclass[0], 'pycif.utils.classes'),
subclass[1])
@classmethod
def print_registered(cls):
"""Print all registered plugins.
"""
print cls.registered
@classmethod
def load_registered(cls, name, version, plg_type, plg_orig=None):
"""Get a sub-class instance of a registered plugin.
......
......@@ -63,7 +63,7 @@ class Setup(Plugin):
try:
with open(fic, 'r') as f:
config_dict = yaml.load(f)
config_dict = yaml.load(f, Loader=yaml.FullLoader)
config_dict['def_file'] = fic
......
......@@ -6,6 +6,7 @@ import pycif.utils.check as check
import xarray as xr
import os
import numpy as np
import pdb
def dump_datastore(datastore,
......@@ -160,6 +161,11 @@ def read_datastore(fic_monitor,
#df.index = df.index.to_frame()['index']
setattr(df, 'nc_attributes', ds.attrs)
# df.index = df.index.to_frame()['index']
# pdb.set_trace()
# setattr(df, 'nc_attributes', ds.attrs)
# df.loc[:,'nc_attributes'] = ds.attrs
elif dump_type == 'csv':
# Reading the file by chunks in case it is a very big file
df = pd.concat(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment