Ignore:
Timestamp:
12/08/17 15:08:49 (6 years ago)
Author:
dubos
Message:

devel : introduced kernels for caldyn_vert (optional)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/unstructured/caldyn_unstructured.F90

    r615 r624  
    22  USE ISO_C_BINDING 
    33  USE OMP_LIB 
     4#ifdef CPP_USING_XIOS 
    45  USE xios 
     6#endif 
    57  IMPLICIT NONE 
    68  PRIVATE 
    79  SAVE 
    810 
    9 #define BINDC(thename) BIND(C, name='dynamico_' // #thename) 
     11#define BINDC_(thename) BIND(C, name=#thename) 
     12#define BINDC(thename) BINDC_(dynamico_ ## thename) 
    1013! 
    1114#define DBL REAL(C_DOUBLE) 
     
    1518#define INDEX INTEGER(C_INT) 
    1619#define PHI_BOT(ij) Phi_bot 
    17 #define PHI_BOT_VAR 0.d0 
    18 ! 
    19   INTEGER, PARAMETER :: eta_mass=1, eta_lag=2, thermo_theta=1, thermo_entropy=2, thermo_moist=3, thermo_boussinesq=4 
    20   INTEGER(C_INT),  BIND(C) :: caldyn_thermo=thermo_theta, caldyn_eta=eta_lag, nb_threads=1 
     20#define PHI_BOT_VAR 0. 
     21! 
     22  INTEGER, PARAMETER :: eta_mass=1, eta_lag=2, & 
     23       thermo_theta=1, thermo_entropy=2, thermo_moist=3, thermo_boussinesq=4, & 
     24       caldyn_vert_cons=1 
     25  INTEGER(C_INT),  BIND(C) :: caldyn_thermo=thermo_theta, caldyn_eta=eta_lag, & 
     26       caldyn_vert_variant=caldyn_vert_cons, nb_threads=1 
    2127  LOGICAL(C_BOOL), BIND(C) :: hydrostatic=.TRUE., debug_hevi_solver=.TRUE., rigid=.TRUE. 
    2228! 
     
    4046! 
    4147  INTEGER(C_INT), BIND(C) :: comm_icosa 
     48 
     49#ifdef CPP_USING_XIOS 
    4250  TYPE(xios_context) :: ctx_hdl 
     51#endif 
    4352 
    4453CONTAINS 
     
    199208  DOUBLE2(llm+1, edge_num) :: wwuu 
    200209  DECLARE_INDICES 
     210  DBL :: dF_deta, dFu_deta 
    201211  wwuu=0. 
     212#include "../kernels_unst/caldyn_wflux.k90" 
     213#include "../kernels_unst/caldyn_dmass.k90" 
    202214#include "../kernels_unst/caldyn_vert.k90" 
    203215END SUBROUTINE caldyn_vert 
     
    392404!---------------------------------------------- XIOS ----------------------------------------- 
    393405 
     406#ifdef CPP_USING_XIOS 
     407 
    394408  SUBROUTINE setup_xios() BINDC(setup_xios) 
    395409    ! MPI_INIT / MPI_finalize are assumed to be called BEFORE/AFTER this routine 
     
    443457  END SUBROUTINE call_xios_update_calendar 
    444458 
     459#endif 
     460 
    445461END MODULE caldyn_unstructured_mod 
Note: See TracChangeset for help on using the changeset viewer.